r63819 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63818‎ | r63819 | r63820 >
Date:16:06, 16 March 2010
Author:adam
Status:ok
Tags:
Comment:
Insert Table Dialog: Fix for bug 22841
Modified paths:
  • /trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php
@@ -16,14 +16,14 @@
1717 array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ),
1818 array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ),
1919 array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ),
20 - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 58 ),
 20+ array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 59 ),
2121 array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ),
2222 ),
2323 'combined' => array(
24 - array( 'src' => 'WikiEditor.combined.js', 'version' => 62 ),
 24+ array( 'src' => 'WikiEditor.combined.js', 'version' => 63 ),
2525 ),
2626 'minified' => array(
27 - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 62 ),
 27+ array( 'src' => 'WikiEditor.combined.min.js', 'version' => 63 ),
2828 ),
2929 );
3030 static $messages = array(
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -1544,8 +1544,7 @@
15451545 var colsVal = $j( '#wikieditor-toolbar-table-dimensions-columns' ).val();
15461546 var rows = parseInt( rowsVal, 10 );
15471547 var cols = parseInt( colsVal, 10 );
1548 - var header = $j( '#wikieditor-toolbar-table-dimensions-header:checked' ).is( ':checked' ) ?
1549 - 1 : 0;
 1548+ var header = $j( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) ? 1 : 0;
15501549 var u = mw.usability;
15511550 if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) {
15521551 alert( u.getMsg( 'wikieditor-toolbar-tool-table-invalidnumber' ) );
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -131,7 +131,7 @@
132132 </div>\
133133 </div></div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(mw.usability.getMsg($j(this).attr('rel')));});$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')
134134 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')
135 -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:checked').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;}
 135+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;}
136136 if(rows+header==0||cols==0){alert(u.getMsg('wikieditor-toolbar-tool-table-zero'));return;}
137137 if(rows*cols>1000){alert(u.getMsg('wikieditor-toolbar-tool-table-toomany',1000));return;}
138138 var headerText=u.getMsg('wikieditor-toolbar-tool-table-example-header');var normalText=u.getMsg('wikieditor-toolbar-tool-table-example');var table="";for(var r=0;r<rows+header;r++){table+="|-\n";for(var c=0;c<cols;c++){var isHeader=(header&&r==0);var delim=isHeader?'!':'|';if(c>0){delim+=delim;}
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
@@ -1495,8 +1495,7 @@
14961496 var colsVal = $j( '#wikieditor-toolbar-table-dimensions-columns' ).val();
14971497 var rows = parseInt( rowsVal, 10 );
14981498 var cols = parseInt( colsVal, 10 );
1499 - var header = $j( '#wikieditor-toolbar-table-dimensions-header:checked' ).is( ':checked' ) ?
1500 - 1 : 0;
 1499+ var header = $j( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) ? 1 : 0;
15011500 var u = mw.usability;
15021501 if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) {
15031502 alert( u.getMsg( 'wikieditor-toolbar-tool-table-invalidnumber' ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63773UsabilityInitiative: (bug 22841) Opera ignores header checkbox in create tabl...catrope16:10, 15 March 2010

Status & tagging log