X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffilebrowser%2Fplugin.js;h=9af9714eff8f19b85df1328d38779b61e24e764f;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=de764f1697fff6f41beec7abb194cc5e0b4bbdc5;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;p=ckeditor.git diff --git a/_source/plugins/filebrowser/plugin.js b/_source/plugins/filebrowser/plugin.js index de764f1..9af9714 100644 --- a/_source/plugins/filebrowser/plugin.js +++ b/_source/plugins/filebrowser/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -174,7 +174,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license params.langCode = editor.langCode; var url = addQueryString( this.filebrowser.url, params ); - editor.popup( url, width, height ); + editor.popup( url, width, height, editor.config.fileBrowserWindowFeatures ); } /** @@ -261,8 +261,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( element.filebrowser.action == 'Browse' ) { - var url = element.filebrowser.url || editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ] - || editor.config.filebrowserBrowseUrl; + var url = element.filebrowser.url; + if ( url === undefined ) + { + url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ]; + if ( url === undefined ) + url = editor.config.filebrowserBrowseUrl; + } if ( url ) { @@ -273,8 +278,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } else if ( element.filebrowser.action == 'QuickUpload' && element[ 'for' ] ) { - url = element.filebrowser.url || editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ] - || editor.config.filebrowserUploadUrl; + url = element.filebrowser.url; + if ( url === undefined ) + { + url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ]; + if ( url === undefined ) + url = editor.config.filebrowserUploadUrl; + } if ( url ) { @@ -340,7 +350,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var ids = elementId.split( ";" ); for ( var i = 0 ; i < ids.length ; i++ ) { - if ( isConfigured( definition, tabId, ids[i]) ) + if ( isConfigured( definition, tabId, ids[i] ) ) return true; } return false; @@ -378,6 +388,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license init : function( editor, pluginPath ) { editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor ); + editor.on( 'destroy', function () { CKEDITOR.tools.removeFunction( this._.filebrowserFn ); } ); } } ); @@ -388,11 +399,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Associate filebrowser to elements with 'filebrowser' attribute. for ( var i in definition.contents ) { - element = definition.contents[ i ] ; - attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); - if ( element.hidden && element.filebrowser ) + if ( ( element = definition.contents[ i ] ) ) { - element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); + attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); + if ( element.hidden && element.filebrowser ) + { + element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); + } } } } ); @@ -477,3 +490,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * @example * config.filebrowserImageBrowseLinkUrl = '/browser/browse.php'; */ + +/** + * The "features" to use in the file browser popup window. + * @name CKEDITOR.config.filebrowserWindowFeatures + * @since 3.4.1 + * @type String + * @default 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes' + * @example + * config.filebrowserWindowFeatures = 'resizable=yes,scrollbars=no'; + */