JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / plugins / popup / plugin.js
index 7fc400a..f3cdddc 100644 (file)
@@ -3,7 +3,7 @@ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
-CKEDITOR.plugins.add( 'popup');\r
+CKEDITOR.plugins.add( 'popup' );\r
 \r
 CKEDITOR.tools.extend( CKEDITOR.editor.prototype,\r
 {\r
@@ -13,8 +13,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
         * @param {String} url The url of the external file browser.\r
         * @param {String} width Popup window width.\r
         * @param {String} height Popup window height.\r
+        * @param {String} options Popup window features.\r
         */\r
-       popup : function( url, width, height )\r
+       popup : function( url, width, height, options )\r
        {\r
                width = width || '80%';\r
                height = height || '70%';\r
@@ -32,8 +33,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
                        height = 420;\r
 \r
                var top = parseInt( ( window.screen.height - height ) / 2, 10 ),\r
-                       left = parseInt( ( window.screen.width  - width ) / 2, 10 ),\r
-                       options = 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes' +\r
+                       left = parseInt( ( window.screen.width  - width ) / 2, 10 );\r
+\r
+               options = ( options || 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes' ) +\r
                        ',width='  + width +\r
                        ',height=' + height +\r
                        ',top='  + top +\r
@@ -52,11 +54,11 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
                        popupWindow.focus();\r
                        popupWindow.location.href = url;\r
                }\r
-               catch (e)\r
+               catch ( e )\r
                {\r
                        popupWindow = window.open( url, null, options, true );\r
                }\r
 \r
-               return true ;\r
+               return true;\r
        }\r
 });\r