summaryrefslogtreecommitdiff
path: root/_source/plugins/panelbutton/plugin.js
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2013-07-15 14:22:23 +0100
committerlsces <lester@lsces.co.uk>2013-07-15 14:22:23 +0100
commit6d4c4f12d15ae68d912972921997a8c5180c9aea (patch)
tree104274447272d09617c483cf6b0ee79559c9fe6f /_source/plugins/panelbutton/plugin.js
parentde6d09676a9527919813a4474cc28af554a35fe1 (diff)
downloadckeditor-6d4c4f12d15ae68d912972921997a8c5180c9aea.tar.gz
ckeditor-6d4c4f12d15ae68d912972921997a8c5180c9aea.tar.bz2
ckeditor-6d4c4f12d15ae68d912972921997a8c5180c9aea.zip
Upgrade to CKEditor V4
Directory structure changed so many files removed and replace in a new location This batch is the delete and add
Diffstat (limited to '_source/plugins/panelbutton/plugin.js')
-rw-r--r--_source/plugins/panelbutton/plugin.js144
1 files changed, 0 insertions, 144 deletions
diff --git a/_source/plugins/panelbutton/plugin.js b/_source/plugins/panelbutton/plugin.js
deleted file mode 100644
index 078b398..0000000
--- a/_source/plugins/panelbutton/plugin.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
-For licensing, see LICENSE.html or http://ckeditor.com/license
-*/
-
-CKEDITOR.plugins.add( 'panelbutton',
-{
- requires : [ 'button' ],
- onLoad : function()
- {
- function clickFn( editor )
- {
- var _ = this._;
-
- if ( _.state == CKEDITOR.TRISTATE_DISABLED )
- return;
-
- this.createPanel( editor );
-
- if ( _.on )
- {
- _.panel.hide();
- return;
- }
-
- _.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 );
- }
-
- 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.base( definition );
-
- 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.panelButton( definition );
- }
- }
- },
-
- 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.floatPanel( editor, panelParentElement, panelDefinition ),
- block = panel.addBlock( _.id, panelBlockDefinition ),
- me = this;
-
- panel.onShow = function()
- {
- if ( me.className )
- this.element.getFirst().addClass( me.className + '_panel' );
-
- me.setState( CKEDITOR.TRISTATE_ON );
-
- _.on = 1;
-
- if ( me.onOpen )
- me.onOpen();
- };
-
- panel.onHide = function( preventOnClose )
- {
- if ( me.className )
- this.element.getFirst().removeClass( me.className + '_panel' );
-
- me.setState( me.modes && me.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );
-
- _.on = 0;
-
- if ( !preventOnClose && me.onClose )
- me.onClose();
- };
-
- panel.onEscape = function()
- {
- panel.hide();
- me.document.getById( _.id ).focus();
- };
-
- if ( this.onBlock )
- this.onBlock( panel, block );
-
- block.onHide = function()
- {
- _.on = 0;
- me.setState( CKEDITOR.TRISTATE_OFF );
- };
- }
- }
- });
-
- },
- beforeInit : function( editor )
- {
- editor.ui.addHandler( CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler );
- }
-});
-
-/**
- * Button UI element.
- * @constant
- * @example
- */
-CKEDITOR.UI_PANELBUTTON = 'panelbutton';