X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fdialog%2Fplugin.js;h=68494616cb9bb2f7cc2d7282ff62845dc6b6fc90;hp=b5aab8182c2060c5e27b7863ba76f6b848dce35b;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/plugins/dialog/plugin.js b/_source/plugins/dialog/plugin.js index b5aab81..6849461 100644 --- a/_source/plugins/dialog/plugin.js +++ b/_source/plugins/dialog/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 */ @@ -710,13 +710,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; */ show : function() { - var editor = this._.editor; - if ( editor.mode == 'wysiwyg' && CKEDITOR.env.ie ) - { - var selection = editor.getSelection(); - selection && selection.lock(); - } - // Insert the dialog's element to the root document. var element = this._.element; var definition = this.definition; @@ -1706,7 +1699,9 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; return; var editor = dialog.getParentEditor(); - var wrapperWidth, wrapperHeight, viewSize, origin, startSize; + var wrapperWidth, wrapperHeight, + viewSize, origin, startSize, + dialogCover; function positionDialog( right ) { @@ -1725,6 +1720,16 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; { startSize = dialog.getSize(); + var content = dialog.parts.contents, + iframeDialog = content.$.getElementsByTagName( 'iframe' ).length; + + // Shim to help capturing "mousemove" over iframe. + if ( iframeDialog ) + { + dialogCover = CKEDITOR.dom.element.createFromHtml( '
' ); + content.append( dialogCover ); + } + // Calculate the offset between content and chrome size. wrapperHeight = startSize.height - dialog.parts.contents.getSize( 'height', ! ( CKEDITOR.env.gecko || CKEDITOR.env.opera || CKEDITOR.env.ie && CKEDITOR.env.quirks ) ); wrapperWidth = startSize.width - dialog.parts.contents.getSize( 'width', 1 ); @@ -1803,6 +1808,12 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); + if ( dialogCover ) + { + dialogCover.remove(); + dialogCover = null; + } + if ( CKEDITOR.env.ie6Compat ) { var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); @@ -1852,7 +1863,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; if ( !coverElement ) { var html = [ - '
*
  • 'OS' - the buttons will be displayed in the default order of the user's OS;
  • *
  • 'ltr' - for Left-To-Right order;
  • @@ -3034,7 +3055,7 @@ CKEDITOR.plugins.add( 'dialog', * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them. * Separate each pair with semicolon (see example). * Note: All names are case-sensitive. - * Note: Be cautious when specifying dialog tabs that are mandatory, like "info", dialog functionality might be broken because of this! + * Note: Be cautious when specifying dialog tabs that are mandatory, like "info", dialog functionality might be broken because of this! * @name CKEDITOR.config.removeDialogTabs * @type String * @since 3.5 @@ -3060,8 +3081,58 @@ CKEDITOR.plugins.add( 'dialog', /** * Fired when a tab is going to be selected in a dialog - * @name dialog#selectPage + * @name CKEDITOR.dialog#selectPage + * @event + * @param {String} page The id of the page that it's gonna be selected. + * @param {String} currentPage The id of the current page. + */ + +/** + * Fired when the user tries to dismiss a dialog + * @name CKEDITOR.dialog#cancel + * @event + * @param {Boolean} hide Whether the event should proceed or not. + */ + +/** + * Fired when the user tries to confirm a dialog + * @name CKEDITOR.dialog#ok + * @event + * @param {Boolean} hide Whether the event should proceed or not. + */ + +/** + * Fired when a dialog is shown + * @name CKEDITOR.dialog#show + * @event + */ + +/** + * Fired when a dialog is shown + * @name CKEDITOR.editor#dialogShow + * @event + */ + +/** + * Fired when a dialog is hidden + * @name CKEDITOR.dialog#hide + * @event + */ + +/** + * Fired when a dialog is hidden + * @name CKEDITOR.editor#dialogHide + * @event + */ + +/** + * Fired when a dialog is being resized. The event is fired on + * the 'CKEDITOR.dialog' object, not a dialog instance. + * @name CKEDITOR.dialog#resize + * @since 3.5 * @event - * @param String page The id of the page that it's gonna be selected. - * @param String currentPage The id of the current page. + * @param {CKEDITOR.dialog} dialog The dialog being resized. + * @param {String} skin The skin name. + * @param {Number} width The new width. + * @param {Number} height The new height. */