\r
var switchLockRatio = function( dialog, value )\r
{\r
+ if ( !dialog.getContentElement( 'info', 'ratioLock' ) )\r
+ return null;\r
+\r
var oImageOriginal = dialog.originalElement;\r
\r
// Dialog may already closed. (#5505)\r
var oImageOriginal = dialog.originalElement;\r
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )\r
{\r
- dialog.setValueOf( 'info', 'txtWidth', oImageOriginal.$.width );\r
- dialog.setValueOf( 'info', 'txtHeight', oImageOriginal.$.height );\r
+ var widthField = dialog.getContentElement( 'info', 'txtWidth' ),\r
+ heightField = dialog.getContentElement( 'info', 'txtHeight' );\r
+ widthField && widthField.setValue( oImageOriginal.$.width );\r
+ heightField && heightField.setValue( oImageOriginal.$.height );\r
}\r
updatePreview( dialog );\r
};\r
if ( dialogType != 'image' )\r
this.hidePage( 'Link' ); //Hide Link tab.\r
var doc = this._.element.getDocument();\r
- this.addFocusable( doc.getById( btnResetSizeId ), 5 );\r
- this.addFocusable( doc.getById( btnLockSizesId ), 5 );\r
+\r
+ if ( this.getContentElement( 'info', 'ratioLock' ) )\r
+ {\r
+ this.addFocusable( doc.getById( btnResetSizeId ), 5 );\r
+ this.addFocusable( doc.getById( btnLockSizesId ), 5 );\r
+ }\r
\r
this.commitContent = commitContent;\r
},\r
children :\r
[\r
{\r
+ id : 'basic',\r
type : 'vbox',\r
children :\r
[\r
]\r
},\r
{\r
+ id : 'ratioLock',\r
type : 'html',\r
style : 'margin-top:30px;width:40px;height:40px;',\r
onLoad : function()\r
[\r
{\r
type : 'html',\r
+ id : 'htmlPreview',\r
style : 'width:95%;',\r
html : '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'<br>'+\r
'<div id="' + imagePreviewLoaderId + '" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div>'+\r