JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5
[ckeditor.git] / _source / plugins / image / dialogs / image.js
index 268185f..9c5f4e5 100644 (file)
@@ -264,7 +264,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                return {\r
                        title : ( dialogType == 'image' ) ? editor.lang.image.title : editor.lang.image.titleButton,\r
                        minWidth : 420,\r
-                       minHeight : 310,\r
+                       minHeight : CKEDITOR.env.ie && CKEDITOR.env.quirks?  360: 310,\r
                        onShow : function()\r
                        {\r
                                this.imageElement = false;\r
@@ -319,7 +319,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                this.setupContent( LINK, link );\r
                                }\r
 \r
-                               if ( element && element.getName() == 'img' && !element.getAttribute( '_cke_realelement' )\r
+                               if ( element && element.getName() == 'img' && !element.data( 'cke-realelement' )\r
                                        || element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'image' )\r
                                {\r
                                        this.imageEditMode = element.getName();\r
@@ -533,7 +533,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                        {\r
                                                                                                if ( type == IMAGE )\r
                                                                                                {\r
-                                                                                                       var url = element.getAttribute( '_cke_saved_src' ) || element.getAttribute( 'src' );\r
+                                                                                                       var url = element.data( 'cke-saved-src' ) || element.getAttribute( 'src' );\r
                                                                                                        var field = this;\r
 \r
                                                                                                        this.getDialog().dontResetSize = true;\r
@@ -547,7 +547,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                        {\r
                                                                                                if ( type == IMAGE && ( this.getValue() || this.isChanged() ) )\r
                                                                                                {\r
-                                                                                                       element.setAttribute( '_cke_saved_src', decodeURI( this.getValue() ) );\r
+                                                                                                       element.data( 'cke-saved-src', decodeURI( this.getValue() ) );\r
                                                                                                        element.setAttribute( 'src', decodeURI( this.getValue() ) );\r
                                                                                                }\r
                                                                                                else if ( type == CLEANUP )\r
@@ -607,17 +607,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                },\r
                                                {\r
                                                        type : 'hbox',\r
-                                                       widths : [ '140px', '240px' ],\r
                                                        children :\r
                                                        [\r
                                                                {\r
                                                                        type : 'vbox',\r
-                                                                       padding : 10,\r
                                                                        children :\r
                                                                        [\r
                                                                                {\r
                                                                                        type : 'hbox',\r
-                                                                                       widths : [ '70%', '30%' ],\r
+                                                                                       widths : [ '50%', '50%' ],\r
                                                                                        children :\r
                                                                                        [\r
                                                                                                {\r
@@ -629,8 +627,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                                        type : 'text',\r
                                                                                                                        width: '40px',\r
                                                                                                                        id : 'txtWidth',\r
-                                                                                                                       labelLayout : 'horizontal',\r
-                                                                                                                       label : editor.lang.image.width,\r
+                                                                                                                       label : editor.lang.common.width,\r
                                                                                                                        onKeyUp : onSizeChange,\r
                                                                                                                        onChange : function()\r
                                                                                                                        {\r
@@ -640,7 +637,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                                        {\r
                                                                                                                                var aMatch  =  this.getValue().match( regexGetSizeOrEmpty );\r
                                                                                                                                if ( !aMatch )\r
-                                                                                                                                       alert( editor.lang.image.validateWidth );\r
+                                                                                                                                       alert( editor.lang.common.invalidWidth );\r
                                                                                                                                return !!aMatch;\r
                                                                                                                        },\r
                                                                                                                        setup : setupDimension,\r
@@ -679,8 +676,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                                        type : 'text',\r
                                                                                                                        id : 'txtHeight',\r
                                                                                                                        width: '40px',\r
-                                                                                                                       labelLayout : 'horizontal',\r
-                                                                                                                       label : editor.lang.image.height,\r
+                                                                                                                       label : editor.lang.common.height,\r
                                                                                                                        onKeyUp : onSizeChange,\r
                                                                                                                        onChange : function()\r
                                                                                                                        {\r
@@ -690,7 +686,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                                        {\r
                                                                                                                                var aMatch = this.getValue().match( regexGetSizeOrEmpty );\r
                                                                                                                                if ( !aMatch )\r
-                                                                                                                                       alert( editor.lang.image.validateHeight );\r
+                                                                                                                                       alert( editor.lang.common.invalidHeight );\r
                                                                                                                                return !!aMatch;\r
                                                                                                                        },\r
                                                                                                                        setup : setupDimension,\r
@@ -730,7 +726,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                },\r
                                                                                                {\r
                                                                                                        type : 'html',\r
-                                                                                                       style : 'margin-top:10px;width:40px;height:40px;',\r
+                                                                                                       style : 'margin-top:30px;width:40px;height:40px;',\r
                                                                                                        onLoad : function()\r
                                                                                                        {\r
                                                                                                                // Activate Reset button\r
@@ -800,7 +796,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                        type : 'text',\r
                                                                                                        id : 'txtBorder',\r
                                                                                                        width: '60px',\r
-                                                                                                       labelLayout : 'horizontal',\r
                                                                                                        label : editor.lang.image.border,\r
                                                                                                        'default' : '',\r
                                                                                                        onKeyUp : function()\r
@@ -857,7 +852,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                        type : 'text',\r
                                                                                                        id : 'txtHSpace',\r
                                                                                                        width: '60px',\r
-                                                                                                       labelLayout : 'horizontal',\r
                                                                                                        label : editor.lang.image.hSpace,\r
                                                                                                        'default' : '',\r
                                                                                                        onKeyUp : function()\r
@@ -921,7 +915,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                        type : 'text',\r
                                                                                                        id : 'txtVSpace',\r
                                                                                                        width : '60px',\r
-                                                                                                       labelLayout : 'horizontal',\r
                                                                                                        label : editor.lang.image.vSpace,\r
                                                                                                        'default' : '',\r
                                                                                                        onKeyUp : function()\r
@@ -983,16 +976,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                                {\r
                                                                                                        id : 'cmbAlign',\r
                                                                                                        type : 'select',\r
-                                                                                                       labelLayout : 'horizontal',\r
                                                                                                        widths : [ '35%','65%' ],\r
                                                                                                        style : 'width:90px',\r
-                                                                                                       label : editor.lang.image.align,\r
+                                                                                                       label : editor.lang.common.align,\r
                                                                                                        'default' : '',\r
                                                                                                        items :\r
                                                                                                        [\r
                                                                                                                [ editor.lang.common.notSet , ''],\r
-                                                                                                               [ editor.lang.image.alignLeft , 'left'],\r
-                                                                                                               [ editor.lang.image.alignRight , 'right']\r
+                                                                                                               [ editor.lang.common.alignLeft , 'left'],\r
+                                                                                                               [ editor.lang.common.alignRight , 'right']\r
                                                                                                                // Backward compatible with v2 on setup when specified as attribute value,\r
                                                                                                                // while these values are no more available as select options.\r
                                                                                                                //      [ editor.lang.image.alignAbsBottom , 'absBottom'],\r
@@ -1098,7 +1090,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                        {\r
                                                                if ( type == LINK )\r
                                                                {\r
-                                                                       var href = element.getAttribute( '_cke_saved_href' );\r
+                                                                       var href = element.data( 'cke-saved-href' );\r
                                                                        if ( !href )\r
                                                                                href = element.getAttribute( 'href' );\r
                                                                        this.setValue( href );\r
@@ -1110,7 +1102,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                {\r
                                                                        if ( this.getValue() || this.isChanged() )\r
                                                                        {\r
-                                                                               element.setAttribute( '_cke_saved_href', decodeURI( this.getValue() ) );\r
+                                                                               element.data( 'cke-saved-href', decodeURI( this.getValue() ) );\r
                                                                                element.setAttribute( 'href', 'javascript:void(0)/*' +\r
                                                                                        CKEDITOR.tools.getNextNumber() + '*/' );\r
 \r