MDL-40759 fontawesome: Fix section highlighting
The section highlighting code was re-written in parallel to font-awesome - so we need to apply the same font-awesome tweaks here now.
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -355,15 +355,22 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
|
||||
*/
|
||||
var replaceActionItem = function(actionitem, image, stringname,
|
||||
stringcomponent, titlestr, titlecomponent, newaction) {
|
||||
actionitem.find('img').attr('src', url.imageUrl(image, 'core'));
|
||||
|
||||
str.get_string(stringname, stringcomponent).done(function(newstring) {
|
||||
actionitem.find('span.menu-action-text').html(newstring);
|
||||
actionitem.attr('title', newstring);
|
||||
});
|
||||
if (titlestr) {
|
||||
str.get_string(titlestr, titlecomponent).done(function(newtitle) {
|
||||
str.get_string(titlestr, titlecomponent).then(function(newtitle) {
|
||||
templates.renderPix(image, 'core', newtitle).then(function(html) {
|
||||
actionitem.find('.icon').replaceWith(html);
|
||||
});
|
||||
actionitem.attr('title', newtitle);
|
||||
});
|
||||
} else {
|
||||
templates.renderPix(image, 'core', '').then(function(html) {
|
||||
actionitem.find('.icon').replaceWith(html);
|
||||
});
|
||||
}
|
||||
actionitem.attr('data-action', newaction);
|
||||
};
|
||||
@@ -591,4 +598,4 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
|
||||
replaceActionItem(actionitem, image, stringname, stringcomponent, titlestr, titlecomponent, newaction);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user