123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- Ext.define('saas.override.ux.TabCloseMenu', {
- override: 'Ext.ux.TabCloseMenu',
- cls: 'x-tab-close-menu',
- createMenu : function() {
- var me = this;
-
- if (!me.menu) {
- var items = [{
- itemId: 'close',
- text: me.closeTabText,
- scope: me,
- handler: me.onClose
- }];
-
- if (me.showCloseAll || me.showCloseOthers) {
- items.push('-');
- }
-
- if (me.showCloseOthers) {
- items.push({
- itemId: 'closeOthers',
- text: me.closeOthersTabsText,
- scope: me,
- handler: me.onCloseOthers
- });
- }
-
- if (me.showCloseAll) {
- items.push({
- itemId: 'closeAll',
- text: me.closeAllTabsText,
- scope: me,
- handler: me.onCloseAll
- });
- }
-
- if (me.extraItemsHead) {
- items = me.extraItemsHead.concat(items);
- }
-
- if (me.extraItemsTail) {
- items = items.concat(me.extraItemsTail);
- }
-
- me.menu = Ext.create('Ext.menu.Menu', {
- cls: me.cls,
- items: items,
- listeners: {
- hide: me.onHideMenu,
- scope: me
- }
- });
- }
-
- return me.menu;
- },
- });
|