Index: trunk/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' => 373 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 374 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 373 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 374 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/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' => 80 ), |
| 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' => 84 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 85 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 84 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 85 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1684,7 +1684,7 @@ |
1685 | 1685 | // Set tabindexes on form fields |
1686 | 1686 | $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) ); |
1687 | 1687 | |
1688 | | - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
| 1688 | + $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 ); |
1689 | 1689 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
1690 | 1690 | $j( '#wikieditor-toolbar-table-wikitable' ).click( function() { |
1691 | 1691 | $j( '.wikieditor-toolbar-table-preview' ).toggleClass( 'wikitable' ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | </tr>\ |
143 | 143 | </table>\ |
144 | 144 | </div>\ |
145 | | - </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') |
| 145 | + </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') |
146 | 146 | 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') |
147 | 147 | 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;} |
148 | 148 | if(rows+header==0||cols==0){alert(u.getMsg('wikieditor-toolbar-tool-table-zero'));return;} |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1635,7 +1635,7 @@ |
1636 | 1636 | // Set tabindexes on form fields |
1637 | 1637 | $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) ); |
1638 | 1638 | |
1639 | | - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 4 ); |
| 1639 | + $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 ); |
1640 | 1640 | $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 ); |
1641 | 1641 | $j( '#wikieditor-toolbar-table-wikitable' ).click( function() { |
1642 | 1642 | $j( '.wikieditor-toolbar-table-preview' ).toggleClass( 'wikitable' ); |
Index: trunk/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: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9777,12 +9777,12 @@ |
9778 | 9778 | */ |
9779 | 9779 | getTemplateDisplayName: function ( model ) { |
9780 | 9780 | var tName = model.getName(); |
9781 | | - if( tName.toLowerCase() in $.wikiEditor.modules.templateEditor.nameMappings ) { |
9782 | | - return tName + ': ' + model.getValue( $.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()] ); |
9783 | | - } else if( model.getValue( 'name' ) != '' ) { |
| 9781 | + if( model.getValue( 'name' ) != '' ) { |
9784 | 9782 | return tName + ': ' + model.getValue( 'name' ); |
9785 | 9783 | } else if( model.getValue( 'Name' ) != '' ) { |
9786 | 9784 | return tName + ': ' + model.getValue( 'Name' ); |
| 9785 | + } else if( tName.toLowerCase() in $.wikiEditor.modules.templateEditor.nameMappings ) { |
| 9786 | + return tName + ': ' + model.getValue( $.wikiEditor.modules.templateEditor.nameMappings[tName.toLowerCase()] ); |
9787 | 9787 | } |
9788 | 9788 | return tName; |
9789 | 9789 | }, |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -669,7 +669,7 @@ |
670 | 670 | $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);}} |
671 | 671 | $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();} |
672 | 672 | $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);} |
673 | | -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');} |
| 673 | +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()]);} |
674 | 674 | 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;} |
675 | 675 | function Range(begin,end){this.begin=begin;this.end=end;} |
676 | 676 | function getSetValue(name,value,original){var valueRange;var rangeIndex;var retVal;if(isNaN(name)){if(typeof paramsByName[name]=='undefined'){return"";} |