Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -78,14 +78,14 @@ |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 19 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 96 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), |
82 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 29 ), |
| 82 | + array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 30 ), |
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' => 296 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 297 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 296 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 297 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js |
— | — | @@ -299,10 +299,7 @@ |
300 | 300 | var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' ); |
301 | 301 | $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text( |
302 | 302 | typeof param == 'string' ? |
303 | | - param.name.replace( /[\_\-]/g, ' ' ) |
304 | | - .replace( /^(.)|\s(.)/g, function( first ) { |
305 | | - return first.toUpperCase(); |
306 | | - } ) : |
| 303 | + param.name.replace( /[\_\-]/g, ' ' ) : |
307 | 304 | param.name |
308 | 305 | ).appendTo( $paramRow ); |
309 | 306 | $( '<td />' ).addClass( 'wikiEditor-template-dialog-value' ).append( |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9406,10 +9406,7 @@ |
9407 | 9407 | var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' ); |
9408 | 9408 | $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text( |
9409 | 9409 | typeof param == 'string' ? |
9410 | | - param.name.replace( /[\_\-]/g, ' ' ) |
9411 | | - .replace( /^(.)|\s(.)/g, function( first ) { |
9412 | | - return first.toUpperCase(); |
9413 | | - } ) : |
| 9410 | + param.name.replace( /[\_\-]/g, ' ' ) : |
9414 | 9411 | param.name |
9415 | 9412 | ).appendTo( $paramRow ); |
9416 | 9413 | $( '<td />' ).addClass( 'wikiEditor-template-dialog-value' ).append( |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -647,7 +647,7 @@ |
648 | 648 | <table class="wikiEditor-template-dialog-table" />\ |
649 | 649 | </fieldset>',init:function(){$(this).find('[rel]').each(function(){$(this).text(mw.usability.getMsg($(this).attr('rel')));});},dialog:{width:500,dialogClass:'wikiEditor-toolbar-dialog',buttons:{'wikieditor-template-editor-dialog-submit':function(){var $templateDiv=$(this).data('templateDiv');context.fn.highlightLine($templateDiv);var $templateText=$templateDiv.children('.wikiEditor-template-text');var templateModel=$templateText.data('model');$(this).find('.wikiEditor-template-dialog-value input').each(function(){templateModel.setValue($(this).data('name'),$(this).val());});$templateText.text(templateModel.getText());$(this).dialog('close');}},open:function(){var $templateDiv=$(this).data('templateDiv');var $templateText=$templateDiv.children('.wikiEditor-template-text');var templateModel=$templateText.data('model');if(templateModel.getText()!=$templateText.text()){templateModel=new $.wikiEditor.modules.templateEditor.fn.model($templateText.text());$templateText.data('model',templateModel);} |
650 | 650 | var params=templateModel.getAllInitialParams();var $table=$(this).find('.wikiEditor-template-dialog-table').empty();for(var paramIndex in params){var param=params[paramIndex];if(typeof param.name=='undefined'){continue;} |
651 | | -var $paramRow=$('<tr />').addClass('wikiEditor-template-dialog-row');$('<td />').addClass('wikiEditor-template-dialog-label').text(typeof param=='string'?param.name.replace(/[\_\-]/g,' ').replace(/^(.)|\s(.)/g,function(first){return first.toUpperCase();}):param.name).appendTo($paramRow);$('<td />').addClass('wikiEditor-template-dialog-value').append($('<input />').data('name',param.name).val(templateModel.getValue(param.name))).appendTo($paramRow);$table.append($paramRow);}}}};function createDialog($templateDiv){context.$textarea.wikiEditor('addDialog',{'templateEditor':dialog});$('#'+dialog.id).data('templateDiv',$templateDiv).dialog('open');} |
| 651 | +var $paramRow=$('<tr />').addClass('wikiEditor-template-dialog-row');$('<td />').addClass('wikiEditor-template-dialog-label').text(typeof param=='string'?param.name.replace(/[\_\-]/g,' '):param.name).appendTo($paramRow);$('<td />').addClass('wikiEditor-template-dialog-value').append($('<input />').data('name',param.name).val(templateModel.getValue(param.name))).appendTo($paramRow);$table.append($paramRow);}}}};function createDialog($templateDiv){context.$textarea.wikiEditor('addDialog',{'templateEditor':dialog});$('#'+dialog.id).data('templateDiv',$templateDiv).dialog('open');} |
652 | 652 | function noEdit(){return false;}},unwrapTemplate:function($wrapper){$wrapper.parent().replaceWith($wrapper);},getTemplateInfo:function(templateName){var templateInfo='';return $(templateInfo);},model:function(wikitext){var collapsible=true;function Param(name,value,number,nameIndex,equalsIndex,valueIndex){this.name=name;this.value=value;this.number=number;this.nameIndex=nameIndex;this.equalsIndex=equalsIndex;this.valueIndex=valueIndex;} |
653 | 653 | function Range(begin,end){this.begin=begin;this.end=end;} |
654 | 654 | function getSetValue(name,value,original){var valueRange;var rangeIndex;var retVal;if(isNaN(name)){if(typeof paramsByName[name]=='undefined'){return"";} |