Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -71,16 +71,16 @@ |
72 | 72 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 20 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 17 ), |
75 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 31 ), |
| 75 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 32 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 9 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 38 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 3 ), |
79 | 79 | ), |
80 | 80 | 'combined' => array( |
81 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 81 ), |
| 81 | + array( 'src' => 'js/plugins.combined.js', 'version' => 82 ), |
82 | 82 | ), |
83 | 83 | 'minified' => array( |
84 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 81 ), |
| 84 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 82 ), |
85 | 85 | ), |
86 | 86 | ), |
87 | 87 | ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php |
— | — | @@ -28,6 +28,9 @@ |
29 | 29 | |
30 | 30 | /* Setup */ |
31 | 31 | |
| 32 | +// Bump this each time you change an icon without renaming it |
| 33 | +$wgWikiEditorIconVersion = 0; |
| 34 | + |
32 | 35 | // Credits |
33 | 36 | $wgExtensionCredits['other'][] = array( |
34 | 37 | 'path' => __FILE__, |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -25,6 +25,11 @@ |
26 | 26 | ), |
27 | 27 | ); |
28 | 28 | static $modules = array( |
| 29 | + 'global' => array( |
| 30 | + 'variables' => array( |
| 31 | + 'wgWikiEditorIconVersion', |
| 32 | + ), |
| 33 | + ), |
29 | 34 | 'highlight' => array( |
30 | 35 | 'i18n' => 'WikiEditorHighlight', |
31 | 36 | 'preferences' => array( |
— | — | @@ -307,17 +312,19 @@ |
308 | 313 | |
309 | 314 | // Modules |
310 | 315 | $preferences = array(); |
311 | | - foreach ( $wgWikiEditorModules as $module => $enable ) { |
| 316 | + $modules = $wgWikiEditorModules; |
| 317 | + $modules['global'] = true; |
| 318 | + foreach ( $modules as $module => $enable ) { |
312 | 319 | if ( |
313 | 320 | $enable['global'] || ( |
314 | 321 | $enable['user'] |
315 | 322 | && isset( self::$modules[$module]['preferences']['enable'] ) |
316 | 323 | && $wgUser->getOption( self::$modules[$module]['preferences']['enable']['key'] ) |
317 | | - ) |
| 324 | + ) || $module == 'global' |
318 | 325 | ) { |
319 | 326 | UsabilityInitiativeHooks::initialize(); |
320 | 327 | // Messages |
321 | | - if ( isset( self::$modules[$module]['i18n'], self::$modules[$module]['messages'] ) ) { |
| 328 | + if ( isset( self::$modules[$module]['i18n'], self::$modules[$module]['messages'] ) ) { |
322 | 329 | wfLoadExtensionMessages( self::$modules[$module]['i18n'] ); |
323 | 330 | UsabilityInitiativeHooks::addMessages( self::$modules[$module]['messages'] ); |
324 | 331 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -274,7 +274,7 @@ |
275 | 275 | var label = $.wikiEditor.autoMsg( tool, 'label' ); |
276 | 276 | switch ( tool.type ) { |
277 | 277 | case 'button': |
278 | | - var src = tool.icon; |
| 278 | + var src = tool.icon + '?' + wgWikiEditorIconVersion; |
279 | 279 | if ( src.indexOf( 'http://' ) !== 0 && src.indexOf( 'https://' ) !== 0 ) { |
280 | 280 | src = $.wikiEditor.imgPath + 'toolbar/' + src; |
281 | 281 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -2186,7 +2186,7 @@ |
2187 | 2187 | var label = $.wikiEditor.autoMsg( tool, 'label' ); |
2188 | 2188 | switch ( tool.type ) { |
2189 | 2189 | case 'button': |
2190 | | - var src = tool.icon; |
| 2190 | + var src = tool.icon + '?' + wgWikiEditorIconVersion; |
2191 | 2191 | if ( src.indexOf( 'http://' ) !== 0 && src.indexOf( 'https://' ) !== 0 ) { |
2192 | 2192 | src = $.wikiEditor.imgPath + 'toolbar/' + src; |
2193 | 2193 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | break;case'dialog':context.$textarea.wikiEditor('openDialog',action.module);break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')} |
132 | 132 | var empty=true;if('tools'in group){for(tool in group.tools){var tool=$.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]);if(tool){empty=false;$group.append(tool);}}} |
133 | 133 | return empty?null:$group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}} |
134 | | -var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=tool.icon;if(src.indexOf('http://')!==0&&src.indexOf('https://')!==0){src=$.wikiEditor.imgPath+'toolbar/'+src;} |
| 134 | +var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=tool.icon+'?'+wgWikiEditorIconVersion;if(src.indexOf('http://')!==0&&src.indexOf('https://')!==0){src=$.wikiEditor.imgPath+'toolbar/'+src;} |
135 | 135 | $button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-button'});if('action'in tool){$button.data('action',tool.action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'),$(this));return false;});} |
136 | 136 | return $button;case'select':var $select=$('<div />').attr({'rel':id,'class':'tool tool-select'}).click(function(){var $options=$(this).find('.options');$options.animate({'opacity':'toggle'},'fast');});$options=$('<div />').addClass('options');if('list'in tool){for(option in tool.list){var optionLabel=$.wikiEditor.autoMsg(tool.list[option],'label');$options.append($('<a />').data('action',tool.list[option].action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'),$(this));}).text(optionLabel).addClass('option').attr('rel',option));}} |
137 | 137 | $select.append($('<div />').addClass('menu').append($options));$select.append($('<div />').addClass('label').text(label));return $select;default:return null;}},buildBookmark:function(context,id,page){var label=$.wikiEditor.autoMsg(page,'label');return $('<div />').text(label).attr('rel',id).data('context',context).bind('mousedown',function(){$(this).parent().parent().find('.page').hide();$(this).parent().parent().find('.page-'+$(this).attr('rel')).show();$(this).siblings().removeClass('current');$(this).addClass('current');var section=$(this).parent().parent().attr('rel');if($.trackAction!=undefined){$.trackAction(section+'.'+$(this).attr('rel'));} |