Index: branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -78,14 +78,14 @@ |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 23 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), |
82 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 74 ), |
| 82 | + array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 75 ), |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 367 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 374 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 367 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 374 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,14 +16,14 @@ |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 19 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | | - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 68 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 81 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 72 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 85 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 72 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 85 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1499,7 +1499,7 @@ |
1500 | 1500 | // Set tabindexes on form fields |
1501 | 1501 | $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) ); |
1502 | 1502 | |
1503 | | - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
| 1503 | + $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 ); |
1504 | 1504 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
1505 | 1505 | $j( '#wikieditor-toolbar-table-wikitable' ).click( function() { |
1506 | 1506 | $j( '.wikieditor-toolbar-table-preview' ).toggleClass( 'wikitable' ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | </tr>\ |
132 | 132 | </table>\ |
133 | 133 | </div>\ |
134 | | - </div></div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(mw.usability.getMsg($j(this).attr('rel')));});$j.wikiEditor.modules.dialogs.fn.setTabindexes($j(this).find('input').not('[tabindex]'));$j('#wikieditor-toolbar-table-dimensions-rows').val(4);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);$j('#wikieditor-toolbar-table-wikitable').click(function(){$j('.wikieditor-toolbar-table-preview').toggleClass('wikitable');});$j('#wikieditor-toolbar-table-preview').clone().attr('id','wikieditor-toolbar-table-preview2').addClass('sortable').insertAfter($j('#wikieditor-toolbar-table-preview')).hide();if(typeof ts_makeSortable=='function') |
| 134 | + </div></div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(mw.usability.getMsg($j(this).attr('rel')));});$j.wikiEditor.modules.dialogs.fn.setTabindexes($j(this).find('input').not('[tabindex]'));$j('#wikieditor-toolbar-table-dimensions-rows').val(3);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);$j('#wikieditor-toolbar-table-wikitable').click(function(){$j('.wikieditor-toolbar-table-preview').toggleClass('wikitable');});$j('#wikieditor-toolbar-table-preview').clone().attr('id','wikieditor-toolbar-table-preview2').addClass('sortable').insertAfter($j('#wikieditor-toolbar-table-preview')).hide();if(typeof ts_makeSortable=='function') |
135 | 135 | ts_makeSortable($j('#wikieditor-toolbar-table-preview2').get(0));$j('#wikieditor-toolbar-table-sortable').click(function(){$j('#wikieditor-toolbar-table-preview').hide().attr('id','wikieditor-toolbar-table-preview3');$j('#wikieditor-toolbar-table-preview2').attr('id','wikieditor-toolbar-table-preview').show();$j('#wikieditor-toolbar-table-preview3').attr('id','wikieditor-toolbar-table-preview2');});$j('#wikieditor-toolbar-table-dimensions-header').click(function(){var headerHTML=$j('.wikieditor-toolbar-table-preview-header').html();var hiddenHTML=$j('.wikieditor-toolbar-table-preview-hidden').html();$j('.wikieditor-toolbar-table-preview-header').html(hiddenHTML);$j('.wikieditor-toolbar-table-preview-hidden').html(headerHTML);if(typeof ts_makeSortable=='function') |
136 | 136 | ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{resizable:false,dialogClass:'wikiEditor-toolbar-dialog',width:590,buttons:{'wikieditor-toolbar-tool-table-insert':function(){var rowsVal=$j('#wikieditor-toolbar-table-dimensions-rows').val();var colsVal=$j('#wikieditor-toolbar-table-dimensions-columns').val();var rows=parseInt(rowsVal,10);var cols=parseInt(colsVal,10);var header=$j('#wikieditor-toolbar-table-dimensions-header').is(':checked')?1:0;var u=mw.usability;if(isNaN(rows)||isNaN(cols)||rows!=rowsVal||cols!=colsVal){alert(u.getMsg('wikieditor-toolbar-tool-table-invalidnumber'));return;} |
137 | 137 | if(rows+header==0||cols==0){alert(u.getMsg('wikieditor-toolbar-tool-table-zero'));return;} |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1450,7 +1450,7 @@ |
1451 | 1451 | // Set tabindexes on form fields |
1452 | 1452 | $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) ); |
1453 | 1453 | |
1454 | | - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
| 1454 | + $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 ); |
1455 | 1455 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
1456 | 1456 | $j( '#wikieditor-toolbar-table-wikitable' ).click( function() { |
1457 | 1457 | $j( '.wikieditor-toolbar-table-preview' ).toggleClass( 'wikitable' ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js |
— | — | @@ -455,12 +455,12 @@ |
456 | 456 | */ |
457 | 457 | getTemplateDisplayName: function ( model ) { |
458 | 458 | var tName = model.getName(); |
459 | | - if( tName.toLowerCase() in $.wikiEditor.modules.templateEditor.nameMappings ) { |
460 | | - return tName + ': ' + model.getValue( $.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()] ); |
461 | | - } else if( model.getValue( 'name' ) != '' ) { |
| 459 | + if( model.getValue( 'name' ) != '' ) { |
462 | 460 | return tName + ': ' + model.getValue( 'name' ); |
463 | 461 | } else if( model.getValue( 'Name' ) != '' ) { |
464 | 462 | return tName + ': ' + model.getValue( 'Name' ); |
| 463 | + } else if( tName.toLowerCase() in $.wikiEditor.modules.templateEditor.nameMappings ) { |
| 464 | + return tName + ': ' + model.getValue( $.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()] ); |
465 | 465 | } |
466 | 466 | return tName; |
467 | 467 | }, |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9778,12 +9778,12 @@ |
9779 | 9779 | */ |
9780 | 9780 | getTemplateDisplayName: function ( model ) { |
9781 | 9781 | var tName = model.getName(); |
9782 | | - if( tName.toLowerCase() in $.wikiEditor.modules.templateEditor.nameMappings ) { |
9783 | | - return tName + ': ' + model.getValue( $.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()] ); |
9784 | | - } else if( model.getValue( 'name' ) != '' ) { |
| 9782 | + if( model.getValue( 'name' ) != '' ) { |
9785 | 9783 | return tName + ': ' + model.getValue( 'name' ); |
9786 | 9784 | } else if( model.getValue( 'Name' ) != '' ) { |
9787 | 9785 | return tName + ': ' + model.getValue( 'Name' ); |
| 9786 | + } else if( tName.toLowerCase() in $.wikiEditor.modules.templateEditor.nameMappings ) { |
| 9787 | + return tName + ': ' + model.getValue( $.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()] ); |
9788 | 9788 | } |
9789 | 9789 | return tName; |
9790 | 9790 | }, |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -665,7 +665,7 @@ |
666 | 666 | $rows=$rows.not($row);}else{var $paramRow=$('<div />').addClass('wikiEditor-template-dialog-field-wrapper');$('<label />').text(paramText).appendTo($paramRow);$('<textarea />').data('name',param.name).val(paramVal).each(function(){$(this).css('height',$(this).val().length>24?'4.5em':'1.5em');}).data('expanded',false).bind('cut paste keypress click change',function(e){if(e.keyCode=='9')return true;var $this=$(this);setTimeout(function(){var expanded=$this.data('expanded');if($this.val().indexOf('\n')!=-1||$this.val().length>24){if(!expanded){$this.animate({'height':'4.5em'},'fast');$this.data('expanded',true);}}else{if(expanded){$this.animate({'height':'1.5em'},'fast');$this.data('expanded',false);}}},0);}).appendTo($paramRow);$paramRow.append('<div style="clear:both"></div>').appendTo($fields);}} |
667 | 667 | $rows.remove();$fields.find('label').autoEllipsis();$(this).parent('.ui-dialog').find('.ui-dialog-titlebar-close').removeClass('ui-state-focus');var $needTabindex=$(this).closest('.ui-dialog').find('button, textarea');if($needTabindex.not('[tabindex]').length){$needTabindex.removeAttr('tabindex');$.wikiEditor.modules.dialogs.fn.setTabindexes($needTabindex);}}}};context.$textarea.wikiEditor('addDialog',{'templateEditor':dialog});$('#'+dialog.id).data('templateDiv',$template).dialog('open');},updateModel:function($templateText,model){var context=$templateText.data('marker').context;var text;if(typeof model=='undefined'){text=context.fn.htmlToText($templateText.html());}else{text=model.getText();} |
668 | 668 | $templateText.text(text);$templateText.html($templateText.html().replace(/\n/g,'<br />'));$templateText.data('oldHTML',$templateText.html());if(typeof model=='undefined'){model=new $.wikiEditor.modules.templateEditor.fn.model(text);$templateText.data('model',model);} |
669 | | -return model;},getTemplateDisplayName:function(model){var tName=model.getName();if(tName.toLowerCase()in $.wikiEditor.modules.templateEditor.nameMappings){return tName+': '+model.getValue($.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()]);}else if(model.getValue('name')!=''){return tName+': '+model.getValue('name');}else if(model.getValue('Name')!=''){return tName+': '+model.getValue('Name');} |
| 669 | +return model;},getTemplateDisplayName:function(model){var tName=model.getName();if(model.getValue('name')!=''){return tName+': '+model.getValue('name');}else if(model.getValue('Name')!=''){return tName+': '+model.getValue('Name');}else if(tName.toLowerCase()in $.wikiEditor.modules.templateEditor.nameMappings){return tName+': '+model.getValue($.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()]);} |
670 | 670 | return tName;},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;} |
671 | 671 | function Range(begin,end){this.begin=begin;this.end=end;} |
672 | 672 | function getSetValue(name,value,original){var valueRange;var rangeIndex;var retVal;if(isNaN(name)){if(typeof paramsByName[name]=='undefined'){return"";} |