X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fimage%2Fdialogs%2Fimage.js;h=cc1893693a7a81444cc33f1ff75f1f9d87831d04;hp=9c4ceecfc4b4ad3f570e39e80a34aa4259037447;hb=059b4c2fef02528bf1af189f7996e80652faddfb;hpb=c6e377a02b54abc07129d72b632763c727476a15 diff --git a/_source/plugins/image/dialogs/image.js b/_source/plugins/image/dialogs/image.js index 9c4ceec..cc18936 100644 --- a/_source/plugins/image/dialogs/image.js +++ b/_source/plugins/image/dialogs/image.js @@ -147,6 +147,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license else ratioButton.addClass( 'cke_btn_unlocked' ); + var lang = dialog._.editor.lang.image, + label = lang[ dialog.lockRatio ? 'unlockRatio' : 'lockRatio' ]; + + ratioButton.setAttribute( 'title', label ); + ratioButton.getFirst().setText( label ); + return dialog.lockRatio; }; @@ -460,10 +466,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license children : [ { - type : 'html', - html : '' + CKEDITOR.tools.htmlEncode( editor.lang.image.url ) + '' - }, - { type : 'hbox', widths : [ '280px', '110px' ], align : 'right', @@ -472,7 +474,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { id : 'txtUrl', type : 'text', - label : '', + label : editor.lang.common.url, + required: true, onChange : function() { var dialog = this.getDialog(), @@ -542,6 +545,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { type : 'button', id : 'browse', + // v-align with the 'txtUrl' field. + // TODO: We need something better than a fixed size here. + style : 'display:inline-block;margin-top:10px;', align : 'center', label : editor.lang.common.browseServer, hidden : true, @@ -614,11 +620,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { commitInternally.call( this, 'advanced:txtdlgGenStyle' ); }, - validate: function() + validate : function() { var aMatch = this.getValue().match( regexGetSizeOrEmpty ); if ( !aMatch ) - alert( editor.lang.common.validateNumberFailed ); + alert( editor.lang.image.validateWidth ); return !!aMatch; }, setup : setupDimension, @@ -664,11 +670,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { commitInternally.call( this, 'advanced:txtdlgGenStyle' ); }, - validate: function() + validate : function() { var aMatch = this.getValue().match( regexGetSizeOrEmpty ); if ( !aMatch ) - alert( editor.lang.common.validateNumberFailed ); + alert( editor.lang.image.validateHeight ); return !!aMatch; }, setup : setupDimension, @@ -761,10 +767,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } }, html : '