r64452 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64451‎ | r64452 | r64453 >
Date:19:30, 31 March 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixed tooltips missing on sprited tools.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -74,7 +74,7 @@
7575 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 30 ),
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 179 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 52 ),
78 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 54 ),
 78+ array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 55 ),
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 23 ),
8080 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ),
8181 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 372 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 373 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 372 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 373 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -312,9 +312,14 @@
313313 if ( 'offset' in tool ) {
314314 var offset = $.wikiEditor.autoLang( tool.offset );
315315 $button = $( '<a href="#" />' )
 316+ .attr( {
 317+ 'alt' : label,
 318+ 'title' : label,
 319+ 'rel' : id,
 320+ 'class' : 'wikiEditor-toolbar-spritedButton'
 321+ } )
316322 .text( label )
317323 .click( function() { return false; } )
318 - .addClass( 'wikiEditor-toolbar-spritedButton' )
319324 .css( 'backgroundPosition', offset[0] + 'px ' + offset[1] + 'px' );
320325 } else {
321326 $button = $( '<img />' )
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -11134,9 +11134,14 @@
1113511135 if ( 'offset' in tool ) {
1113611136 var offset = $.wikiEditor.autoLang( tool.offset );
1113711137 $button = $( '<a href="#" />' )
 11138+ .attr( {
 11139+ 'alt' : label,
 11140+ 'title' : label,
 11141+ 'rel' : id,
 11142+ 'class' : 'wikiEditor-toolbar-spritedButton'
 11143+ } )
1113811144 .text( label )
1113911145 .click( function() { return false; } )
11140 - .addClass( 'wikiEditor-toolbar-spritedButton' )
1114111146 .css( 'backgroundPosition', offset[0] + 'px ' + offset[1] + 'px' );
1114211147 } else {
1114311148 $button = $( '<img />' )
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -762,7 +762,7 @@
763763 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=empty&&tool.css('display')=='none';$group.append(tool);}}}
764764 if(empty){$group.hide();}
765765 return $group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}}
766 -var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=$.wikiEditor.autoIcon(tool.icon,$.wikiEditor.imgPath+'toolbar/');var $button;if('offset'in tool){var offset=$.wikiEditor.autoLang(tool.offset);$button=$('<a href="#" />').text(label).click(function(){return false;}).addClass('wikiEditor-toolbar-spritedButton').css('backgroundPosition',offset[0]+'px '+offset[1]+'px');}else{$button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-button'});}
 766+var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=$.wikiEditor.autoIcon(tool.icon,$.wikiEditor.imgPath+'toolbar/');var $button;if('offset'in tool){var offset=$.wikiEditor.autoLang(tool.offset);$button=$('<a href="#" />').attr({'alt':label,'title':label,'rel':id,'class':'wikiEditor-toolbar-spritedButton'}).text(label).click(function(){return false;}).css('backgroundPosition',offset[0]+'px '+offset[1]+'px');}else{$button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-button'});}
767767 if('action'in tool){$button.data('action',tool.action).data('context',context).mousedown(function(e){e.preventDefault();return false;}).click(function(e){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'),$(this));e.preventDefault();return false;});if(tool.action.type=='dialog'&&!(tool.action.module in $.wikiEditor.modules.dialogs.modules)){$button.hide();context.$textarea.bind('wikiEditor-dialogs-loaded-'+tool.action.module,{button:$button},function(event){event.data.button.show().parent().show();});}}
768768 return $button;case'select':var $select=$('<div />').attr({'rel':id,'class':'tool tool-select'});var $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).mousedown(function(e){e.preventDefault();return false;}).click(function(e){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'),$(this));if($(this).parent().is(':visible')){$(this).parent().animate({'opacity':'toggle'},'fast');}
769769 e.preventDefault();return false;}).text(optionLabel).addClass('option').attr({'rel':option,'href':'#'}));}}

Status & tagging log