X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fdialogs%2Ftextarea.js;h=f0f7967f9df1b5a9b884a151ab77d9e1a8cc1f56;hb=refs%2Ftags%2Fv3.6.2;hp=df29235fb33efde65d97598fbf9f5c219c059d2b;hpb=f0610347140239143439a511ee2bd48cb784f470;p=ckeditor.git diff --git a/_source/plugins/forms/dialogs/textarea.js b/_source/plugins/forms/dialogs/textarea.js index df29235..f0f7967 100644 --- a/_source/plugins/forms/dialogs/textarea.js +++ b/_source/plugins/forms/dialogs/textarea.js @@ -7,7 +7,7 @@ CKEDITOR.dialog.add( 'textarea', function( editor ) return { title : editor.lang.textarea.title, minWidth : 350, - minHeight : 150, + minHeight : 220, onShow : function() { delete this.textarea; @@ -66,47 +66,68 @@ CKEDITOR.dialog.add( 'textarea', function( editor ) } }, { - id : 'cols', - type : 'text', - label : editor.lang.textarea.cols, - 'default' : '', - accessKey : 'C', - style : 'width:50px', - validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), - setup : function( element ) - { - var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' ); - this.setValue( value || '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'cols', this.getValue() ); - else - element.removeAttribute( 'cols' ); - } + type : 'hbox', + widths:['50%','50%'], + children:[ + { + id : 'cols', + type : 'text', + label : editor.lang.textarea.cols, + 'default' : '', + accessKey : 'C', + style : 'width:50px', + validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), + setup : function( element ) + { + var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' ); + this.setValue( value || '' ); + }, + commit : function( element ) + { + if ( this.getValue() ) + element.setAttribute( 'cols', this.getValue() ); + else + element.removeAttribute( 'cols' ); + } + }, + { + id : 'rows', + type : 'text', + label : editor.lang.textarea.rows, + 'default' : '', + accessKey : 'R', + style : 'width:50px', + validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), + setup : function( element ) + { + var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' ); + this.setValue( value || '' ); + }, + commit : function( element ) + { + if ( this.getValue() ) + element.setAttribute( 'rows', this.getValue() ); + else + element.removeAttribute( 'rows' ); + } + } + ] }, { - id : 'rows', - type : 'text', - label : editor.lang.textarea.rows, + id : 'value', + type : 'textarea', + label : editor.lang.textfield.value, 'default' : '', - accessKey : 'R', - style : 'width:50px', - validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), setup : function( element ) { - var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' ); - this.setValue( value || '' ); + this.setValue( element.$.defaultValue ); }, commit : function( element ) { - if ( this.getValue() ) - element.setAttribute( 'rows', this.getValue() ); - else - element.removeAttribute( 'rows' ); + element.$.value = element.$.defaultValue = this.getValue() ; } } + ] } ]