diff options
| author | Paramjit Singh Sahota <psa@tinyerp.com> | 2013-12-24 11:01:25 +0530 |
|---|---|---|
| committer | Paramjit Singh Sahota <psa@tinyerp.com> | 2013-12-24 11:01:25 +0530 |
| commit | 18d8368ee11eef0a74bacdb8f293414331bfa8da (patch) | |
| tree | fc21df70cbd2901396c2bcf2fee0b52d750abd43 /addons/website/static/lib/ckeditor/plugins/popup/plugin.js | |
| parent | 5900672160c2bd5ae1d9257f20dbb5c51a193996 (diff) | |
| parent | 123185757f51ee7e146d7295864556999d2a6938 (diff) | |
[MERGE] Merged lp:~openerp-dev/openobject-addons/trunk-website-al
bzr revid: psa@tinyerp.com-20131224053125-3lrogsrgd3ccp0i6
Diffstat (limited to 'addons/website/static/lib/ckeditor/plugins/popup/plugin.js')
| -rw-r--r-- | addons/website/static/lib/ckeditor/plugins/popup/plugin.js | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/addons/website/static/lib/ckeditor/plugins/popup/plugin.js b/addons/website/static/lib/ckeditor/plugins/popup/plugin.js deleted file mode 100644 index a8b5b72af20..00000000000 --- a/addons/website/static/lib/ckeditor/plugins/popup/plugin.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md or http://ckeditor.com/license - */ - -CKEDITOR.plugins.add( 'popup' ); - -CKEDITOR.tools.extend( CKEDITOR.editor.prototype, { - /** - * Opens Browser in a popup. The `width` and `height` parameters accept - * numbers (pixels) or percent (of screen size) values. - * - * @member CKEDITOR.editor - * @param {String} url The url of the external file browser. - * @param {Number/String} [width='80%'] Popup window width. - * @param {Number/String} [height='70%'] Popup window height. - * @param {String} [options='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes'] - * Popup window features. - */ - popup: function( url, width, height, options ) { - width = width || '80%'; - height = height || '70%'; - - if ( typeof width == 'string' && width.length > 1 && width.substr( width.length - 1, 1 ) == '%' ) - width = parseInt( window.screen.width * parseInt( width, 10 ) / 100, 10 ); - - if ( typeof height == 'string' && height.length > 1 && height.substr( height.length - 1, 1 ) == '%' ) - height = parseInt( window.screen.height * parseInt( height, 10 ) / 100, 10 ); - - if ( width < 640 ) - width = 640; - - if ( height < 420 ) - height = 420; - - var top = parseInt( ( window.screen.height - height ) / 2, 10 ), - 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 + - ',left=' + left; - - var popupWindow = window.open( '', null, options, true ); - - // Blocked by a popup blocker. - if ( !popupWindow ) - return false; - - try { - // Chrome is problematic with moveTo/resizeTo, but it's not really needed here (#8855). - var ua = navigator.userAgent.toLowerCase(); - if ( ua.indexOf( ' chrome/' ) == -1 ) { - popupWindow.moveTo( left, top ); - popupWindow.resizeTo( width, height ); - } - popupWindow.focus(); - popupWindow.location.href = url; - } catch ( e ) { - popupWindow = window.open( url, null, options, true ); - } - - return true; - } -}); |
