r63130 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63129‎ | r63130 | r63131 >
Date:19:53, 1 March 2010
Author:adam
Status:ok
Tags:
Comment:
WikiEditor Template Editor: enabling toolbar dialog styles for the template editor's dialogs and a class name change
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css (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
@@ -22,18 +22,18 @@
2323 array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 7 ),
2424 array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ),
2525 array( 'src' => 'css/wikiEditor.css', 'version' => 12 ),
26 - array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 20 ),
 26+ array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 21 ),
2727 array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ),
2828 array( 'src' => 'css/wikiEditor.toc.css', 'version' => 28 ),
2929 array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 11 ),
3030 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3131 ),
3232 'combined' => array(
33 - array( 'src' => 'css/combined.css', 'version' => 68 ),
 33+ array( 'src' => 'css/combined.css', 'version' => 69 ),
3434 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3535 ),
3636 'minified' => array(
37 - array( 'src' => 'css/combined.min.css', 'version' => 68 ),
 37+ array( 'src' => 'css/combined.min.css', 'version' => 69 ),
3838 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3939 ),
4040 )
@@ -79,14 +79,14 @@
8080 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 19 ),
8181 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 96 ),
8282 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ),
83 - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 28 ),
 83+ array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 29 ),
8484 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ),
8585 ),
8686 'combined' => array(
87 - array( 'src' => 'js/plugins.combined.js', 'version' => 295 ),
 87+ array( 'src' => 'js/plugins.combined.js', 'version' => 296 ),
8888 ),
8989 'minified' => array(
90 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 295 ),
 90+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 296 ),
9191 ),
9292 ),
9393 );
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css
@@ -221,6 +221,10 @@
222222 body.rtl #wikieditor-toolbar-link-int-target-status-external {
223223 background-image: url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png );
224224 }
 225+/* Template Editor Dialogs */
 226+.wikiEditor-template-dialog-label {
 227+ text-transform: capitalize;
 228+}
225229 /* Self Clearing Floats */
226230 .wikieditor-toolbar-table-dimension-fields:after,
227231 .wikieditor-toolbar-dialog-wrapper:after {
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -468,6 +468,10 @@
469469 body.rtl #wikieditor-toolbar-link-int-target-status-external {
470470 background-image: url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png );
471471 }
 472+/* Template Editor Dialogs */
 473+.wikiEditor-template-dialog-label {
 474+ text-transform: capitalize;
 475+}
472476 /* Self Clearing Floats */
473477 .wikieditor-toolbar-table-dimension-fields:after,
474478 .wikieditor-toolbar-dialog-wrapper:after {
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -446,6 +446,9 @@
447447 body.rtl #wikieditor-toolbar-link-int-target-status-external{
448448 background-image:url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png );
449449 }
 450+.wikiEditor-template-dialog-label{
 451+text-transform:capitalize;
 452+}
450453 .wikieditor-toolbar-table-dimension-fields:after,
451454 .wikieditor-toolbar-dialog-wrapper:after{
452455 visibility:hidden;
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js
@@ -258,6 +258,7 @@
259259 },
260260 dialog: {
261261 width: 500,
 262+ dialogClass: 'wikiEditor-toolbar-dialog',
262263 buttons: {
263264 'wikieditor-template-editor-dialog-submit': function() {
264265 // More user feedback
@@ -296,7 +297,7 @@
297298 continue;
298299 }
299300 var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' );
300 - $( '<td />' ).addClass( 'wikiEditor-template-dialog-name' ).text(
 301+ $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text(
301302 typeof param == 'string' ?
302303 param.name.replace( /[\_\-]/g, ' ' )
303304 .replace( /^(.)|\s(.)/g, function( first ) {
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -9382,6 +9382,7 @@
93839383 },
93849384 dialog: {
93859385 width: 500,
 9386+ dialogClass: 'wikiEditor-toolbar-dialog',
93869387 buttons: {
93879388 'wikieditor-template-editor-dialog-submit': function() {
93889389 // More user feedback
@@ -9420,7 +9421,7 @@
94219422 continue;
94229423 }
94239424 var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' );
9424 - $( '<td />' ).addClass( 'wikiEditor-template-dialog-name' ).text(
 9425+ $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text(
94259426 typeof param == 'string' ?
94269427 param.name.replace( /[\_\-]/g, ' ' )
94279428 .replace( /^(.)|\s(.)/g, function( first ) {
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -647,9 +647,9 @@
648648 <fieldset>\
649649 <div class="wikiEditor-template-dialog-title" />\
650650 <table class="wikiEditor-template-dialog-table" />\
651 - </fieldset>',init:function(){$(this).find('[rel]').each(function(){$(this).text(mw.usability.getMsg($(this).attr('rel')));});},dialog:{width:500,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);}
 651+ </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);}
652652 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;}
653 -var $paramRow=$('<tr />').addClass('wikiEditor-template-dialog-row');$('<td />').addClass('wikiEditor-template-dialog-name').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');}
 653+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');}
654654 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;}
655655 function Range(begin,end){this.begin=begin;this.end=end;}
656656 function getSetValue(name,value,original){var valueRange;var rangeIndex;var retVal;if(isNaN(name)){if(typeof paramsByName[name]=='undefined'){return"";}

Follow-up revisions

RevisionCommit summaryAuthorDate
r63136UsabilityInitiative: Remove regex-based capitalization since r63130 added it ...catrope21:06, 1 March 2010

Status & tagging log