Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -22,18 +22,18 @@ |
23 | 23 | array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 7 ), |
24 | 24 | array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ), |
25 | 25 | 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 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/wikiEditor.toc.css', 'version' => 28 ), |
29 | 29 | array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 11 ), |
30 | 30 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
31 | 31 | ), |
32 | 32 | 'combined' => array( |
33 | | - array( 'src' => 'css/combined.css', 'version' => 68 ), |
| 33 | + array( 'src' => 'css/combined.css', 'version' => 69 ), |
34 | 34 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
35 | 35 | ), |
36 | 36 | 'minified' => array( |
37 | | - array( 'src' => 'css/combined.min.css', 'version' => 68 ), |
| 37 | + array( 'src' => 'css/combined.min.css', 'version' => 69 ), |
38 | 38 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
39 | 39 | ), |
40 | 40 | ) |
— | — | @@ -79,14 +79,14 @@ |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 19 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 96 ), |
82 | 82 | 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 ), |
84 | 84 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), |
85 | 85 | ), |
86 | 86 | 'combined' => array( |
87 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 295 ), |
| 87 | + array( 'src' => 'js/plugins.combined.js', 'version' => 296 ), |
88 | 88 | ), |
89 | 89 | 'minified' => array( |
90 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 295 ), |
| 90 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 296 ), |
91 | 91 | ), |
92 | 92 | ), |
93 | 93 | ); |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css |
— | — | @@ -221,6 +221,10 @@ |
222 | 222 | body.rtl #wikieditor-toolbar-link-int-target-status-external { |
223 | 223 | background-image: url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png ); |
224 | 224 | } |
| 225 | +/* Template Editor Dialogs */ |
| 226 | +.wikiEditor-template-dialog-label { |
| 227 | + text-transform: capitalize; |
| 228 | +} |
225 | 229 | /* Self Clearing Floats */ |
226 | 230 | .wikieditor-toolbar-table-dimension-fields:after, |
227 | 231 | .wikieditor-toolbar-dialog-wrapper:after { |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -468,6 +468,10 @@ |
469 | 469 | body.rtl #wikieditor-toolbar-link-int-target-status-external { |
470 | 470 | background-image: url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png ); |
471 | 471 | } |
| 472 | +/* Template Editor Dialogs */ |
| 473 | +.wikiEditor-template-dialog-label { |
| 474 | + text-transform: capitalize; |
| 475 | +} |
472 | 476 | /* Self Clearing Floats */ |
473 | 477 | .wikieditor-toolbar-table-dimension-fields:after, |
474 | 478 | .wikieditor-toolbar-dialog-wrapper:after { |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -446,6 +446,9 @@ |
447 | 447 | body.rtl #wikieditor-toolbar-link-int-target-status-external{ |
448 | 448 | background-image:url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png ); |
449 | 449 | } |
| 450 | +.wikiEditor-template-dialog-label{ |
| 451 | +text-transform:capitalize; |
| 452 | +} |
450 | 453 | .wikieditor-toolbar-table-dimension-fields:after, |
451 | 454 | .wikieditor-toolbar-dialog-wrapper:after{ |
452 | 455 | visibility:hidden; |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js |
— | — | @@ -258,6 +258,7 @@ |
259 | 259 | }, |
260 | 260 | dialog: { |
261 | 261 | width: 500, |
| 262 | + dialogClass: 'wikiEditor-toolbar-dialog', |
262 | 263 | buttons: { |
263 | 264 | 'wikieditor-template-editor-dialog-submit': function() { |
264 | 265 | // More user feedback |
— | — | @@ -296,7 +297,7 @@ |
297 | 298 | continue; |
298 | 299 | } |
299 | 300 | var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' ); |
300 | | - $( '<td />' ).addClass( 'wikiEditor-template-dialog-name' ).text( |
| 301 | + $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text( |
301 | 302 | typeof param == 'string' ? |
302 | 303 | param.name.replace( /[\_\-]/g, ' ' ) |
303 | 304 | .replace( /^(.)|\s(.)/g, function( first ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9382,6 +9382,7 @@ |
9383 | 9383 | }, |
9384 | 9384 | dialog: { |
9385 | 9385 | width: 500, |
| 9386 | + dialogClass: 'wikiEditor-toolbar-dialog', |
9386 | 9387 | buttons: { |
9387 | 9388 | 'wikieditor-template-editor-dialog-submit': function() { |
9388 | 9389 | // More user feedback |
— | — | @@ -9420,7 +9421,7 @@ |
9421 | 9422 | continue; |
9422 | 9423 | } |
9423 | 9424 | var $paramRow = $( '<tr />' ).addClass( 'wikiEditor-template-dialog-row' ); |
9424 | | - $( '<td />' ).addClass( 'wikiEditor-template-dialog-name' ).text( |
| 9425 | + $( '<td />' ).addClass( 'wikiEditor-template-dialog-label' ).text( |
9425 | 9426 | typeof param == 'string' ? |
9426 | 9427 | param.name.replace( /[\_\-]/g, ' ' ) |
9427 | 9428 | .replace( /^(.)|\s(.)/g, function( first ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -647,9 +647,9 @@ |
648 | 648 | <fieldset>\ |
649 | 649 | <div class="wikiEditor-template-dialog-title" />\ |
650 | 650 | <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);} |
652 | 652 | 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');} |
654 | 654 | 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;} |
655 | 655 | function Range(begin,end){this.begin=begin;this.end=end;} |
656 | 656 | function getSetValue(name,value,original){var valueRange;var rangeIndex;var retVal;if(isNaN(name)){if(typeof paramsByName[name]=='undefined'){return"";} |