r58927 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58926‎ | r58927 | r58928 >
Date:20:29, 11 November 2009
Author:catrope
Status:deferred
Tags:
Comment:
usability: Merge r58926 (double line in toolbar fix) to acaifix
Modified paths:
  • /branches/usability/acaifix (modified) (history)
  • /branches/usability/acaifix/EditToolbar/EditToolbar.js (modified) (history)
  • /branches/usability/acaifix/OptIn/SpecialOptIn.php (modified) (history)
  • /branches/usability/acaifix/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/usability/acaifix/js/plugins.combined.js (modified) (history)
  • /branches/usability/acaifix/js/plugins.combined.min.js (modified) (history)
  • /branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Property changes on: branches/usability/acaifix/OptIn/SpecialOptIn.php
___________________________________________________________________
Name: svn:mergeinfo
11 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php:51646
/trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php:56151-57234,57956
/trunk/phase3/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
22 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php:51646
/trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php:56151-57234,57956,58926
/trunk/phase3/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
Index: branches/usability/acaifix/UsabilityInitiative.hooks.php
@@ -67,15 +67,15 @@
6868 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ),
6969 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 17 ),
7070 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 12 ),
71 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 19 ),
 71+ array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 20 ),
7272 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 8 ),
7373 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 27 ),
7474 ),
7575 'combined' => array(
76 - array( 'src' => 'js/plugins.combined.js', 'version' => 61 ),
 76+ array( 'src' => 'js/plugins.combined.js', 'version' => 62 ),
7777 ),
7878 'minified' => array(
79 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 61 ),
 79+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 62 ),
8080 ),
8181 ),
8282 );
Property changes on: branches/usability/acaifix/EditToolbar/EditToolbar.js
___________________________________________________________________
Name: svn:mergeinfo
8383 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:51646
/trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56151-57234
/trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js:58873,58923
/trunk/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
8484 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:51646
/trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56151-57234,58926
/trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js:58873,58923
/trunk/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
Index: branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js
@@ -251,12 +251,18 @@
252252 if ( label ) {
253253 $group.append( '<div class="label">' + label + '</div>' )
254254 }
 255+
 256+ var empty = true;
255257 if ( 'tools' in group ) {
256258 for ( tool in group.tools ) {
257 - $group.append( $.wikiEditor.modules.toolbar.fn.buildTool( context, tool, group.tools[tool] ) );
 259+ var tool = $.wikiEditor.modules.toolbar.fn.buildTool( context, tool, group.tools[tool] );
 260+ if ( tool ) {
 261+ empty = false;
 262+ $group.append( tool );
 263+ }
258264 }
259265 }
260 - return $group;
 266+ return empty ? null : $group;
261267 },
262268 buildTool : function( context, id, tool ) {
263269 if ( 'filters' in tool ) {
Property changes on: branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js
___________________________________________________________________
Name: svn:mergeinfo
264270 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:51646
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56151-57234,57443,58923
/trunk/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
265271 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:51646
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56151-57234,57443,58923,58926
/trunk/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
Index: branches/usability/acaifix/js/plugins.combined.js
@@ -1783,12 +1783,18 @@
17841784 if ( label ) {
17851785 $group.append( '<div class="label">' + label + '</div>' )
17861786 }
 1787+
 1788+ var empty = true;
17871789 if ( 'tools' in group ) {
17881790 for ( tool in group.tools ) {
1789 - $group.append( $.wikiEditor.modules.toolbar.fn.buildTool( context, tool, group.tools[tool] ) );
 1791+ var tool = $.wikiEditor.modules.toolbar.fn.buildTool( context, tool, group.tools[tool] );
 1792+ if ( tool ) {
 1793+ empty = false;
 1794+ $group.append( tool );
 1795+ }
17901796 }
17911797 }
1792 - return $group;
 1798+ return empty ? null : $group;
17931799 },
17941800 buildTool : function( context, id, tool ) {
17951801 if ( 'filters' in tool ) {
Index: branches/usability/acaifix/js/plugins.combined.min.js
@@ -114,8 +114,8 @@
115115 if('regex'in action.options&&'regexReplace'in action.options){var selection=context.$textarea.getSelection();if(selection!=''&&selection.match(action.options.regex)){parts.peri=selection.replace(action.options.regex,action.options.regexReplace);parts.pre=parts.post='';}}
116116 context.$textarea.encapsulateSelection(parts.pre,parts.peri,parts.post,action.options.ownline,action.type=='replace');break;case'callback':if(typeof action.execute=='function'){action.execute(context);}
117117 break;case'dialog':context.$textarea.wikiEditor('openDialog',{'dialog':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>')}
118 -if('tools'in group){for(tool in group.tools){$group.append($.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]));}}
119 -return $group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}}
 118+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);}}}
 119+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;}}}
120120 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;}
121121 $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;});}
122122 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));}}
Property changes on: branches/usability/acaifix
___________________________________________________________________
Name: svn:mergeinfo
123123 - /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646
/trunk/extensions/UsabilityInitiative:56151-57234
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
124124 + /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646
/trunk/extensions/UsabilityInitiative:56151-57234,58926
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58926UsabilityInitiative: Toolbar: Don't add empty sections resulting in a double ...catrope20:26, 11 November 2009

Status & tagging log