CLICK HERE TO BUY IT TODAY! OR GET IT FREE VIA TRIALPAY  

PHP Demo Application - Source Code

/Framework/Model/Vendor/CkEditor/_source/plugins/panelbutton/plugin.js



/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add'panelbutton',
{
	    requires : [ 'button' ],
	    beforeInit : function( editor )
	    {
		        editor.ui.addHandlerCKEDITOR.UI_PANELBUTTONCKEDITOR.ui.panelButton.handler );
		    }
	});
/**
 * Button UI element.
 * @constant
 * @example
 */
CKEDITOR.UI_PANELBUTTON 4;
(function()
{
	    var clickFn = function( editor )
	    {
		        var this._;
		        if ( _.state == CKEDITOR.TRISTATE_DISABLED )
		            return;
		        this.createPaneleditor );
		        if ( _.on )
		        {
			            _.panel.hide();
			            return;
			        }
		        _.panel.showBlockthis._.idthis.document.getByIdthis._.id ), );
		    };
	    CKEDITOR.ui.panelButton CKEDITOR.tools.createClass(
	    {
		        base CKEDITOR.ui.button,
		        $ : function( definition )
		        {
			            // We don't want the panel definition in this object.
			            var panelDefinition definition.panel;
			            delete definition.panel;
			            this.basedefinition );
			            this.document = ( panelDefinition
			                                && panelDefinition.parent
			                                && panelDefinition.parent.getDocument() )
			                            || CKEDITOR.document;
			            panelDefinition.block =
			            {
				                attributes panelDefinition.attributes
				            };
			            this.hasArrow true;
			            this.click clickFn;
			            this.=
			            {
				                panelDefinition panelDefinition
				            };
			        },
		        statics :
		        {
			            handler :
			            {
				                create : function( definition )
				                {
					                    return new CKEDITOR.ui.panelButtondefinition );
					                }
				            }
			        },
		        proto :
		        {
			            createPanel : function( editor )
			            {
				                var this._;
				                if ( _.panel )
				                    return;
				                var panelDefinition this._.panelDefinition || {},
				                     panelBlockDefinition this._.panelDefinition.block,
				                    panelParentElement panelDefinition.parent || CKEDITOR.document.getBody(),
				                    panel this._.panel = new CKEDITOR.ui.floatPaneleditorpanelParentElementpanelDefinition ),
				                    block panel.addBlock_.idpanelBlockDefinition ),
				                    me this;
				                panel.onShow = function()
				                    {
					                        if ( me.className )
					                            this.element.getFirst().addClassme.className '_panel' );
					                        _.oldState me._.state;
					                        me.setStateCKEDITOR.TRISTATE_ON );
					                        _.on 1;
					                        if ( me.onOpen )
					                            me.onOpen();
					                    };
				                panel.onHide = function()
				                    {
					                        if ( me.className )
					                            this.element.getFirst().removeClassme.className '_panel' );
					                        me.setState_.oldState );
					                        _.on 0;
					                        if ( me.onClose )
					                            me.onClose();
					                    };
				                panel.onEscape = function()
				                    {
					                        panel.hide();
					                        me.document.getById_.id ).focus();
					                    };
				                if ( this.onBlock )
				                    this.onBlockpanelblock );
				                block.onHide = function()
				                        {
					                                _.on 0;
					                                me.setStateCKEDITOR.TRISTATE_OFF );
					                        };
				            }
			        }
		    });
	})();





PHP Demo Source Code Index