JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.3
[ckeditor.git] / _source / plugins / wsc / dialogs / wsc.js
index b084384..7bc95dd 100644 (file)
@@ -23,7 +23,7 @@ CKEDITOR.dialog.add( 'checkspell', function( editor )
                        ' style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;">' +\r
                '</div><iframe' +\r
                        ' src=""' +\r
-                       ' style="width:485px;background-color:#f1f1e3;height:380px"' +\r
+                       ' style="width:100%;background-color:#f1f1e3;"' +\r
                        ' frameborder="0"' +\r
                        ' name="' + iframeId + '"' +\r
                        ' id="' + iframeId + '"' +\r
@@ -129,6 +129,7 @@ CKEDITOR.dialog.add( 'checkspell', function( editor )
                {\r
                        var contentArea = this.getContentElement( 'general', 'content' ).getElement();\r
                        contentArea.setHtml( pasteArea );\r
+                       contentArea.getChild( 2 ).setStyle( 'height', this._.contentSize.height + 'px' );\r
 \r
                        if ( typeof( window.doSpell ) != 'function' )\r
                        {\r
@@ -166,11 +167,21 @@ CKEDITOR.dialog.add( 'checkspell', function( editor )
                                        {\r
                                                type : 'html',\r
                                                id : 'content',\r
-                                               style : 'width:485;height:380px',\r
-                                               html : '<div></div>'\r
+                                               html : ''\r
                                        }\r
                                ]\r
                        }\r
                ]\r
        };\r
 });\r
+\r
+// Expand the spell-check frame when dialog resized. (#6829)\r
+CKEDITOR.dialog.on( 'resize', function( evt )\r
+{\r
+       var data = evt.data,\r
+               dialog = data.dialog,\r
+               height = data.height;\r
+               var content = dialog.getContentElement( 'general', 'content' ).getElement(),\r
+                               iframe = content && content.getChild( 2 );\r
+               iframe && iframe.setStyle( 'height', height + 'px' );\r
+});\r