r63136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63135‎ | r63136 | r63137 >
Date:21:06, 1 March 2010
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: Remove regex-based capitalization since r63130 added it in CSS
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -78,14 +78,14 @@
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 19 ),
8080 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 96 ),
8181 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 ),
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 296 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 297 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 296 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 297 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js
@@ -299,10 +299,7 @@
300300 var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' );
301301 $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text(
302302 typeof param == 'string' ?
303 - param.name.replace( /[\_\-]/g, ' ' )
304 - .replace( /^(.)|\s(.)/g, function( first ) {
305 - return first.toUpperCase();
306 - } ) :
 303+ param.name.replace( /[\_\-]/g, ' ' ) :
307304 param.name
308305 ).appendTo( $paramRow );
309306 $( '<td />' ).addClass( 'wikiEditor-template-dialog-value' ).append(
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -9406,10 +9406,7 @@
94079407 var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' );
94089408 $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text(
94099409 typeof param == 'string' ?
9410 - param.name.replace( /[\_\-]/g, ' ' )
9411 - .replace( /^(.)|\s(.)/g, function( first ) {
9412 - return first.toUpperCase();
9413 - } ) :
 9410+ param.name.replace( /[\_\-]/g, ' ' ) :
94149411 param.name
94159412 ).appendTo( $paramRow );
94169413 $( '<td />' ).addClass( 'wikiEditor-template-dialog-value' ).append(
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -647,7 +647,7 @@
648648 <table class="wikiEditor-template-dialog-table" />\
649649 </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);}
650650 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');}
652652 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;}
653653 function Range(begin,end){this.begin=begin;this.end=end;}
654654 function getSetValue(name,value,original){var valueRange;var rangeIndex;var retVal;if(isNaN(name)){if(typeof paramsByName[name]=='undefined'){return"";}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63130WikiEditor Template Editor: enabling toolbar dialog styles for the template e...adam19:53, 1 March 2010

Status & tagging log