define([ "./contextMenuTab", "./GanttTaskControl", "./GanttProjectControl", "dijit/Dialog", "dijit/form/Button", "dijit/form/Form", "dijit/registry", "dojo/_base/declare", "dojo/_base/array", "dojo/_base/lang", "dojo/date/locale", "dojo/request", "dojo/on", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dojo/dom-attr", "dojo/dom-geometry", "dojo/keys", "dojo/domReady!" ], function(contextMenuTab, GanttTaskControl, GanttProjectControl, Dialog, Button, Form, registry, declare, arrayUtil, lang, locale, request, on, dom, domClass, domConstruct, domStyle, domAttr, domGeometry, keys){ return declare("dojox.gantt.TabMenu", [], { constructor: function(chart){ this.ganttChart = chart; this.menuPanel = null; this.paneContentArea = null; this.paneActionBar = null; this.tabPanelDlg = null; this.tabPanelDlgId = null; this.arrTabs = []; this.isShow = false; this.buildContent(); }, buildContent: function(){ this.createMenuPanel(); this.createTabPanel(); //tasks customization var taskSucAdd = this.createTab(11, "Add Successor Task", "t", true, this); taskSucAdd.addItem(1, "Id", "id", true); taskSucAdd.addItem(2, "Name", "name"); taskSucAdd.addItem(3, "Start Time", "startTime"); taskSucAdd.addItem(4, "Duration (hours)", "duration"); taskSucAdd.addItem(5, "Percent Complete (%)", "percentage"); taskSucAdd.addItem(6, "Task Assignee", "taskOwner"); taskSucAdd.addAction("addSuccessorTaskAction"); var taskChildAdd = this.createTab(10, "Add Child Task", "t", true, this); taskChildAdd.addItem(1, "Id", "id", true); taskChildAdd.addItem(2, "Name", "name"); taskChildAdd.addItem(3, "Start Time", "startTime"); taskChildAdd.addItem(4, "Duration (hours)", "duration"); taskChildAdd.addItem(5, "Percent Complete (%)", "percentage"); taskChildAdd.addItem(6, "Task Assignee", "taskOwner"); taskChildAdd.addAction("addChildTaskAction"); var taskDuration = this.createTab(4, "Set Duration(hours)", "t", true, this, true); taskDuration.addItem(1, "Duration (hours)", "duration", true); taskDuration.addAction("durationUpdateAction"); var taskCP = this.createTab(5, "Set Complete Percentage (%)", "t", true, this, true); taskCP.addItem(1, "Percent Complete (%)", "percentage", true); taskCP.addAction("cpUpdateAction"); var taskOwner = this.createTab(20, "Set Owner", "t", true, this, true); taskOwner.addItem(1, "Task Assignee", "taskOwner", true); taskOwner.addAction("ownerUpdateAction"); var taskPrevious = this.createTab(13, "Set Previous Task", "t", true, this); taskPrevious.addItem(1, "Previous Task Id", "previousTaskId", true); taskPrevious.addAction("ptUpdateAction"); var taskRename = this.createTab(1, "Rename Task", "t", true, this, true); taskRename.addItem(1, "New Name", "name", true); taskRename.addAction("renameTaskAction"); var taskDelete = this.createTab(2, "Delete Task", "t", true, this); taskDelete.addAction("deleteAction"); //projects customization var projectAdd = this.createTab(12, "Add New Project", "p", false, this); projectAdd.addItem(1, "Id", "id", true); projectAdd.addItem(2, "Name", "name", true); projectAdd.addItem(3, "Start Date", "startDate", true); projectAdd.addAction("addProjectAction"); var projectCP = this.createTab(8, "Set Complete Percentage (%)", "p", true, this, true); projectCP.addItem(1, "Percent Complete (%)", "percentage", true); projectCP.addAction("cpProjectAction"); var projectRename = this.createTab(6, "Rename Project", "p", true, this, true); projectRename.addItem(1, "New Name", "name", true); projectRename.addAction("renameProjectAction"); var projectDelete = this.createTab(7, "Delete Project", "p", true, this); projectDelete.addAction("deleteProjectAction"); //task relative var projectTaskAdd = this.createTab(9, "Add New Task", "p", true, this); projectTaskAdd.addItem(1, "Id", "id", true); projectTaskAdd.addItem(2, "Name", "name"); projectTaskAdd.addItem(3, "Start Time", "startTime"); projectTaskAdd.addItem(4, "Duration (hours)", "duration"); projectTaskAdd.addItem(5, "Percent Complete (%)", "percentage"); projectTaskAdd.addItem(6, "Task Assignee", "taskOwner"); projectTaskAdd.addItem(7, "Parent Task Id", "parentTaskId"); projectTaskAdd.addItem(8, "Previous Task Id", "previousTaskId"); projectTaskAdd.addAction("addTaskAction"); }, createMenuPanel: function(){ this.menuPanel = domConstruct.create("div", { innerHTML: "