ProgramMenu.js
453 Bytes
Ext.define('MyMA.controller.ProgramMenu', {
extend: 'Ext.app.Controller',
init: function() {
this.control({
'programmenu > menu': {
click: this.LaunchProgram
}
});
},
LaunchProgram: function(menu, item) {
if (item.itemId == 'logout') {
this.getController('Viewport').Logout();
}
else {
this.getController('Taskpanel').addProgram({
name: item.widgetName,
title: item.text
});
}
}
});