Adapt toolbar icon change to change 19789d76 in WikiEditor

Bug: T125201
Change-Id: I58c1d246d3fbb8031e3be482f349a0538c44152c
This commit is contained in:
Fomafix 2016-01-29 11:07:47 +00:00 committed by [[mw:User:Fomafix]]
parent 127cec0d8d
commit d4a5b7eddf

View file

@ -280,9 +280,9 @@
$( '.group-codeeditor-main' ).prependTo( '.section-main' ); $( '.group-codeeditor-main' ).prependTo( '.section-main' );
}, },
updateButtonIcon: function ( targetName, iconFn ) { updateButtonIcon: function ( targetName, iconFn ) {
var target = 'img.tool[rel=' + targetName + ']', var target = '.tool[rel=' + targetName + ']',
$img = context.modules.toolbar.$toolbar.find( target ); $icon = context.modules.toolbar.$toolbar.find( target );
$img.attr( 'src', iconFn() ); $icon.css( 'background-image', 'url(' + iconFn() + ')' );
}, },
updateCodeEditorToolbarButton: function () { updateCodeEditorToolbarButton: function () {
context.fn.updateButtonIcon( 'codeEditor', context.fn.codeEditorToolbarIcon ); context.fn.updateButtonIcon( 'codeEditor', context.fn.codeEditorToolbarIcon );