Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 154 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 34 ), |
78 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 51 ), |
| 78 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 52 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 19 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 94 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 289 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 290 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 289 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 290 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -239,15 +239,11 @@ |
240 | 240 | switch ( action.type ) { |
241 | 241 | case 'replace': |
242 | 242 | case 'encapsulate': |
243 | | - var parts = { 'pre' : '', 'peri' : '', 'post' : '' }; |
244 | | - for ( part in parts ) { |
245 | | - if ( part + 'Msg' in action.options ) { |
246 | | - parts[part] = mw.usability.getMsg( |
247 | | - action.options[part + 'Msg'], ( action.options[part] || null ) ); |
248 | | - } else { |
249 | | - parts[part] = ( action.options[part] || '' ) |
250 | | - } |
251 | | - } |
| 243 | + var parts = { |
| 244 | + 'pre' : $.wikiEditor.autoMsg( action.options, 'pre' ), |
| 245 | + 'peri' : $.wikiEditor.autoMsg( action.options, 'peri' ), |
| 246 | + 'post' : $.wikiEditor.autoMsg( action.options, 'post' ) |
| 247 | + }; |
252 | 248 | if ( 'regex' in action.options && 'regexReplace' in action.options ) { |
253 | 249 | var selection = context.$textarea.textSelection( 'getSelection' ); |
254 | 250 | if ( selection != '' && selection.match( action.options.regex ) ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -10544,15 +10544,11 @@ |
10545 | 10545 | switch ( action.type ) { |
10546 | 10546 | case 'replace': |
10547 | 10547 | case 'encapsulate': |
10548 | | - var parts = { 'pre' : '', 'peri' : '', 'post' : '' }; |
10549 | | - for ( part in parts ) { |
10550 | | - if ( part + 'Msg' in action.options ) { |
10551 | | - parts[part] = mw.usability.getMsg( |
10552 | | - action.options[part + 'Msg'], ( action.options[part] || null ) ); |
10553 | | - } else { |
10554 | | - parts[part] = ( action.options[part] || '' ) |
10555 | | - } |
10556 | | - } |
| 10548 | + var parts = { |
| 10549 | + 'pre' : $.wikiEditor.autoMsg( action.options, 'pre' ), |
| 10550 | + 'peri' : $.wikiEditor.autoMsg( action.options, 'peri' ), |
| 10551 | + 'post' : $.wikiEditor.autoMsg( action.options, 'post' ) |
| 10552 | + }; |
10557 | 10553 | if ( 'regex' in action.options && 'regexReplace' in action.options ) { |
10558 | 10554 | var selection = context.$textarea.textSelection( 'getSelection' ); |
10559 | 10555 | if ( selection != '' && selection.match( action.options.regex ) ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -723,8 +723,7 @@ |
724 | 724 | i++;var rel=step.attr('rel');if(rel){rels.push(step.attr('rel'));} |
725 | 725 | step=step.parent();} |
726 | 726 | rels.reverse();var id=rels.join('.');$.trackAction(id);} |
727 | | -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]||'')}} |
728 | | -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='';}} |
| 727 | +switch(action.type){case'replace':case'encapsulate':var parts={'pre':$.wikiEditor.autoMsg(action.options,'pre'),'peri':$.wikiEditor.autoMsg(action.options,'peri'),'post':$.wikiEditor.autoMsg(action.options,'post')};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='';}} |
729 | 728 | context.$textarea.textSelection('encapsulateSelection',$.extend({},action.options,parts,{'replace':action.type=='replace'}));if(typeof context.$iframe!=='undefined'){context.$iframe[0].contentWindow.focus();} |
730 | 729 | break;case'callback':if(typeof action.execute=='function'){action.execute(context);} |
731 | 730 | break;case'dialog':context.fn.saveSelection();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>')} |