Index: branches/RC/admin/editor/cmseditor/editor/_source/classes/fcktoolbarpanelbutton.js =================================================================== diff -u -N --- branches/RC/admin/editor/cmseditor/editor/_source/classes/fcktoolbarpanelbutton.js (revision 8929) +++ branches/RC/admin/editor/cmseditor/editor/_source/classes/fcktoolbarpanelbutton.js (revision 0) @@ -1,119 +0,0 @@ -/* - * FCKeditor - The text editor for internet - * Copyright (C) 2003-2004 Frederico Caldeira Knabben - * - * Licensed under the terms of the GNU Lesser General Public License: - * http://www.opensource.org/licenses/lgpl-license.php - * - * For further information visit: - * http://www.fckeditor.net/ - * - * File Name: fcktoolbarpanelbutton.js - * FCKToolbarPanelButton Class: represents a special button in the toolbar - * that shows a panel when pressed. - * - * Version: 2.0 RC3 - * Modified: 2005-01-10 15:28:31 - * - * File Authors: - * Frederico Caldeira Knabben (fredck@fckeditor.net) - */ - -var FCKToolbarPanelButton = function( commandName, label, tooltip, style ) -{ - this.Command = FCKCommands.GetCommand( commandName ) ; - this.Label = label ? label : commandName ; - this.Tooltip = tooltip ? tooltip : ( label ? label : commandName) ; - this.Style = style ? style : FCK_TOOLBARITEM_ONLYICON ; - this.State = FCK_UNKNOWN ; -} - -FCKToolbarPanelButton.prototype.CreateInstance = function( parentToolbar ) -{ -/* - - - - - - - -
Redo
- -*/ - this.DOMDiv = document.createElement( 'div' ) ; - this.DOMDiv.className = 'TB_Button_Off' ; - - this.DOMDiv.FCKToolbarButton = this ; - - this.DOMDiv.onmouseover = function() - { - if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED ) - { - this.className = 'TB_Button_On' ; - } - } - - this.DOMDiv.onmouseout = function() - { - if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED && this.FCKToolbarButton.State != FCK_TRISTATE_ON ) - { - this.className = 'TB_Button_Off' ; - } - } - - this.DOMDiv.onclick = function( e ) - { - // For Mozilla we must stop the event propagation to avoid it hiding - // the panel because of a click outside of it. - if ( e ) - { - e.stopPropagation() ; - FCKPanelEventHandlers.OnDocumentClick( e ) ; - } - - if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED ) - { - this.FCKToolbarButton.Command.Execute(0, this.FCKToolbarButton.DOMDiv.offsetHeight, this.FCKToolbarButton.DOMDiv) ; -// this.FCKToolbarButton.HandleOnClick( this.FCKToolbarButton, e ) ; - } - - return false ; - } - - // Gets the correct CSS class to use for the specified style (param). - var sClass ; - switch ( this.Style ) - { - case FCK_TOOLBARITEM_ONLYICON : - sClass = 'TB_ButtonType_Icon' ; - break ; - case FCK_TOOLBARITEM_ONLYTEXT : - sClass = 'TB_ButtonType_Text' ; - break ; - case FCK_TOOLBARITEM_ICONTEXT : - sClass = '' ; - break ; - } - - this.DOMDiv.innerHTML = - '' + - '' + - '' + - '' + - '' + - '' + - '
' + this.Label + '
' ; - - - var oCell = parentToolbar.DOMRow.insertCell(-1) ; - oCell.appendChild( this.DOMDiv ) ; - - this.RefreshState() ; -} - -// The Panel Button works like a normal button so the refresh state functions -// defined for the normal button can be reused here. -FCKToolbarPanelButton.prototype.RefreshState = FCKToolbarButton.prototype.RefreshState ; -FCKToolbarPanelButton.prototype.Enable = FCKToolbarButton.prototype.Enable ; -FCKToolbarPanelButton.prototype.Disable = FCKToolbarButton.prototype.Disable ; \ No newline at end of file