JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / plugins / filebrowser / plugin.js
index de764f1..665a5ac 100644 (file)
@@ -174,7 +174,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        params.langCode = editor.langCode;\r
 \r
                var url = addQueryString( this.filebrowser.url, params );\r
-               editor.popup( url, width, height );\r
+               editor.popup( url, width, height, editor.config.fileBrowserWindowFeatures );\r
        }\r
 \r
        /**\r
@@ -261,8 +261,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        if ( element.filebrowser.action == 'Browse' )\r
                        {\r
-                               var url = element.filebrowser.url || editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ]\r
-                                                       || editor.config.filebrowserBrowseUrl;\r
+                               var url = element.filebrowser.url;\r
+                               if ( url === undefined )\r
+                               {\r
+                                       url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ];\r
+                                       if ( url === undefined )\r
+                                               url = editor.config.filebrowserBrowseUrl;\r
+                               }\r
 \r
                                if ( url )\r
                                {\r
@@ -273,8 +278,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        }\r
                        else if ( element.filebrowser.action == 'QuickUpload' && element[ 'for' ] )\r
                        {\r
-                               url =  element.filebrowser.url || editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ]\r
-                                                       || editor.config.filebrowserUploadUrl;\r
+                               var url = element.filebrowser.url;\r
+                               if ( url === undefined )\r
+                               {\r
+                                       url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ];\r
+                                       if ( url === undefined )\r
+                                               url = editor.config.filebrowserUploadUrl;\r
+                               }\r
 \r
                                if ( url )\r
                                {\r
@@ -340,7 +350,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        var ids = elementId.split( ";" );\r
                        for ( var i = 0 ; i < ids.length ; i++ )\r
                        {\r
-                               if ( isConfigured( definition, tabId, ids[i]) )\r
+                               if ( isConfigured( definition, tabId, ids[i] ) )\r
                                        return true;\r
                        }\r
                        return false;\r
@@ -388,11 +398,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                // Associate filebrowser to elements with 'filebrowser' attribute.\r
                for ( var i in definition.contents )\r
                {\r
-                       element = definition.contents[ i ] ;\r
-                       attachFileBrowser( evt.editor, evt.data.name, definition, element.elements );\r
-                       if ( element.hidden && element.filebrowser )\r
+                       if ( ( element = definition.contents[ i ] ) )\r
                        {\r
-                               element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser );\r
+                               attachFileBrowser( evt.editor, evt.data.name, definition, element.elements );\r
+                               if ( element.hidden && element.filebrowser )\r
+                               {\r
+                                       element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser );\r
+                               }\r
                        }\r
                }\r
        } );\r
@@ -477,3 +489,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
  * @example\r
  * config.filebrowserImageBrowseLinkUrl = '/browser/browse.php';\r
  */\r
+\r
+/**\r
+ * The "features" to use in the file browser popup window.\r
+ * @name CKEDITOR.config.filebrowserWindowFeatures\r
+ * @since 3.4.1\r
+ * @type String\r
+ * @default 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes'\r
+ * @example\r
+ * config.filebrowserWindowFeatures = 'resizable=yes,scrollbars=no';\r
+ */\r