diff --git a/modules/jquery.wikiEditor.dialogs.config.js b/modules/jquery.wikiEditor.dialogs.config.js index 54fcad79..76a3a57e 100644 --- a/modules/jquery.wikiEditor.dialogs.config.js +++ b/modules/jquery.wikiEditor.dialogs.config.js @@ -729,12 +729,12 @@ $.wikiEditor.modules.dialogs.config = {
\ \ \ \ @@ -832,8 +832,8 @@ $.wikiEditor.modules.dialogs.config = { var colsVal = $( '#wikieditor-toolbar-table-dimensions-columns' ).val(); var rows = parseInt( rowsVal, 10 ); var cols = parseInt( colsVal, 10 ); - var header = $( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) ? 1 : 0; - if ( isNaN( rows ) || isNaN( cols ) || rows !== rowsVal || cols !== colsVal ) { + var header = $( '#wikieditor-toolbar-table-dimensions-header' ).prop( 'checked' ) ? 1 : 0; + if ( isNaN( rows ) || isNaN( cols ) || String( rows ) !== rowsVal || String( cols ) !== colsVal || rowsVal < 0 || colsVal < 0 ) { alert( mw.msg( 'wikieditor-toolbar-tool-table-invalidnumber' ) ); return; } @@ -841,7 +841,7 @@ $.wikiEditor.modules.dialogs.config = { alert( mw.msg( 'wikieditor-toolbar-tool-table-zero' ) ); return; } - if ( rows * cols > 1000 ) { + if ( ( rows * cols ) > 1000 ) { alert( mw.msg( 'wikieditor-toolbar-tool-table-toomany', 1000 ) ); return; }