X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fiframe%2Fdialogs%2Fiframe.js;h=769b6aff8ccf19a10ac1764be7c5bc2748c0964f;hp=ddfff19bb62ad59b77faee716deb402843845bfc;hb=f0610347140239143439a511ee2bd48cb784f470;hpb=4e70ea24db840898be8cc21c950363a52a2a6aba diff --git a/_source/plugins/iframe/dialogs/iframe.js b/_source/plugins/iframe/dialogs/iframe.js index ddfff19..769b6af 100644 --- a/_source/plugins/iframe/dialogs/iframe.js +++ b/_source/plugins/iframe/dialogs/iframe.js @@ -61,7 +61,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var iframeNode = editor.restoreRealElement( fakeImage ); this.iframeNode = iframeNode; - this.setupContent( iframeNode, fakeImage ); + this.setupContent( iframeNode ); } }, onOk : function() @@ -123,23 +123,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license style : 'width:100%', labelLayout : 'vertical', label : commonLang.width, - validate : CKEDITOR.dialog.validate.integer( commonLang.invalidWidth ), - setup : function( iframeNode, fakeImage ) - { - loadValue.apply( this, arguments ); - if ( fakeImage ) - { - var fakeImageWidth = parseInt( fakeImage.$.style.width, 10 ); - if ( !isNaN( fakeImageWidth ) ) - this.setValue( fakeImageWidth ); - } - }, - commit : function( iframeNode, extraStyles ) - { - commitValue.apply( this, arguments ); - if ( this.getValue() ) - extraStyles.width = this.getValue() + 'px'; - } + validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.width ) ), + setup : loadValue, + commit : commitValue }, { id : 'height', @@ -147,23 +133,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license style : 'width:100%', labelLayout : 'vertical', label : commonLang.height, - validate : CKEDITOR.dialog.validate.integer( commonLang.invalidHeight ), - setup : function( iframeNode, fakeImage ) - { - loadValue.apply( this, arguments ); - if ( fakeImage ) - { - var fakeImageHeight = parseInt( fakeImage.$.style.height, 10 ); - if ( !isNaN( fakeImageHeight ) ) - this.setValue( fakeImageHeight ); - } - }, - commit : function( iframeNode, extraStyles ) - { - commitValue.apply( this, arguments ); - if ( this.getValue() ) - extraStyles.height = this.getValue() + 'px'; - } + validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.height ) ), + setup : loadValue, + commit : commitValue }, { id : 'align',