Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,25 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
return maxCols;
|
||||
}
|
||||
|
||||
|
||||
// Whole-positive-integer validator.
|
||||
function validatorNum( msg )
|
||||
{
|
||||
return function()
|
||||
{
|
||||
var value = this.getValue(),
|
||||
pass = !!( CKEDITOR.dialog.validate.integer()( value ) && value > 0 );
|
||||
|
||||
if ( !pass )
|
||||
{
|
||||
alert( msg );
|
||||
this.select();
|
||||
}
|
||||
|
||||
return pass;
|
||||
};
|
||||
}
|
||||
|
||||
function tableDialog( editor, command )
|
||||
{
|
||||
var makeElement = function( name )
|
||||
@@ -281,19 +300,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
label : editor.lang.table.rows,
|
||||
required : true,
|
||||
controlStyle : 'width:5em',
|
||||
validate : function()
|
||||
{
|
||||
var pass = true,
|
||||
value = this.getValue();
|
||||
pass = pass && CKEDITOR.dialog.validate.integer()( value )
|
||||
&& value > 0;
|
||||
if ( !pass )
|
||||
{
|
||||
alert( editor.lang.table.invalidRows );
|
||||
this.select();
|
||||
}
|
||||
return pass;
|
||||
},
|
||||
validate : validatorNum( editor.lang.table.invalidRows ),
|
||||
setup : function( selectedElement )
|
||||
{
|
||||
this.setValue( selectedElement.$.rows.length );
|
||||
@@ -307,19 +314,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
label : editor.lang.table.columns,
|
||||
required : true,
|
||||
controlStyle : 'width:5em',
|
||||
validate : function()
|
||||
{
|
||||
var pass = true,
|
||||
value = this.getValue();
|
||||
pass = pass && CKEDITOR.dialog.validate.integer()( value )
|
||||
&& value > 0;
|
||||
if ( !pass )
|
||||
{
|
||||
alert( editor.lang.table.invalidCols );
|
||||
this.select();
|
||||
}
|
||||
return pass;
|
||||
},
|
||||
validate : validatorNum( editor.lang.table.invalidCols ),
|
||||
setup : function( selectedTable )
|
||||
{
|
||||
this.setValue( tableColumns( selectedTable ) );
|
||||
@@ -468,7 +463,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
setup : function( selectedTable )
|
||||
{
|
||||
var val = selectedTable.getStyle( 'width' );
|
||||
var val = selectedTable.getStyle( 'height' );
|
||||
val && this.setValue( val );
|
||||
},
|
||||
commit : commitValue
|
||||
|
||||
Reference in new issue
Block a user