~ubuntu-branches/ubuntu/intrepid/moin/intrepid-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/editor/_source/internals/fckcontextmenu_ie.js

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-02-14 16:09:24 UTC
  • mfrom: (0.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20060214160924-fyrx3gvknzqvt4vj
Tags: 1.5.2-1ubuntu1
Drop python2.3 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * FCKeditor - The text editor for internet
3
 
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
4
 
 * 
5
 
 * Licensed under the terms of the GNU Lesser General Public License:
6
 
 *              http://www.opensource.org/licenses/lgpl-license.php
7
 
 * 
8
 
 * For further information visit:
9
 
 *              http://www.fckeditor.net/
10
 
 * 
11
 
 * "Support Open Source software. What about a donation today?"
12
 
 * 
13
 
 * File Name: fckcontextmenu_ie.js
14
 
 *      Context Menu operations. (IE specific implementations)
15
 
 * 
16
 
 * File Authors:
17
 
 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
18
 
 */
19
 
 
20
 
function FCKContextMenu_OnContextMenu() { return false ; }
21
 
 
22
 
FCKContextMenu.Show = function( x, y )
23
 
{
24
 
        // Create the Popup used to show the menu (this is a IE 5.5+ feature).
25
 
        if ( ! this._Popup )
26
 
        {
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 ;
31
 
 
32
 
                aCleanupDocs[ aCleanupDocs.length ] = this._Document ;
33
 
        }
34
 
 
35
 
        // Create the context menu if needed.
36
 
        if ( !this._IsLoaded )
37
 
        {
38
 
                this.Reload() ;
39
 
                this._Div.style.visibility = '' ;
40
 
        }
41
 
 
42
 
        this.RefreshState() ;
43
 
 
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 ) ;
47
 
 
48
 
        // This was the previous solution. It works well to.
49
 
        // So a temporary element is created to get this for us.
50
 
        /*
51
 
        if ( !this._DivCopy )
52
 
        {
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 );
58
 
        }
59
 
 
60
 
        this._DivCopy.innerHTML = this._Div.innerHTML ;
61
 
        */
62
 
 
63
 
        // Show the Popup at the specified location.
64
 
        this._Popup.show( x, y, this._Div.offsetWidth, this._Div.offsetHeight ) ;
65
 
}
66
 
 
67
 
FCKContextMenu.Hide = function()
68
 
{
69
 
        if ( this._Popup )
70
 
                this._Popup.hide() ;
71
 
}
 
 
b'\\ No newline at end of file'