Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Павел Резуненко / MTAweb

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 1
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • mtaweb
  • public
  • app
  • controller
  • ProgramMenu.js
  • Павел Резуненко's avatar
    Added main stream code · 130d3782
    Павел Резуненко committed Oct 29, 2012
    130d3782
ProgramMenu.js 453 Bytes
BlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
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
			});
		}
	}
});