X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpopup%2Fplugin.js;fp=_source%2Fplugins%2Fpopup%2Fplugin.js;h=fb7f2c4d2822f66f390bf81a6efc0a951874b27b;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hp=7fc400ac6f1380a440046d82aaed0f0651d352ca;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66;p=ckeditor.git diff --git a/_source/plugins/popup/plugin.js b/_source/plugins/popup/plugin.js index 7fc400a..fb7f2c4 100644 --- a/_source/plugins/popup/plugin.js +++ b/_source/plugins/popup/plugin.js @@ -3,7 +3,7 @@ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ -CKEDITOR.plugins.add( 'popup'); +CKEDITOR.plugins.add( 'popup' ); CKEDITOR.tools.extend( CKEDITOR.editor.prototype, { @@ -13,8 +13,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, * @param {String} url The url of the external file browser. * @param {String} width Popup window width. * @param {String} height Popup window height. + * @param {String} options Popup window features. */ - popup : function( url, width, height ) + popup : function( url, width, height, options ) { width = width || '80%'; height = height || '70%'; @@ -32,8 +33,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, height = 420; var top = parseInt( ( window.screen.height - height ) / 2, 10 ), - left = parseInt( ( window.screen.width - width ) / 2, 10 ), - options = 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes' + + left = parseInt( ( window.screen.width - width ) / 2, 10 ); + + options = ( options || 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes' ) + ',width=' + width + ',height=' + height + ',top=' + top + @@ -57,6 +59,6 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, popupWindow = window.open( url, null, options, true ); } - return true ; + return true; } });