Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -453,4 +453,4 @@ |
454 | 454 | background-color:white; |
455 | 455 | text-decoration:none; |
456 | 456 | border-color:#a8d7f9; |
457 | | -} |
\ No newline at end of file |
| 457 | +} |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -114,9 +114,6 @@ |
115 | 115 | } |
116 | 116 | } |
117 | 117 | }, |
118 | | - modifyTool : function( context, data ){ |
119 | | - |
120 | | - }, |
121 | 118 | removeFromToolbar : function( context, data ) { |
122 | 119 | js_log("f:removeFromToolbar"); |
123 | 120 | if ( typeof data.section == 'string' ) { |
— | — | @@ -476,8 +473,8 @@ |
477 | 474 | ); |
478 | 475 | }, |
479 | 476 | buildSection : function( context, id, section ) { |
480 | | - var selected = $ |
481 | | - .cookie( 'wikiEditor-' + context.instance + '-toolbar-section' ); |
| 477 | + context.$textarea.trigger( 'wikiEditor-toolbar-buildSection-' + id, [section] ); |
| 478 | + var selected = $.cookie( 'wikiEditor-' + context.instance + '-toolbar-section' ); |
482 | 479 | var $section; |
483 | 480 | switch ( section.type ) { |
484 | 481 | case 'toolbar': |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
485 | 482 | + /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 |
/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/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1557,9 +1557,6 @@ |
1558 | 1558 | } |
1559 | 1559 | } |
1560 | 1560 | }, |
1561 | | - modifyTool : function( context, data ){ |
1562 | | - |
1563 | | - }, |
1564 | 1561 | removeFromToolbar : function( context, data ) { |
1565 | 1562 | js_log("f:removeFromToolbar"); |
1566 | 1563 | if ( typeof data.section == 'string' ) { |
— | — | @@ -1919,8 +1916,8 @@ |
1920 | 1917 | ); |
1921 | 1918 | }, |
1922 | 1919 | buildSection : function( context, id, section ) { |
1923 | | - var selected = $ |
1924 | | - .cookie( 'wikiEditor-' + context.instance + '-toolbar-section' ); |
| 1920 | + context.$textarea.trigger( 'wikiEditor-toolbar-buildSection-' + id, [section] ); |
| 1921 | + var selected = $.cookie( 'wikiEditor-' + context.instance + '-toolbar-section' ); |
1925 | 1922 | var $section; |
1926 | 1923 | switch ( section.type ) { |
1927 | 1924 | case 'toolbar': |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | var $table=context.modules.$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]));} |
104 | 104 | break;case'characters':if(!('section'in data&&'page'in data)){continue;} |
105 | 105 | $characters=context.modules.$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)).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).parent().data('context'),$(this).parent().data('actions')[$(this).attr('rel')]);return false;}));} |
106 | | -break;default:break;}}},modifyTool:function(context,data){},removeFromToolbar:function(context,data){js_log("f:removeFromToolbar");if(typeof data.section=='string'){var tab='div.tabs span[rel='+data.section+'].tab';var target='div[rel='+data.section+'].section';if(typeof data.group=='string'){target+=' div[rel='+data.group+'].group';if(typeof data.tool=='string'){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.find(index).remove();$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,null,context.modules.$toolbar.find(target),context.modules.$toolbar.find(index));}}else{context.modules.$toolbar.find(tab).remove();} |
| 106 | +break;default:break;}}},removeFromToolbar:function(context,data){js_log("f:removeFromToolbar");if(typeof data.section=='string'){var tab='div.tabs span[rel='+data.section+'].tab';var target='div[rel='+data.section+'].section';if(typeof data.group=='string'){target+=' div[rel='+data.group+'].group';if(typeof data.tool=='string'){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.find(index).remove();$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,null,context.modules.$toolbar.find(target),context.modules.$toolbar.find(index));}}else{context.modules.$toolbar.find(tab).remove();} |
107 | 107 | js_log('target is: '+target);context.modules.$toolbar.find(target).remove();}}},fn:{create:function(context,config){if('$toolbar'in context.modules){return;} |
108 | 108 | context.modules.$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);},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;} |
109 | 109 | i++;var rel=step.attr('rel');if(rel){rels.push(step.attr('rel'));} |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | html+='</tr>';return html;},buildCharacter:function(character,actions){if(typeof character=='string'){character={'label':character,'action':{'type':'encapsulate','options':{'pre':character}}};}else if(0 in character&&1 in character){character={'label':character[0],'action':{'type':'encapsulate','options':{'pre':character[1]}}};} |
132 | 132 | if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).click(function(){var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));$(this).blur();var show=$section.css('display')=='none';$section.parent().children().hide("fast");$(this).parent().parent().find('a').removeClass('current');if(show){$section.show("fast");$(this).addClass('current');} |
133 | 133 | if($.trackAction!=undefined){$.trackAction($section.attr('rel')+'.'+(show?'show':'hide'));} |
134 | | -$.cookie('wikiEditor-'+$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;}));},buildSection:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var $section;switch(section.type){case'toolbar':var $section=$('<div />').attr({'class':'toolbar section section-'+id,'rel':id});if('groups'in section){for(group in section.groups){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,section.groups[group]));}} |
| 134 | +$.cookie('wikiEditor-'+$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;}));},buildSection:function(context,id,section){context.$textarea.trigger('wikiEditor-toolbar-buildSection-'+id,[section]);var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var $section;switch(section.type){case'toolbar':var $section=$('<div />').attr({'class':'toolbar section section-'+id,'rel':id});if('groups'in section){for(group in section.groups){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,section.groups[group]));}} |
135 | 135 | break;case'booklet':var $pages=$('<div />').addClass('pages');var $index=$('<div />').addClass('index');if('pages'in section){for(page in section.pages){$pages.append($.wikiEditor.modules.toolbar.fn.buildPage(context,page,section.pages[page]));$index.append($.wikiEditor.modules.toolbar.fn.buildBookmark(context,page,section.pages[page]));}} |
136 | 136 | $section=$('<div />').attr({'class':'booklet section section-'+id,'rel':id}).append($index).append($pages);$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,page,$pages,$index);break;} |
137 | 137 | if($section!==null&&id!=='main'){$section.css('display',selected==id?'block':'none');} |