1234567891011121314151617181920212223242526272829 |
- Ext.define('saas.override.panel.Tool', {
- override: 'Ext.panel.Tool',
- initComponent: function () {
- var me = this;
- me.callParent();
- if (me.items) {
- me.on({
- click: 'showMenu',
- scope: me
- });
- }
- },
- privates: {
- showMenu: function () {
- var me = this, menu = me.menu;
- if (!menu) {
- menu = me.menu = Ext.create('Ext.menu.Menu', {
- width: 100,
- margin: '0 0 10 0',
- items: me.items,
- ownerCmp: me
- });
- }
- menu.showBy(me, null, [5, 0]);
- }
- }
- });
|