JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.1
[ckeditor.git] / _source / plugins / iframe / dialogs / iframe.js
index ddfff19..769b6af 100644 (file)
@@ -61,7 +61,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        var iframeNode = editor.restoreRealElement( fakeImage );\r
                                        this.iframeNode = iframeNode;\r
 \r
-                                       this.setupContent( iframeNode, fakeImage );\r
+                                       this.setupContent( iframeNode );\r
                                }\r
                        },\r
                        onOk : function()\r
@@ -123,23 +123,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                        style : 'width:100%',\r
                                                                        labelLayout : 'vertical',\r
                                                                        label : commonLang.width,\r
-                                                                       validate : CKEDITOR.dialog.validate.integer( commonLang.invalidWidth ),\r
-                                                                       setup : function( iframeNode, fakeImage )\r
-                                                                       {\r
-                                                                               loadValue.apply( this, arguments );\r
-                                                                               if ( fakeImage )\r
-                                                                               {\r
-                                                                                       var fakeImageWidth = parseInt( fakeImage.$.style.width, 10 );\r
-                                                                                       if ( !isNaN( fakeImageWidth ) )\r
-                                                                                               this.setValue( fakeImageWidth );\r
-                                                                               }\r
-                                                                       },\r
-                                                                       commit : function( iframeNode, extraStyles )\r
-                                                                       {\r
-                                                                               commitValue.apply( this, arguments );\r
-                                                                               if ( this.getValue() )\r
-                                                                                       extraStyles.width = this.getValue() + 'px';\r
-                                                                       }\r
+                                                                       validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.width ) ),\r
+                                                                       setup : loadValue,\r
+                                                                       commit : commitValue\r
                                                                },\r
                                                                {\r
                                                                        id : 'height',\r
@@ -147,23 +133,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                        style : 'width:100%',\r
                                                                        labelLayout : 'vertical',\r
                                                                        label : commonLang.height,\r
-                                                                       validate : CKEDITOR.dialog.validate.integer( commonLang.invalidHeight ),\r
-                                                                       setup : function( iframeNode, fakeImage )\r
-                                                                       {\r
-                                                                               loadValue.apply( this, arguments );\r
-                                                                               if ( fakeImage )\r
-                                                                               {\r
-                                                                                       var fakeImageHeight = parseInt( fakeImage.$.style.height, 10 );\r
-                                                                                       if ( !isNaN( fakeImageHeight ) )\r
-                                                                                               this.setValue( fakeImageHeight );\r
-                                                                               }\r
-                                                                       },\r
-                                                                       commit : function( iframeNode, extraStyles )\r
-                                                                       {\r
-                                                                               commitValue.apply( this, arguments );\r
-                                                                               if ( this.getValue() )\r
-                                                                                       extraStyles.height = this.getValue() + 'px';\r
-                                                                       }\r
+                                                                       validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.height ) ),\r
+                                                                       setup : loadValue,\r
+                                                                       commit : commitValue\r
                                                                },\r
                                                                {\r
                                                                        id : 'align',\r