/**
* @class Ext.ux.TabCloseMenu
* Plugin (ptype = 'tabclosemenu') for adding a close context menu to tabs. Note that the menu respects
* the closable configuration on the tab. As such, commands like remove others and remove all will not
* remove items that are not closable.
*
* @constructor
* @param {Object} config The configuration options
* @ptype tabclosemenu
*/
Ext.define('Ext.tab.TabCloseMenu', {
alias: 'plugin.tabclosemenu',
alternateClassName: 'Ext.ux.TabCloseMenu',
mixins: {
observable: 'Ext.util.Observable'
},
/**
* @cfg {String} closeTabText
* The text for closing the current tab. Defaults to <tt>'Close Tab'</tt>.
*/
closeTabText: 'Close Tab',
/**
* @cfg {Boolean} showCloseOthers
* Indicates whether to show the 'Close Others' option. Defaults to <tt>true</tt>.
*/
showCloseOthers: true,
/**
* @cfg {String} closeOtherTabsText
* The text for closing all tabs except the current one. Defaults to <tt>'Close Other Tabs'</tt>.
*/
closeOthersTabsText: 'Close Other Tabs',
/**
* @cfg {Boolean} showCloseAll
* Indicates whether to show the 'Close All' option. Defaults to <tt>true</tt>.
*/
showCloseAll: true,
/**
* @cfg {String} closeAllTabsText
* <p>The text for closing all tabs. Defaults to <tt>'Close All Tabs'</tt>.
*/
closeAllTabsText: 'Close All Tabs',
/**
* @cfg {Array} extraItemsHead
* An array of additional context menu items to add to the front of the context menu.
*/
extraItemsHead: null,
/**
* @cfg {Array} extraItemsTail
* An array of additional context menu items to add to the end of the context menu.
*/
extraItemsTail: null,
//public
constructor: function (config) {
this.mixins.observable.constructor.call(this, config);
//this.addEvents(
// 'aftermenu',
// 'beforemenu');
},
init :...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.