Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -18,13 +18,13 @@ |
19 | 19 | 'raw' => array( |
20 | 20 | array( 'src' => 'css/wikiEditor.css', 'version' => 4 ), |
21 | 21 | array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 5 ), |
22 | | - array( 'src' => 'css/wikiEditor.toc.css', 'version' => 4 ), |
| 22 | + array( 'src' => 'css/wikiEditor.toc.css', 'version' => 5 ), |
23 | 23 | ), |
24 | 24 | 'combined' => array( |
25 | | - array( 'src' => 'css/combined.css', 'version' => 5 ), |
| 25 | + array( 'src' => 'css/combined.css', 'version' => 6 ), |
26 | 26 | ), |
27 | 27 | 'minified' => array( |
28 | | - array( 'src' => 'css/combined.min.css', 'version' => 5 ), |
| 28 | + array( 'src' => 'css/combined.min.css', 'version' => 6 ), |
29 | 29 | ), |
30 | 30 | ) |
31 | 31 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | // Recursively build the structure and adds special item for section 0 |
219 | 219 | var structure = buildStructure( outline ); |
220 | 220 | structure.unshift( |
221 | | - { 'text': wgTitle, 'level': 1, 'index': 0, 'position': 0 } |
| 221 | + { 'text': wgPageName.replace(/_/g, ' '), 'level': 1, 'index': 0, 'position': 0 } |
222 | 222 | ); |
223 | 223 | context.modules.$toc.html( buildList( structure ) ); |
224 | 224 | // Cache the outline for later use |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -859,7 +859,7 @@ |
860 | 860 | // Recursively build the structure and adds special item for section 0 |
861 | 861 | var structure = buildStructure( outline ); |
862 | 862 | structure.unshift( |
863 | | - { 'text': wgTitle, 'level': 1, 'index': 0, 'position': 0 } |
| 863 | + { 'text': wgPageName.replace(/_/g, ' '), 'level': 1, 'index': 0, 'position': 0 } |
864 | 864 | ); |
865 | 865 | context.modules.$toc.html( buildList( structure ) ); |
866 | 866 | // Cache the outline for later use |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | var lastLevel=0;var nLevel=0;for(var i=0;i<outline.length;i++){if(outline[i].level>lastLevel){nLevel++;} |
64 | 64 | else if(outline[i].level<lastLevel){nLevel-=Math.max(1,lastLevel-outline[i].level);} |
65 | 65 | outline[i].nLevel=nLevel;lastLevel=nLevel;} |
66 | | -var structure=buildStructure(outline);structure.unshift({'text':wgTitle,'level':1,'index':0,'position':0});context.modules.$toc.html(buildList(structure));context.data.outline=outline;}}};})(jQuery);(function($){$.wikiEditor.modules.toolbar={imgPath:wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/toolbar/',api:{addToToolbar:function(context,data){},modifyToolbar:function(context,data){},removeFromToolbar:function(context,data){if(typeof data.section=='string'){var selector='div[rel='+data.section+'].section';if(typeof data.group=='string'){selector+=' div[rel='+data.group+'].group';if(typeof data.tool=='string'){selector+=' div[rel='+data.tool+'].tool';}} |
| 66 | +var structure=buildStructure(outline);structure.unshift({'text':wgPageName.replace(/_/g,' '),'level':1,'index':0,'position':0});context.modules.$toc.html(buildList(structure));context.data.outline=outline;}}};})(jQuery);(function($){$.wikiEditor.modules.toolbar={imgPath:wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/toolbar/',api:{addToToolbar:function(context,data){},modifyToolbar:function(context,data){},removeFromToolbar:function(context,data){if(typeof data.section=='string'){var selector='div[rel='+data.section+'].section';if(typeof data.group=='string'){selector+=' div[rel='+data.group+'].group';if(typeof data.tool=='string'){selector+=' div[rel='+data.tool+'].tool';}} |
67 | 67 | context.modules.$toolbar.find(selector).remove();}}},fn:{autoMsg:function(object,property){if(property in object){return object[property];}else if(property+'Msg'in object){return gM(object[property+'Msg']);}else{return'';}},create:function(context,config){if('$toolbar'in context.modules){return;} |
68 | 68 | context.modules.$toolbar=$('<div></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){switch(action.type){case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=gM(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}} |
69 | 69 | context.$textarea.encapsulateSelection(parts.pre,parts.peri,parts.post);break;default:break;}},buildSection:function(context,id,section){switch(section.type){case'toolbar':return $.wikiEditor.modules.toolbar.fn.buildToolbar(context,id,section);case'booklet':return $.wikiEditor.modules.toolbar.fn.buildBooklet(context,id,section);default:return null;}},buildToolbar:function(context,id,toolbar){var $toolbar=$('<div></div>').attr({'class':'toolbar section section-'+id,'rel':id});if('groups'in toolbar){for(group in toolbar.groups){$toolbar.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,toolbar.groups[group]));}} |