2
* FCKeditor - The text editor for internet
3
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
5
* Licensed under the terms of the GNU Lesser General Public License:
6
* http://www.opensource.org/licenses/lgpl-license.php
8
* For further information visit:
9
* http://www.fckeditor.net/
11
* "Support Open Source software. What about a donation today?"
13
* File Name: fckcontextmenu_ie.js
14
* Context Menu operations. (IE specific implementations)
17
* Frederico Caldeira Knabben (fredck@fckeditor.net)
20
function FCKContextMenu_OnContextMenu() { return false ; }
22
FCKContextMenu.Show = function( x, y )
24
// Create the Popup used to show the menu (this is a IE 5.5+ feature).
27
this._Popup = window.createPopup() ;
28
this._Document = this._Popup.document ;
29
this._Document.createStyleSheet( FCKConfig.SkinPath + 'fck_contextmenu.css' ) ;
30
this._Document.oncontextmenu = FCKContextMenu_OnContextMenu ;
32
aCleanupDocs[ aCleanupDocs.length ] = this._Document ;
35
// Create the context menu if needed.
36
if ( !this._IsLoaded )
39
this._Div.style.visibility = '' ;
44
// IE doens't get the offsetWidth and offsetHeight values if the element is not visible.
45
// So the Popup must be "shown" with no size to be able to get these values.
46
this._Popup.show( x, y, 0, 0 ) ;
48
// This was the previous solution. It works well to.
49
// So a temporary element is created to get this for us.
53
this._DivCopy = document.createElement( 'DIV' ) ;
54
this._DivCopy.className = 'CM_ContextMenu' ;
55
this._DivCopy.style.position = 'absolute' ;
56
this._DivCopy.style.visibility = 'hidden' ;
57
document.body.appendChild( this._DivCopy );
60
this._DivCopy.innerHTML = this._Div.innerHTML ;
63
// Show the Popup at the specified location.
64
this._Popup.show( x, y, this._Div.offsetWidth, this._Div.offsetHeight ) ;
67
FCKContextMenu.Hide = function()
b'\\ No newline at end of file'