update address standardization for cust_location changes
[freeside.git] / rt / share / html / NoAuth / RichText / FCKeditor / editor / _source / classes / fckcontextmenu.js
diff --git a/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckcontextmenu.js b/rt/share/html/NoAuth/RichText/FCKeditor/editor/_source/classes/fckcontextmenu.js
deleted file mode 100644 (file)
index 56027dc..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-/*\r
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
- * Copyright (C) 2003-2009 Frederico Caldeira Knabben\r
- *\r
- * == BEGIN LICENSE ==\r
- *\r
- * Licensed under the terms of any of the following licenses at your\r
- * choice:\r
- *\r
- *  - GNU General Public License Version 2 or later (the "GPL")\r
- *    http://www.gnu.org/licenses/gpl.html\r
- *\r
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
- *    http://www.gnu.org/licenses/lgpl.html\r
- *\r
- *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
- *    http://www.mozilla.org/MPL/MPL-1.1.html\r
- *\r
- * == END LICENSE ==\r
- *\r
- * FCKContextMenu Class: renders an control a context menu.\r
- */\r
-\r
-var FCKContextMenu = function( parentWindow, langDir )\r
-{\r
-       this.CtrlDisable = false ;\r
-\r
-       var oPanel = this._Panel = new FCKPanel( parentWindow ) ;\r
-       oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;\r
-       oPanel.IsContextMenu = true ;\r
-\r
-       // The FCKTools.DisableSelection doesn't seems to work to avoid dragging of the icons in Mozilla\r
-       // so we stop the start of the dragging\r
-       if ( FCKBrowserInfo.IsGecko )\r
-               oPanel.Document.addEventListener( 'draggesture', function(e) {e.preventDefault(); return false;}, true ) ;\r
-\r
-       var oMenuBlock = this._MenuBlock = new FCKMenuBlock() ;\r
-       oMenuBlock.Panel = oPanel ;\r
-       oMenuBlock.OnClick = FCKTools.CreateEventListener( FCKContextMenu_MenuBlock_OnClick, this ) ;\r
-\r
-       this._Redraw = true ;\r
-}\r
-\r
-\r
-FCKContextMenu.prototype.SetMouseClickWindow = function( mouseClickWindow )\r
-{\r
-       if ( !FCKBrowserInfo.IsIE )\r
-       {\r
-               this._Document = mouseClickWindow.document ;\r
-               if ( FCKBrowserInfo.IsOpera && !( 'oncontextmenu' in document.createElement('foo') ) )\r
-               {\r
-                       this._Document.addEventListener( 'mousedown', FCKContextMenu_Document_OnMouseDown, false ) ;\r
-                       this._Document.addEventListener( 'mouseup', FCKContextMenu_Document_OnMouseUp, false ) ;\r
-               }\r
-               this._Document.addEventListener( 'contextmenu', FCKContextMenu_Document_OnContextMenu, false ) ;\r
-       }\r
-}\r
-\r
-/**\r
- The customData parameter is just a value that will be send to the command that is executed,\r
- so it's possible to reuse the same command for several items just by assigning different data for each one.\r
-*/\r
-FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )\r
-{\r
-       var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;\r
-       this._Redraw = true ;\r
-       return oItem ;\r
-}\r
-\r
-FCKContextMenu.prototype.AddSeparator = function()\r
-{\r
-       this._MenuBlock.AddSeparator() ;\r
-       this._Redraw = true ;\r
-}\r
-\r
-FCKContextMenu.prototype.RemoveAllItems = function()\r
-{\r
-       this._MenuBlock.RemoveAllItems() ;\r
-       this._Redraw = true ;\r
-}\r
-\r
-FCKContextMenu.prototype.AttachToElement = function( element )\r
-{\r
-       if ( FCKBrowserInfo.IsIE )\r
-               FCKTools.AddEventListenerEx( element, 'contextmenu', FCKContextMenu_AttachedElement_OnContextMenu, this ) ;\r
-       else\r
-               element._FCKContextMenu = this ;\r
-}\r
-\r
-function FCKContextMenu_Document_OnContextMenu( e )\r
-{\r
-       if ( FCKConfig.BrowserContextMenu )\r
-               return true ;\r
-\r
-       var el = e.target ;\r
-\r
-       while ( el )\r
-       {\r
-               if ( el._FCKContextMenu )\r
-               {\r
-                       if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) )\r
-                               return true ;\r
-\r
-                       FCKTools.CancelEvent( e ) ;\r
-                       FCKContextMenu_AttachedElement_OnContextMenu( e, el._FCKContextMenu, el ) ;\r
-                       return false ;\r
-               }\r
-               el = el.parentNode ;\r
-       }\r
-       return true ;\r
-}\r
-\r
-var FCKContextMenu_OverrideButton ;\r
-\r
-function FCKContextMenu_Document_OnMouseDown( e )\r
-{\r
-       if( !e || e.button != 2 )\r
-               return false ;\r
-\r
-       if ( FCKConfig.BrowserContextMenu )\r
-               return true ;\r
-\r
-       var el = e.target ;\r
-\r
-       while ( el )\r
-       {\r
-               if ( el._FCKContextMenu )\r
-               {\r
-                       if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) )\r
-                               return true ;\r
-\r
-                       var overrideButton = FCKContextMenu_OverrideButton ;\r
-                       if( !overrideButton )\r
-                       {\r
-                               var doc = FCKTools.GetElementDocument( e.target ) ;\r
-                               overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ;\r
-                               overrideButton.type = 'button' ;\r
-                               var buttonHolder = doc.createElement('p') ;\r
-                               doc.body.appendChild( buttonHolder ) ;\r
-                               buttonHolder.appendChild( overrideButton ) ;\r
-                       }\r
-\r
-                       overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) +\r
-                               'px;left:' + ( e.clientX - 2 ) +\r
-                               'px;width:5px;height:5px;opacity:0.01' ;\r
-               }\r
-               el = el.parentNode ;\r
-       }\r
-       return false ;\r
-}\r
-\r
-function FCKContextMenu_Document_OnMouseUp( e )\r
-{\r
-       if ( FCKConfig.BrowserContextMenu )\r
-               return true ;\r
-\r
-       var overrideButton = FCKContextMenu_OverrideButton ;\r
-\r
-       if ( overrideButton )\r
-       {\r
-               var parent = overrideButton.parentNode ;\r
-               parent.parentNode.removeChild( parent ) ;\r
-               FCKContextMenu_OverrideButton = undefined ;\r
-\r
-               if( e && e.button == 2 )\r
-               {\r
-                       FCKContextMenu_Document_OnContextMenu( e ) ;\r
-                       return false ;\r
-               }\r
-       }\r
-       return true ;\r
-}\r
-\r
-function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el )\r
-{\r
-       if ( ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) ) || FCKConfig.BrowserContextMenu )\r
-               return true ;\r
-\r
-       var eTarget = el || this ;\r
-\r
-       if ( fckContextMenu.OnBeforeOpen )\r
-               fckContextMenu.OnBeforeOpen.call( fckContextMenu, eTarget ) ;\r
-\r
-       if ( fckContextMenu._MenuBlock.Count() == 0 )\r
-               return false ;\r
-\r
-       if ( fckContextMenu._Redraw )\r
-       {\r
-               fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ;\r
-               fckContextMenu._Redraw = false ;\r
-       }\r
-\r
-       // This will avoid that the content of the context menu can be dragged in IE\r
-       // as the content of the panel is recreated we need to do it every time\r
-       FCKTools.DisableSelection( fckContextMenu._Panel.Document.body ) ;\r
-\r
-       var x = 0 ;\r
-       var y = 0 ;\r
-       if ( FCKBrowserInfo.IsIE )\r
-       {\r
-               x = ev.screenX ;\r
-               y = ev.screenY ;\r
-       }\r
-       else if ( FCKBrowserInfo.IsSafari )\r
-       {\r
-               x = ev.clientX ;\r
-               y = ev.clientY ;\r
-       }\r
-       else\r
-       {\r
-               x = ev.pageX ;\r
-               y = ev.pageY ;\r
-       }\r
-       fckContextMenu._Panel.Show( x, y, ev.currentTarget || null ) ;\r
-\r
-       return false ;\r
-}\r
-\r
-function FCKContextMenu_MenuBlock_OnClick( menuItem, contextMenu )\r
-{\r
-       contextMenu._Panel.Hide() ;\r
-       FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ;\r
-}\r