JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-4.0_full
[ckeditor.git] / _source / plugins / menubutton / plugin.js
diff --git a/_source/plugins/menubutton/plugin.js b/_source/plugins/menubutton/plugin.js
deleted file mode 100644 (file)
index 414edac..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*\r
-Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
-For licensing, see LICENSE.html or http://ckeditor.com/license\r
-*/\r
-\r
-CKEDITOR.plugins.add( 'menubutton',\r
-{\r
-       requires : [ 'button', 'menu' ],\r
-       beforeInit : function( editor )\r
-       {\r
-               editor.ui.addHandler( CKEDITOR.UI_MENUBUTTON, CKEDITOR.ui.menuButton.handler );\r
-       }\r
-});\r
-\r
-/**\r
- * Button UI element.\r
- * @constant\r
- * @example\r
- */\r
-CKEDITOR.UI_MENUBUTTON = 'menubutton';\r
-\r
-(function()\r
-{\r
-       var clickFn = function( editor )\r
-       {\r
-               var _ = this._;\r
-\r
-               // Do nothing if this button is disabled.\r
-               if ( _.state === CKEDITOR.TRISTATE_DISABLED )\r
-                       return;\r
-\r
-               _.previousState = _.state;\r
-\r
-               // Check if we already have a menu for it, otherwise just create it.\r
-               var menu = _.menu;\r
-               if ( !menu )\r
-               {\r
-                       menu = _.menu = new CKEDITOR.menu( editor,\r
-                       {\r
-                               panel:\r
-                               {\r
-                                       className : editor.skinClass + ' cke_contextmenu',\r
-                                       attributes : { 'aria-label' : editor.lang.common.options }\r
-                               }\r
-                       });\r
-\r
-                       menu.onHide = CKEDITOR.tools.bind( function()\r
-                               {\r
-                                       this.setState( this.modes && this.modes[ editor.mode ] ? _.previousState : CKEDITOR.TRISTATE_DISABLED );\r
-                               },\r
-                               this );\r
-\r
-                       // Initialize the menu items at this point.\r
-                       if ( this.onMenu )\r
-                               menu.addListener( this.onMenu );\r
-               }\r
-\r
-               if ( _.on )\r
-               {\r
-                       menu.hide();\r
-                       return;\r
-               }\r
-\r
-               this.setState( CKEDITOR.TRISTATE_ON );\r
-\r
-               menu.show( CKEDITOR.document.getById( this._.id ), 4 );\r
-       };\r
-\r
-\r
-       CKEDITOR.ui.menuButton = CKEDITOR.tools.createClass(\r
-       {\r
-               base : CKEDITOR.ui.button,\r
-\r
-               $ : function( definition )\r
-               {\r
-                       // We don't want the panel definition in this object.\r
-                       var panelDefinition = definition.panel;\r
-                       delete definition.panel;\r
-\r
-                       this.base( definition );\r
-\r
-                       this.hasArrow = true;\r
-\r
-                       this.click = clickFn;\r
-               },\r
-\r
-               statics :\r
-               {\r
-                       handler :\r
-                       {\r
-                               create : function( definition )\r
-                               {\r
-                                       return new CKEDITOR.ui.menuButton( definition );\r
-                               }\r
-                       }\r
-               }\r
-       });\r
-})();\r