Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -67,10 +67,10 @@ |
68 | 68 | array( 'src' => 'js/plugins/jquery.expandableField.js', 'version' => 17 ), |
69 | 69 | array( 'src' => 'js/plugins/jquery.highlightText.js', 'version' => 1 ), |
70 | 70 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 33 ), |
71 | | - array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 36 ), |
| 71 | + array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 37 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 196 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
74 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 72 ), |
| 74 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 73 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 28 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 12 ), |
— | — | @@ -83,10 +83,10 @@ |
84 | 84 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ), |
85 | 85 | ), |
86 | 86 | 'combined' => array( |
87 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 454 ), |
| 87 | + array( 'src' => 'js/plugins.combined.js', 'version' => 455 ), |
88 | 88 | ), |
89 | 89 | 'minified' => array( |
90 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 476 ), |
| 90 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 477 ), |
91 | 91 | ), |
92 | 92 | ), |
93 | 93 | ); |
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | // Save for later checking if empty |
144 | 144 | group = target; |
145 | 145 | // Tool |
146 | | - target += ' div[rel=' + data.tool + '].tool'; |
| 146 | + target += ' span[rel=' + data.tool + '].tool'; |
147 | 147 | } |
148 | 148 | } else if ( typeof data.page == 'string' ) { |
149 | 149 | // Booklet page |
— | — | @@ -327,7 +327,7 @@ |
328 | 328 | 'alt' : label, |
329 | 329 | 'title' : label, |
330 | 330 | 'rel' : id, |
331 | | - 'class' : 'wikiEditor-toolbar-spritedButton' |
| 331 | + 'class' : 'tool tool-button wikiEditor-toolbar-spritedButton' |
332 | 332 | } ) |
333 | 333 | .text( label ) |
334 | 334 | .css( 'backgroundPosition', offsetOrIcon[0] + 'px ' + offsetOrIcon[1] + 'px' ); |
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -4050,7 +4050,7 @@ |
4051 | 4051 | // Save for later checking if empty |
4052 | 4052 | group = target; |
4053 | 4053 | // Tool |
4054 | | - target += ' div[rel=' + data.tool + '].tool'; |
| 4054 | + target += ' span[rel=' + data.tool + '].tool'; |
4055 | 4055 | } |
4056 | 4056 | } else if ( typeof data.page == 'string' ) { |
4057 | 4057 | // Booklet page |
— | — | @@ -4235,7 +4235,7 @@ |
4236 | 4236 | 'alt' : label, |
4237 | 4237 | 'title' : label, |
4238 | 4238 | 'rel' : id, |
4239 | | - 'class' : 'wikiEditor-toolbar-spritedButton' |
| 4239 | + 'class' : 'tool tool-button wikiEditor-toolbar-spritedButton' |
4240 | 4240 | } ) |
4241 | 4241 | .text( label ) |
4242 | 4242 | .css( 'backgroundPosition', offsetOrIcon[0] + 'px ' + offsetOrIcon[1] + 'px' ); |
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -276,7 +276,7 @@ |
277 | 277 | var $table=context.modules.toolbar.$toolbar.find('div[rel='+data.section+'].section '+'div[rel='+data.page+'].page table');for(row in data[type]){$table.append($.wikiEditor.modules.toolbar.fn.buildRow(context,data[type][row]));} |
278 | 278 | break;case'characters':if(!('section'in data&&'page'in data)){continue;} |
279 | 279 | $characters=context.modules.toolbar.$toolbar.find('div[rel='+data.section+'].section '+'div[rel='+data.page+'].page div');var actions=$characters.data('actions');for(character in data[type]){$characters.append($($.wikiEditor.modules.toolbar.fn.buildCharacter(data[type][character],actions)).mousedown(function(e){context.fn.saveStuffForIE();e.preventDefault();return false;}).click(function(e){$.wikiEditor.modules.toolbar.fn.doAction($(this).parent().data('context'),$(this).parent().data('actions')[$(this).attr('rel')]);e.preventDefault();return false;}));} |
280 | | -break;default:break;}}},removeFromToolbar:function(context,data){if(typeof data.section=='string'){var tab='div.tabs span[rel='+data.section+'].tab';var target='div[rel='+data.section+'].section';var group=null;if(typeof data.group=='string'){target+=' div[rel='+data.group+'].group';if(typeof data.tool=='string'){group=target;target+=' div[rel='+data.tool+'].tool';}}else if(typeof data.page=='string'){var index=target+' div.index div[rel='+data.page+']';target+=' div.pages div[rel='+data.page+'].page';if(typeof data.character=='string'){target+=' a[rel='+data.character+']';}else if(typeof data.row=='number'){target+=' table tr:not(:has(th)):eq('+data.row+')';}else{context.modules.toolbar.$toolbar.find(index).remove();$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,null,context.modules.toolbar.$toolbar.find(target),context.modules.toolbar.$toolbar.find(index));}}else{context.modules.toolbar.$toolbar.find(tab).remove();} |
| 280 | +break;default:break;}}},removeFromToolbar:function(context,data){if(typeof data.section=='string'){var tab='div.tabs span[rel='+data.section+'].tab';var target='div[rel='+data.section+'].section';var group=null;if(typeof data.group=='string'){target+=' div[rel='+data.group+'].group';if(typeof data.tool=='string'){group=target;target+=' span[rel='+data.tool+'].tool';}}else if(typeof data.page=='string'){var index=target+' div.index div[rel='+data.page+']';target+=' div.pages div[rel='+data.page+'].page';if(typeof data.character=='string'){target+=' a[rel='+data.character+']';}else if(typeof data.row=='number'){target+=' table tr:not(:has(th)):eq('+data.row+')';}else{context.modules.toolbar.$toolbar.find(index).remove();$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,null,context.modules.toolbar.$toolbar.find(target),context.modules.toolbar.$toolbar.find(index));}}else{context.modules.toolbar.$toolbar.find(tab).remove();} |
281 | 281 | context.modules.toolbar.$toolbar.find(target).remove();if(group){$group=context.modules.toolbar.$toolbar.find(group);if($group.children().length==0){$group.hide();}}}}},evt:{resize:function(context,event){context.$ui.find('.sections').height(context.$ui.find('.sections .section-visible').outerHeight());},tocCollapse:function(context,event){$.wikiEditor.modules.toolbar.evt.resize(context,event);},tocExpand:function(context,event){$.wikiEditor.modules.toolbar.evt.resize(context,event);}},fn:{create:function(context,config){if('$toolbar'in context.modules.toolbar){return;} |
282 | 282 | context.modules.toolbar.$toolbar=$('<div />').addClass('wikiEditor-ui-toolbar').attr('id','wikiEditor-ui-toolbar');$.wikiEditor.modules.toolbar.fn.build(context,config);context.$ui.find('.wikiEditor-ui-top').append(context.modules.toolbar.$toolbar);},doAction:function(context,action,source){if($.trackAction!=undefined&&source.closest('.wikiEditor-ui-toolbar').size()){var rels=[];var step=source;var i=0;while(!step.hasClass('wikiEditor-ui-toolbar')){if(i>25){break;} |
283 | 283 | i++;var rel=step.attr('rel');if(rel){rels.push(step.attr('rel'));} |
— | — | @@ -289,7 +289,7 @@ |
290 | 290 | 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);}}} |
291 | 291 | if(empty){$group.hide();} |
292 | 292 | return $group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}} |
293 | | -var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=$.wikiEditor.autoIcon(tool.icon,$.wikiEditor.imgPath+'toolbar/');var $button=null;if('offset'in tool){var offsetOrIcon=$.wikiEditor.autoIconOrOffset(tool.icon,tool.offset,$.wikiEditor.imgPath+'toolbar/');if(typeof offsetOrIcon=='object'){$button=$('<span />').attr({'alt':label,'title':label,'rel':id,'class':'wikiEditor-toolbar-spritedButton'}).text(label).css('backgroundPosition',offsetOrIcon[0]+'px '+offsetOrIcon[1]+'px');}} |
| 293 | +var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=$.wikiEditor.autoIcon(tool.icon,$.wikiEditor.imgPath+'toolbar/');var $button=null;if('offset'in tool){var offsetOrIcon=$.wikiEditor.autoIconOrOffset(tool.icon,tool.offset,$.wikiEditor.imgPath+'toolbar/');if(typeof offsetOrIcon=='object'){$button=$('<span />').attr({'alt':label,'title':label,'rel':id,'class':'tool tool-button wikiEditor-toolbar-spritedButton'}).text(label).css('backgroundPosition',offsetOrIcon[0]+'px '+offsetOrIcon[1]+'px');}} |
294 | 294 | if(!$button){$button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-button'});} |
295 | 295 | if('action'in tool){$button.data('action',tool.action).data('context',context).mousedown(function(e){context.fn.saveStuffForIE();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-setup-'+tool.action.module,{button:$button},function(event){event.data.button.show().parent().show();});}} |
296 | 296 | 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){context.fn.saveStuffForIE();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');} |