Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 6957)
+++ /CKEditor/trunk/CHANGES.html (revision 6958)
@@ -74,4 +74,5 @@
#6663 : Table caption that contains rich text is not anymore corrupted after edit with table dialog.
#7192 : [IE] Selecting paragrpah format in an empty editor without focus didn't bring focus into editor body.
+ #7158 : Width and height fields in the iframe dialog are now synchronized with the style field.
Updated the following language files:
- #7834 : Dutch;
Index: /CKEditor/trunk/_source/plugins/iframe/dialogs/iframe.js
===================================================================
--- /CKEditor/trunk/_source/plugins/iframe/dialogs/iframe.js (revision 6957)
+++ /CKEditor/trunk/_source/plugins/iframe/dialogs/iframe.js (revision 6958)
@@ -49,4 +49,24 @@
minWidth : 350,
minHeight : 260,
+ onLoad : function()
+ {
+ var dialog = this,
+ styles = dialog.getContentElement( 'advanced', 'advStyles' );
+
+ styles && styles.on( 'change', function()
+ {
+ // Synchronize width value.
+ var width = parseInt( this.getStyle( 'width', '' ) || '', 10 ),
+ txtWidth = dialog.getContentElement( 'info', 'width' );
+
+ txtWidth && txtWidth.setValue( width, true );
+
+ // Synchronize height value.
+ var height = parseInt( this.getStyle( 'height', '' ) || '', 10 ),
+ txtHeight = dialog.getContentElement( 'info', 'height' );
+
+ txtHeight && txtHeight.setValue( height, true );
+ });
+ },
onShow : function()
{
@@ -64,4 +84,11 @@
this.setupContent( iframeNode, fakeImage );
}
+
+ // Call the onChange method for the widht and height fields so
+ // they get reflected into the Advanced tab.
+ var widthInput = this.getContentElement( 'info', 'width' ),
+ heightInput = this.getContentElement( 'info', 'height' );
+ widthInput && widthInput.onChange();
+ heightInput && heightInput.onChange();
},
onOk : function()
@@ -140,4 +167,10 @@
if ( this.getValue() )
extraStyles.width = this.getValue() + 'px';
+ },
+ onChange : function()
+ {
+ var styles = this.getDialog().getContentElement( 'advanced', 'advStyles' ),
+ value = this.getValue();
+ styles && styles.updateStyle( 'width', value && ( value + 'px' ) );
}
},
@@ -164,4 +197,10 @@
if ( this.getValue() )
extraStyles.height = this.getValue() + 'px';
+ },
+ onChange : function()
+ {
+ var styles = this.getDialog().getContentElement( 'advanced', 'advStyles' ),
+ value = this.getValue();
+ styles && styles.updateStyle( 'height', value && ( value + 'px' ) );
}
},