Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js |
— | — | @@ -1,4 +1,4 @@ |
2 | | -mw.ready( function() { |
| 2 | +$j(document).ready( function() { |
3 | 3 | // Check if CollapsibleTabs is enabled |
4 | 4 | if ( !wgVectorEnabledModules.collapsibletabs ) { |
5 | 5 | return true; |
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup/FooterCleanup.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | /* Prototype code to demonstrate proposed edit page footer cleanups */ |
3 | 3 | /* First draft and will be changing greatly */ |
4 | 4 | |
5 | | -mw.ready( function() { |
| 5 | +$j(document).ready( function() { |
6 | 6 | if( !wgVectorEnabledModules.footercleanup ) { |
7 | 7 | return true; |
8 | 8 | } |
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/EditWarning/EditWarning.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for EditWarning extension */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check if EditWarning is enabled and if we need it |
6 | 6 | if ( !wgVectorEnabledModules.editwarning || $j( '#wpTextbox1' ).size() == 0 ) { |
7 | 7 | return true; |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | $j( '#wpSummary' ).data( 'origtext' ) != $j( '#wpSummary' ).val() |
33 | 33 | ) { |
34 | 34 | // Return our message |
35 | | - return gM( 'vector-editwarning-warning' ); |
| 35 | + return mw.usability.getMsg( 'vector-editwarning-warning' ); |
36 | 36 | } |
37 | 37 | } |
38 | 38 | // Add form submission handler |
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | /* Prototype code to show collapsing left nav options */ |
3 | 3 | /* First draft and will be changing greatly */ |
4 | 4 | |
5 | | -mw.ready( function() { |
| 5 | +$j(document).ready( function() { |
6 | 6 | if( !wgVectorEnabledModules.collapsiblenav ) { |
7 | 7 | return true; |
8 | 8 | } |
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | os_autoload_forms = []; |
9 | 9 | } |
10 | 10 | |
11 | | -mw.ready( function() { |
| 11 | +$j(document).ready( function() { |
12 | 12 | // Only use this function in conjuction with the Vector skin |
13 | 13 | if( !wgVectorEnabledModules.simplesearch || skin != 'vector' ) { |
14 | 14 | return true; |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | $j( 'div#simpleSearch > input#searchInput' ) |
18 | 18 | .each( function() { |
19 | 19 | $j( '<label />' ) |
20 | | - .text( gM( 'vector-simplesearch-search' ) ) |
| 20 | + .text( mw.usability.getMsg( 'vector-simplesearch-search' ) ) |
21 | 21 | .css({ |
22 | 22 | 'display': 'none', |
23 | 23 | 'position' : 'absolute', |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | $j(this).show(); |
97 | 97 | $label = $j( '<div />' ) |
98 | 98 | .addClass( 'special-label' ) |
99 | | - .text( gM( 'vector-simplesearch-containing' ) ) |
| 99 | + .text( mw.usability.getMsg( 'vector-simplesearch-containing' ) ) |
100 | 100 | .appendTo( $j(this) ); |
101 | 101 | $query = $j( '<div />' ) |
102 | 102 | .addClass( 'special-query' ) |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -12,17 +12,17 @@ |
13 | 13 | |
14 | 14 | static $scripts = array( |
15 | 15 | 'raw' => array( |
16 | | - array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 6 ), |
17 | | - array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 6 ), |
18 | | - array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 5 ), |
19 | | - array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 4 ), |
20 | | - array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 6 ), |
| 16 | + array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 7 ), |
| 17 | + array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 7 ), |
| 18 | + array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 6 ), |
| 19 | + array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ), |
| 20 | + array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 7 ), |
21 | 21 | ), |
22 | 22 | 'combined' => array( |
23 | | - array( 'src' => 'Vector.combined.js', 'version' => 18 ), |
| 23 | + array( 'src' => 'Vector.combined.js', 'version' => 19 ), |
24 | 24 | ), |
25 | 25 | 'minified' => array( |
26 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 18 ), |
| 26 | + array( 'src' => 'Vector.combined.min.js', 'version' => 19 ), |
27 | 27 | ), |
28 | 28 | ); |
29 | 29 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | /* Prototype code to show collapsing left nav options */ |
3 | 3 | /* First draft and will be changing greatly */ |
4 | 4 | |
5 | | -mw.ready( function() { |
| 5 | +$j(document).ready( function() { |
6 | 6 | if( !wgVectorEnabledModules.collapsiblenav ) { |
7 | 7 | return true; |
8 | 8 | } |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | return false; |
37 | 37 | } ); |
38 | 38 | } ); |
39 | | -mw.ready( function() { |
| 39 | +$j(document).ready( function() { |
40 | 40 | // Check if CollapsibleTabs is enabled |
41 | 41 | if ( !wgVectorEnabledModules.collapsibletabs ) { |
42 | 42 | return true; |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | } ); |
121 | 121 | /* JavaScript for EditWarning extension */ |
122 | 122 | |
123 | | -mw.ready( function() { |
| 123 | +$j(document).ready( function() { |
124 | 124 | // Check if EditWarning is enabled and if we need it |
125 | 125 | if ( !wgVectorEnabledModules.editwarning || $j( '#wpTextbox1' ).size() == 0 ) { |
126 | 126 | return true; |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | $j( '#wpSummary' ).data( 'origtext' ) != $j( '#wpSummary' ).val() |
152 | 152 | ) { |
153 | 153 | // Return our message |
154 | | - return gM( 'vector-editwarning-warning' ); |
| 154 | + return mw.usability.getMsg( 'vector-editwarning-warning' ); |
155 | 155 | } |
156 | 156 | } |
157 | 157 | // Add form submission handler |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | /* Prototype code to demonstrate proposed edit page footer cleanups */ |
166 | 166 | /* First draft and will be changing greatly */ |
167 | 167 | |
168 | | -mw.ready( function() { |
| 168 | +$j(document).ready( function() { |
169 | 169 | if( !wgVectorEnabledModules.footercleanup ) { |
170 | 170 | return true; |
171 | 171 | } |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | os_autoload_forms = []; |
243 | 243 | } |
244 | 244 | |
245 | | -mw.ready( function() { |
| 245 | +$j(document).ready( function() { |
246 | 246 | // Only use this function in conjuction with the Vector skin |
247 | 247 | if( !wgVectorEnabledModules.simplesearch || skin != 'vector' ) { |
248 | 248 | return true; |
— | — | @@ -250,7 +250,7 @@ |
251 | 251 | $j( 'div#simpleSearch > input#searchInput' ) |
252 | 252 | .each( function() { |
253 | 253 | $j( '<label />' ) |
254 | | - .text( gM( 'vector-simplesearch-search' ) ) |
| 254 | + .text( mw.usability.getMsg( 'vector-simplesearch-search' ) ) |
255 | 255 | .css({ |
256 | 256 | 'display': 'none', |
257 | 257 | 'position' : 'absolute', |
— | — | @@ -329,7 +329,7 @@ |
330 | 330 | $j(this).show(); |
331 | 331 | $label = $j( '<div />' ) |
332 | 332 | .addClass( 'special-label' ) |
333 | | - .text( gM( 'vector-simplesearch-containing' ) ) |
| 333 | + .text( mw.usability.getMsg( 'vector-simplesearch-containing' ) ) |
334 | 334 | .appendTo( $j(this) ); |
335 | 335 | $query = $j( '<div />' ) |
336 | 336 | .addClass( 'special-query' ) |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -1,15 +1,15 @@ |
2 | 2 | |
3 | | -mw.ready(function(){if(!wgVectorEnabledModules.collapsiblenav){return true;} |
4 | | -$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal:first').addClass('expanded').find('div.body').show();$j('#panel > div.portal:not(:first)').each(function(){if($j.cookie('vector-nav-'+$j(this).attr('id'))=='true'){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}});$j('#panel > div.portal > h5').click(function(){$j.cookie('vector-nav-'+$j(this).parent().attr('id'),$j(this).parent().is('.collapsed'));$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');return false;});});mw.ready(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;} |
| 3 | +$j(document).ready(function(){if(!wgVectorEnabledModules.collapsiblenav){return true;} |
| 4 | +$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal:first').addClass('expanded').find('div.body').show();$j('#panel > div.portal:not(:first)').each(function(){if($j.cookie('vector-nav-'+$j(this).attr('id'))=='true'){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}});$j('#panel > div.portal > h5').click(function(){$j.cookie('vector-nav-'+$j(this).parent().attr('id'),$j(this).parent().is('.collapsed'));$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');return false;});});$j(document).ready(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;} |
5 | 5 | var rtl=$j('body').is('.rtl');$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var target=$moving.data('collapsibleTabsSettings').collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var $target=$j($moving.data('collapsibleTabsSettings').expandedContainer).find('span.placeholder:first');var expandedWidth=$moving.data('collapsibleTabsSettings').expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none') |
6 | 6 | $j("#p-cactions").addClass("filledPortlet").removeClass("emptyPortlet").find('h5').css('width','1px').animate({'width':'26px'},390);}).bind("beforeTabExpand",function(){if($j('#p-cactions li').length==1) |
7 | | -$j("#p-cactions h5").animate({'width':'1px'},370,function(){$j(this).attr('style','').parent().addClass("emptyPortlet").removeClass("filledPortlet");});}).collapsibleTabs({expandCondition:function(eleWidth){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width()+1)<($j('#left-navigation').position().left-eleWidth);}else{return($j('#left-navigation').position().left+$j('#left-navigation').width()+1)<($j('#right-navigation').position().left-eleWidth);}},collapseCondition:function(){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width())>$j('#left-navigation').position().left;}else{return($j('#left-navigation').position().left+$j('#left-navigation').width())>$j('#right-navigation').position().left;}}});});mw.ready(function(){if(!wgVectorEnabledModules.editwarning||$j('#wpTextbox1').size()==0){return true;} |
| 7 | +$j("#p-cactions h5").animate({'width':'1px'},370,function(){$j(this).attr('style','').parent().addClass("emptyPortlet").removeClass("filledPortlet");});}).collapsibleTabs({expandCondition:function(eleWidth){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width()+1)<($j('#left-navigation').position().left-eleWidth);}else{return($j('#left-navigation').position().left+$j('#left-navigation').width()+1)<($j('#right-navigation').position().left-eleWidth);}},collapseCondition:function(){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width())>$j('#left-navigation').position().left;}else{return($j('#left-navigation').position().left+$j('#left-navigation').width())>$j('#right-navigation').position().left;}}});});$j(document).ready(function(){if(!wgVectorEnabledModules.editwarning||$j('#wpTextbox1').size()==0){return true;} |
8 | 8 | $j('#wpTextbox1, #wpSummary').each(function(){$j(this).data('origtext',$j(this).val());});fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){var fallbackResult=null;if(fallbackWindowOnBeforeUnload){fallbackResult=fallbackWindowOnBeforeUnload();} |
9 | 9 | if(fallbackResult!==null){return fallbackResult;} |
10 | | -if(wgAction=='submit'||$j('#wpTextbox1').data('origtext')!=$j('#wpTextbox1').val()||$j('#wpSummary').data('origtext')!=$j('#wpSummary').val()){return gM('vector-editwarning-warning');}} |
11 | | -$j('form').submit(function(){window.onbeforeunload=fallbackWindowOnBeforeUnload;});});var fallbackWindowOnBeforeUnload=null;mw.ready(function(){if(!wgVectorEnabledModules.footercleanup){return true;} |
| 10 | +if(wgAction=='submit'||$j('#wpTextbox1').data('origtext')!=$j('#wpTextbox1').val()||$j('#wpSummary').data('origtext')!=$j('#wpSummary').val()){return mw.usability.getMsg('vector-editwarning-warning');}} |
| 11 | +$j('form').submit(function(){window.onbeforeunload=fallbackWindowOnBeforeUnload;});});var fallbackWindowOnBeforeUnload=null;$j(document).ready(function(){if(!wgVectorEnabledModules.footercleanup){return true;} |
12 | 12 | $j('#editpage-copywarn').add('.editOptions').wrapAll('<div id="editpage-bottom"></div>');$j('#wpSummary').data('hint',$j('#wpSummaryLabel span small').remove().text().replace(/\)|\(/g,'')).change(function(){if($j(this).val().length==0){$j(this).addClass('inline-hint').val($j(this).data('hint'));}else{$j(this).removeClass('inline-hint');}}).focus(function(){if($j(this).val()==$j(this).data('hint')){$j(this).removeClass('inline-hint').val("");}}).blur(function(){$j(this).trigger('change');}).trigger('change');$j('#wpSummary').add('.editCheckboxes').wrapAll('<div id="editpage-summary-fields"></div>');$j('#editpage-specialchars').remove();var transclusionCount=$j('.templatesUsed ul li').size();$j('.templatesUsed ul').wrap('<div id="transclusions-list" class="collapsible-list collapsed"></div>').parent().prepend('<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' |
13 | 13 | +transclusionCount |
14 | 14 | +'</strong> other pages.</label>');$j('.mw-templatesUsedExplanation').remove();$j('.collapsible-list label').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('ul').slideToggle('fast');return false;}).trigger('click');$j('#wpPreview, #wpDiff, .editHelp, #editpage-specialchars').remove();$j('#mw-editform-cancel').remove().appendTo('.editButtons');});if(wgVectorEnabledModules.simplesearch&&skin=='vector'&&typeof os_autoload_inputs!=='undefined'&&os_autoload_forms!=='undefined'){os_autoload_inputs=[];os_autoload_forms=[];} |
15 | | -mw.ready(function(){if(!wgVectorEnabledModules.simplesearch||skin!='vector'){return true;} |
16 | | -$j('div#simpleSearch > input#searchInput').each(function(){$j('<label />').text(gM('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').show();}}).focus(function(){$j(this).parent().find('label').hide();}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').show();}});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){var perfectMatch=false;$j(this).closest('.suggestions').find('.suggestions-results div').each(function(){if($j(this).data('text')==query){perfectMatch=true;}});if(perfectMatch){if($j(this).children().size()==0){$j(this).show();$label=$j('<div />').addClass('special-label').text(gM('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipsis();}else{$j(this).find('.special-query').empty().text(query).autoEllipsis();}}else{$j(this).hide();$j(this).empty();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')});}); |
\ No newline at end of file |
| 15 | +$j(document).ready(function(){if(!wgVectorEnabledModules.simplesearch||skin!='vector'){return true;} |
| 16 | +$j('div#simpleSearch > input#searchInput').each(function(){$j('<label />').text(mw.usability.getMsg('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').show();}}).focus(function(){$j(this).parent().find('label').hide();}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').show();}});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){var perfectMatch=false;$j(this).closest('.suggestions').find('.suggestions-results div').each(function(){if($j(this).data('text')==query){perfectMatch=true;}});if(perfectMatch){if($j(this).children().size()==0){$j(this).show();$label=$j('<div />').addClass('special-label').text(mw.usability.getMsg('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipsis();}else{$j(this).find('.special-query').empty().text(query).autoEllipsis();}}else{$j(this).hide();$j(this).empty();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')});}); |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -51,6 +51,8 @@ |
52 | 52 | // Core functionality of extension |
53 | 53 | 'base_sets' => array( |
54 | 54 | 'raw' => array( |
| 55 | + // Common UsabilityInitiative funtions |
| 56 | + array( 'src' => 'js/usability.js', 'version' => 1 ), |
55 | 57 | |
56 | 58 | // These scripts can be pulled from core once the js2 is merged |
57 | 59 | array( 'src' => 'js/js2stopgap/ui.core.js', 'version' => 1 ), |
— | — | @@ -70,20 +72,20 @@ |
71 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
72 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
73 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 26 ), |
74 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 71 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 72 ), |
75 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 23 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 44 ), |
77 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 10 ), |
78 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 73 ), |
79 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 9 ), |
| 78 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 45 ), |
| 79 | + array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 11 ), |
| 80 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 74 ), |
| 81 | + array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 10 ), |
80 | 82 | array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 16 ), |
81 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 1 ), |
| 83 | + array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
82 | 84 | ), |
83 | 85 | 'combined' => array( |
84 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 183 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 184 ), |
85 | 87 | ), |
86 | 88 | 'minified' => array( |
87 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 183 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 184 ), |
88 | 90 | ), |
89 | 91 | ), |
90 | 92 | ); |
— | — | @@ -162,7 +164,7 @@ |
163 | 165 | Xml::tags( |
164 | 166 | 'script', |
165 | 167 | array( 'type' => $wgJsMimeType ), |
166 | | - 'mw.addMessages({' . implode( ',', self::$messages ) . '});' |
| 168 | + 'mw.usability.addMessages({' . implode( ',', self::$messages ) . '});' |
167 | 169 | ) |
168 | 170 | ); |
169 | 171 | } |
— | — | @@ -210,7 +212,7 @@ |
211 | 213 | |
212 | 214 | /** |
213 | 215 | * Adds internationalized message definitions to the document for access |
214 | | - * via javascript using the gM() function |
| 216 | + * via javascript using the mw.usability.getMsg() function |
215 | 217 | * @param array $messages Key names of messages to load |
216 | 218 | */ |
217 | 219 | public static function addMessages( $messages ) { |
Index: trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | /* Configuration */ |
21 | 21 | |
22 | 22 | // Increment this value when you change ClickTracking.js |
23 | | -$wgClickTrackingStyleVersion = 3; |
| 23 | +$wgClickTrackingStyleVersion = 4; |
24 | 24 | |
25 | 25 | // click throttle, should be seen as "1 out of every $wgClickTrackThrottle users will have it enabled" |
26 | 26 | // setting this to 1 means all users will have it enabled |
— | — | @@ -66,4 +66,4 @@ |
67 | 67 | |
68 | 68 | // Adds Internationalized Messages |
69 | 69 | $wgExtensionMessagesFiles['ClickTracking'] = $dir . 'ClickTracking.i18n.php'; |
70 | | -$wgExtensionAliasesFiles['ClickTracking'] = $dir . 'ClickTracking.alias.php'; |
\ No newline at end of file |
| 70 | +$wgExtensionAliasesFiles['ClickTracking'] = $dir . 'ClickTracking.alias.php'; |
Index: trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | }; |
8 | 8 | |
9 | 9 | // Clicktrack the left sidebar links |
10 | | - $(document).ready( function() { |
| 10 | + addOnloadHook( function() { |
11 | 11 | $( '#p-logo a, #p-navigation a, #p-tb a' ).click( function() { |
12 | 12 | var id = 'leftnav-' + skin + '-' + |
13 | 13 | ( $(this).attr( 'id' ) || $(this).parent().attr( 'id' ) ); |
— | — | @@ -23,4 +23,4 @@ |
24 | 24 | }); |
25 | 25 | } |
26 | 26 | |
27 | | -})(jQuery); |
\ No newline at end of file |
| 27 | +})(jQuery); |
Index: trunk/extensions/UsabilityInitiative/ClickTracking/SpecialClickTracking.js |
— | — | @@ -512,6 +512,6 @@ |
513 | 513 | })(jQuery); |
514 | 514 | |
515 | 515 | // colorize the table on document.ready |
516 | | -mw.ready( $j.colorizeTable ); |
517 | | -mw.ready( $j.changeDataLinks ); |
518 | | -mw.ready( $j.setUIControls ); |
\ No newline at end of file |
| 516 | +$j(document).ready( $j.colorizeTable ); |
| 517 | +$j(document).ready( $j.changeDataLinks ); |
| 518 | +$j(document).ready( $j.setUIControls ); |
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | $wgOptInAlwaysShowPersonalLink = false; |
30 | 30 | $wgOptInNeverShowPersonalLink = false; |
31 | 31 | |
32 | | -$wgOptInStyleVersion = 10; |
| 32 | +$wgOptInStyleVersion = 11; |
33 | 33 | |
34 | 34 | // Preferences to set when users opt in |
35 | 35 | // array( prefname => value ) |
Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | $url = $this->getTitle()->getLinkUrl(); |
123 | 123 | $wgOut->addHTML( Xml::tags( 'script', |
124 | 124 | array( 'type' => $wgJsMimeType ), |
125 | | - 'mw.ready( function() { $j.post( "' . $url . '", optInGetPOSTData() ); } );' |
| 125 | + '$j(document).ready( function() { $j.post( "' . $url . '", optInGetPOSTData() ); } );' |
126 | 126 | ) ); |
127 | 127 | } else if ( self::isOptedIn( $wgUser ) ) { |
128 | 128 | // User is already opted in but |
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.js |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | 'opt': 'browser' }; |
70 | 70 | } |
71 | 71 | |
72 | | -mw.ready( function() { |
| 72 | +$j(document).ready( function() { |
73 | 73 | $j( '.optin-other-select' ).parent().hide(); |
74 | 74 | $j( 'select.optin-need-other' ).change( function() { |
75 | 75 | if( $j(this).val() == 'other' ) |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Highlight module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for highlight |
6 | 6 | if ( !wgWikiEditorEnabledModules.highlight ) { |
7 | 7 | return true; |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | }); |
14 | 14 | /* JavaScript for WikiEditor Preview module */ |
15 | 15 | |
16 | | -mw.ready( function() { |
| 16 | +$j(document).ready( function() { |
17 | 17 | // Check preferences for preview |
18 | 18 | if ( !wgWikiEditorEnabledModules.preview ) { |
19 | 19 | return true; |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | }); |
26 | 26 | /* JavaScript for WikiEditor Publish module */ |
27 | 27 | |
28 | | -mw.ready( function() { |
| 28 | +$j(document).ready( function() { |
29 | 29 | // Check preferences for publish |
30 | 30 | if ( !wgWikiEditorEnabledModules.publish ) { |
31 | 31 | return true; |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | }); |
38 | 38 | /* JavaScript for WikiEditor Toc module */ |
39 | 39 | |
40 | | -mw.ready( function() { |
| 40 | +$j(document).ready( function() { |
41 | 41 | // Check preferences for toolbar |
42 | 42 | if ( !wgWikiEditorPreferences || !( wgWikiEditorPreferences.toc && wgWikiEditorPreferences.toc.enable ) ) { |
43 | 43 | return true; |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | }); |
51 | 51 | /* JavaScript for WikiEditor Toolbar module */ |
52 | 52 | |
53 | | -mw.ready( function() { |
| 53 | +$j(document).ready( function() { |
54 | 54 | // Check preferences for toolbar |
55 | 55 | if ( !wgWikiEditorEnabledModules.toolbar ) { |
56 | 56 | return true; |
— | — | @@ -1009,17 +1009,18 @@ |
1010 | 1010 | ); |
1011 | 1011 | } |
1012 | 1012 | // Set labels of tabs based on rel values |
| 1013 | + var u = mw.usability; |
1013 | 1014 | $j(this).find( '[rel]' ).each( function() { |
1014 | | - $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
| 1015 | + $j(this).text( u.getMsg( $j(this).attr( 'rel' ) ) ); |
1015 | 1016 | }); |
1016 | 1017 | // Setup the tooltips in the textboxes |
1017 | 1018 | $j( '#wikieditor-toolbar-link-int-target' ) |
1018 | | - .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) ); |
| 1019 | + .data( 'tooltip', u.getMsg( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) ); |
1019 | 1020 | $j( '#wikieditor-toolbar-link-int-text' ) |
1020 | | - .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) ); |
| 1021 | + .data( 'tooltip', u.getMsg( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) ); |
1021 | 1022 | $j( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ) |
1022 | 1023 | .each( function() { |
1023 | | - var tooltip = gM( $j( this ).attr( 'id' ) + '-tooltip' ); |
| 1024 | + var tooltip = u.getMsg( $j( this ).attr( 'id' ) + '-tooltip' ); |
1024 | 1025 | if ( $j( this ).val() == '' ) |
1025 | 1026 | $j( this ) |
1026 | 1027 | .val( $j( this ).data( 'tooltip' ) ) |
— | — | @@ -1068,11 +1069,11 @@ |
1069 | 1070 | }); |
1070 | 1071 | // Add images to the page existence widget, which will be shown mutually exclusively to communicate if the |
1071 | 1072 | // page exists, does not exist or the title is invalid (like if it contains a | character) |
1072 | | - var existsMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-exists' ); |
1073 | | - var notexistsMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-notexists' ); |
1074 | | - var invalidMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ); |
1075 | | - var externalMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-external' ); |
1076 | | - var loadingMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-loading' ); |
| 1073 | + var existsMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-exists' ); |
| 1074 | + var notexistsMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-notexists' ); |
| 1075 | + var invalidMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ); |
| 1076 | + var externalMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-external' ); |
| 1077 | + var loadingMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-loading' ); |
1077 | 1078 | $j( '#wikieditor-toolbar-link-int-target-status' ) |
1078 | 1079 | .append( $j( '<div />' ) |
1079 | 1080 | .attr( 'id', 'wikieditor-toolbar-link-int-target-status-exists' ) |
— | — | @@ -1188,8 +1189,9 @@ |
1189 | 1190 | var whitespace = $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace' ); |
1190 | 1191 | var target = $j( '#wikieditor-toolbar-link-int-target' ).val(); |
1191 | 1192 | var text = $j( '#wikieditor-toolbar-link-int-text' ).val(); |
| 1193 | + var u = mw.usability; |
1192 | 1194 | if ( target == '' ) { |
1193 | | - alert( gM( 'wikieditor-toolbar-tool-link-empty' ) ); |
| 1195 | + alert( u.getMsg( 'wikieditor-toolbar-tool-link-empty' ) ); |
1194 | 1196 | return; |
1195 | 1197 | } |
1196 | 1198 | if ( $j.trim( text ) == '' ) { |
— | — | @@ -1201,7 +1203,7 @@ |
1202 | 1204 | // FIXME: Exactly how fragile is this? |
1203 | 1205 | if ( $j( '#wikieditor-toolbar-link-int-target-status-invalid' ).is( ':visible' ) ) { |
1204 | 1206 | // Refuse to add links to invalid titles |
1205 | | - alert( gM( 'wikieditor-toolbar-tool-link-int-invalid' ) ); |
| 1207 | + alert( u.getMsg( 'wikieditor-toolbar-tool-link-int-invalid' ) ); |
1206 | 1208 | return; |
1207 | 1209 | } |
1208 | 1210 | |
— | — | @@ -1219,18 +1221,18 @@ |
1220 | 1222 | if ( match && !$j(this).data( 'ignoreLooksInternal' ) ) { |
1221 | 1223 | var buttons = { }; |
1222 | 1224 | var that = this; |
1223 | | - buttons[ gM( 'wikieditor-toolbar-tool-link-lookslikeinternal-int' ) ] = function() { |
| 1225 | + buttons[ u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal-int' ) ] = function() { |
1224 | 1226 | $j( '#wikieditor-toolbar-link-int-target' ).val( match[1] ).change(); |
1225 | 1227 | $j(this).dialog( 'close' ); |
1226 | 1228 | }; |
1227 | | - buttons[ gM( 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' ) ] = function() { |
| 1229 | + buttons[ u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' ) ] = function() { |
1228 | 1230 | $j(that).data( 'ignoreLooksInternal', true ); |
1229 | 1231 | $j(that).closest( '.ui-dialog' ).find( 'button:first' ).click(); |
1230 | 1232 | $j(that).data( 'ignoreLooksInternal', false ); |
1231 | 1233 | $j(this).dialog( 'close' ); |
1232 | 1234 | }; |
1233 | 1235 | $j.wikiEditor.modules.dialogs.quickDialog( |
1234 | | - gM( 'wikieditor-toolbar-tool-link-lookslikeinternal', match[1] ), |
| 1236 | + u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal', match[1] ), |
1235 | 1237 | { buttons: buttons } |
1236 | 1238 | ); |
1237 | 1239 | return; |
— | — | @@ -1399,7 +1401,7 @@ |
1400 | 1402 | </div></div>', |
1401 | 1403 | init: function() { |
1402 | 1404 | $j(this).find( '[rel]' ).each( function() { |
1403 | | - $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
| 1405 | + $j(this).text( mw.usability.getMsg( $j(this).attr( 'rel' ) ) ); |
1404 | 1406 | }); |
1405 | 1407 | $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
1406 | 1408 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
— | — | @@ -1456,20 +1458,21 @@ |
1457 | 1459 | var rows = parseInt( rowsVal, 10 ); |
1458 | 1460 | var cols = parseInt( colsVal, 10 ); |
1459 | 1461 | var header = Math.min( 1, $j( '#wikieditor-toolbar-table-dimensions-header:checked' ).size() ); |
| 1462 | + var u = mw.usability; |
1460 | 1463 | if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) { |
1461 | | - alert( gM( 'wikieditor-toolbar-tool-table-invalidnumber' ) ); |
| 1464 | + alert( u.getMsg( 'wikieditor-toolbar-tool-table-invalidnumber' ) ); |
1462 | 1465 | return; |
1463 | 1466 | } |
1464 | 1467 | if ( rows + header == 0 || cols == 0 ) { |
1465 | | - alert( gM( 'wikieditor-toolbar-tool-table-zero' ) ); |
| 1468 | + alert( u.getMsg( 'wikieditor-toolbar-tool-table-zero' ) ); |
1466 | 1469 | return; |
1467 | 1470 | } |
1468 | 1471 | if ( rows * cols > 1000 ) { |
1469 | | - alert( gM( 'wikieditor-toolbar-tool-table-toomany', 1000 ) ); |
| 1472 | + alert( u.getMsg( 'wikieditor-toolbar-tool-table-toomany', 1000 ) ); |
1470 | 1473 | return; |
1471 | 1474 | } |
1472 | | - var headerText = gM( 'wikieditor-toolbar-tool-table-example-header' ); |
1473 | | - var normalText = gM( 'wikieditor-toolbar-tool-table-example' ); |
| 1475 | + var headerText = u.getMsg( 'wikieditor-toolbar-tool-table-example-header' ); |
| 1476 | + var normalText = u.getMsg( 'wikieditor-toolbar-tool-table-example' ); |
1474 | 1477 | var table = ""; |
1475 | 1478 | for ( var r = 0; r < rows + header; r++ ) { |
1476 | 1479 | table += "|-\n"; |
— | — | @@ -1575,8 +1578,9 @@ |
1576 | 1579 | </div>\ |
1577 | 1580 | </fieldset>', |
1578 | 1581 | init: function() { |
| 1582 | + var u = mw.usability; |
1579 | 1583 | $j(this).find( '[rel]' ).each( function() { |
1580 | | - $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
| 1584 | + $j(this).text( u.getMsg( $j(this).attr( 'rel' ) ) ); |
1581 | 1585 | }); |
1582 | 1586 | |
1583 | 1587 | // TODO: Find a cleaner way to share this function |
— | — | @@ -1604,7 +1608,7 @@ |
1605 | 1609 | var regex = new RegExp( searchStr, flags ); |
1606 | 1610 | } catch( e ) { |
1607 | 1611 | $j( '#wikieditor-toolbar-replace-invalidregex' ) |
1608 | | - .text( gM( 'wikieditor-toolbar-tool-replace-invalidregex', |
| 1612 | + .text( u.getMsg( 'wikieditor-toolbar-tool-replace-invalidregex', |
1609 | 1613 | e.message ) ) |
1610 | 1614 | .show(); |
1611 | 1615 | return; |
— | — | @@ -1653,7 +1657,7 @@ |
1654 | 1658 | offset = newEnd; |
1655 | 1659 | } |
1656 | 1660 | $j( '#wikieditor-toolbar-replace-success' ) |
1657 | | - .text( gM( 'wikieditor-toolbar-tool-replace-success', match.length ) ) |
| 1661 | + .text( u.getMsg( 'wikieditor-toolbar-tool-replace-success', match.length ) ) |
1658 | 1662 | .show(); |
1659 | 1663 | $j(this).data( 'offset', 0 ); |
1660 | 1664 | } else { |
— | — | @@ -1745,7 +1749,7 @@ |
1746 | 1750 | |
1747 | 1751 | /* JavaScript for WikiEditor Template Editor module */ |
1748 | 1752 | |
1749 | | -mw.ready( function() { |
| 1753 | +$j(document).ready( function() { |
1750 | 1754 | // Check preferences for templateEditor |
1751 | 1755 | if ( !wgWikiEditorEnabledModules.templateEditor ) { |
1752 | 1756 | return true; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -1,9 +1,9 @@ |
2 | 2 | |
3 | | -mw.ready(function(){if(!wgWikiEditorEnabledModules.highlight){return true;} |
4 | | -if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','highlight');}});mw.ready(function(){if(!wgWikiEditorEnabledModules.preview){return true;} |
5 | | -if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','preview');}});mw.ready(function(){if(!wgWikiEditorEnabledModules.publish){return true;} |
6 | | -if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','publish');}});mw.ready(function(){if(!wgWikiEditorPreferences||!(wgWikiEditorPreferences.toc&&wgWikiEditorPreferences.toc.enable)){return true;} |
7 | | -if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule',{'toc':{'rtl':($j('body').is('.rtl'))}});}});mw.ready(function(){if(!wgWikiEditorEnabledModules.toolbar){return true;} |
| 3 | +$j(document).ready(function(){if(!wgWikiEditorEnabledModules.highlight){return true;} |
| 4 | +if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','highlight');}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.preview){return true;} |
| 5 | +if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','preview');}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.publish){return true;} |
| 6 | +if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','publish');}});$j(document).ready(function(){if(!wgWikiEditorPreferences||!(wgWikiEditorPreferences.toc&&wgWikiEditorPreferences.toc.enable)){return true;} |
| 7 | +if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule',{'toc':{'rtl':($j('body').is('.rtl'))}});}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.toolbar){return true;} |
8 | 8 | if(wgWikiEditorPreferences.toolbar.dialogs){$j('#wpTextbox1').addClass('toolbar-dialogs');} |
9 | 9 | if($j.fn.wikiEditor){$j('#toolbar').remove();$j('#wpTextbox1').wikiEditor('addModule',{'toolbar':{'main':{type:'toolbar',groups:{'format':{tools:{'bold':{labelMsg:'wikieditor-toolbar-tool-bold',type:'button',icon:{'default':'format-bold.png','en':'format-bold-B.png','de':'format-bold-F.png','fr':'format-bold-G.png','es':'format-bold-N.png','it':'format-bold-G.png','nl':'format-bold-V.png','pt':'format-bold-N.png','pt-br':'format-bold-N.png','pl':'format-bold-P.png'},action:{type:'encapsulate',options:{pre:"'''",periMsg:'wikieditor-toolbar-tool-bold-example',post:"'''"}}},'italic':{section:'main',group:'format',id:'italic',labelMsg:'wikieditor-toolbar-tool-italic',type:'button',icon:{'default':'format-italic.png','en':'format-italic-I.png','de':'format-italic-K.png','fr':'format-italic-I.png','es':'format-italic-C.png','it':'format-italic-C.png','nl':'format-italic-C.png','pt':'format-italic-I.png','pt-br':'format-italic-I.png','pl':'format-italic-K.png'},action:{type:'encapsulate',options:{pre:"''",periMsg:'wikieditor-toolbar-tool-italic-example',post:"''"}}}}},'insert':{tools:{'xlink':{labelMsg:'wikieditor-toolbar-tool-xlink',type:'button',icon:'insert-xlink.png',filters:['#wpTextbox1:not(.toolbar-dialogs)'],action:{type:'encapsulate',options:{pre:"[",periMsg:'wikieditor-toolbar-tool-xlink-example',post:"]"}}},'ilink':{labelMsg:'wikieditor-toolbar-tool-ilink',type:'button',icon:'insert-ilink.png',filters:['#wpTextbox1:not(.toolbar-dialogs)'],action:{type:'encapsulate',options:{pre:"[[",periMsg:'wikieditor-toolbar-tool-ilink-example',post:"]]"}}},'linkCGD':{labelMsg:'wikieditor-toolbar-tool-link',type:'button',icon:'insert-link.png',filters:['#wpTextbox1.toolbar-dialogs'],action:{type:'dialog',module:'insert-link'}},'file':{labelMsg:'wikieditor-toolbar-tool-file',type:'button',icon:'insert-file.png',action:{type:'encapsulate',options:{pre:"[[",preMsg:'wikieditor-toolbar-tool-file-pre',periMsg:'wikieditor-toolbar-tool-file-example',post:"]]"}}},'reference':{labelMsg:'wikieditor-toolbar-tool-reference',filters:['body.ns-subject'],type:'button',icon:'insert-reference.png',action:{type:'encapsulate',options:{pre:"<ref>",periMsg:'wikieditor-toolbar-tool-reference-example',post:"</ref>"}}},'signature':{labelMsg:'wikieditor-toolbar-tool-signature',filters:['body:not(.ns-0)'],type:'button',icon:'insert-signature.png',action:{type:'encapsulate',options:{post:"--~~~~"}}}}}}},'advanced':{labelMsg:'wikieditor-toolbar-section-advanced',type:'toolbar',groups:{'heading':{tools:{'heading':{labelMsg:'wikieditor-toolbar-tool-heading',type:'select',list:{'heading-2':{labelMsg:'wikieditor-toolbar-tool-heading-2',action:{type:'replace',options:{pre:'==',periMsg:'wikieditor-toolbar-tool-heading-example',post:'==',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1==\$3==\$4",ownline:true}}},'heading-3':{labelMsg:'wikieditor-toolbar-tool-heading-3',action:{type:'replace',options:{pre:'===',periMsg:'wikieditor-toolbar-tool-heading-example',post:'===',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1===\$3===\$4",ownline:true}}},'heading-4':{labelMsg:'wikieditor-toolbar-tool-heading-4',action:{type:'replace',options:{pre:'====',periMsg:'wikieditor-toolbar-tool-heading-example',post:'====',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1====\$3====\$4",ownline:true}}},'heading-5':{labelMsg:'wikieditor-toolbar-tool-heading-5',action:{type:'replace',options:{pre:'=====',periMsg:'wikieditor-toolbar-tool-heading-example',post:'=====',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1=====\$3=====\$4",ownline:true}}}}}}},'list':{labelMsg:'wikieditor-toolbar-group-list',tools:{'ulist':{labelMsg:'wikieditor-toolbar-tool-ulist',type:'button',icon:'format-ulist.png',action:{type:'encapsulate',options:{pre:"* ",periMsg:'wikieditor-toolbar-tool-ulist-example',post:"",ownline:true}}},'olist':{labelMsg:'wikieditor-toolbar-tool-olist',type:'button',icon:'format-olist.png',action:{type:'encapsulate',options:{pre:"# ",periMsg:'wikieditor-toolbar-tool-olist-example',post:"",ownline:true}}},'indent':{labelMsg:'wikieditor-toolbar-tool-indent',type:'button',icon:'format-indent.png',action:{type:'encapsulate',options:{pre:":",periMsg:'wikieditor-toolbar-tool-indent-example',post:"",ownline:true,splitlines:true}}}}},'size':{labelMsg:'wikieditor-toolbar-group-size',tools:{'big':{labelMsg:'wikieditor-toolbar-tool-big',type:'button',icon:'format-big.png',action:{type:'encapsulate',options:{pre:"<big>",periMsg:'wikieditor-toolbar-tool-big-example',post:"</big>"}}},'small':{labelMsg:'wikieditor-toolbar-tool-small',type:'button',icon:'format-small.png',action:{type:'encapsulate',options:{pre:"<small>",periMsg:'wikieditor-toolbar-tool-small-example',post:"</small>"}}}}},'baseline':{labelMsg:'wikieditor-toolbar-group-baseline',tools:{'superscript':{labelMsg:'wikieditor-toolbar-tool-superscript',type:'button',icon:'format-superscript.png',action:{type:'encapsulate',options:{pre:"<sup>",periMsg:'wikieditor-toolbar-tool-superscript-example',post:"</sup>"}}},'subscript':{labelMsg:'wikieditor-toolbar-tool-subscript',type:'button',icon:'format-subscript.png',action:{type:'encapsulate',options:{pre:"<sub>",periMsg:'wikieditor-toolbar-tool-subscript-example',post:"</sub>"}}}}},'insert':{labelMsg:'wikieditor-toolbar-group-insert',tools:{'gallery':{labelMsg:'wikieditor-toolbar-tool-gallery',type:'button',icon:'insert-gallery.png',action:{type:'encapsulate',options:{pre:"<gallery>\n",periMsg:'wikieditor-toolbar-tool-gallery-example',post:"\n</gallery>",ownline:true}}},'tableCGD':{labelMsg:'wikieditor-toolbar-tool-table',type:'button',icon:'insert-table.png',filters:['#wpTextbox1.toolbar-dialogs'],action:{type:'dialog',module:'insert-table'}},'table':{labelMsg:'wikieditor-toolbar-tool-table',type:'button',icon:'insert-table.png',filters:['#wpTextbox1:not(.toolbar-dialogs)'],action:{type:'encapsulate',options:{pre:"{| class=\"wikitable\" border=\"1\"\n|",periMsg:'wikieditor-toolbar-tool-table-example-old',post:"\n|}",ownline:true}}},'newline':{labelMsg:'wikieditor-toolbar-tool-newline',type:'button',icon:'insert-newline.png',action:{type:'encapsulate',options:{pre:"<br />\n"}}}}},'search':{tools:{'replace':{labelMsg:'wikieditor-toolbar-tool-replace',type:'button',icon:'search-replace.png',filters:['#wpTextbox1.toolbar-dialogs'],action:{type:'dialog',module:'search-and-replace'}}}}}},'characters':{labelMsg:'wikieditor-toolbar-section-characters',type:'booklet',pages:{'latin':{'labelMsg':'wikieditor-toolbar-characters-page-latin','layout':'characters','characters':["\u00c1","\u00e1","\u00c0","\u00e0","\u00c2","\u00e2","\u00c4","\u00e4","\u00c3","\u00e3","\u01cd","\u01ce","\u0100","\u0101","\u0102","\u0103","\u0104","\u0105","\u00c5","\u00e5","\u0106","\u0107","\u0108","\u0109","\u00c7","\u00e7","\u010c","\u010d","\u010a","\u010b","\u0110","\u0111","\u010e","\u010f","\u00c9","\u00e9","\u00c8","\u00e8","\u00ca","\u00ea","\u00cb","\u00eb","\u011a","\u011b","\u0112","\u0113","\u0114","\u0115","\u0116","\u0117","\u0118","\u0119","\u011c","\u011d","\u0122","\u0123","\u011e","\u011f","\u0120","\u0121","\u0124","\u0125","\u0126","\u0127","\u00cd","\u00ed","\u00cc","\u00ec","\u00ce","\u00ee","\u00cf","\u00ef","\u0128","\u0129","\u01cf","\u01d0","\u012a","\u012b","\u012c","\u012d","\u0130","\u0131","\u012e","\u012f","\u0134","\u0135","\u0136","\u0137","\u0139","\u013a","\u013b","\u013c","\u013d","\u013e","\u0141","\u0142","\u013f","\u0140","\u0143","\u0144","\u00d1","\u00f1","\u0145","\u0146","\u0147","\u0148","\u00d3","\u00f3","\u00d2","\u00f2","\u00d4","\u00f4","\u00d6","\u00f6","\u00d5","\u00f5","\u01d1","\u01d2","\u014c","\u014d","\u014e","\u014f","\u01ea","\u01eb","\u0150","\u0151","\u0154","\u0155","\u0156","\u0157","\u0158","\u0159","\u015a","\u015b","\u015c","\u015d","\u015e","\u015f","\u0160","\u0161","\u0162","\u0163","\u0164","\u0165","\u00da","\u00fa","\u00d9","\u00f9","\u00db","\u00fb","\u00dc","\u00fc","\u0168","\u0169","\u016e","\u016f","\u01d3","\u01d4","\u016a","\u016b","\u01d6","\u01d8","\u01da","\u01dc","\u016c","\u016d","\u0172","\u0173","\u0170","\u0171","\u0174","\u0175","\u00dd","\u00fd","\u0176","\u0177","\u0178","\u00ff","\u0232","\u0233","\u0179","\u017a","\u017d","\u017e","\u017b","\u017c","\u00c6","\u00e6","\u01e2","\u01e3","\u00d8","\u00f8","\u0152","\u0153","\u00df","\u00f0","\u00de","\u00fe","\u018f","\u0259"]},'latinextended':{'labelMsg':'wikieditor-toolbar-characters-page-latinextended','layout':'characters','characters':["\u1e00","\u1e01","\u1e9a","\u1ea0","\u1ea1","\u1ea2","\u1ea3","\u1ea4","\u1ea5","\u1ea6","\u1ea7","\u1ea8","\u1ea9","\u1eaa","\u1eab","\u1eac","\u1ead","\u1eae","\u1eaf","\u1eb0","\u1eb1","\u1eb2","\u1eb3","\u1eb4","\u1eb5","\u1eb6","\u1eb7","\u1e02","\u1e03","\u1e04","\u1e05","\u1e06","\u1e07","\u1e08","\u1e09","\u1e0a","\u1e0b","\u1e0c","\u1e0d","\u1e0e","\u1e0f","\u1e10","\u1e11","\u1e12","\u1e13","\u1e14","\u1e15","\u1e16","\u1e17","\u1e18","\u1e19","\u1e1a","\u1e1b","\u1e1c","\u1e1d","\u1eb8","\u1eb9","\u1eba","\u1ebb","\u1ebc","\u1ebd","\u1ebe","\u1ebf","\u1ec0","\u1ec1","\u1ec2","\u1ec3","\u1ec4","\u1ec5","\u1ec6","\u1ec7","\u1e1e","\u1e1f","\u1e20","\u1e21","\u1e22","\u1e23","\u1e24","\u1e25","\u1e26","\u1e27","\u1e28","\u1e29","\u1e2a","\u1e2b","\u1e96","\u1e2c","\u1e2d","\u1e2e","\u1e2f","\u1ec8","\u1ec9","\u1eca","\u1ecb","\u1e30","\u1e31","\u1e32","\u1e33","\u1e34","\u1e35","\u1e36","\u1e37","\u1e38","\u1e39","\u1e3a","\u1e3b","\u1e3c","\u1e3d","\u1efa","\u1efb","\u1e3e","\u1e3f","\u1e40","\u1e41","\u1e42","\u1e43","\u1e44","\u1e45","\u1e46","\u1e47","\u1e48","\u1e49","\u1e4a","\u1e4b","\u1e4c","\u1e4d","\u1e4e","\u1e4f","\u1e50","\u1e51","\u1e52","\u1e53","\u1ecc","\u1ecd","\u1ece","\u1ecf","\u1ed0","\u1ed1","\u1ed2","\u1ed3","\u1ed4","\u1ed5","\u1ed6","\u1ed7","\u1ed8","\u1ed9","\u1eda","\u1edb","\u1edc","\u1edd","\u1ede","\u1edf","\u1ee0","\u1ee1","\u1ee2","\u1ee3","\u1e54","\u1e55","\u1e56","\u1e57","\u1e58","\u1e59","\u1e5a","\u1e5b","\u1e5c","\u1e5d","\u1e5e","\u1e5f","\u1e60","\u1e61","\u1e9b","\u1e62","\u1e63","\u1e64","\u1e65","\u1e66","\u1e67","\u1e68","\u1e69","\u1e9c","\u1e9d","\u1e6a","\u1e6b","\u1e6c","\u1e6d","\u1e6e","\u1e6f","\u1e70","\u1e71","\u1e97","\u1e72","\u1e73","\u1e74","\u1e75","\u1e76","\u1e77","\u1e78","\u1e79","\u1e7a","\u1e7b","\u1ee4","\u1ee5","\u1ee6","\u1ee7","\u1ee8","\u1ee9","\u1eea","\u1eeb","\u1eec","\u1eed","\u1eee","\u1eef","\u1ef0","\u1ef1","\u1e7c","\u1e7d","\u1e7e","\u1e7f","\u1efc","\u1efd","\u1e80","\u1e81","\u1e82","\u1e83","\u1e84","\u1e85","\u1e86","\u1e87","\u1e88","\u1e89","\u1e98","\u1e8a","\u1e8b","\u1e8c","\u1e8d","\u1e8e","\u1e8f","\u1e99","\u1ef2","\u1ef3","\u1ef4","\u1ef5","\u1ef6","\u1ef7","\u1ef8","\u1ef9","\u1efe","\u1eff","\u1e90","\u1e91","\u1e92","\u1e93","\u1e94","\u1e95","\u1e9e","\u1e9f"]},'ipa':{labelMsg:'wikieditor-toolbar-characters-page-ipa',layout:'characters',characters:["p","t\u032a","t","\u0288","c","k","q","\u02a1","\u0294","b","d\u032a","d","\u0256","\u025f","\u0261","\u0262","\u0253","\u0257","\u0284","\u0260","\u029b","t\u0361s","t\u0361\u0283","t\u0361\u0255","d\u0361z","d\u0361\u0292","d\u0361\u0291","\u0278","f","\u03b8","s","\u0283","\u0285","\u0286","\u0282","\u0255","\u00e7","\u0267","x","\u03c7","\u0127","\u029c","h","\u03b2","v","\u028d","\u00f0","z","\u0292","\u0293","\u0290","\u0291","\u029d","\u0263","\u0281","\u0295","\u0296","\u02a2","\u0266","\u026c","\u026e","m","m\u0329","\u0271","\u0271\u0329","\u0271\u030d","n\u032a","n\u032a\u030d","n","n\u0329","\u0273","\u0273\u0329","\u0272","\u0272\u0329","\u014b","\u014b\u030d","\u014b\u0329","\u0274","\u0274\u0329","\u0299","\u0299\u0329","r","r\u0329","\u0280","\u0280\u0329","\u027e","\u027d","\u027f","\u027a","l\u032a","l\u032a\u0329","l","l\u0329","\u026b","\u026b\u0329","\u026d","\u026d\u0329","\u028e","\u028e\u0329","\u029f","\u029f\u0329","w","\u0265","\u028b","\u0279","\u027b","j","\u0270","\u0298","\u01c2","\u01c0","!","\u01c1","\u02b0","\u02b1","\u02b7","\u02b8","\u02b2","\u02b3","\u207f","\u02e1","\u02b4","\u02b5","\u02e2","\u02e3","\u02e0","\u02b6","\u02e4","\u02c1","\u02c0","\u02bc","i","i\u032f","\u0129","y","y\u032f","\u1ef9","\u026a","\u026a\u032f","\u026a\u0303","\u028f","\u028f\u032f","\u028f\u0303","\u0268","\u0268\u032f","\u0268\u0303","\u0289","\u0289\u032f","\u0289\u0303","\u026f","\u026f\u032f","\u026f\u0303","u","u\u032f","\u0169","\u028a","\u028a\u032f","\u028a\u0303","e","e\u032f","\u1ebd","\u00f8","\u00f8\u032f","\u00f8\u0303","\u0258","\u0258\u032f","\u0258\u0303","\u0275","\u0275\u032f","\u0275\u0303","\u0264","\u0264\u032f","\u0264\u0303","o","o\u032f","\u00f5","\u025b","\u025b\u032f","\u025b\u0303","\u0153","\u0153\u032f","\u0153\u0303","\u025c","\u025c\u032f","\u025c\u0303","\u0259","\u0259\u032f","\u0259\u0303","\u025e","\u025e\u032f","\u025e\u0303","\u028c","\u028c\u032f","\u028c\u0303","\u0254","\u0254\u032f","\u0254\u0303","\u00e6","\u00e6\u032f","\u00e6\u0303","\u0276","\u0276\u032f","\u0276\u0303","a","a\u032f","\u00e3","\u0250","\u0250\u032f","\u0250\u0303","\u0251","\u0251\u032f","\u0251\u0303","\u0252","\u0252\u032f","\u0252\u0303","\u02c8","\u02cc","\u02d0","\u02d1","\u02d8",".","\u203f","|","\u2016"]},'symbols':{'labelMsg':'wikieditor-toolbar-characters-page-symbols','layout':'characters','characters':["~","|","\u00a1","\u00bf","\u2020","\u2021","\u2194","\u2191","\u2193","\u2022","\u00b6","#","\u00bd","\u2153","\u2154","\u00bc","\u00be","\u215b","\u215c","\u215d","\u215e","\u221e","\u2018","\u201e","\u201c","\u2019","\u201d",{'label':"\u00ab\u00bb",'action':{'type':'encapsulate','options':{'pre':"\u00ab",'post':"\u00bb"}}},"\u00a4","\u20b3","\u0e3f","\u20b5","\u00a2","\u20a1","\u20a2","$","\u20ab","\u20af","\u20ac","\u20a0","\u20a3","\u0192","\u20b4","\u20ad","\u20a4","\u2133","\u20a5","\u20a6","\u2116","\u20a7","\u20b0","\u00a3","\u17db","\u20a8","\u20aa","\u09f3","\u20ae","\u20a9","\u00a5","\u2660","\u2663","\u2665","\u2666","m\u00b2","m\u00b3","\u2013","\u2014","\u2026","\u2018","\u201c","\u2019","\u201d","\u00b0","\u2033","\u2032","\u2248","\u2260","\u2264","\u2265","\u00b1","\u2212","\u00d7","\u00f7","\u2190","\u2192","\u00b7","\u00a7"]},'greek':{'labelMsg':'wikieditor-toolbar-characters-page-greek','layout':'characters','language':'hl','characters':["\u0391","\u0386","\u03b1","\u03ac","\u0392","\u03b2","\u0393","\u03b3","\u0394","\u03b4","\u0395","\u0388","\u03b5","\u03ad","\u0396","\u03b6","\u0397","\u0389","\u03b7","\u03ae","\u0398","\u03b8","\u0399","\u038a","\u03b9","\u03af","\u039a","\u03ba","\u039b","\u03bb","\u039c","\u03bc","\u039d","\u03bd","\u039e","\u03be","\u039f","\u038c","\u03bf","\u03cc","\u03a0","\u03c0","\u03a1","\u03c1","\u03a3","\u03c3","\u03c2","\u03a4","\u03c4","\u03a5","\u038e","\u03c5","\u03cd","\u03a6","\u03c6","\u03a7","\u03c7","\u03a8","\u03c8","\u03a9","\u038f","\u03c9","\u03ce"]},'cyrillic':{'labelMsg':'wikieditor-toolbar-characters-page-cyrillic','layout':'characters','characters':["\u0410","\u0430","\u04d8","\u04d9","\u0411","\u0431","\u0412","\u0432","\u0413","\u0433","\u0490","\u0491","\u0403","\u0453","\u0492","\u0493","\u0414","\u0434","\u0402","\u0452","\u0415","\u0435","\u0404","\u0454","\u0401","\u0451","\u0416","\u0436","\u0417","\u0437","\u0405","\u0455","\u0418","\u0438","\u0406","\u0456","\u0407","\u0457","\u0130","\u0419","\u0439","\u04e2","\u04e3","\u0408","\u0458","\u041a","\u043a","\u040c","\u045c","\u049a","\u049b","\u041b","\u043b","\u0409","\u0459","\u041c","\u043c","\u041d","\u043d","\u040a","\u045a","\u04a2","\u04a3","\u041e","\u043e","\u04e8","\u04e9","\u041f","\u043f","\u0420","\u0440","\u0421","\u0441","\u0422","\u0442","\u040b","\u045b","\u0423","\u0443","\u040e","\u045e","\u04ee","\u04ef","\u04b0","\u04b1","\u04ae","\u04af","\u0424","\u0444","\u0425","\u0445","\u04b2","\u04b3","\u04ba","\u04bb","\u0426","\u0446","\u0427","\u0447","\u04b6","\u04b7","\u040f","\u045f","\u0428","\u0448","\u0429","\u0449","\u042a","\u044a","\u042b","\u044b","\u042c","\u044c","\u042d","\u044d","\u042e","\u044e","\u042f","\u044f"]},'arabic':{'labelMsg':'wikieditor-toolbar-characters-page-arabic','layout':'characters','language':'ar','direction':'rtl','characters':["\u061b","\u061f","\u0621","\u0622","\u0623","\u0624","\u0625","\u0626","\u0627","\u0628","\u0629","\u062a","\u062b","\u062c","\u062d","\u062e","\u062f","\u0630","\u0631","\u0632","\u0633","\u0634","\u0635","\u0636","\u0637","\u0638","\u0639","\u063a","\u0641","\u0642","\u0643","\u0644","\u0645","\u0646","\u0647","\u0648","\u0649","\u064a","\u060c","\u067e","\u0686","\u0698","\u06af","\u06ad"]},'hebrew':{'labelMsg':'wikieditor-toolbar-characters-page-hebrew','layout':'characters','direction':'rtl','characters':["\u05d0","\u05d1","\u05d2","\u05d3","\u05d4","\u05d5","\u05d6","\u05d7","\u05d8","\u05d9","\u05db","\u05da","\u05dc","\u05de","\u05dd","\u05e0","\u05df","\u05e1","\u05e2","\u05e4","\u05e3","\u05e6","\u05e5","\u05e7","\u05e8","\u05e9","\u05ea","\u05f3","\u05f4","\u05f0","\u05f1","\u05f2","\u05d0","\u05d3","\u05d4","\u05d5","\u05d6","\u05d7","\u05d8","\u05d9","\u05da","\u05db","\u05dc","\u05dd","\u05de","\u05df","\u05e0","\u05e1","\u05e2","\u05e3","\u05e4","\u05be","\u05f3","\u05f4",["\u05b0\u25cc","\u05b0"],["\u05b1\u25cc","\u05b1"],["\u05b2\u25cc","\u05b2"],["\u05b3\u25cc","\u05b3"],["\u05b4\u25cc","\u05b4"],["\u05b5\u25cc","\u05b5"],["\u05b6\u25cc","\u05b6"],["\u05b7\u25cc","\u05b7"],["\u05b8\u25cc","\u05b8"],["\u05b9\u25cc","\u05b9"],["\u05bb\u25cc","\u05bb"],["\u05bc\u25cc","\u05bc"],["\u05c1\u25cc","\u05c1"],["\u05c2\u25cc","\u05c2"],["\u05c7\u25cc","\u05c7"],["\u0591\u25cc","\u0591"],["\u0592\u25cc","\u0592"],["\u0593\u25cc","\u0593"],["\u0594\u25cc","\u0594"],["\u0595\u25cc","\u0595"],["\u0596\u25cc","\u0596"],["\u0597\u25cc","\u0597"],["\u0598\u25cc","\u0598"],["\u0599\u25cc","\u0599"],["\u059a\u25cc","\u059a"],["\u059b\u25cc","\u059b"],["\u059c\u25cc","\u059c"],["\u059d\u25cc","\u059d"],["\u059e\u25cc","\u059e"],["\u059f\u25cc","\u059f"],["\u05a0\u25cc","\u05a0"],["\u05a1\u25cc","\u05a1"],["\u05a2\u25cc","\u05a2"],["\u05a3\u25cc","\u05a3"],["\u05a4\u25cc","\u05a4"],["\u05a5\u25cc","\u05a5"],["\u05a6\u25cc","\u05a6"],["\u05a7\u25cc","\u05a7"],["\u05a8\u25cc","\u05a8"],["\u05a9\u25cc","\u05a9"],["\u05aa\u25cc","\u05aa"],["\u05ab\u25cc","\u05ab"],["\u05ac\u25cc","\u05ac"],["\u05ad\u25cc","\u05ad"],["\u05ae\u25cc","\u05ae"],["\u05af\u25cc","\u05af"],["\u05bf\u25cc","\u05bf"],["\u05c0\u25cc","\u05c0"],["\u05c3\u25cc","\u05c3"]]},'telugu':{'labelMsg':'wikieditor-toolbar-characters-page-telugu','language':'te','layout':'characters','characters':["\u0c01","\u0c02","\u0c03","\u0c05","\u0c06","\u0c07","\u0c08","\u0c09","\u0c0a","\u0c0b","\u0c60","\u0c0c","\u0c61","\u0c0e","\u0c0f","\u0c10","\u0c12","\u0c13","\u0c14","\u0c15","\u0c16","\u0c17","\u0c18","\u0c19","\u0c1a","\u0c1b","\u0c1c","\u0c1d","\u0c1e","\u0c1f","\u0c20","\u0c21","\u0c22","\u0c23","\u0c24","\u0c25","\u0c26","\u0c27","\u0c28","\u0c2a","\u0c2b","\u0c2c","\u0c2d","\u0c2e","\u0c2f","\u0c30","\u0c31","\u0c32","\u0c33","\u0c35","\u0c36","\u0c37","\u0c38","\u0c39","\u0c3e","\u0c3f","\u0c40","\u0c41","\u0c42","\u0c43","\u0c44","\u0c46","\u0c47","\u0c48","\u0c4a","\u0c4b","\u0c4c","\u0c4d","\u0c62","\u0c63","\u0c58","\u0c59","\u0c66","\u0c67","\u0c68","\u0c69","\u0c6a","\u0c6b","\u0c6c","\u0c6d","\u0c6e","\u0c6f","\u0c3d","\u0c78","\u0c79","\u0c7a","\u0c7b","\u0c7c","\u0c7d","\u0c7e","\u0c7f"]},'sinhala':{'labelMsg':'wikieditor-toolbar-characters-page-sinhala','language':'si','layout':'characters','characters':["\u0d85","\u0d86","\u0d87","\u0d88","\u0d89","\u0d8a","\u0d8b","\u0d8c","\u0d8d","\u0d8e","\u0d8f","\u0d90","\u0d91","\u0d92","\u0d93","\u0d94","\u0d95","\u0d96","\u0d9a","\u0d9b","\u0d9c","\u0d9d","\u0d9e","\u0d9f","\u0da0","\u0da1","\u0da2","\u0da3","\u0da4","\u0da5","\u0da6","\u0da7","\u0da8","\u0da9","\u0daa","\u0dab","\u0dac","\u0dad","\u0dae","\u0daf","\u0db0","\u0db1","\u0db3","\u0db4","\u0db5","\u0db6","\u0db7","\u0db8","\u0db9","\u0dba","\u0dbb","\u0dbd","\u0dc0","\u0dc1","\u0dc2","\u0dc3","\u0dc4","\u0dc5","\u0dc6",["\u25cc\u0dcf","\u0dcf"],["\u25cc\u0dd0","\u0dd0"],["\u25cc\u0dd1","\u0dd1"],["\u25cc\u0dd2","\u0dd2"],["\u25cc\u0dd3","\u0dd3"],["\u25cc\u0dd4","\u0dd4"],["\u25cc\u0dd6","\u0dd6"],["\u25cc\u0dd8","\u0dd8"],["\u25cc\u0df2","\u0df2"],["\u25cc\u0ddf","\u0ddf"],["\u25cc\u0df3","\u0df3"],["\u25cc\u0dd9","\u0dd9"],["\u25cc\u0dda","\u0dda"],["\u25cc\u0ddc","\u0ddc"],["\u25cc\u0ddd","\u0ddd"],["\u25cc\u0dde","\u0dde"],["\u25cc\u0dca","\u0dca"]]},'gujarati':{'labelMsg':'wikieditor-toolbar-characters-page-gujarati','language':'gu','layout':'characters','characters':["\u0ad0","\u0a85","\u0a86","\u0a87","\u0a88","\u0a89","\u0a8a","\u0a8b","\u0ae0","\u0a8c","\u0ae1","\u0a8d","\u0a8f","\u0a90","\u0a91","\u0a93","\u0a94","\u0a95","\u0a96","\u0a97","\u0a98","\u0a99","\u0a9a","\u0a9b","\u0a9c","\u0a9d","\u0a9e","\u0a9f","\u0aa0","\u0aa1","\u0aa2","\u0aa3","\u0aa4","\u0aa5","\u0aa6","\u0aa7","\u0aa8","\u0aaa","\u0aab","\u0aac","\u0aad","\u0aae","\u0aaf","\u0ab0","\u0ab2","\u0ab5","\u0ab6","\u0ab7","\u0ab8","\u0ab9","\u0ab3","\u0abd",["\u25cc\u0abe","\u0abe"],["\u25cc\u0abf","\u0abf"],["\u25cc\u0ac0","\u0ac0"],["\u25cc\u0ac1","\u0ac1"],["\u25cc\u0ac2","\u0ac2"],["\u25cc\u0ac3","\u0ac3"],["\u25cc\u0ac4","\u0ac4"],["\u25cc\u0ae2","\u0ae2"],["\u25cc\u0ae3","\u0ae3"],["\u25cc\u0ac5","\u0ac5"],["\u25cc\u0ac7","\u0ac7"],["\u25cc\u0ac8","\u0ac8"],["\u25cc\u0ac9","\u0ac9"],["\u25cc\u0acb","\u0acb"],["\u25cc\u0acc","\u0acc"],["\u25cc\u0acd","\u0acd"]]}}},'help':{labelMsg:'wikieditor-toolbar-section-help',type:'booklet',pages:{'format':{labelMsg:'wikieditor-toolbar-help-page-format',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-italic-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-italic-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-italic-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-bold-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-bold-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-bold-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-bolditalic-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-bolditalic-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-bolditalic-result'}}]},'link':{labelMsg:'wikieditor-toolbar-help-page-link',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-ilink-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-ilink-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-ilink-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-xlink-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-xlink-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-xlink-result'}}]},'heading':{labelMsg:'wikieditor-toolbar-help-page-heading',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading1-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading1-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading1-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading2-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading2-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading2-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading3-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading3-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading3-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading4-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading4-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading4-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading5-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading5-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading5-result'}}]},'list':{labelMsg:'wikieditor-toolbar-help-page-list',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-ulist-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-ulist-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-ulist-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-olist-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-olist-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-olist-result'}}]},'file':{labelMsg:'wikieditor-toolbar-help-page-file',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-file-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-file-syntax'},'result':{htmlMsg:['wikieditor-toolbar-help-content-file-result',stylepath]}}]},'reference':{labelMsg:'wikieditor-toolbar-help-page-reference',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-reference-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-reference-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-reference-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-rereference-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-rereference-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-rereference-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-showreferences-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-showreferences-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-showreferences-result'}}]},'discussion':{labelMsg:'wikieditor-toolbar-help-page-discussion',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-signaturetimestamp-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-signaturetimestamp-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-signaturetimestamp-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-signature-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-signature-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-signature-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-indent-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-indent-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-indent-result'}}]}}}},'dialogs':{'insert-link':{titleMsg:'wikieditor-toolbar-tool-link-title',id:'wikieditor-toolbar-link-dialog',html:'\ |
10 | 10 | <fieldset>\ |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | status='notexists';else if(typeof page.invalid!='undefined') |
40 | 40 | status='invalid';} |
41 | 41 | cache[target]=status;updateWidget(status);}}));} |
42 | | -$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-link-int-target').data('tooltip',gM('wikieditor-toolbar-tool-link-int-target-tooltip'));$j('#wikieditor-toolbar-link-int-text').data('tooltip',gM('wikieditor-toolbar-tool-link-int-text-tooltip'));$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').each(function(){var tooltip=gM($j(this).attr('id')+'-tooltip');if($j(this).val()=='') |
| 42 | +var u=mw.usability;$j(this).find('[rel]').each(function(){$j(this).text(u.getMsg($j(this).attr('rel')));});$j('#wikieditor-toolbar-link-int-target').data('tooltip',u.getMsg('wikieditor-toolbar-tool-link-int-target-tooltip'));$j('#wikieditor-toolbar-link-int-text').data('tooltip',u.getMsg('wikieditor-toolbar-tool-link-int-text-tooltip'));$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').each(function(){var tooltip=u.getMsg($j(this).attr('id')+'-tooltip');if($j(this).val()=='') |
43 | 43 | $j(this).val($j(this).data('tooltip')).addClass('wikieditor-toolbar-dialog-hint');}).focus(function(){$j(this).removeClass('wikieditor-toolbar-dialog-hint');if($j(this).val()==$j(this).data('tooltip')) |
44 | 44 | $j(this).val('');}).bind('blur change',function(){if($j(this).val()=='') |
45 | 45 | $j(this).val($j(this).data('tooltip')).addClass('wikieditor-toolbar-dialog-hint');else |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | $j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');else |
48 | 48 | $j('#wikieditor-toolbar-link-type-int').attr('checked','checked');if($j('#wikieditor-toolbar-link-int-text').data('untouched')) |
49 | 49 | $j('#wikieditor-toolbar-link-int-text').val($j('#wikieditor-toolbar-link-int-target').val()).change();},0);});$j('#wikieditor-toolbar-link-int-text').bind('change keydown paste cut',function(){var oldVal=$j(this).val();var that=this;setTimeout(function(){if($j(that).val()!=oldVal) |
50 | | -$j(that).data('untouched',false);},0);});var existsMsg=gM('wikieditor-toolbar-tool-link-int-target-status-exists');var notexistsMsg=gM('wikieditor-toolbar-tool-link-int-target-status-notexists');var invalidMsg=gM('wikieditor-toolbar-tool-link-int-target-status-invalid');var externalMsg=gM('wikieditor-toolbar-tool-link-int-target-status-external');var loadingMsg=gM('wikieditor-toolbar-tool-link-int-target-status-loading');$j('#wikieditor-toolbar-link-int-target-status').append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-exists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-exists.png')).append(existsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-notexists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-notexists.png')).append(notexistsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-invalid').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-invalid.png')).append(invalidMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-external').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-external.png')).append(externalMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-loading').append($j('<img />').attr({'src':$j.wikiEditor.imgPath+'dialogs/'+'loading.gif','alt':loadingMsg,'title':loadingMsg}))).data('existencecache',{}).children().hide();$j('#wikieditor-toolbar-link-int-target').bind('keypress paste cut',function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
| 50 | +$j(that).data('untouched',false);},0);});var existsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-exists');var notexistsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-notexists');var invalidMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-invalid');var externalMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-external');var loadingMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-loading');$j('#wikieditor-toolbar-link-int-target-status').append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-exists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-exists.png')).append(existsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-notexists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-notexists.png')).append(notexistsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-invalid').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-invalid.png')).append(invalidMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-external').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-external.png')).append(externalMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-loading').append($j('<img />').attr({'src':$j.wikiEditor.imgPath+'dialogs/'+'loading.gif','alt':loadingMsg,'title':loadingMsg}))).data('existencecache',{}).children().hide();$j('#wikieditor-toolbar-link-int-target').bind('keypress paste cut',function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
51 | 51 | var timerID=setTimeout(updateExistence,120);$j(this).data('timerID',timerID);}).change(function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
52 | 52 | updateExistence();});$j('#wikieditor-toolbar-link-int-target').data('suggcache',{}).suggestions({fetch:function(query){var that=this;var title=$j(this).val();if(isExternalLink(title)||title.indexOf('|')!=-1||title==''){$j(this).suggestions('suggestions',[]);return;} |
53 | 53 | var cache=$j(this).data('suggcache');if(typeof cache[title]!='undefined'){$j(this).suggestions('suggestions',cache[title]);return;} |
— | — | @@ -54,13 +54,13 @@ |
55 | 55 | request.abort();}});},dialog:{width:500,buttons:{'wikieditor-toolbar-tool-link-insert':function(){function escapeInternalText(s){return s.replace(/(]{2,})/g,'<nowiki>$1</nowiki>');} |
56 | 56 | function escapeExternalTarget(s){return s.replace(/ /g,'%20').replace(/]/g,'%5D');} |
57 | 57 | function escapeExternalText(s){return s.replace(/(]+)/g,'<nowiki>$1</nowiki>');} |
58 | | -var insertText='';var whitespace=$j('#wikieditor-toolbar-link-dialog').data('whitespace');var target=$j('#wikieditor-toolbar-link-int-target').val();var text=$j('#wikieditor-toolbar-link-int-text').val();if(target==''){alert(gM('wikieditor-toolbar-tool-link-empty'));return;} |
| 58 | +var insertText='';var whitespace=$j('#wikieditor-toolbar-link-dialog').data('whitespace');var target=$j('#wikieditor-toolbar-link-int-target').val();var text=$j('#wikieditor-toolbar-link-int-text').val();var u=mw.usability;if(target==''){alert(u.getMsg('wikieditor-toolbar-tool-link-empty'));return;} |
59 | 59 | if($j.trim(text)==''){text='';} |
60 | | -if($j('#wikieditor-toolbar-link-type-int').is(':checked')){if($j('#wikieditor-toolbar-link-int-target-status-invalid').is(':visible')){alert(gM('wikieditor-toolbar-tool-link-int-invalid'));return;} |
| 60 | +if($j('#wikieditor-toolbar-link-type-int').is(':checked')){if($j('#wikieditor-toolbar-link-int-target-status-invalid').is(':visible')){alert(u.getMsg('wikieditor-toolbar-tool-link-int-invalid'));return;} |
61 | 61 | if(target==text) |
62 | 62 | insertText='[['+target+']]';else |
63 | 63 | insertText='[['+target+'|'+escapeInternalText(text)+']]';}else{if(!target.match(/^[a-z]+:\/\/./)) |
64 | | -target='http://'+target;var match=target.match($j(this).data('articlePathRegex'));if(match&&!$j(this).data('ignoreLooksInternal')){var buttons={};var that=this;buttons[gM('wikieditor-toolbar-tool-link-lookslikeinternal-int')]=function(){$j('#wikieditor-toolbar-link-int-target').val(match[1]).change();$j(this).dialog('close');};buttons[gM('wikieditor-toolbar-tool-link-lookslikeinternal-ext')]=function(){$j(that).data('ignoreLooksInternal',true);$j(that).closest('.ui-dialog').find('button:first').click();$j(that).data('ignoreLooksInternal',false);$j(this).dialog('close');};$j.wikiEditor.modules.dialogs.quickDialog(gM('wikieditor-toolbar-tool-link-lookslikeinternal',match[1]),{buttons:buttons});return;} |
| 64 | +target='http://'+target;var match=target.match($j(this).data('articlePathRegex'));if(match&&!$j(this).data('ignoreLooksInternal')){var buttons={};var that=this;buttons[u.getMsg('wikieditor-toolbar-tool-link-lookslikeinternal-int')]=function(){$j('#wikieditor-toolbar-link-int-target').val(match[1]).change();$j(this).dialog('close');};buttons[u.getMsg('wikieditor-toolbar-tool-link-lookslikeinternal-ext')]=function(){$j(that).data('ignoreLooksInternal',true);$j(that).closest('.ui-dialog').find('button:first').click();$j(that).data('ignoreLooksInternal',false);$j(this).dialog('close');};$j.wikiEditor.modules.dialogs.quickDialog(u.getMsg('wikieditor-toolbar-tool-link-lookslikeinternal',match[1]),{buttons:buttons});return;} |
65 | 65 | var escTarget=escapeExternalTarget(target);var escText=escapeExternalText(text);if(escTarget==escText) |
66 | 66 | insertText=escTarget;else if(text=='') |
67 | 67 | insertText='['+escTarget+']';else |
— | — | @@ -127,12 +127,12 @@ |
128 | 128 | </tr>\ |
129 | 129 | </table>\ |
130 | 130 | </div>\ |
131 | | - </div></div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-table-dimensions-rows').val(4);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);$j('#wikieditor-toolbar-table-wikitable').click(function(){$j('.wikieditor-toolbar-table-preview').toggleClass('wikitable');});$j('#wikieditor-toolbar-table-preview').clone().attr('id','wikieditor-toolbar-table-preview2').addClass('sortable').insertAfter($j('#wikieditor-toolbar-table-preview')).hide();if(typeof ts_makeSortable=='function') |
| 131 | + </div></div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(mw.usability.getMsg($j(this).attr('rel')));});$j('#wikieditor-toolbar-table-dimensions-rows').val(4);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);$j('#wikieditor-toolbar-table-wikitable').click(function(){$j('.wikieditor-toolbar-table-preview').toggleClass('wikitable');});$j('#wikieditor-toolbar-table-preview').clone().attr('id','wikieditor-toolbar-table-preview2').addClass('sortable').insertAfter($j('#wikieditor-toolbar-table-preview')).hide();if(typeof ts_makeSortable=='function') |
132 | 132 | ts_makeSortable($j('#wikieditor-toolbar-table-preview2').get(0));$j('#wikieditor-toolbar-table-sortable').click(function(){$j('#wikieditor-toolbar-table-preview').hide().attr('id','wikieditor-toolbar-table-preview3');$j('#wikieditor-toolbar-table-preview2').attr('id','wikieditor-toolbar-table-preview').show();$j('#wikieditor-toolbar-table-preview3').attr('id','wikieditor-toolbar-table-preview2');});$j('#wikieditor-toolbar-table-dimensions-header').click(function(){var headerHTML=$j('.wikieditor-toolbar-table-preview-header').html();var hiddenHTML=$j('.wikieditor-toolbar-table-preview-hidden').html();$j('.wikieditor-toolbar-table-preview-header').html(hiddenHTML);$j('.wikieditor-toolbar-table-preview-hidden').html(headerHTML);if(typeof ts_makeSortable=='function') |
133 | | -ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{resizable:false,width:590,buttons:{'wikieditor-toolbar-tool-table-insert':function(){var rowsVal=$j('#wikieditor-toolbar-table-dimensions-rows').val();var colsVal=$j('#wikieditor-toolbar-table-dimensions-columns').val();var rows=parseInt(rowsVal,10);var cols=parseInt(colsVal,10);var header=Math.min(1,$j('#wikieditor-toolbar-table-dimensions-header:checked').size());if(isNaN(rows)||isNaN(cols)||rows!=rowsVal||cols!=colsVal){alert(gM('wikieditor-toolbar-tool-table-invalidnumber'));return;} |
134 | | -if(rows+header==0||cols==0){alert(gM('wikieditor-toolbar-tool-table-zero'));return;} |
135 | | -if(rows*cols>1000){alert(gM('wikieditor-toolbar-tool-table-toomany',1000));return;} |
136 | | -var headerText=gM('wikieditor-toolbar-tool-table-example-header');var normalText=gM('wikieditor-toolbar-tool-table-example');var table="";for(var r=0;r<rows+header;r++){table+="|-\n";for(var c=0;c<cols;c++){var isHeader=(r+1==header);var delim=isHeader?'!':'|';if(c>0){delim+=delim;} |
| 133 | +ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{resizable:false,width:590,buttons:{'wikieditor-toolbar-tool-table-insert':function(){var rowsVal=$j('#wikieditor-toolbar-table-dimensions-rows').val();var colsVal=$j('#wikieditor-toolbar-table-dimensions-columns').val();var rows=parseInt(rowsVal,10);var cols=parseInt(colsVal,10);var header=Math.min(1,$j('#wikieditor-toolbar-table-dimensions-header:checked').size());var u=mw.usability;if(isNaN(rows)||isNaN(cols)||rows!=rowsVal||cols!=colsVal){alert(u.getMsg('wikieditor-toolbar-tool-table-invalidnumber'));return;} |
| 134 | +if(rows+header==0||cols==0){alert(u.getMsg('wikieditor-toolbar-tool-table-zero'));return;} |
| 135 | +if(rows*cols>1000){alert(u.getMsg('wikieditor-toolbar-tool-table-toomany',1000));return;} |
| 136 | +var headerText=u.getMsg('wikieditor-toolbar-tool-table-example-header');var normalText=u.getMsg('wikieditor-toolbar-tool-table-example');var table="";for(var r=0;r<rows+header;r++){table+="|-\n";for(var c=0;c<cols;c++){var isHeader=(r+1==header);var delim=isHeader?'!':'|';if(c>0){delim+=delim;} |
137 | 137 | table+=delim+' '+(isHeader?headerText:normalText)+' ';} |
138 | 138 | table=table.substr(0,table.length-1)+"\n";} |
139 | 139 | var classes=[];if($j('#wikieditor-toolbar-table-wikitable').is(':checked')) |
— | — | @@ -164,16 +164,16 @@ |
165 | 165 | <input type="checkbox" id="wikieditor-toolbar-replace-regex" />\ |
166 | 166 | <label for="wikieditor-toolbar-replace-regex" rel="wikieditor-toolbar-tool-replace-regex"></label>\ |
167 | 167 | </div>\ |
168 | | - </fieldset>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j(this).data('replaceCallback',function(mode){$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();var searchStr=$j('#wikieditor-toolbar-replace-search').val();if(searchStr==''){$j('#wikieditor-toolbar-replace-emptysearch').show();return;} |
| 168 | + </fieldset>',init:function(){var u=mw.usability;$j(this).find('[rel]').each(function(){$j(this).text(u.getMsg($j(this).attr('rel')));});$j(this).data('replaceCallback',function(mode){$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();var searchStr=$j('#wikieditor-toolbar-replace-search').val();if(searchStr==''){$j('#wikieditor-toolbar-replace-emptysearch').show();return;} |
169 | 169 | var replaceStr=$j('#wikieditor-toolbar-replace-replace').val();var flags='m';var matchCase=$j('#wikieditor-toolbar-replace-case').is(':checked');var isRegex=$j('#wikieditor-toolbar-replace-regex').is(':checked');if(!matchCase){flags+='i';} |
170 | 170 | if(mode=='replaceAll'){flags+='g';} |
171 | 171 | if(!isRegex){searchStr=RegExp.escape(searchStr);} |
172 | | -try{var regex=new RegExp(searchStr,flags);}catch(e){$j('#wikieditor-toolbar-replace-invalidregex').text(gM('wikieditor-toolbar-tool-replace-invalidregex',e.message)).show();return;} |
| 172 | +try{var regex=new RegExp(searchStr,flags);}catch(e){$j('#wikieditor-toolbar-replace-invalidregex').text(u.getMsg('wikieditor-toolbar-tool-replace-invalidregex',e.message)).show();return;} |
173 | 173 | var $textarea=$j(this).data('context').$textarea;var text=$textarea.textSelection('getContents');var match=false;var offset,s;if(mode!='replaceAll'){offset=$j(this).data('offset');s=text.substr(offset);match=s.match(regex);} |
174 | 174 | if(!match){offset=0;s=text;match=s.match(regex);} |
175 | 175 | if(!match){$j('#wikieditor-toolbar-replace-nomatch').show();}else if(mode=='replaceAll'){var index;for(var i=0;i<match.length;i++){index=s.indexOf(match[i]);if(index==-1){break;} |
176 | 176 | s=s.substr(index+match[i].length);var start=index+offset;var end=start+match[i].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end}).textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});offset=newEnd;} |
177 | | -$j('#wikieditor-toolbar-replace-success').text(gM('wikieditor-toolbar-tool-replace-success',match.length)).show();$j(this).data('offset',0);}else{var start=match.index+offset;var end=start+match[0].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end});if(mode=='replace'){$textarea.textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});} |
| 177 | +$j('#wikieditor-toolbar-replace-success').text(u.getMsg('wikieditor-toolbar-tool-replace-success',match.length)).show();$j(this).data('offset',0);}else{var start=match.index+offset;var end=start+match[0].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end});if(mode=='replace'){$textarea.textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});} |
178 | 178 | $textarea.textSelection('scrollToCaretPosition');$j(this).data('offset',mode=='replace'?newEnd:end);}});},dialog:{width:500,buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',true);$j(this).closest('.ui-dialog').keypress(function(e){if((e.keyCode||e.which)==13){var button=$j(this).data('dialogaction')||$j(this).find('button:first');button.click();e.preventDefault();}});$j(this).closest('.ui-dialog').find('button').focus(function(){$j(this).closest('.ui-dialog').data('dialogaction',this);});} |
179 | | -var dialog=$j(this).closest('.ui-dialog');var that=this;$j($j(this).data('context').$iframe[0].contentWindow.document).bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}else if((e.keyCode||e.which)==27){$j(that).dialog('close');}});},close:function(){$j($j(this).data('context').$iframe[0].contentWindow.document).unbind('keypress.srdialog');$j(this).data('context').$iframe[0].contentWindow.focus();$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});mw.ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
| 179 | +var dialog=$j(this).closest('.ui-dialog');var that=this;$j($j(this).data('context').$iframe[0].contentWindow.document).bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}else if((e.keyCode||e.which)==27){$j(that).dialog('close');}});},close:function(){$j($j(this).data('context').$iframe[0].contentWindow.document).unbind('keypress.srdialog');$j(this).data('context').$iframe[0].contentWindow.focus();$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
180 | 180 | if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','templateEditor');}}); |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Preview/Preview.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Preview module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for preview |
6 | 6 | if ( !wgWikiEditorEnabledModules.preview ) { |
7 | 7 | return true; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/TemplateEditor/TemplateEditor.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Template Editor module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for templateEditor |
6 | 6 | if ( !wgWikiEditorEnabledModules.templateEditor ) { |
7 | 7 | return true; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Toolbar module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for toolbar |
6 | 6 | if ( !wgWikiEditorEnabledModules.toolbar ) { |
7 | 7 | return true; |
— | — | @@ -960,17 +960,18 @@ |
961 | 961 | ); |
962 | 962 | } |
963 | 963 | // Set labels of tabs based on rel values |
| 964 | + var u = mw.usability; |
964 | 965 | $j(this).find( '[rel]' ).each( function() { |
965 | | - $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
| 966 | + $j(this).text( u.getMsg( $j(this).attr( 'rel' ) ) ); |
966 | 967 | }); |
967 | 968 | // Setup the tooltips in the textboxes |
968 | 969 | $j( '#wikieditor-toolbar-link-int-target' ) |
969 | | - .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) ); |
| 970 | + .data( 'tooltip', u.getMsg( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) ); |
970 | 971 | $j( '#wikieditor-toolbar-link-int-text' ) |
971 | | - .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) ); |
| 972 | + .data( 'tooltip', u.getMsg( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) ); |
972 | 973 | $j( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ) |
973 | 974 | .each( function() { |
974 | | - var tooltip = gM( $j( this ).attr( 'id' ) + '-tooltip' ); |
| 975 | + var tooltip = u.getMsg( $j( this ).attr( 'id' ) + '-tooltip' ); |
975 | 976 | if ( $j( this ).val() == '' ) |
976 | 977 | $j( this ) |
977 | 978 | .val( $j( this ).data( 'tooltip' ) ) |
— | — | @@ -1019,11 +1020,11 @@ |
1020 | 1021 | }); |
1021 | 1022 | // Add images to the page existence widget, which will be shown mutually exclusively to communicate if the |
1022 | 1023 | // page exists, does not exist or the title is invalid (like if it contains a | character) |
1023 | | - var existsMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-exists' ); |
1024 | | - var notexistsMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-notexists' ); |
1025 | | - var invalidMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ); |
1026 | | - var externalMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-external' ); |
1027 | | - var loadingMsg = gM( 'wikieditor-toolbar-tool-link-int-target-status-loading' ); |
| 1024 | + var existsMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-exists' ); |
| 1025 | + var notexistsMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-notexists' ); |
| 1026 | + var invalidMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ); |
| 1027 | + var externalMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-external' ); |
| 1028 | + var loadingMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-loading' ); |
1028 | 1029 | $j( '#wikieditor-toolbar-link-int-target-status' ) |
1029 | 1030 | .append( $j( '<div />' ) |
1030 | 1031 | .attr( 'id', 'wikieditor-toolbar-link-int-target-status-exists' ) |
— | — | @@ -1139,8 +1140,9 @@ |
1140 | 1141 | var whitespace = $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace' ); |
1141 | 1142 | var target = $j( '#wikieditor-toolbar-link-int-target' ).val(); |
1142 | 1143 | var text = $j( '#wikieditor-toolbar-link-int-text' ).val(); |
| 1144 | + var u = mw.usability; |
1143 | 1145 | if ( target == '' ) { |
1144 | | - alert( gM( 'wikieditor-toolbar-tool-link-empty' ) ); |
| 1146 | + alert( u.getMsg( 'wikieditor-toolbar-tool-link-empty' ) ); |
1145 | 1147 | return; |
1146 | 1148 | } |
1147 | 1149 | if ( $j.trim( text ) == '' ) { |
— | — | @@ -1152,7 +1154,7 @@ |
1153 | 1155 | // FIXME: Exactly how fragile is this? |
1154 | 1156 | if ( $j( '#wikieditor-toolbar-link-int-target-status-invalid' ).is( ':visible' ) ) { |
1155 | 1157 | // Refuse to add links to invalid titles |
1156 | | - alert( gM( 'wikieditor-toolbar-tool-link-int-invalid' ) ); |
| 1158 | + alert( u.getMsg( 'wikieditor-toolbar-tool-link-int-invalid' ) ); |
1157 | 1159 | return; |
1158 | 1160 | } |
1159 | 1161 | |
— | — | @@ -1170,18 +1172,18 @@ |
1171 | 1173 | if ( match && !$j(this).data( 'ignoreLooksInternal' ) ) { |
1172 | 1174 | var buttons = { }; |
1173 | 1175 | var that = this; |
1174 | | - buttons[ gM( 'wikieditor-toolbar-tool-link-lookslikeinternal-int' ) ] = function() { |
| 1176 | + buttons[ u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal-int' ) ] = function() { |
1175 | 1177 | $j( '#wikieditor-toolbar-link-int-target' ).val( match[1] ).change(); |
1176 | 1178 | $j(this).dialog( 'close' ); |
1177 | 1179 | }; |
1178 | | - buttons[ gM( 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' ) ] = function() { |
| 1180 | + buttons[ u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' ) ] = function() { |
1179 | 1181 | $j(that).data( 'ignoreLooksInternal', true ); |
1180 | 1182 | $j(that).closest( '.ui-dialog' ).find( 'button:first' ).click(); |
1181 | 1183 | $j(that).data( 'ignoreLooksInternal', false ); |
1182 | 1184 | $j(this).dialog( 'close' ); |
1183 | 1185 | }; |
1184 | 1186 | $j.wikiEditor.modules.dialogs.quickDialog( |
1185 | | - gM( 'wikieditor-toolbar-tool-link-lookslikeinternal', match[1] ), |
| 1187 | + u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal', match[1] ), |
1186 | 1188 | { buttons: buttons } |
1187 | 1189 | ); |
1188 | 1190 | return; |
— | — | @@ -1350,7 +1352,7 @@ |
1351 | 1353 | </div></div>', |
1352 | 1354 | init: function() { |
1353 | 1355 | $j(this).find( '[rel]' ).each( function() { |
1354 | | - $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
| 1356 | + $j(this).text( mw.usability.getMsg( $j(this).attr( 'rel' ) ) ); |
1355 | 1357 | }); |
1356 | 1358 | $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
1357 | 1359 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
— | — | @@ -1407,20 +1409,21 @@ |
1408 | 1410 | var rows = parseInt( rowsVal, 10 ); |
1409 | 1411 | var cols = parseInt( colsVal, 10 ); |
1410 | 1412 | var header = Math.min( 1, $j( '#wikieditor-toolbar-table-dimensions-header:checked' ).size() ); |
| 1413 | + var u = mw.usability; |
1411 | 1414 | if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) { |
1412 | | - alert( gM( 'wikieditor-toolbar-tool-table-invalidnumber' ) ); |
| 1415 | + alert( u.getMsg( 'wikieditor-toolbar-tool-table-invalidnumber' ) ); |
1413 | 1416 | return; |
1414 | 1417 | } |
1415 | 1418 | if ( rows + header == 0 || cols == 0 ) { |
1416 | | - alert( gM( 'wikieditor-toolbar-tool-table-zero' ) ); |
| 1419 | + alert( u.getMsg( 'wikieditor-toolbar-tool-table-zero' ) ); |
1417 | 1420 | return; |
1418 | 1421 | } |
1419 | 1422 | if ( rows * cols > 1000 ) { |
1420 | | - alert( gM( 'wikieditor-toolbar-tool-table-toomany', 1000 ) ); |
| 1423 | + alert( u.getMsg( 'wikieditor-toolbar-tool-table-toomany', 1000 ) ); |
1421 | 1424 | return; |
1422 | 1425 | } |
1423 | | - var headerText = gM( 'wikieditor-toolbar-tool-table-example-header' ); |
1424 | | - var normalText = gM( 'wikieditor-toolbar-tool-table-example' ); |
| 1426 | + var headerText = u.getMsg( 'wikieditor-toolbar-tool-table-example-header' ); |
| 1427 | + var normalText = u.getMsg( 'wikieditor-toolbar-tool-table-example' ); |
1425 | 1428 | var table = ""; |
1426 | 1429 | for ( var r = 0; r < rows + header; r++ ) { |
1427 | 1430 | table += "|-\n"; |
— | — | @@ -1526,8 +1529,9 @@ |
1527 | 1530 | </div>\ |
1528 | 1531 | </fieldset>', |
1529 | 1532 | init: function() { |
| 1533 | + var u = mw.usability; |
1530 | 1534 | $j(this).find( '[rel]' ).each( function() { |
1531 | | - $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
| 1535 | + $j(this).text( u.getMsg( $j(this).attr( 'rel' ) ) ); |
1532 | 1536 | }); |
1533 | 1537 | |
1534 | 1538 | // TODO: Find a cleaner way to share this function |
— | — | @@ -1555,7 +1559,7 @@ |
1556 | 1560 | var regex = new RegExp( searchStr, flags ); |
1557 | 1561 | } catch( e ) { |
1558 | 1562 | $j( '#wikieditor-toolbar-replace-invalidregex' ) |
1559 | | - .text( gM( 'wikieditor-toolbar-tool-replace-invalidregex', |
| 1563 | + .text( u.getMsg( 'wikieditor-toolbar-tool-replace-invalidregex', |
1560 | 1564 | e.message ) ) |
1561 | 1565 | .show(); |
1562 | 1566 | return; |
— | — | @@ -1604,7 +1608,7 @@ |
1605 | 1609 | offset = newEnd; |
1606 | 1610 | } |
1607 | 1611 | $j( '#wikieditor-toolbar-replace-success' ) |
1608 | | - .text( gM( 'wikieditor-toolbar-tool-replace-success', match.length ) ) |
| 1612 | + .text( u.getMsg( 'wikieditor-toolbar-tool-replace-success', match.length ) ) |
1609 | 1613 | .show(); |
1610 | 1614 | $j(this).data( 'offset', 0 ); |
1611 | 1615 | } else { |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toc/Toc.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Toc module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for toolbar |
6 | 6 | if ( !wgWikiEditorPreferences || !( wgWikiEditorPreferences.toc && wgWikiEditorPreferences.toc.enable ) ) { |
7 | 7 | return true; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Publish/Publish.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Publish module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for publish |
6 | 6 | if ( !wgWikiEditorEnabledModules.publish ) { |
7 | 7 | return true; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Highlight/Highlight.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /* JavaScript for WikiEditor Highlight module */ |
3 | 3 | |
4 | | -mw.ready( function() { |
| 4 | +$j(document).ready( function() { |
5 | 5 | // Check preferences for highlight |
6 | 6 | if ( !wgWikiEditorEnabledModules.highlight ) { |
7 | 7 | return true; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -12,18 +12,18 @@ |
13 | 13 | |
14 | 14 | static $scripts = array( |
15 | 15 | 'raw' => array( |
16 | | - array( 'src' => 'Modules/Highlight/Highlight.js', 'version' => 4 ), |
17 | | - array( 'src' => 'Modules/Preview/Preview.js', 'version' => 5 ), |
18 | | - array( 'src' => 'Modules/Publish/Publish.js', 'version' => 5 ), |
19 | | - array( 'src' => 'Modules/Toc/Toc.js', 'version' => 6 ), |
20 | | - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 36 ), |
21 | | - array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 3 ), |
| 16 | + array( 'src' => 'Modules/Highlight/Highlight.js', 'version' => 5 ), |
| 17 | + array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ), |
| 18 | + array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
| 19 | + array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 37 ), |
| 21 | + array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 4 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 38 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 39 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 38 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 39 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/js/usability.js |
— | — | @@ -0,0 +1,45 @@ |
| 2 | +/** |
| 3 | + * Common version-independent functions |
| 4 | + */ |
| 5 | + |
| 6 | +if ( typeof mw == 'undefined' ) { |
| 7 | + mw = {}; |
| 8 | +} |
| 9 | + |
| 10 | +mw.usability = { |
| 11 | + messages: {} |
| 12 | +} |
| 13 | + |
| 14 | +/** |
| 15 | + * This may eventually load something instead of just calling the callback. |
| 16 | + */ |
| 17 | +mw.usability.load = function( deps, callback ) { |
| 18 | + callback(); |
| 19 | +}; |
| 20 | + |
| 21 | +/** |
| 22 | + * Add messages to a local message table |
| 23 | + */ |
| 24 | +mw.usability.addMessages = function( messages ) { |
| 25 | + for ( var key in messages ) { |
| 26 | + this.messages[key] = messages[key]; |
| 27 | + } |
| 28 | +}; |
| 29 | + |
| 30 | +/** |
| 31 | + * Get a message |
| 32 | + */ |
| 33 | +mw.usability.getMsg = function( key, args ) { |
| 34 | + if ( !( key in this.messages ) ) { |
| 35 | + return '[' + key + ']'; |
| 36 | + } |
| 37 | + var msg = this.messages[key]; |
| 38 | + if ( typeof args == 'object' || typeof args == 'array' ) { |
| 39 | + for ( var argKey in args ) { |
| 40 | + msg = msg.replace( '\$' + (parseInt( argKey ) + 1), args[argKey] ); |
| 41 | + } |
| 42 | + } else if ( typeof args == 'string' || typeof args == 'number' ) { |
| 43 | + msg = msg.replace( '$1', args ); |
| 44 | + } |
| 45 | + return msg; |
| 46 | +}; |
Property changes on: trunk/extensions/UsabilityInitiative/js/usability.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 47 | + native |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -106,9 +106,8 @@ |
107 | 107 | return $.wikiEditor.supported = true; |
108 | 108 | }, |
109 | 109 | /** |
110 | | - * Provides a way to extract messages from objects. Wraps the gM function from js2stopgap.js, which will be changing |
111 | | - * in the very near future, so let's keep and eye on this. It's also possible that this function will just be moved |
112 | | - * to the global mw object all together. |
| 110 | + * Provides a way to extract messages from objects. Wraps the mw.usability.getMsg() function, which |
| 111 | + * may eventually become a wrapper for some kind of core MW functionality. |
113 | 112 | * |
114 | 113 | * @param object Object to extract messages from |
115 | 114 | * @param property String of name of property which contains the message. This should be the base name of the |
— | — | @@ -131,9 +130,9 @@ |
132 | 131 | } else if ( property + 'Msg' in object ) { |
133 | 132 | if ( typeof object[property + 'Msg' ] == 'object' ) { |
134 | 133 | // [ messageKey, arg1, arg2, ... ] |
135 | | - return gM.apply( this, object[property + 'Msg' ] ); |
| 134 | + return mw.usability.getMsg.apply( mw.usability, object[property + 'Msg' ] ); |
136 | 135 | } else { |
137 | | - return gM( object[property + 'Msg'] ); |
| 136 | + return mw.usability.getMsg( object[property + 'Msg'] ); |
138 | 137 | } |
139 | 138 | } else { |
140 | 139 | return ''; |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -231,7 +231,8 @@ |
232 | 232 | var parts = { 'pre' : '', 'peri' : '', 'post' : '' }; |
233 | 233 | for ( part in parts ) { |
234 | 234 | if ( part + 'Msg' in action.options ) { |
235 | | - parts[part] = gM( action.options[part + 'Msg'], ( action.options[part] || null ) ); |
| 235 | + parts[part] = mw.usability.getMsg( |
| 236 | + action.options[part + 'Msg'], ( action.options[part] || null ) ); |
236 | 237 | } else { |
237 | 238 | parts[part] = ( action.options[part] || '' ) |
238 | 239 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.publish.js |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | </div>', |
44 | 44 | init: function() { |
45 | 45 | $(this).find( '[rel]' ).each( function() { |
46 | | - $(this).text( gM( $(this).attr( 'rel' ) ) ); |
| 46 | + $(this).text( mw.usability.getMsg( $(this).attr( 'rel' ) ) ); |
47 | 47 | }); |
48 | 48 | $(this).find( '.wikiEditor-dialog-copywarn' ) |
49 | 49 | .html( $( '#editpage-copywarn' ).html() ); |
— | — | @@ -105,4 +105,4 @@ |
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | | -}; } )( jQuery ); |
\ No newline at end of file |
| 109 | +}; } )( jQuery ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.preview.js |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | } |
123 | 123 | } ); |
124 | 124 | |
125 | | - var loadingMsg = gM( 'wikieditor-preview-loading' ); |
| 125 | + var loadingMsg = mw.usability.getMsg( 'wikieditor-preview-loading' ); |
126 | 126 | context.modules.preview.$preview |
127 | 127 | .add( context.$changesTab ) |
128 | 128 | .append( $( '<div />' ) |
— | — | @@ -148,4 +148,4 @@ |
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
152 | | -}; } )( jQuery ); |
\ No newline at end of file |
| 152 | +}; } )( jQuery ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | $.wikiEditor.modules.dialogs.modules[module] = config[module]; |
45 | 45 | } |
46 | 46 | // Build out modules immediately |
47 | | - mw.load( ['$j.ui', '$j.ui.dialog', '$j.ui.draggable', '$j.ui.resizable' ], function() { |
| 47 | + mw.usability.load( ['$j.ui', '$j.ui.dialog', '$j.ui.draggable', '$j.ui.resizable' ], function() { |
48 | 48 | for ( module in $.wikiEditor.modules.dialogs.modules ) { |
49 | 49 | var module = $.wikiEditor.modules.dialogs.modules[module]; |
50 | 50 | // Only create the dialog if it doesn't exist yet |
— | — | @@ -56,10 +56,10 @@ |
57 | 57 | configuration.title = $.wikiEditor.autoMsg( module, 'title' ); |
58 | 58 | // Transform messages in keys |
59 | 59 | // Stupid JS won't let us do stuff like |
60 | | - // foo = { gM ('bar'): baz } |
| 60 | + // foo = { mw.usability.getMsg ('bar'): baz } |
61 | 61 | configuration.newButtons = {}; |
62 | 62 | for ( msg in configuration.buttons ) |
63 | | - configuration.newButtons[gM( msg )] = configuration.buttons[msg]; |
| 63 | + configuration.newButtons[mw.usability.getMsg( msg )] = configuration.buttons[msg]; |
64 | 64 | configuration.buttons = configuration.newButtons; |
65 | 65 | // Create the dialog <div> |
66 | 66 | var dialogDiv = $( '<div /> ' ) |
— | — | @@ -148,4 +148,4 @@ |
149 | 149 | .dialog( 'open' ); |
150 | 150 | } |
151 | 151 | |
152 | | -}; } ) ( jQuery ); |
\ No newline at end of file |
| 152 | +}; } ) ( jQuery ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js |
— | — | @@ -428,7 +428,7 @@ |
429 | 429 | context.modules.toc.$toc.trigger( 'collapse.wikiEditor-toc' ); return false; |
430 | 430 | } ) |
431 | 431 | .find( 'a' ) |
432 | | - .text( gM( 'wikieditor-toc-hide' ) ); |
| 432 | + .text( mw.usability.getMsg( 'wikieditor-toc-hide' ) ); |
433 | 433 | $expandControl |
434 | 434 | .addClass( 'wikiEditor-ui-toc-expandControl' ) |
435 | 435 | .append( '<a href="#" />' ) |
— | — | @@ -437,7 +437,7 @@ |
438 | 438 | } ) |
439 | 439 | .hide() |
440 | 440 | .find( 'a' ) |
441 | | - .text( gM( 'wikieditor-toc-show' ) ); |
| 441 | + .text( mw.usability.getMsg( 'wikieditor-toc-show' ) ); |
442 | 442 | $collapseControl.insertBefore( context.modules.toc.$toc ); |
443 | 443 | context.$ui.find( '.wikiEditor-ui-left .wikiEditor-ui-top' ).append( $expandControl ); |
444 | 444 | } |
Index: trunk/extensions/UsabilityInitiative/js/tests/wikiEditor.toolbar.js |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | 'post': 6 |
191 | 191 | } |
192 | 192 | }; |
193 | | -mw.ready( function() { |
| 193 | +$j(document).ready( function() { |
194 | 194 | var button = $j( '<button>Run wikiEditor Tests!</button>' ) |
195 | 195 | .css( { |
196 | 196 | 'position': 'fixed', |
— | — | @@ -243,4 +243,4 @@ |
244 | 244 | } ) |
245 | 245 | .appendTo( $j( 'body' ) ); |
246 | 246 | setTimeout( function() { button.slideDown( 'fast' ) }, 2000 ); |
247 | | -} ); |
\ No newline at end of file |
| 247 | +} ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1,3 +1,48 @@ |
| 2 | +/** |
| 3 | + * Common version-independent functions |
| 4 | + */ |
| 5 | + |
| 6 | +if ( typeof mw == 'undefined' ) { |
| 7 | + mw = {}; |
| 8 | +} |
| 9 | + |
| 10 | +mw.usability = { |
| 11 | + messages: {} |
| 12 | +} |
| 13 | + |
| 14 | +/** |
| 15 | + * This may eventually load something instead of just calling the callback. |
| 16 | + */ |
| 17 | +mw.usability.load = function( deps, callback ) { |
| 18 | + callback(); |
| 19 | +}; |
| 20 | + |
| 21 | +/** |
| 22 | + * Add messages to a local message table |
| 23 | + */ |
| 24 | +mw.usability.addMessages = function( messages ) { |
| 25 | + for ( var key in messages ) { |
| 26 | + this.messages[key] = messages[key]; |
| 27 | + } |
| 28 | +}; |
| 29 | + |
| 30 | +/** |
| 31 | + * Get a message |
| 32 | + */ |
| 33 | +mw.usability.getMsg = function( key, args ) { |
| 34 | + if ( !( key in this.messages ) ) { |
| 35 | + return '[' + key + ']'; |
| 36 | + } |
| 37 | + var msg = this.messages[key]; |
| 38 | + if ( typeof args == 'object' || typeof args == 'array' ) { |
| 39 | + for ( var argKey in args ) { |
| 40 | + msg = msg.replace( '\$' + (parseInt( argKey ) + 1), args[argKey] ); |
| 41 | + } |
| 42 | + } else if ( typeof args == 'string' || typeof args == 'number' ) { |
| 43 | + msg = msg.replace( '$1', args ); |
| 44 | + } |
| 45 | + return msg; |
| 46 | +}; |
2 | 47 | /* |
3 | 48 | * jQuery UI 1.7.1 |
4 | 49 | * |
— | — | @@ -6485,9 +6530,8 @@ |
6486 | 6531 | return $.wikiEditor.supported = true; |
6487 | 6532 | }, |
6488 | 6533 | /** |
6489 | | - * Provides a way to extract messages from objects. Wraps the gM function from js2stopgap.js, which will be changing |
6490 | | - * in the very near future, so let's keep and eye on this. It's also possible that this function will just be moved |
6491 | | - * to the global mw object all together. |
| 6534 | + * Provides a way to extract messages from objects. Wraps the mw.usability.getMsg() function, which |
| 6535 | + * may eventually become a wrapper for some kind of core MW functionality. |
6492 | 6536 | * |
6493 | 6537 | * @param object Object to extract messages from |
6494 | 6538 | * @param property String of name of property which contains the message. This should be the base name of the |
— | — | @@ -6510,9 +6554,9 @@ |
6511 | 6555 | } else if ( property + 'Msg' in object ) { |
6512 | 6556 | if ( typeof object[property + 'Msg' ] == 'object' ) { |
6513 | 6557 | // [ messageKey, arg1, arg2, ... ] |
6514 | | - return gM.apply( this, object[property + 'Msg' ] ); |
| 6558 | + return mw.usability.getMsg.apply( mw.usability, object[property + 'Msg' ] ); |
6515 | 6559 | } else { |
6516 | | - return gM( object[property + 'Msg'] ); |
| 6560 | + return mw.usability.getMsg( object[property + 'Msg'] ); |
6517 | 6561 | } |
6518 | 6562 | } else { |
6519 | 6563 | return ''; |
— | — | @@ -7402,7 +7446,7 @@ |
7403 | 7447 | $.wikiEditor.modules.dialogs.modules[module] = config[module]; |
7404 | 7448 | } |
7405 | 7449 | // Build out modules immediately |
7406 | | - mw.load( ['$j.ui', '$j.ui.dialog', '$j.ui.draggable', '$j.ui.resizable' ], function() { |
| 7450 | + mw.usability.load( ['$j.ui', '$j.ui.dialog', '$j.ui.draggable', '$j.ui.resizable' ], function() { |
7407 | 7451 | for ( module in $.wikiEditor.modules.dialogs.modules ) { |
7408 | 7452 | var module = $.wikiEditor.modules.dialogs.modules[module]; |
7409 | 7453 | // Only create the dialog if it doesn't exist yet |
— | — | @@ -7415,10 +7459,10 @@ |
7416 | 7460 | configuration.title = $.wikiEditor.autoMsg( module, 'title' ); |
7417 | 7461 | // Transform messages in keys |
7418 | 7462 | // Stupid JS won't let us do stuff like |
7419 | | - // foo = { gM ('bar'): baz } |
| 7463 | + // foo = { mw.usability.getMsg ('bar'): baz } |
7420 | 7464 | configuration.newButtons = {}; |
7421 | 7465 | for ( msg in configuration.buttons ) |
7422 | | - configuration.newButtons[gM( msg )] = configuration.buttons[msg]; |
| 7466 | + configuration.newButtons[mw.usability.getMsg( msg )] = configuration.buttons[msg]; |
7423 | 7467 | configuration.buttons = configuration.newButtons; |
7424 | 7468 | // Create the dialog <div> |
7425 | 7469 | var dialogDiv = $( '<div /> ' ) |
— | — | @@ -7507,7 +7551,8 @@ |
7508 | 7552 | .dialog( 'open' ); |
7509 | 7553 | } |
7510 | 7554 | |
7511 | | -}; } ) ( jQuery );/* Highlight module for wikiEditor */ |
| 7555 | +}; } ) ( jQuery ); |
| 7556 | +/* Highlight module for wikiEditor */ |
7512 | 7557 | ( function( $ ) { $.wikiEditor.modules.highlight = { |
7513 | 7558 | |
7514 | 7559 | /** |
— | — | @@ -7923,7 +7968,7 @@ |
7924 | 7969 | } |
7925 | 7970 | } ); |
7926 | 7971 | |
7927 | | - var loadingMsg = gM( 'wikieditor-preview-loading' ); |
| 7972 | + var loadingMsg = mw.usability.getMsg( 'wikieditor-preview-loading' ); |
7928 | 7973 | context.modules.preview.$preview |
7929 | 7974 | .add( context.$changesTab ) |
7930 | 7975 | .append( $( '<div />' ) |
— | — | @@ -7950,7 +7995,8 @@ |
7951 | 7996 | } |
7952 | 7997 | } |
7953 | 7998 | |
7954 | | -}; } )( jQuery );/* Publish module for wikiEditor */ |
| 7999 | +}; } )( jQuery ); |
| 8000 | +/* Publish module for wikiEditor */ |
7955 | 8001 | ( function( $ ) { $.wikiEditor.modules.publish = { |
7956 | 8002 | |
7957 | 8003 | /** |
— | — | @@ -7994,7 +8040,7 @@ |
7995 | 8041 | </div>', |
7996 | 8042 | init: function() { |
7997 | 8043 | $(this).find( '[rel]' ).each( function() { |
7998 | | - $(this).text( gM( $(this).attr( 'rel' ) ) ); |
| 8044 | + $(this).text( mw.usability.getMsg( $(this).attr( 'rel' ) ) ); |
7999 | 8045 | }); |
8000 | 8046 | $(this).find( '.wikiEditor-dialog-copywarn' ) |
8001 | 8047 | .html( $( '#editpage-copywarn' ).html() ); |
— | — | @@ -8057,7 +8103,8 @@ |
8058 | 8104 | } |
8059 | 8105 | } |
8060 | 8106 | |
8061 | | -}; } )( jQuery );/* TemplateEditor module for wikiEditor */ |
| 8107 | +}; } )( jQuery ); |
| 8108 | +/* TemplateEditor module for wikiEditor */ |
8062 | 8109 | ( function( $ ) { $.wikiEditor.modules.templateEditor = { |
8063 | 8110 | |
8064 | 8111 | /** |
— | — | @@ -9102,7 +9149,7 @@ |
9103 | 9150 | context.modules.toc.$toc.trigger( 'collapse.wikiEditor-toc' ); return false; |
9104 | 9151 | } ) |
9105 | 9152 | .find( 'a' ) |
9106 | | - .text( gM( 'wikieditor-toc-hide' ) ); |
| 9153 | + .text( mw.usability.getMsg( 'wikieditor-toc-hide' ) ); |
9107 | 9154 | $expandControl |
9108 | 9155 | .addClass( 'wikiEditor-ui-toc-expandControl' ) |
9109 | 9156 | .append( '<a href="#" />' ) |
— | — | @@ -9111,7 +9158,7 @@ |
9112 | 9159 | } ) |
9113 | 9160 | .hide() |
9114 | 9161 | .find( 'a' ) |
9115 | | - .text( gM( 'wikieditor-toc-show' ) ); |
| 9162 | + .text( mw.usability.getMsg( 'wikieditor-toc-show' ) ); |
9116 | 9163 | $collapseControl.insertBefore( context.modules.toc.$toc ); |
9117 | 9164 | context.$ui.find( '.wikiEditor-ui-left .wikiEditor-ui-top' ).append( $expandControl ); |
9118 | 9165 | } |
— | — | @@ -9476,7 +9523,8 @@ |
9477 | 9524 | var parts = { 'pre' : '', 'peri' : '', 'post' : '' }; |
9478 | 9525 | for ( part in parts ) { |
9479 | 9526 | if ( part + 'Msg' in action.options ) { |
9480 | | - parts[part] = gM( action.options[part + 'Msg'], ( action.options[part] || null ) ); |
| 9527 | + parts[part] = mw.usability.getMsg( |
| 9528 | + action.options[part + 'Msg'], ( action.options[part] || null ) ); |
9481 | 9529 | } else { |
9482 | 9530 | parts[part] = ( action.options[part] || '' ) |
9483 | 9531 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -1,4 +1,9 @@ |
2 | | -;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.1",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;} |
| 2 | + |
| 3 | +if(typeof mw=='undefined'){mw={};} |
| 4 | +mw.usability={messages:{}} |
| 5 | +mw.usability.load=function(deps,callback){callback();};mw.usability.addMessages=function(messages){for(var key in messages){this.messages[key]=messages[key];}};mw.usability.getMsg=function(key,args){if(!(key in this.messages)){return'['+key+']';} |
| 6 | +var msg=this.messages[key];if(typeof args=='object'||typeof args=='array'){for(var argKey in args){msg=msg.replace('\$'+(parseInt(argKey)+1),args[argKey]);}}else if(typeof args=='string'||typeof args=='number'){msg=msg.replace('$1',args);} |
| 7 | +return msg;};;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.1",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;} |
3 | 8 | for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;} |
4 | 9 | var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;} |
5 | 10 | el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};} |
— | — | @@ -433,7 +438,7 @@ |
434 | 439 | if(!($.browser.name in $.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return $.wikiEditor.supported=true;} |
435 | 440 | var browser=$.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];for(condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return $.wikiEditor.supported=false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return $.wikiEditor.supported=false;}}} |
436 | 441 | return $.wikiEditor.supported=true;},'autoMsg':function(object,property){if(typeof property=='object'){for(i in property){if(property[i]in object||property[i]+'Msg'in object){property=property[i];break;}}} |
437 | | -if(property in object){return object[property];}else if(property+'Msg'in object){if(typeof object[property+'Msg']=='object'){return gM.apply(this,object[property+'Msg']);}else{return gM(object[property+'Msg']);}}else{return'';}},'autoLang':function(object,lang){return object[lang||wgUserLanguage]||object['default']||object;},'autoIcon':function(icon,path,lang){var src=$.wikiEditor.autoLang(icon,lang);path=path||$.wikiEditor.imgPath;if(src.substr(0,7)!='http://'&&src.substr(0,8)!='https://'&&src[0]!='/'){src=path+src;} |
| 442 | +if(property in object){return object[property];}else if(property+'Msg'in object){if(typeof object[property+'Msg']=='object'){return mw.usability.getMsg.apply(mw.usability,object[property+'Msg']);}else{return mw.usability.getMsg(object[property+'Msg']);}}else{return'';}},'autoLang':function(object,lang){return object[lang||wgUserLanguage]||object['default']||object;},'autoIcon':function(icon,path,lang){var src=$.wikiEditor.autoLang(icon,lang);path=path||$.wikiEditor.imgPath;if(src.substr(0,7)!='http://'&&src.substr(0,8)!='https://'&&src[0]!='/'){src=path+src;} |
438 | 443 | return src+'?'+wgWikiEditorIconVersion;}};$.fn.wikiEditor=function(){if(!$j.wikiEditor.isSupported()){return $(this);} |
439 | 444 | var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){context={'$textarea':$(this),'views':{},'modules':{},'data':{},'instance':$.wikiEditor.instances.push($(this))-1,'offsets':null};context.api={'addModule':function(context,data){var modules={};if(typeof data=='string'){modules[data]={};}else if(typeof data=='object'){modules=data;} |
440 | 445 | for(module in modules){if(typeof module=='string'&&module in $.wikiEditor.modules){if('api'in $.wikiEditor.modules[module]){for(call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}} |
— | — | @@ -493,8 +498,8 @@ |
494 | 499 | context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('change',event);}).delayedBind(250,'keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));return context.fallbackWindowOnBeforeUnload?context.fallbackWindowOnBeforeUnload():null;}} |
495 | 500 | arguments=$.makeArray(arguments);if(arguments.length>0){var call=arguments.shift();if(call in context.api){context.api[call](context,typeof arguments[0]=='undefined'?{}:arguments[0]);}} |
496 | 501 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |
497 | | -mw.load(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons) |
498 | | -configuration.newButtons[gM(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;var dialogDiv=$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration);if(!('resizeme'in module)||module.resizeme){dialogDiv.bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});} |
| 502 | +mw.usability.load(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons) |
| 503 | +configuration.newButtons[mw.usability.getMsg(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;var dialogDiv=$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration);if(!('resizeme'in module)||module.resizeme){dialogDiv.bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});} |
499 | 504 | var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
500 | 505 | maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}});},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldWidth=wrapper.width();var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){var thisWidth=$(this).data('thisWidth')?$(this).data('thisWidth'):0;thisWidth=Math.max($(this).get(0).scrollWidth,thisWidth);$(this).width(thisWidth);$(this).data('thisWidth',thisWidth);var wrapperWidth=$(this).data('wrapperWidth')?$(this).data('wrapperWidth'):0;wrapperWidth=Math.max(wrapper.get(0).scrollWidth,wrapperWidth);wrapper.width(wrapperWidth);$(this).data('wrapperWidth',wrapperWidth);$(this).dialog({'width':wrapper.width()});wrapper.css('left',parseInt(wrapper.css('left'))-(wrapper.width()-oldWidth)/2);} |
501 | 506 | $(this).css('white-space',oldWS);oldHidden.each(function(){$(this).attr('style',$(this).data('oldstyle'));});}},modules:{},quickDialog:function(body,settings){$('<div />').text(body).appendTo($('body')).dialog($.extend({bgiframe:true,modal:true},settings)).dialog('open');}};})(jQuery);(function($){$.wikiEditor.modules.highlight={cfg:{'styleVersion':3},evt:{delayedChange:function(context,event){if(event.data.scope=='division'){$.wikiEditor.modules.highlight.fn.scan(context,"");$.wikiEditor.modules.highlight.fn.mark(context,"","");}},ready:function(context,event){$.wikiEditor.modules.highlight.fn.scan(context,"");$.wikiEditor.modules.highlight.fn.mark(context,"","");}},fn:{create:function(context,config){},divide:function(context){},isolate:function(context){return[];},strip:function(context,division){return $('<div />').html(division.html().replace(/\<br[^\>]*\>/g,"\n")).text();},scan:function(context,division){function Token(offset,label,tokenStart,match){this.offset=offset;this.label=label;this.tokenStart=tokenStart;this.match=match;} |
— | — | @@ -518,7 +523,7 @@ |
519 | 524 | context.modules.preview.previewText=wikitext;context.modules.preview.$preview.find('.wikiEditor-preview-loading').hide();context.modules.preview.$preview.find('.wikiEditor-preview-contents').html(data.parse.text['*']).find('a:not([href^=#])').click(function(){return false;});},'json');}});context.$changesTab=context.fn.addView({'name':'changes','titleMsg':'wikieditor-preview-changes-tab','init':function(context){var wikitext=context.fn.getContents();if(context.modules.preview.changesText==wikitext){return;} |
520 | 525 | context.$changesTab.find('table.diff tbody').empty();context.$changesTab.find('.wikiEditor-preview-loading').show();var postdata={'action':'parse','onlypst':'','text':wikitext,'format':'json'};$.post(wgScriptPath+'/api.php',postdata,function(data){try{var postdata2={'action':'query','indexpageids':'','prop':'revisions','titles':wgPageName,'rvdifftotext':data.parse.text['*'],'rvprop':'','format':'json'};var section=$('[name=wpSection]').val();if(section!='') |
521 | 526 | postdata['rvsection']=section;$.post(wgScriptPath+'/api.php',postdata2,function(data){if($('link[href='+stylepath+'/common/diff.css]').size()==0){$('head').append($('<link />').attr({'rel':'stylesheet','type':'text/css','href':stylepath+'/common/diff.css'}));} |
522 | | -try{var diff=data.query.pages[data.query.pageids[0]].revisions[0].diff['*'];context.$changesTab.find('table.diff tbody').html(diff);context.$changesTab.find('.wikiEditor-preview-loading').hide();context.modules.preview.changesText=wikitext;}catch(e){}},'json');}catch(e){}},'json');}});var loadingMsg=gM('wikieditor-preview-loading');context.modules.preview.$preview.add(context.$changesTab).append($('<div />').addClass('wikiEditor-preview-loading').append($('<img />').addClass('wikiEditor-preview-spinner').attr({'src':$.wikiEditor.imgPath+'dialogs/loading.gif','valign':'absmiddle','alt':loadingMsg,'title':loadingMsg})).append($('<span></span>').text(loadingMsg))).append($('<div />').addClass('wikiEditor-preview-contents'));context.$changesTab.find('.wikiEditor-preview-contents').html('<table class="diff"><col class="diff-marker" /><col class="diff-content" />'+'<col class="diff-marker" /><col class="diff-content" /><tbody /></table>');}}};})(jQuery);(function($){$.wikiEditor.modules.publish={fn:{create:function(context,config){var dialogID='wikiEditor-'+context.instance+'-dialog';$.wikiEditor.modules.dialogs.fn.create(context,{previewsave:{id:dialogID,titleMsg:'wikieditor-publish-dialog-title',html:'\ |
| 527 | +try{var diff=data.query.pages[data.query.pageids[0]].revisions[0].diff['*'];context.$changesTab.find('table.diff tbody').html(diff);context.$changesTab.find('.wikiEditor-preview-loading').hide();context.modules.preview.changesText=wikitext;}catch(e){}},'json');}catch(e){}},'json');}});var loadingMsg=mw.usability.getMsg('wikieditor-preview-loading');context.modules.preview.$preview.add(context.$changesTab).append($('<div />').addClass('wikiEditor-preview-loading').append($('<img />').addClass('wikiEditor-preview-spinner').attr({'src':$.wikiEditor.imgPath+'dialogs/loading.gif','valign':'absmiddle','alt':loadingMsg,'title':loadingMsg})).append($('<span></span>').text(loadingMsg))).append($('<div />').addClass('wikiEditor-preview-contents'));context.$changesTab.find('.wikiEditor-preview-contents').html('<table class="diff"><col class="diff-marker" /><col class="diff-content" />'+'<col class="diff-marker" /><col class="diff-content" /><tbody /></table>');}}};})(jQuery);(function($){$.wikiEditor.modules.publish={fn:{create:function(context,config){var dialogID='wikiEditor-'+context.instance+'-dialog';$.wikiEditor.modules.dialogs.fn.create(context,{previewsave:{id:dialogID,titleMsg:'wikieditor-publish-dialog-title',html:'\ |
523 | 528 | <div class="wikiEditor-dialog-copywarn"></div>\ |
524 | 529 | <div class="wikiEditor-dialog-editoptions">\ |
525 | 530 | <form id="wikieditor-'+context.instance+'-publish-dialog-form">\ |
— | — | @@ -538,7 +543,7 @@ |
539 | 544 | <label for="wikiEditor-'+context.instance+'-dialog-watch"\ |
540 | 545 | rel="wikieditor-publish-dialog-watch"></label>\ |
541 | 546 | </form>\ |
542 | | - </div>',init:function(){$(this).find('[rel]').each(function(){$(this).text(gM($(this).attr('rel')));});$(this).find('.wikiEditor-dialog-copywarn').html($('#editpage-copywarn').html());if($('#wpMinoredit').size()==0) |
| 547 | + </div>',init:function(){$(this).find('[rel]').each(function(){$(this).text(mw.usability.getMsg($(this).attr('rel')));});$(this).find('.wikiEditor-dialog-copywarn').html($('#editpage-copywarn').html());if($('#wpMinoredit').size()==0) |
543 | 548 | $('#wikiEditor-'+context.instance+'-dialog-minor').hide();else if($('#wpMinoredit').is(':checked')) |
544 | 549 | $('#wikiEditor-'+context.instance+'-dialog-minor').attr('checked','checked');if($('#wpWatchthis').size()==0) |
545 | 550 | $('#wikiEditor-'+context.instance+'-dialog-watch').hide();else if($('#wpWatchthis').is(':checked')) |
— | — | @@ -604,7 +609,7 @@ |
605 | 610 | div.html(' ');var item=$('<li />').append(div);if(structure[i].sections!==undefined){item.append(buildList(structure[i].sections));} |
606 | 611 | list.append(item);} |
607 | 612 | return list;} |
608 | | -function buildCollapseControls(){var $collapseControl=$('<div />'),$expandControl=$('<div />');$collapseControl.addClass('tab').addClass('tab-toc').append('<a href="#" />').bind('click.wikiEditor-toc',function(){context.modules.toc.$toc.trigger('collapse.wikiEditor-toc');return false;}).find('a').text(gM('wikieditor-toc-hide'));$expandControl.addClass('wikiEditor-ui-toc-expandControl').append('<a href="#" />').bind('click.wikiEditor-toc',function(){context.modules.toc.$toc.trigger('expand.wikiEditor-toc');return false;}).hide().find('a').text(gM('wikieditor-toc-show'));$collapseControl.insertBefore(context.modules.toc.$toc);context.$ui.find('.wikiEditor-ui-left .wikiEditor-ui-top').append($expandControl);} |
| 613 | +function buildCollapseControls(){var $collapseControl=$('<div />'),$expandControl=$('<div />');$collapseControl.addClass('tab').addClass('tab-toc').append('<a href="#" />').bind('click.wikiEditor-toc',function(){context.modules.toc.$toc.trigger('collapse.wikiEditor-toc');return false;}).find('a').text(mw.usability.getMsg('wikieditor-toc-hide'));$expandControl.addClass('wikiEditor-ui-toc-expandControl').append('<a href="#" />').bind('click.wikiEditor-toc',function(){context.modules.toc.$toc.trigger('expand.wikiEditor-toc');return false;}).hide().find('a').text(mw.usability.getMsg('wikieditor-toc-show'));$collapseControl.insertBefore(context.modules.toc.$toc);context.$ui.find('.wikiEditor-ui-left .wikiEditor-ui-top').append($expandControl);} |
609 | 614 | function buildResizeControls(){context.$ui.data('resizableDone',true).find('.wikiEditor-ui-right').data('wikiEditor-ui-left',context.$ui.find('.wikiEditor-ui-left')).resizable({handles:'w,e',preventPositionLeftChange:true,minWidth:parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth),start:function(e,ui){var $this=$(this);$('<div />').addClass('wikiEditor-ui-resize-mask').css({'position':'absolute','z-index':2,'left':0,'top':0,'bottom':0,'right':0}).appendTo(context.$ui.find('.wikiEditor-ui-left'));$this.resizable('option','maxWidth',$this.parent().width()- |
610 | 615 | parseFloat($.wikiEditor.modules.toc.cfg.textMinimumWidth));if(context.modules.toc.$toc.data('positionMode')=='goofy'){$.wikiEditor.modules.toc.fn.switchLayout(context);}},resize:function(e,ui){$(this).css({'width':ui.size.width,'top':'auto','height':'auto'}).data('wikiEditor-ui-left').css('marginRight',(-1*ui.size.width)).children().css('marginRight',ui.size.width);context.fn.trigger('resize');},stop:function(e,ui){context.$ui.find('.wikiEditor-ui-resize-mask').remove();context.$content.trigger('mouseup');if(ui.size.width<=parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)){context.modules.toc.$toc.trigger('collapse.wikiEditor-toc');}else{context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});context.modules.toc.$toc.data('openWidth',ui.size.width);$.cookie('wikiEditor-'+context.instance+'-toc-width',ui.size.width);} |
611 | 616 | context.fn.trigger('resize');}});var handle=$.wikiEditor.modules.toc.cfg.rtl?'w':'e';context.$ui.find('.ui-resizable-'+handle).removeClass('ui-resizable-'+handle).addClass('ui-resizable-'+(handle=='w'?'e':'w')).addClass('wikiEditor-ui-toc-resize-grip');context.modules.toc.$toc.bind('collapse.wikiEditor-toc',$.wikiEditor.modules.toc.fn.collapse).bind('expand.wikiEditor-toc',$.wikiEditor.modules.toc.fn.expand);context.modules.toc.$toc.data('openWidth',$.wikiEditor.modules.toc.cfg.defaultWidth);if($.cookie('wikiEditor-'+context.instance+'-toc-width')==0){context.modules.toc.$toc.trigger('collapse.wikiEditor-toc',{data:context});}else if($.cookie('wikiEditor-'+context.instance+'-toc-width')>0){var initialWidth=$.cookie('wikiEditor-'+context.instance+'-toc-width');if(initialWidth<parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)) |
— | — | @@ -633,7 +638,7 @@ |
634 | 639 | i++;var rel=step.attr('rel');if(rel){rels.push(step.attr('rel'));} |
635 | 640 | step=step.parent();} |
636 | 641 | rels.reverse();var id=rels.join('.');$.trackAction(id);} |
637 | | -switch(action.type){case'replace':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]||'')}} |
| 642 | +switch(action.type){case'replace':case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=mw.usability.getMsg(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}} |
638 | 643 | if('regex'in action.options&&'regexReplace'in action.options){var selection=context.$textarea.textSelection('getSelection');if(selection!=''&&selection.match(action.options.regex)){parts.peri=selection.replace(action.options.regex,action.options.regexReplace);parts.pre=parts.post='';}} |
639 | 644 | context.$textarea.textSelection('encapsulateSelection',$.extend({},action.options,parts,{'replace':action.type=='replace'}));break;case'callback':if(typeof action.execute=='function'){action.execute(context);} |
640 | 645 | break;case'dialog':context.$textarea.wikiEditor('openDialog',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>')} |
Index: trunk/extensions/UsabilityInitiative/Makefile |
— | — | @@ -12,6 +12,7 @@ |
13 | 13 | css/wikiEditor.preview.css |
14 | 14 | |
15 | 15 | PLUGINS := \ |
| 16 | + js/usability.js\ |
16 | 17 | js/js2stopgap/ui.core.js\ |
17 | 18 | js/js2stopgap/ui.datepicker.js\ |
18 | 19 | js/js2stopgap/ui.dialog.js\ |