diff --git a/db/update15.0.sql b/db/update15.0.sql
index 6b30c72d42..3ca69ee6d8 100644
--- a/db/update15.0.sql
+++ b/db/update15.0.sql
@@ -37,6 +37,7 @@ ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned N
ALTER TABLE `zt_testtask` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
ALTER TABLE `zt_webhook` CHANGE `projects` `executions` mediumint(8) unsigned NOT NULL;
+ALTER TABLE `zt_action` ADD `project` mediumint(8) unsigned NOT NULL AFTER `product`;
ALTER TABLE `zt_task` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `zt_doclib` ADD `project` mediumint(8) unsigned NOT NULL AFTER `product`;
ALTER TABLE `zt_doc` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
diff --git a/db/zentao.sql b/db/zentao.sql
index 6ec1f1248b..dbb2819fe6 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -37,7 +37,8 @@ CREATE TABLE IF NOT EXISTS `zt_action` (
`objectType` varchar(30) NOT NULL default '',
`objectID` mediumint(8) unsigned NOT NULL default '0',
`product` varchar(255) NOT NULL,
- `project` mediumint(9) NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
`actor` varchar(100) NOT NULL default '',
`action` varchar(30) NOT NULL default '',
`date` datetime NOT NULL,
diff --git a/module/bug/control.php b/module/bug/control.php
index 2415c51f87..1eb6faac46 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -53,7 +53,6 @@ class bug extends control
{
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
- $this->lang->noMenuModule[] = $this->app->rawModule;
}
else
{
@@ -911,8 +910,6 @@ class bug extends control
}
$this->loadModel('my')->setMenu();
- $moduleIndex = array_search('bug', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->task->menu = $this->lang->my->menu->work;
$this->lang->my->menu->work['subModule'] = 'bug';
diff --git a/module/bug/view/ajaxgetdropmenu.html.php b/module/bug/view/ajaxgetdropmenu.html.php
index 0d846113f9..f33d53c8d8 100644
--- a/module/bug/view/ajaxgetdropmenu.html.php
+++ b/module/bug/view/ajaxgetdropmenu.html.php
@@ -21,17 +21,17 @@ $productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='t
foreach($products as $product)
{
+ $selected = $product->id == $productID ? 'selected' : '';
$productName = $product->program ? zget($programs, $product->program, '') . '/' : '';
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
- $productsHtml .= html::a($linkHtml, $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='project'");
+ $productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='project'");
}
?>
+
diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php
index 4bb39b6ea1..70843136ea 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -210,7 +210,7 @@ tbody tr td:first-child input {display: none;}
if($canBeChanged and common::hasPriv('build', 'unlinkBug'))
{
$unlinkURL = inlink('unlinkBug', "buildID=$build->id&bug=$bug->id");
- echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn btn-icon' title='{$lang->build->unlinkBug}'");
+ echo html::a("###", '', '', "onclick='ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)' class='btn' title='{$lang->build->unlinkBug}'");
}
?>
diff --git a/module/caselib/view/ajaxgetdropmenu.html.php b/module/caselib/view/ajaxgetdropmenu.html.php
index 3e83074d48..c93e3bdf55 100644
--- a/module/caselib/view/ajaxgetdropmenu.html.php
+++ b/module/caselib/view/ajaxgetdropmenu.html.php
@@ -1,8 +1,10 @@
$libName)
{
- echo html::a(sprintf($link, $libID), " " . $libName, '', "data-key='{$librariesPinyin[$libName]}'");
+ $selected = $currentLibID == $libID ? 'selected' : '';
+ echo html::a(sprintf($link, $libID), " " . $libName, '', "class='$selected' data-key='{$librariesPinyin[$libName]}'");
}
?>
diff --git a/module/ci/model.php b/module/ci/model.php
index acb523c31f..f86c6ce357 100644
--- a/module/ci/model.php
+++ b/module/ci/model.php
@@ -18,19 +18,9 @@ class ciModel extends model
public function setMenu()
{
$repoID = $this->session->repoID;
- $projectID = isset($_GET['project']) ? $_GET['project'] : 0;
$moduleName = $this->app->getModuleName();
foreach($this->lang->{$moduleName}->menu as $key => $menu) common::setMenuVars($this->lang->{$moduleName}->menu, $key, $repoID);
$this->lang->{$moduleName}->menuOrder = $this->lang->ci->menuOrder;
- if(!$projectID)
- {
- $this->lang->navGroup->repo = 'repo';
- $this->lang->navGroup->jenkins = 'repo';
- $this->lang->navGroup->job = 'repo';
- $this->lang->navGroup->compile = 'repo';
- $this->lang->noMenuModule[] = 'job';
- $this->lang->noMenuModule[] = 'compile';
- }
}
/**
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index 1d2cd379eb..f5a6b3978a 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -9,6 +9,11 @@
* @version $Id: en.php 5116 2013-07-12 06:37:48Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
+
+include (dirname(__FILE__) . '/common.php');
+
+global $config;
+
$lang->arrow = ' ';
$lang->colon = '-';
$lang->comma = ',';
@@ -121,112 +126,107 @@ $lang->openedByAB = 'CreatedBy';
$lang->assignedToAB = 'AssignedTo';
$lang->typeAB = 'Type';
-$lang->common = new stdclass();
-$lang->common->common = 'Common Module';
+$lang->common->common = 'Common Module';
+$lang->my->common = 'Dashboard';
+$lang->program->common = 'Program';
+$lang->product->common = 'Product';
+$lang->project->common = 'Project';
+$lang->execution->common = $config->systemMode == 'new' ? 'Execution' : $lang->executionCommon;
+$lang->qa->common = 'QA';
+$lang->devops->common = 'DevOps';
+$lang->doc->common = 'Doc';
+$lang->report->common = 'Statistic';
+$lang->system->common = 'System';
+$lang->admin->common = 'Admin';
+$lang->task->common = 'Task';
+$lang->bug->common = 'Bug';
+$lang->testcase->common = 'Testcase';
+$lang->testtask->common = 'Testtask';
+$lang->score->common = 'Score';
+$lang->build->common = 'Build';
+$lang->testreport->common = 'Report';
+$lang->automation->common = 'Automation';
+$lang->team->common = 'Team';
+$lang->user->common = 'User';
+$lang->custom->common = 'Custom';
+$lang->extension->common = 'Extension';
+$lang->company->common = 'Company';
+$lang->dept->common = 'Dept';
-global $config;
-list($programModule, $programMethod) = explode('-', $config->programLink);
-list($productModule, $productMethod) = explode('-', $config->productLink);
-list($projectModule, $projectMethod) = explode('-', $config->projectLink);
-list($executionModule, $executionMethod) = explode('-', $config->executionLink);
+$lang->personnel->common = 'Member';
+$lang->personnel->invest = 'Investment';
+$lang->personnel->accessible = 'Accessible';
-/* Main menu. */
-$lang->mainNav = new stdclass();
-$lang->mainNav->my = ' My|my|index|';
-$lang->mainNav->product = " Product|$productModule|$productMethod|";
-if($config->systemMode == 'new')
-{
- $lang->mainNav->project = " Project|$projectModule|$projectMethod|";
- $lang->mainNav->execution = " Execution|$executionModule|$executionMethod|";
-}
-else
-{
- $lang->mainNav->execution = " $lang->executionCommon|$executionModule|$executionMethod|";
-}
-$lang->mainNav->qa = ' Test|qa|index|';
-$lang->mainNav->repo = ' Code|repo|browse|';
-$lang->mainNav->doc = ' Doc|doc|index|';
-$lang->mainNav->report = " Statistic|report|productsummary|";
-$lang->mainNav->system = ' System|company|browse|';
-$lang->mainNav->admin = ' Admin|admin|index|';
-if($config->systemMode == 'new') $lang->mainNav->program = " Program|$programModule|$programMethod|";
+$lang->stakeholder->common = 'Stakeholder';
+$lang->release->common = 'Release';
+$lang->message->common = 'Message';
+$lang->mail->common = 'Mail';
-$lang->dividerMenu = ',qa,report,admin,';
+$lang->my->shortCommon = 'My';
+$lang->testcase->shortCommon = 'Case';
+$lang->productplan->shortCommon = 'Plan';
+$lang->score->shortCommon = 'Score';
+$lang->testreport->shortCommon = 'Report';
+$lang->qa->shortCommon = 'QA';
-/* Program set menu. */
-$lang->program = new stdclass();
-$lang->program->homeMenu = new stdclass();
-//$lang->program->homeMenu->index = 'Dashboard|program|index|';
-$lang->program->homeMenu->browse = array('link' => 'Program|program|browse|');
+$lang->dashboard = 'Dashboard';
+$lang->contribute = 'Contribute';
+$lang->dynamic = 'Dynamic';
+$lang->contact = 'Contacts';
+$lang->whitelist = 'Whitelist';
+$lang->roadmap = 'Roadmap';
+$lang->track = 'Track';
+$lang->settings = 'Settings';
+$lang->overview = 'Overview';
+$lang->module = 'Module';
+$lang->priv = 'Priv Group';
+$lang->design = 'Design';
+$lang->other = 'Other';
+$lang->estimation = 'Estimation';
+$lang->issue = 'Issue';
+$lang->risk = 'Risk';
+$lang->measure = 'Report';
+$lang->treeView = 'Tree View';
+$lang->groupView = 'Group View';
+$lang->kanban = 'Kanban';
+$lang->burn = 'Burndown';
+$lang->view = 'View';
+$lang->intro = 'Introduction';
+$lang->indexPage = 'Index';
+$lang->model = 'Model';
+$lang->redev = 'Develop';
+$lang->browser = 'Browser';
+$lang->db = 'Database';
+$lang->editor = 'Editor';
+$lang->timezone = 'Timezone';
+$lang->security = 'Security';
+$lang->calendar = 'Calendar';
-$lang->project = new stdclass();
-$lang->project->menu = new stdclass();
-if($config->systemMode == 'new')
-{
- $lang->project->menu->browse = array('link' => 'Project|project|browse|');
-}
-else
-{
- $lang->project->menu->browse = array('link' => "$lang->executionCommon|project|browse|");
-}
+$lang->my->work = 'Work';
-$lang->project->dividerMenu = ',execution,programplan,doc,other,';
+$lang->project->report = 'Report';
-$lang->program->menu = new stdclass();
-$lang->program->menu->product = array('link' => 'Product|program|product|programID=%s', 'alias' => 'view');
-$lang->program->menu->project = array('link' => "Project|program|project|programID=%s");
-$lang->program->menu->personnel = array('link' => "Member|personnel|invest|programID=%s");
-$lang->program->menu->stakeholder = array('link' => "Stakeholder|program|stakeholder|programID=%s", 'alias' => 'createstakeholder');
+$lang->report->weekly = 'Weekly';
+$lang->report->annual = 'Annual Summary';
+$lang->report->notice = new stdclass();
+$lang->report->notice->help = 'Note: The report is generated on the results of browsing the list. Click, e.g. AssignedToMe, then click Create Report to generate a report based on AssignedToMe list.';
-$lang->personnel = new stdClass();
-$lang->personnel->menu = new stdClass();
-$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|programID=%s");
-$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|programID=%s");
-$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|programID=%s", 'alias' => 'addwhitelist');
+$lang->testcase->feature = 'Functional Test';
+$lang->testcase->unit = 'Unit Test';
+$lang->testcase->testsuite = 'Test Suite';
+$lang->testcase->caselib = 'Case Library';
-/* Scrum menu. */
-$lang->product = new stdclass();
-$lang->product->homeMenu = new stdclass();
-$lang->product->homeMenu->home = 'Dashboard|product|index|';
-$lang->product->homeMenu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
+$lang->devops->compile = 'Compile';
+$lang->devops->repo = 'Repo';
+$lang->devops->rules = 'Rule';
-$lang->product->menu = new stdclass();
-$lang->product->menu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
-if($config->URAndSR) $lang->product->menu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->menu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
-$lang->product->menu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
-$lang->product->menu->roadmap = 'Roadmap|product|roadmap|productID=%s';
-$lang->product->menu->project = "Project|product|project|status=all&productID=%s";
-$lang->product->menu->track = array('link' => "Track|story|track|productID=%s");
-$lang->product->menu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
-$lang->product->menu->dynamic = 'Dynamic|product|dynamic|productID=%s';
-$lang->product->menu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
+$lang->admin->system = 'System';
+$lang->admin->entry = 'Application';
+$lang->admin->data = 'Data';
+$lang->admin->cron = 'Cron';
+$lang->admin->buildIndex = 'Full Text Search';
-$lang->product->setMenu = new stdclass();
-$lang->product->setMenu->view = array('link' => 'View|product|view|productID=%s', 'alias' => 'edit');
-$lang->product->setMenu->module = array('link' => 'Module|tree|browse|product=%s&view=story', 'subModule' => 'tree');
-$lang->product->setMenu->branch = array('link' => '@branch@|branch|manage|product=%s', 'subModule' => 'branch');
-$lang->product->setMenu->whitelist = array('link' => 'Whitelist|product|whitelist|product=%s', 'subModule' => 'personnel');
-
-$lang->release = new stdclass();
-$lang->branch = new stdclass();
-$lang->productplan = new stdclass();
-
-$lang->release->menu = $lang->product->menu;
-$lang->branch->menu = $lang->product->menu;
-$lang->productplan->menu = $lang->product->menu;
-
-/* System menu. */
-$lang->system = new stdclass();
-$lang->system->menu = new stdclass();
-$lang->system->menu->team = array('link' => 'Team|my|team|', 'subModule' => 'user');
-$lang->system->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
-$lang->system->menu->dynamic = 'Dynamic|company|dynamic|';
-$lang->system->menu->view = array('link' => 'Company|company|view');
-
-$lang->measurement = new stdclass();
-$lang->measurement->menu = new stdclass();
+$lang->subject->storyConcept = 'Story Concpet';
$lang->searchTips = '';
$lang->searchAB = 'Search';
@@ -251,11 +251,6 @@ $lang->searchObjects['execution'] = $lang->executionCommon;
$lang->searchObjects['user'] = 'User';
$lang->searchTips = 'ID (ctrl+g)';
-/* Code formats for import. */
-$lang->importEncodeList['gbk'] = 'GBK';
-$lang->importEncodeList['big5'] = 'BIG5';
-$lang->importEncodeList['utf-8'] = 'UTF-8';
-
/* File type list for export. */
$lang->exportFileTypeList['csv'] = 'csv';
$lang->exportFileTypeList['xml'] = 'xml';
@@ -277,402 +272,6 @@ $lang->themes['pink'] = 'Pink';
$lang->themes['blackberry'] = 'Blackberry';
$lang->themes['classic'] = 'Classic';
-/* Index menu settings. */
-$lang->index = new stdclass();
-$lang->index->menu = new stdclass();
-
-$lang->index->menu->product = "{$lang->productCommon}|product|browse";
-$lang->index->menu->project = "{$lang->executionCommon}|project|browse";
-
-/* My dashboard menu settings. */
-$lang->my = new stdclass();
-$lang->my->menu = new stdclass();
-
-$lang->my->menu->index = 'Index|my|index';
-$lang->my->menu->myWork = array('link' => 'Work|my|work|mode=task');
-if($config->systemMode == 'new')
-{
- $lang->my->menu->myProject = array('link' => 'Project|my|project|');
- $lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
-}
-else
-{
- $lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
-}
-$lang->my->menu->contribute = array('link' => 'Contribute|my|contribute|mode=task');
-$lang->my->menu->dynamic = 'Dynamic|my|dynamic|';
-$lang->my->menu->score = 'Score|my|score|';
-$lang->my->menu->contacts = 'Contacts|my|managecontacts|';
-
-$lang->my->workMenu = new stdclass();
-$lang->my->workMenu->task = 'Task|my|work|mode=task';
-if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
-$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
-$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
-$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
-$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
-
-$lang->my->contributeMenu = new stdclass();
-$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
-if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
-$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
-$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
-$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
-$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
-$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
-
-$lang->my->dividerMenu = ',myWork,score,';
-
-$lang->todo = new stdclass();
-$lang->todo->menu = $lang->my->menu;
-
-$lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,set,';
-
-$lang->story = new stdclass();
-
-$lang->story->menu = $lang->product->menu;
-
-/* Project menu settings. */
-$lang->execution = new stdclass();
-$lang->execution->homeMenu = new stdclass();
-$lang->execution->homeMenu->index = 'Index|execution|index|';
-$lang->execution->homeMenu->list = array('link' => 'Execution|execution|all|', 'alias' => 'batchedit');
-
-$lang->execution->menu = new stdclass();
-$lang->execution->menu->task = array('link' => 'Task|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
-$lang->execution->menu->kanban = array('link' => 'Kanban|execution|kanban|executionID=%s');
-$lang->execution->menu->burn = array('link' => 'Burndown|execution|burn|executionID=%s');
-$lang->execution->menu->view = array('link' => 'View|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
-$lang->execution->menu->story = array('link' => 'Story|execution|story|executionID=%s', 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
-$lang->execution->menu->qa = array('link' => 'Bug|execution|qa|executionID=%s', 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport');
-$lang->execution->menu->repo = array('link' => 'Repo|repo|browse|projectID=%s');
-$lang->execution->menu->doc = array('link' => 'Doc|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
-$lang->execution->menu->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build');
-$lang->execution->menu->release = array('link' => 'Release|projectrelease|browse|projectID=0&executionID=%s', 'subModule' => 'projectrelease');
-$lang->execution->menu->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s');
-$lang->execution->menu->setting = array('link' => 'Settings|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
-
-$lang->execution->subMenu = new stdclass();
-$lang->execution->subMenu->view = new stdclass();
-$lang->execution->subMenu->view->groupTask = 'Group View|execution|grouptask|executionID=%s';
-$lang->execution->subMenu->view->tree = 'Tree View|execution|tree|executionID=%s';
-
-$lang->execution->subMenu->qa = new stdclass();
-$lang->execution->subMenu->qa->bug = 'Bug|execution|bug|executionID=%s';
-$lang->execution->subMenu->qa->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build');
-$lang->execution->subMenu->qa->testtask = array('link' => 'Request|execution|testtask|executionID=%s', 'subModule' => 'testreport,testtask', 'alias' => 'create');
-
-$lang->execution->subMenu->more = new stdclass();
-$lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|execution|whitelist|executionID=%s', 'subModule' => 'personnel', 'alias' => 'addwhitelist');
-$lang->execution->subMenu->more->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s');
-$lang->execution->subMenu->more->view = array('link' => 'Overview|execution|view|executionID=%s', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
-
-$lang->execution->qaMenu = new stdclass();
-$lang->execution->qaMenu->qa = array('link' => '仪表盘|execution|qa|executionID=%s');
-$lang->execution->qaMenu->bug = array('link' => 'Bug|execution|bug|executionID=%s');
-$lang->execution->qaMenu->testcase = array('link' => '用例|execution|testcase|executionID=%s', 'alias' => 'create');
-$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
-
-$lang->execution->dividerMenu = ',execution,programplan,executionbuild,story,doc,other,';
-
-$lang->task = new stdclass();
-$lang->build = new stdclass();
-$lang->task->menu = $lang->execution->menu;
-$lang->build->menu = $lang->execution->menu;
-
-/* QA menu settings. */
-$lang->qa = new stdclass();
-$lang->qa->menu = new stdclass();
-
-$lang->qa->menu->index = array('link' => 'Index|qa|index');
-$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto');
-$lang->qa->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib');
-$lang->qa->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult');
-$lang->qa->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
-$lang->qa->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
-$lang->qa->menu->caselib = array('link' => 'Case Library|caselib|browse', 'alias' => 'create,createcase,view,edit,batchcreatecase,showimport');
-
-$lang->qa->subMenu = new stdclass();
-$lang->qa->subMenu->testcase = new stdclass();
-$lang->qa->subMenu->testcase->feature = array('link' => 'Functional Test|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story');
-$lang->qa->subMenu->testcase->unit = array('link' => 'Unit Test|testtask|browseUnits|productID=%s');
-
-$lang->bug = new stdclass();
-$lang->bug->menu = new stdclass();
-$lang->bug->subMenu = $lang->qa->subMenu;
-
-$lang->bug->menu->index = array('link' => 'Index|qa|index');
-$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree');
-$lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
-$lang->bug->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
-$lang->bug->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
-$lang->bug->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
-$lang->bug->menu->caselib = array('link' => 'Case Library|caselib|browse');
-
-$lang->testcase = new stdclass();
-$lang->testcase->menu = new stdclass();
-$lang->testcase->subMenu = $lang->qa->subMenu;
-$lang->testcase->menu->index = array('link' => 'Index|qa|index');
-$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
-$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree', 'class' => 'dropdown dropdown-hover');
-$lang->testcase->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
-$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
-$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
-$lang->testcase->menu->caselib = array('link' => 'Case Library|caselib|browse');
-
-$lang->testtask = new stdclass();
-$lang->testtask->menu = new stdclass();
-$lang->testtask->subMenu = $lang->qa->subMenu;
-$lang->testtask->menu->index = array('link' => 'Index|qa|index');
-$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
-$lang->testtask->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
-$lang->testtask->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
-$lang->testtask->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
-$lang->testtask->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
-$lang->testtask->menu->caselib = array('link' => 'Case Library|caselib|browse');
-
-$lang->testsuite = new stdclass();
-$lang->testsuite->menu = new stdclass();
-$lang->testsuite->subMenu = $lang->qa->subMenu;
-$lang->testsuite->menu->index = array('link' => 'Index|qa|index');
-$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
-$lang->testsuite->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
-$lang->testsuite->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
-$lang->testsuite->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
-$lang->testsuite->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
-$lang->testsuite->menu->caselib = array('link' => 'Case Library|caselib|browse');
-
-$lang->testreport = new stdclass();
-$lang->testreport->menu = new stdclass();
-$lang->testreport->subMenu = $lang->qa->subMenu;
-$lang->testreport->menu->index = array('link' => 'Index|qa|index');
-$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
-$lang->testreport->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
-$lang->testreport->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
-$lang->testreport->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
-$lang->testreport->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
-$lang->testreport->menu->caselib = array('link' => 'Case Library|caselib|browse');
-
-$lang->caselib = new stdclass();
-$lang->caselib->menu = new stdclass();
-$lang->caselib->menu->index = array('link' => 'Index|qa|index');
-$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
-$lang->caselib->menu->testcase = array('link' => 'Case|testcase|browse|', 'class' => 'dropdown dropdown-hover');
-$lang->caselib->menu->testtask = array('link' => 'Request|testtask|browse|');
-$lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|');
-$lang->caselib->menu->report = array('link' => 'Report|testreport|browse|');
-$lang->caselib->menu->caselib = array('link' => 'Case Library|caselib|browse|libID=%s', 'alias' => 'create,createcase,view,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
-
-$lang->caselib->subMenu = new stdclass();
-$lang->caselib->subMenu->testcase = new stdclass();
-$lang->caselib->subMenu->testcase->feature = array('link' => 'Functional Test|testcase|browse|', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story');
-$lang->caselib->subMenu->testcase->unit = array('link' => 'Unit Test|testtask|browseUnits|');
-
-$lang->ci = new stdclass();
-$lang->ci->menu = new stdclass();
-$lang->ci->menu->code = array('link' => 'Code|repo|browse|repoID=%s', 'alias' => 'diff,view,revision,log,blame,showsynccomment');
-$lang->ci->menu->build = array('link' => 'Compile|job|browse', 'subModule' => 'compile,job');
-$lang->ci->menu->jenkins = array('link' => 'Jenkins|jenkins|browse', 'alias' => 'create,edit');
-$lang->ci->menu->maintain = array('link' => 'Repo|repo|maintain', 'alias' => 'create,edit');
-$lang->ci->menu->rules = array('link' => 'Rule|repo|setrules');
-
-$lang->repo = new stdclass();
-$lang->jenkins = new stdclass();
-$lang->compile = new stdclass();
-$lang->job = new stdclass();
-$lang->repo->menu = $lang->ci->menu;
-$lang->jenkins->menu = $lang->ci->menu;
-$lang->compile->menu = $lang->ci->menu;
-$lang->job->menu = $lang->ci->menu;
-
-/* Doc menu settings. */
-$lang->doc = new stdclass();
-$lang->doc->menu = new stdclass();
-
-$lang->svn = new stdclass();
-$lang->git = new stdclass();
-
-/* Project release menu settings. */
-$lang->projectrelease = new stdclass();
-$lang->projectrelease->menu = new stdclass();
-
-/* Report menu settings. */
-$lang->report = new stdclass();
-$lang->report->menu = new stdclass();
-
-$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
-$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
-$lang->report->menu->execution = array('link' => 'Execution|report|executiondeviation');
-$lang->report->menu->test = array('link' => 'Request|report|bugcreate', 'alias' => 'bugassign');
-$lang->report->menu->staff = array('link' => 'Company|report|workload');
-
-$lang->report->notice = new stdclass();
-$lang->report->notice->help = 'Note: The report is generated on the results of browsing the list. Click, e.g. AssignedToMe, then click Create Report to generate a report based on AssignedToMe list.';
-
-/* Company menu settings. */
-$lang->company = new stdclass();
-$lang->dept = new stdclass();
-$lang->group = new stdclass();
-$lang->user = new stdclass();
-$lang->company->menu = new stdclass();
-$lang->dept->menu = new stdclass();
-$lang->group->menu = new stdclass();
-$lang->user->menu = new stdclass();
-
-$lang->company = new stdclass();
-$lang->company->menu = new stdclass();
-$lang->company->menu->browseUser = array('link' => 'User|company|browse', 'subModule' => ',user,');
-$lang->company->menu->dept = array('link' => 'Dept|dept|browse', 'subModule' => 'dept');
-$lang->company->menu->browseGroup = array('link' => 'Group|group|browse', 'subModule' => 'group');
-
-/* Admin menu settings. */
-$lang->admin = new stdclass();
-$lang->admin->menu = new stdclass();
-$lang->admin->menu->index = array('link' => 'Home|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
-$lang->admin->menu->company = array('link' => 'User|company|browse|', 'subModule' => ',user,dept,group,');
-$lang->admin->menu->model = array('link' => 'Model|custom|browsestoryconcept|', 'subModule' => 'holiday');
-$lang->admin->menu->custom = array('link' => 'Custom|custom|index', 'subModule' => 'custom');
-$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension');
-$lang->admin->menu->dev = array('link' => 'Develop|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor,entry');
-$lang->admin->menu->message = array('link' => 'Message|message|index', 'subModule' => 'message,mail,webhook');
-$lang->admin->menu->system = array('link' => 'System|backup|index', 'subModule' => 'cron,backup,action,search');
-
-$lang->subject = new stdclass();
-$lang->subject->menu = new stdclass();
-$lang->subject->menu->storyConcept = array('link' => 'Story Concpet|custom|browsestoryconcept|');
-
-$lang->dept->menu = $lang->company->menu;
-$lang->group->menu = $lang->company->menu;
-$lang->user->menu = $lang->company->menu;
-
-$lang->admin->subMenu = new stdclass();
-$lang->admin->subMenu->message = new stdclass();
-$lang->admin->subMenu->message->mail = array('link' => 'Mail|mail|index', 'subModule' => 'mail');
-$lang->admin->subMenu->message->webhook = array('link' => 'Webhook|webhook|browse', 'subModule' => 'webhook');
-$lang->admin->subMenu->message->browser = array('link' => 'Browser|message|browser');
-$lang->admin->subMenu->message->setting = array('link' => 'Settings|message|setting');
-
-$lang->admin->subMenu->sso = new stdclass();
-$lang->admin->subMenu->sso->ranzhi = 'Zdoo|admin|sso';
-
-$lang->admin->subMenu->dev = new stdclass();
-$lang->admin->subMenu->dev->api = array('link' => 'API|dev|api');
-$lang->admin->subMenu->dev->db = array('link' => 'Database|dev|db');
-$lang->admin->subMenu->dev->editor = array('link' => 'Editor|dev|editor');
-$lang->admin->subMenu->dev->entry = array('link' => 'Application|entry|browse', 'subModule' => 'entry');
-
-$lang->admin->subMenu->system = new stdclass();
-$lang->admin->subMenu->system->data = array('link' => 'Data|backup|index', 'subModule' => 'action');
-$lang->admin->subMenu->system->safe = array('link' => 'Security|admin|safe', 'alias' => 'checkweak');
-$lang->admin->subMenu->system->cron = array('link' => 'Cron|cron|index', 'subModule' => 'cron');
-$lang->admin->subMenu->system->timezone = array('link' => 'Timezone|custom|timezone', 'subModule' => 'custom');
-$lang->admin->subMenu->system->buildIndex = array('link' => 'Full Text Search|search|buildindex|');
-
-$lang->admin->dividerMenu = ',message,system,';
-
-$lang->convert = new stdclass();
-$lang->upgrade = new stdclass();
-$lang->action = new stdclass();
-$lang->backup = new stdclass();
-$lang->extension = new stdclass();
-$lang->custom = new stdclass();
-$lang->mail = new stdclass();
-$lang->cron = new stdclass();
-$lang->dev = new stdclass();
-$lang->entry = new stdclass();
-$lang->webhook = new stdclass();
-$lang->message = new stdclass();
-$lang->search = new stdclass();
-
-/* Nav group.*/
-$lang->navGroup = new stdclass();
-$lang->navGroup->my = 'my';
-$lang->navGroup->effort = 'my';
-$lang->navGroup->score = 'my';
-
-$lang->navGroup->program = 'program';
-$lang->navGroup->personnel = 'program';
-
-$lang->navGroup->product = 'product';
-$lang->navGroup->productplan = 'product';
-$lang->navGroup->release = 'product';
-$lang->navGroup->branch = 'product';
-$lang->navGroup->story = 'product';
-$lang->navGroup->tree = 'product';
-
-$lang->navGroup->project = 'project';
-$lang->navGroup->testcase = 'project';
-$lang->navGroup->testtask = 'project';
-$lang->navGroup->testreport = 'project';
-$lang->navGroup->testsuite = 'project';
-$lang->navGroup->caselib = 'project';
-$lang->navGroup->feedback = 'project';
-$lang->navGroup->deploy = 'project';
-$lang->navGroup->stakeholder = 'project';
-
-$lang->navGroup->projectstory = 'project';
-$lang->navGroup->review = 'project';
-$lang->navGroup->reviewissue = 'project';
-$lang->navGroup->milestone = 'project';
-$lang->navGroup->pssp = 'project';
-$lang->navGroup->auditplan = 'project';
-$lang->navGroup->cm = 'project';
-$lang->navGroup->nc = 'project';
-$lang->navGroup->projectrelease = 'project';
-$lang->navGroup->build = 'project';
-$lang->navGroup->job = 'project';
-$lang->navGroup->jenkins = 'project';
-$lang->navGroup->compile = 'project';
-$lang->navGroup->report = 'project';
-$lang->navGroup->measrecord = 'project';
-
-$lang->navGroup->execution = 'execution';
-$lang->navGroup->task = 'execution';
-$lang->navGroup->build = 'execution';
-
-$lang->navGroup->doc = 'doc';
-
-$lang->navGroup->qa = 'qa';
-
-$lang->navGroup->sqlbuilder = 'system';
-$lang->navGroup->auditcl = 'system';
-$lang->navGroup->cmcl = 'system';
-$lang->navGroup->todo = 'system';
-$lang->navGroup->ldap = 'system';
-$lang->navGroup->process = 'system';
-$lang->navGroup->activity = 'system';
-$lang->navGroup->zoutput = 'system';
-$lang->navGroup->classify = 'system';
-$lang->navGroup->subject = 'system';
-$lang->navGroup->baseline = 'system';
-$lang->navGroup->reviewcl = 'system';
-$lang->navGroup->reviewsetting = 'system';
-
-$lang->navGroup->attend = 'attend';
-$lang->navGroup->leave = 'attend';
-$lang->navGroup->makeup = 'attend';
-$lang->navGroup->overtime = 'attend';
-$lang->navGroup->lieu = 'attend';
-
-$lang->navGroup->admin = 'admin';
-$lang->navGroup->company = 'admin';
-$lang->navGroup->dept = 'admin';
-$lang->navGroup->user = 'admin';
-$lang->navGroup->group = 'admin';
-$lang->navGroup->dept = 'admin';
-$lang->navGroup->webhook = 'admin';
-$lang->navGroup->sms = 'admin';
-$lang->navGroup->message = 'admin';
-$lang->navGroup->custom = 'admin';
-$lang->navGroup->cron = 'admin';
-$lang->navGroup->backup = 'admin';
-$lang->navGroup->mail = 'admin';
-$lang->navGroup->dev = 'admin';
-$lang->navGroup->entry = 'admin';
-$lang->navGroup->extension = 'admin';
-$lang->navGroup->action = 'admin';
-$lang->navGroup->search = 'admin';
-
/* Error info. */
$lang->error = new stdclass();
$lang->error->companyNotFound = "The domain %s cannot be found!";
@@ -786,156 +385,4 @@ $lang->datepicker->dayNames = array('Sunday', 'Monday', 'Tuesday', 'Wednesda
$lang->datepicker->abbrDayNames = array('Sun', 'Mon', 'Tues', 'Wed', 'Thur', 'Fri', 'Sat');
$lang->datepicker->monthNames = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
-/* Common action icons. */
-$lang->icons['todo'] = 'check';
-$lang->icons['product'] = 'cube';
-$lang->icons['bug'] = 'bug';
-$lang->icons['task'] = 'check-sign';
-$lang->icons['tasks'] = 'tasks';
-$lang->icons['program'] = 'program';
-$lang->icons['project'] = 'project';
-$lang->icons['stage'] = 'waterfall';
-$lang->icons['sprint'] = 'sprint';
-$lang->icons['doc'] = 'file-text';
-$lang->icons['doclib'] = 'folder-close';
-$lang->icons['story'] = 'lightbulb';
-$lang->icons['release'] = 'tags';
-$lang->icons['roadmap'] = 'code-fork';
-$lang->icons['plan'] = 'flag';
-$lang->icons['dynamic'] = 'volume-up';
-$lang->icons['build'] = 'tag';
-$lang->icons['test'] = 'check';
-$lang->icons['testtask'] = 'check';
-$lang->icons['group'] = 'group';
-$lang->icons['team'] = 'group';
-$lang->icons['company'] = 'sitemap';
-$lang->icons['user'] = 'user';
-$lang->icons['dept'] = 'sitemap';
-$lang->icons['tree'] = 'sitemap';
-$lang->icons['usecase'] = 'sitemap';
-$lang->icons['testcase'] = 'sitemap';
-$lang->icons['result'] = 'list-alt';
-$lang->icons['mail'] = 'envelope';
-$lang->icons['trash'] = 'trash';
-$lang->icons['extension'] = 'th-large';
-$lang->icons['app'] = 'th-large';
-
-$lang->icons['results'] = 'list-alt';
-$lang->icons['create'] = 'plus';
-$lang->icons['post'] = 'edit';
-$lang->icons['batchCreate'] = 'plus-sign';
-$lang->icons['batchEdit'] = 'edit-sign';
-$lang->icons['batchClose'] = 'off';
-$lang->icons['edit'] = 'edit';
-$lang->icons['delete'] = 'close';
-$lang->icons['copy'] = 'copy';
-$lang->icons['report'] = 'bar-chart';
-$lang->icons['export'] = 'export';
-$lang->icons['report-file'] = 'file-powerpoint';
-$lang->icons['import'] = 'import';
-$lang->icons['finish'] = 'checked';
-$lang->icons['resolve'] = 'check';
-$lang->icons['start'] = 'play';
-$lang->icons['restart'] = 'play';
-$lang->icons['run'] = 'run';
-$lang->icons['runCase'] = 'run';
-$lang->icons['batchRun'] = 'play-sign';
-$lang->icons['assign'] = 'hand-right';
-$lang->icons['assignTo'] = 'hand-right';
-$lang->icons['change'] = 'fork';
-$lang->icons['link'] = 'link';
-$lang->icons['close'] = 'off';
-$lang->icons['activate'] = 'magic';
-$lang->icons['review'] = 'glasses';
-$lang->icons['confirm'] = 'search';
-$lang->icons['confirmBug'] = 'search';
-$lang->icons['putoff'] = 'calendar';
-$lang->icons['suspend'] = 'pause';
-$lang->icons['pause'] = 'pause';
-$lang->icons['cancel'] = 'ban-circle';
-$lang->icons['recordEstimate'] = 'time';
-$lang->icons['customFields'] = 'cogs';
-$lang->icons['manage'] = 'cog';
-$lang->icons['unlock'] = 'unlock-alt';
-$lang->icons['confirmStoryChange'] = 'search';
-$lang->icons['score'] = 'tint';
-
-/* Scrum menu. */
-$lang->menu = new stdclass();
-$lang->menu->scrum = new stdclass();
-$lang->menu->scrum->index = 'Index|project|index|project=%s';
-$lang->menu->scrum->project = array('link' => "$lang->executionCommon|project|index|locate=no");
-$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project=%s', 'subModule' => 'story', 'alias' => 'story,track');
-$lang->menu->scrum->doc = array('link' => 'Doc|doc|objectLibs|type=project&objectID=%s', 'subModule' => 'doc');
-$lang->menu->scrum->qa = 'QA|qa|index';
-$lang->menu->scrum->ci = 'Code|repo|browse';
-$lang->menu->scrum->build = array('link' => 'Build|project|build|project=%s');
-$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project=%s');
-$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project=%s', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
-
-$lang->scrum = new stdclass();
-$lang->scrum->setMenu = new stdclass();
-$lang->scrum->setMenu->view = array('link' => 'View|project|view|project=%s');
-$lang->scrum->setMenu->products = array('link' => 'Product|project|manageProducts|project=%s', 'alias' => 'manageproducts');
-$lang->scrum->setMenu->members = array('link' => 'Member|project|manageMembers|project=%s', 'alias' => 'managemembers');
-$lang->scrum->setMenu->whitelist = array('link' => 'White List|project|whitelist|project=%s', 'subModule' => 'personnel');
-$lang->scrum->setMenu->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
-$lang->scrum->setMenu->group = array('link' => 'Priv Group|project|group|project=%s', 'alias' => 'group,manageview,managepriv');
-
-/* Waterfall menu. */
-$lang->menu->waterfall = new stdclass();
-$lang->menu->waterfall->index = array('link' => 'Dashboard|project|index|project=%s');
-$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|project=%s', 'subModule' => 'programplan');
-$lang->menu->waterfall->execution = array('link' => $lang->executionCommon . '|execution|all|status=all&projectID=%s', 'subModule' => ',project,task,');
-$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|project=%s');
-$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|project=%s', 'subModule' => ',milestone,');
-$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project=%s');
-$lang->menu->waterfall->design = 'Design|design|browse|product=0&project=%s';
-$lang->menu->waterfall->ci = 'Repo|repo|browse|';
-$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
-$lang->menu->waterfall->qa = 'QA|qa|index';
-$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->waterfall->build = array('link' => 'Build|project|build|project=%s');
-$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project=%s');
-$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
-$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project=%s', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
-
-$lang->waterfall = new stdclass();
-$lang->waterfall->subMenu = new stdclass();
-$lang->waterfall->subMenu->other = new stdclass();
-$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
-$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-$lang->waterfall->subMenu->other->report = array('link' => 'Report|report|projectsummary|project=%s', 'subModule' => ',report,measrecord');
-$lang->waterfall->subMenu->other->auditplan = array('link' => 'QA|auditplan|browse|', 'subModule' => 'nc');
-
-$lang->waterfall->setMenu = new stdclass();
-$lang->waterfall->setMenu = $lang->scrum->setMenu;
-
-$lang->waterfallproduct = new stdclass();
-$lang->review = new stdclass();
-$lang->milestone = new stdclass();
-$lang->auditplan = new stdclass();
-$lang->cm = new stdclass();
-$lang->nc = new stdclass();
-$lang->pssp = new stdclass();
-$lang->stakeholder = new stdclass();
-$lang->projectstory = new stdclass();
-
-$lang->review->menu = new stdclass();
-$lang->milestone->menu = new stdclass();
-$lang->auditplan->menu = new stdclass();
-$lang->cm->menu = new stdclass();
-$lang->pssp->menu = new stdclass();
-$lang->stakeholder->menu = new stdclass();
-$lang->waterfallproduct->menu = new stdclass();
-$lang->projectstory->menu = new stdclass();
-
-$lang->stakeholder->menu = $lang->scrum->setMenu;
-
-$lang->nc->menu = $lang->auditplan->menu;
-$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins');
-
-include (dirname(__FILE__) . '/menuOrder.php');
+include (dirname(__FILE__) . '/menu.php');
diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php
index 8c20f4c0ce..0f56d1ae14 100644
--- a/module/common/lang/menu.php
+++ b/module/common/lang/menu.php
@@ -295,7 +295,7 @@ $lang->execution->menu->settings['subMenu']->products = array('link' => "$lang-
$lang->execution->menu->settings['subMenu']->team = array('link' => "{$lang->team->common}|execution|team|executionID=%s", 'alias' => 'managemembers');
$lang->execution->menu->settings['subMenu']->whitelist = array('link' => "$lang->whitelist|execution|whitelist|executionID=%s", 'subModule' => 'personnel', 'alias' => 'addwhitelist');
-$lang->execution->dividerMenu = ',story,build,setting,';
+$lang->execution->dividerMenu = ',story,build,settings,';
/* QA menu.*/
$lang->qa->menu = new stdclass();
@@ -335,13 +335,13 @@ $lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->i
/* DevOps menu. */
$lang->devops->menu = new stdclass();
$lang->devops->menu->code = array('link' => "{$lang->devops->common}|repo|browse|repoID=%s", 'alias' => 'diff,view,revision,log,blame,showsynccomment');
-$lang->devops->menu->build = array('link' => "{$lang->devops->build}|job|browse", 'subModule' => 'compile,job');
+$lang->devops->menu->compile = array('link' => "{$lang->devops->compile}|job|browse", 'subModule' => 'compile,job');
$lang->devops->menu->jenkins = array('link' => "Jenkins|jenkins|browse", 'alias' => 'create,edit');
$lang->devops->menu->maintain = array('link' => "{$lang->devops->repo}|repo|maintain", 'alias' => 'create,edit');
$lang->devops->menu->rules = array('link' => "{$lang->devops->rules}|repo|setrules");
$lang->devops->menuOrder[5] = 'code';
-$lang->devops->menuOrder[10] = 'build';
+$lang->devops->menuOrder[10] = 'compile';
$lang->devops->menuOrder[15] = 'jenkins';
$lang->devops->menuOrder[20] = 'maintain';
$lang->devops->menuOrder[25] = 'rules';
@@ -438,7 +438,7 @@ $lang->admin->menu->dev['menuOrder'][20] = 'entry';
$lang->admin->menu->system['subMenu'] = new stdclass();
$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action');
-$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->safety|admin|safe", 'alias' => 'checkweak');
+$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak');
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 548305d886..6fc40967f6 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -140,7 +140,6 @@ $lang->system->common = '组织';
$lang->admin->common = '后台';
$lang->task->common = '任务';
$lang->bug->common = 'Bug';
-$lang->doc->common = '文档';
$lang->testcase->common = '测试用例';
$lang->testtask->common = '测试单';
$lang->score->common = '我的积分';
@@ -180,7 +179,6 @@ $lang->track = '矩阵';
$lang->settings = '设置';
$lang->overview = '概况';
$lang->module = '模块';
-$lang->settings = '设置';
$lang->priv = '权限';
$lang->design = '设计';
$lang->other = '其他';
@@ -201,7 +199,7 @@ $lang->browser = '浏览器';
$lang->db = '数据库';
$lang->editor = '编辑器';
$lang->timezone = '时区';
-$lang->safety = '安全';
+$lang->security = '安全';
$lang->calendar = '日程';
$lang->my->work = '待处理';
@@ -218,9 +216,9 @@ $lang->testcase->unit = '单元测试';
$lang->testcase->testsuite = '套件';
$lang->testcase->caselib = '用例库';
-$lang->devops->build = '构建';
-$lang->devops->repo = '版本库';
-$lang->devops->rules = '指令';
+$lang->devops->compile = '构建';
+$lang->devops->repo = '版本库';
+$lang->devops->rules = '指令';
$lang->admin->system = '系统';
$lang->admin->entry = '应用';
diff --git a/module/company/control.php b/module/company/control.php
index 4f9a603ac9..2bd9d14868 100644
--- a/module/company/control.php
+++ b/module/company/control.php
@@ -148,8 +148,6 @@ class company extends control
*/
public function view()
{
- $this->lang->noMenuModule[] = 'company';
-
$this->company->setMenu();
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->view;
$this->view->position[] = $this->lang->company->view;
@@ -170,8 +168,6 @@ class company extends control
*/
public function dynamic($browseType = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next')
{
- $this->lang->noMenuModule[] = 'company';
-
$this->company->setMenu();
$this->app->loadLang('user');
$this->app->loadLang('execution');
diff --git a/module/custom/control.php b/module/custom/control.php
index 771062c134..1a9126e3d9 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -347,14 +347,6 @@ class custom extends control
*/
public function browseStoryConcept()
{
- /* Process menu.*/
- $this->app->loadLang('custom');
- $this->lang->custom->menu = $this->lang->subject->menu;
- $this->lang->navGroup->custom = 'admin';
- $this->lang->admin->menu->model['subModule'] .= ',custom';
- $key = array_search('custom', $this->lang->noMenuModule);
- if($key !== false) unset($this->lang->noMenuModule[$key]);
-
$this->view->title = $this->lang->custom->browseStoryConcept;
$this->view->position[] = $this->lang->custom->browseStoryConcept;
$this->view->URSRList = $this->custom->getURSRList();
diff --git a/module/doc/control.php b/module/doc/control.php
index 06eba5861c..76114918ce 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -113,17 +113,11 @@ class doc extends control
/* According the from, set menus. */
if($from == 'product')
{
- $this->lang->doc->menuOrder = $this->lang->product->menuOrder;
- $this->product->setMenu($this->product->getPairs(), $productID);
- $this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
- $this->lang->noMenuModule[] = 'doc';
+ $this->product->setMenu($productID);
}
elseif($from == 'project')
{
- $this->lang->doc->menu = $this->lang->project->menu;
- $this->lang->doc->menuOrder = $this->lang->project->menuOrder;
- if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
+ $this->project->setMenu($lib->project);
}
else
{
@@ -342,22 +336,13 @@ class doc extends control
/* According the from, set menus. */
if($this->from == 'product')
{
- $this->lang->navGroup->doc = 'product';
- $this->lang->doc->menu = $this->lang->product->menu;
- $this->lang->doc->menuOrder = $this->lang->product->menuOrder;
- $this->product->setMenu($this->product->getPairs(), $lib->product);
- $this->lang->product->switcherMenu = $this->product->getSwitcher($lib->product);
- $this->lang->noMenuModule[] = 'doc';
+ $this->product->setMenu($lib->product);
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), " " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
}
elseif($this->from == 'project')
{
- $this->lang->navGroup->doc = 'project';
- $this->lang->doc->menu = $this->lang->project->menu;
- $this->lang->doc->menuOrder = $this->lang->project->menuOrder;
- if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
+ $this->project->setMenu($lib->project);
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), " " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
}
@@ -427,21 +412,11 @@ class doc extends control
/* According the from, set menus. */
if($this->from == 'product')
{
- $objectID = $lib->product;
- $this->lang->navGroup->doc = 'product';
- $this->lang->doc->menuOrder = $this->lang->product->menuOrder;
- $this->product->setMenu($this->product->getPairs(), $objectID);
- $this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
- $this->lang->noMenuModule[] = 'doc';
+ $this->product->setMenu($lib->product);
}
elseif($this->from == 'project')
{
- $objectID = $lib->project;
- $this->lang->navGroup->doc = 'project';
- $this->lang->doc->menu = $this->lang->project->menu;
- $this->lang->doc->menuOrder = $this->lang->project->menuOrder;
- if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getExecutionsByProject($this->session->project, 'all', 0, true), $objectID);
+ $this->project->setMenu($lib->project);
}
else
{
@@ -499,21 +474,11 @@ class doc extends control
/* According the from, set menus. */
if($this->from == 'product')
{
- $objectID = $lib->product;
- $this->lang->navGroup->doc = 'product';
- $this->lang->doc->menuOrder = $this->lang->product->menuOrder;
- $this->product->setMenu($this->product->getPairs(), $objectID);
- $this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
- $this->lang->noMenuModule[] = 'doc';
+ $this->product->setMenu($lib->product);
}
elseif($this->from == 'project')
{
- $objectID = $lib->project;
- $this->lang->navGroup->doc = 'project';
- $this->lang->doc->menu = $this->lang->project->menu;
- $this->lang->doc->menuOrder = $this->lang->project->menuOrder;
- if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
+ $this->project->setMenu($lib->project);
}
else
{
@@ -828,18 +793,10 @@ class doc extends control
/* According the from, set menus. */
if($this->from == 'product')
{
- $this->lang->navGroup->doc = 'product';
- $this->lang->doc->menuOrder = $this->lang->product->menuOrder;
- $this->product->setMenu($this->product->getPairs(), $objectID);
- $this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
- $this->lang->noMenuModule[] = 'doc';
+ $this->product->setMenu($lib->product);
}
elseif($this->from == 'project')
{
- $this->lang->navGroup->doc = 'project';
- $this->lang->doc->menu = $this->lang->project->menu;
- $this->lang->doc->menuOrder = $this->lang->project->menuOrder;
- if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
$this->project->setMenu($objectID);
}
else
@@ -921,7 +878,6 @@ class doc extends control
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->project));
- $this->lang->noMenuModule[] = 'doc';
$from = $this->app->openApp;
if($from == 'doc')
diff --git a/module/doc/model.php b/module/doc/model.php
index a8dd6940bf..06bed85813 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -1232,7 +1232,7 @@ class docModel extends model
*/
public function getLibsByObject($type, $objectID, $mode = '')
{
- if($type != 'product' and $type != 'execution') return false;
+ if($type != 'product' and $type != 'project' and $type != 'execution') return false;
$objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->orderBy('`order`, id')->fetchAll('id');
if($type == 'product')
@@ -1318,7 +1318,7 @@ class docModel extends model
*/
public function getLibFiles($type, $objectID, $orderBy, $pager = null)
{
- if($type != 'execution' and $type != 'product') return true;
+ if($type != 'execution' and $type != 'project' and $type != 'product') return true;
$this->loadModel('file');
$docs = $this->dao->select('*')->from(TABLE_DOC)->where($type)->eq($objectID)->fetchAll('id');
foreach($docs as $id => $doc)
@@ -1383,6 +1383,38 @@ class docModel extends model
->page($pager)
->fetchAll('id');
}
+ elseif($type == 'project')
+ {
+ $executionIdList = $this->loadModel('execution')->getIdList($objectID);
+ $taskPairs = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->in($executionIdList)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id');
+ $taskIdList = 0;
+ if(!empty($taskPairs))
+ {
+ $taskIdList = array_keys($taskPairs);
+ $taskIdList = implode(',', $taskIdList);
+ }
+
+ $buildPairs = $this->dao->select('id')->from(TABLE_BUILD)->where('execution')->in($executionIdList)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id');
+ $buildIdList = 0;
+ if(!empty($buildPairs))
+ {
+ $buildIdList = array_keys($buildPairs);
+ $buildIdList = implode(',', $buildIdList);
+ }
+
+ $executionIdList = join(',', $executionIdList);
+ $files = $this->dao->select('*')->from(TABLE_FILE)->alias('t1')
+ ->where('size')->gt('0')
+ ->andWhere("(objectType = 'execution' and objectID in ($executionIdList))", true)
+ ->orWhere("(objectType = 'doc' and objectID in ($docIdList))")
+ ->orWhere("(objectType = 'task' and objectID in ($taskIdList))")
+ ->orWhere("(objectType = 'build' and objectID in ($buildIdList))")
+ ->markRight(1)
+ ->beginIF($searchTitle)->andWhere('title')->like("%{$searchTitle}%")->fi()
+ ->orderBy($orderBy)
+ ->page($pager)
+ ->fetchAll('id');
+ }
elseif($type == 'execution')
{
$taskPairs = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id');
diff --git a/module/execution/control.php b/module/execution/control.php
index e43f4f30ef..27b367578b 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -104,7 +104,7 @@ class execution extends control
$actions = $this->loadModel('action')->getList('execution', $executionID);
/* Set menu. */
- $this->execution->setMenu($this->executions, $executionID, $buildID = 0, $extra);
+ $this->execution->setMenu($executionID, $buildID = 0, $extra);
/* Assign. */
$this->view->executions = $this->executions;
@@ -265,7 +265,6 @@ class execution extends control
*/
public function grouptask($executionID = 0, $groupBy = 'story', $filter = '')
{
- $this->showModuleMenu();
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -826,7 +825,6 @@ class execution extends control
*/
public function qa($executionID = 0)
{
- $this->showModuleMenu();
$this->commonAction($executionID);
$this->view->title = $this->lang->execution->qa;
$this->display();
@@ -848,8 +846,6 @@ class execution extends control
*/
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- $this->showModuleMenu();
-
/* Load these two models. */
$this->loadModel('bug');
$this->loadModel('user');
@@ -924,7 +920,6 @@ class execution extends control
{
$this->loadModel('testcase');
$this->loadModel('testtask');
- $this->showModuleMenu();
$this->commonAction($executionID);
$products = $this->execution->getProducts($executionID);
@@ -1024,8 +1019,6 @@ class execution extends control
*/
public function testtask($executionID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- $this->showModuleMenu();
-
$this->loadModel('testtask');
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
@@ -1148,9 +1141,6 @@ class execution extends control
*/
public function team($executionID = 0)
{
- $moduleIndex = array_search('execution', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1279,7 +1269,7 @@ class execution extends control
}
$executionID = key($this->executions);
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
$this->view->title = $this->lang->execution->create;
$this->view->position[] = $this->view->title;
@@ -1318,8 +1308,6 @@ class execution extends control
*/
public function edit($executionID, $action = 'edit', $extra = '')
{
- $this->showModuleMenu();
-
/* Load language files and get browseExecutionLink. */
$this->app->loadLang('program');
$this->app->loadLang('stage');
@@ -1358,7 +1346,7 @@ class execution extends control
}
/* Set menu. */
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
$executions = array('' => '') + $this->executions;
$execution = $this->execution->getById($executionID);
@@ -1477,7 +1465,7 @@ class execution extends control
die(js::locate($this->session->executionList, 'parent'));
}
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
$executionIDList = $this->post->executionIDList ? $this->post->executionIDList : die(js::locate($this->session->executionList, 'parent'));
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIDList)->fetchAll('id');
@@ -1712,8 +1700,6 @@ class execution extends control
*/
public function view($executionID)
{
- $this->showModuleMenu();
-
$execution = $this->execution->getById($executionID, true);
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
@@ -1730,7 +1716,7 @@ class execution extends control
}
/* Set menu. */
- $this->execution->setMenu($this->executions, $execution->id);
+ $this->execution->setMenu($execution->id);
$this->app->loadLang('bug');
list($dateList, $interval) = $this->execution->getDateList($execution->begin, $execution->end, 'noweekend', 0, 'Y-m-d');
@@ -1782,7 +1768,7 @@ class execution extends control
/* Compatibility IE8*/
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
$execution = $this->loadModel('execution')->getById($executionID);
$tasks = $this->execution->getKanbanTasks($executionID, "id");
$bugs = $this->loadModel('bug')->getExecutionBugs($executionID);
@@ -1826,11 +1812,10 @@ class execution extends control
*/
public function tree($executionID, $type = 'task')
{
- $this->showModuleMenu();
+ $this->execution->setMenu($executionID);
- $this->execution->setMenu($this->executions, $executionID);
$execution = $this->loadModel('execution')->getById($executionID);
- $tree = $this->execution->getTree($executionID);
+ $tree = $this->execution->getTree($executionID);
/* Save to session. */
$uri = $this->app->getURI(true);
@@ -1953,7 +1938,7 @@ class execution extends control
}
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
$execution = $this->execution->getById($executionID);
$this->view->position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name);
@@ -1977,7 +1962,7 @@ class execution extends control
/* Compatibility IE8*/
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
$execution = $this->loadModel('execution')->getById($executionID);
$stories = $this->loadModel('story')->getExecutionStories($executionID);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false);
@@ -2057,9 +2042,6 @@ class execution extends control
*/
public function manageProducts($executionID, $from = '')
{
- $moduleIndex = array_search('execution', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
@@ -2100,7 +2082,7 @@ class execution extends control
$execution = $this->execution->getById($executionID);
/* Set menu. */
- $this->execution->setMenu($this->executions, $execution->id);
+ $this->execution->setMenu($execution->id);
/* Title and position. */
$title = $this->lang->execution->manageProducts . $this->lang->colon . $execution->name;
@@ -2149,8 +2131,6 @@ class execution extends control
*/
public function manageMembers($executionID = 0, $team2Import = 0, $dept = 0)
{
- $this->showModuleMenu();
-
if(!empty($_POST))
{
$this->execution->manageMembers($executionID);
@@ -2181,7 +2161,7 @@ class execution extends control
$roles = $this->user->getUserRoles(array_keys($users));
/* Set menu. */
- $this->execution->setMenu($this->executions, $execution->id);
+ $this->execution->setMenu($execution->id);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["accounts[]"] = $this->config->user->moreLink;
$title = $this->lang->execution->manageMembers . $this->lang->colon . $execution->name;
@@ -2263,7 +2243,7 @@ class execution extends control
if($execution->type == 'project') $browseLink = $this->createLink('projectstory', 'story', "projectID=$executionID");
$this->session->set('storyList', $this->app->getURI(true), 'product'); // Save session.
- if($execution->type != 'execution') $this->execution->setMenu($this->executions, $execution->id); // Set menu.
+ if($execution->type != 'execution') $this->execution->setMenu($execution->id); // Set menu.
if(empty($products))
{
@@ -2451,7 +2431,7 @@ class execution extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Set the menu. If the executionID = 0, use the indexMenu instead. */
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
if($executionID == 0)
{
$this->executions = array('0' => $this->lang->execution->selectExecution) + $this->executions;
@@ -2724,14 +2704,11 @@ class execution extends control
*/
public function whitelist($executionID = 0, $module='execution', $objectType = 'sprint', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- $moduleIndex = array_search('execution', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
/* Set the menu. If the executionID = 0, use the indexMenu instead. */
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
echo $this->fetch('personnel', 'whitelist', "objectID=$executionID&module=$module&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
@@ -2746,13 +2723,11 @@ class execution extends control
*/
public function addWhitelist($executionID = 0, $deptID = 0)
{
- $this->showModuleMenu();
-
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
/* Set the menu. If the executionID = 0, use the indexMenu instead. */
- $this->execution->setMenu($this->executions, $executionID);
+ $this->execution->setMenu($executionID);
echo $this->fetch('personnel', 'addWhitelist', "objectID=$executionID&dept=$deptID&objectType=sprint&module=execution");
}
@@ -3025,16 +3000,4 @@ class execution extends control
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
-
- /**
- * Show module menu for some module.
- *
- * @access public
- * @return void
- */
- public function showModuleMenu()
- {
- $moduleIndex = array_search('execution', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- }
}
diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php
index 0916abc79d..29c07c7064 100644
--- a/module/execution/view/ajaxgetdropmenu.html.php
+++ b/module/execution/view/ajaxgetdropmenu.html.php
@@ -58,12 +58,4 @@ foreach($executions as $execution)
-
+
diff --git a/module/my/control.php b/module/my/control.php
index 642a2d3089..4892da56aa 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -86,9 +86,6 @@ class my extends control
*/
public function work($mode = 'task', $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- $moduleIndex = array_search('my', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
@@ -106,9 +103,6 @@ class my extends control
*/
public function contribute($mode = 'task', $type = 'openedBy', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- $moduleIndex = array_search('my', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
if(($mode == 'issue' or $mode == 'risk') and $type == 'openedBy') $type = 'createdBy';
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
diff --git a/module/personnel/control.php b/module/personnel/control.php
index dc4889630d..2cd479b6ed 100644
--- a/module/personnel/control.php
+++ b/module/personnel/control.php
@@ -107,12 +107,6 @@ class personnel extends control
$this->loadModel('project')->setMenu($objectID);
}
- if($module == 'product')
- {
- $moduleIndex = array_search('product', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- }
-
/* Load lang and set session. */
$this->app->loadLang('user');
$this->app->session->set('whitelistBrowse', $this->app->getURI(true));
diff --git a/module/product/control.php b/module/product/control.php
index 4cdcb4ce2b..82732f207b 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -450,9 +450,6 @@ class product extends control
$productID = $this->product->saveState($productID, $this->products);
$this->product->setMenu($productID);
- $moduleIndex = array_search('product', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
if($programID)
{
$this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
@@ -617,9 +614,6 @@ class product extends control
$product = $this->product->getStatByID($productID);
if(!$product) die(js::error($this->lang->notFound) . js::locate('back'));
- $moduleIndex = array_search('product', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
$this->product->setMenu($productID);
@@ -1000,9 +994,6 @@ class product extends control
/* The secondary test menu processing in the project. */
if(in_array($fromModule, array('qa', 'bug', 'testtask', 'testreport')))
{
- $moduleIndex = array_search('product', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
$menu = $this->lang->qa->menu->$activeMenu;
$menu['subModule'] = 'product';
$this->lang->qa->menu->$activeMenu = $menu;
@@ -1113,8 +1104,6 @@ class product extends control
public function addWhitelist($productID = 0, $deptID = 0, $branch = '')
{
$this->product->setMenu($productID, $branch);
- $moduleIndex = array_search('product', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->modulePageNav = '';
echo $this->fetch('personnel', 'addWhitelist', "objectID=$productID&dept=$deptID&objectType=product&module=product");
diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php
index fb30e60d18..6a5d10b94b 100644
--- a/module/product/view/ajaxgetdropmenu.html.php
+++ b/module/product/view/ajaxgetdropmenu.html.php
@@ -71,12 +71,4 @@ foreach($products as $product)
-
+
diff --git a/module/project/control.php b/module/project/control.php
index d66c9d8033..4b103ad87a 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -206,7 +206,6 @@ class project extends control
*/
public function browse($programID = 0, $browseType = 'doing', $param = 0, $orderBy = 'order_asc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
- $this->lang->noMenuModule[] = 'project';
if($this->session->moreProjectLink) $this->lang->project->mainMenuAction = html::a($this->session->moreProjectLink, ' ' . $this->lang->goback, '', "class='btn btn-link'");
$this->app->session->set('projectBrowse', $this->app->getURI(true));
$this->loadModel('datatable');
@@ -294,8 +293,6 @@ class project extends control
if($programID) $this->program->setMenu($programID);
- $this->lang->noMenuModule[] = 'project';
-
$name = '';
$code = '';
$team = '';
@@ -493,8 +490,6 @@ class project extends control
{
$this->project->setMenu($projectID);
$this->app->loadLang('bug');
- $moduleIndex = array_search('project', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->app->session->set('projectBrowse', $this->app->getURI(true));
@@ -538,9 +533,6 @@ class project extends control
{
$this->project->setMenu($projectID);
- $moduleIndex = array_search('project', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
$title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->browse;
$position[] = $this->lang->group->browse;
@@ -914,11 +906,6 @@ class project extends control
*/
public function manageView($groupID, $projectID, $programID)
{
- $this->lang->navGroup->project = 'project';
- $this->lang->project->menu = $this->lang->scrum->setMenu;
- $moduleIndex = array_search('project', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
if($_POST)
{
$this->group->updateView($groupID);
@@ -952,11 +939,6 @@ class project extends control
*/
public function managePriv($type = 'byGroup', $param = 0, $menu = '', $version = '')
{
- $this->lang->navGroup->project = 'project';
- $this->lang->project->menu = $this->lang->scrum->setMenu;
- $moduleIndex = array_search('project', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
if($type == 'byGroup')
{
$groupID = $param;
@@ -1024,9 +1006,6 @@ class project extends control
{
$this->project->setMenu($projectID);
- $moduleIndex = array_search('project', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
if(!empty($_POST))
{
$this->execution->manageMembers($projectID);
@@ -1386,13 +1365,7 @@ class project extends control
*/
public function whitelist($projectID = 0, $module = 'project', $from = 'project', $objectType = 'project', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- if($from == 'project')
- {
- $this->project->setMenu($projectID);
-
- $moduleIndex = array_search('project', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- }
+ if($from == 'project') $this->project->setMenu($projectID);
echo $this->fetch('personnel', 'whitelist', "objectID=$projectID&module=$module&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&from=$from");
}
diff --git a/module/project/view/ajaxgetdropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php
index 9336ed065a..195acc662a 100644
--- a/module/project/view/ajaxgetdropmenu.html.php
+++ b/module/project/view/ajaxgetdropmenu.html.php
@@ -59,12 +59,4 @@ foreach($projects as $project)
-
+
diff --git a/module/qa/control.php b/module/qa/control.php
index e114447fe1..d5263fac9b 100644
--- a/module/qa/control.php
+++ b/module/qa/control.php
@@ -19,8 +19,6 @@ class qa extends control
*/
public function index($locate = 'auto', $productID = 0, $projectID = 0)
{
- if($this->app->openApp == 'qa') $this->lang->noMenuModule[] = 'qa';
-
$products = $this->loadModel('product')->getProductPairsByProject($projectID, 'noclosed');
if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=qa&moduleGroup=' . $this->lang->navGroup->qa . '&activeMenu=index')));
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
diff --git a/module/repo/control.php b/module/repo/control.php
index c291621f40..2c7d4943c3 100644
--- a/module/repo/control.php
+++ b/module/repo/control.php
@@ -51,7 +51,7 @@ class repo extends control
}
else if($openApp == 'execution')
{
- $this->execution->setMenu($objectID);
+ $this->loadModel('execution')->setMenu($objectID);
}
else
{
@@ -115,7 +115,6 @@ class repo extends control
$this->commonAction($objectID);
- array_push($this->lang->noMenuModule, 'repo');
$this->app->loadLang('action');
$this->repo->setMenu($this->repos, '', false);
@@ -758,7 +757,6 @@ class repo extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('setRules')));
}
- array_push($this->lang->noMenuModule, 'repo');
$this->repo->setMenu($this->repos, $this->session->repoID, false);
$this->app->loadLang('task');
diff --git a/module/report/control.php b/module/report/control.php
index 9ff3af112e..32ac76ae64 100644
--- a/module/report/control.php
+++ b/module/report/control.php
@@ -32,12 +32,6 @@ class report extends control
/* Set report menu group. */
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
if(!$this->projectID) $this->lang->navGroup->report = 'report';
- if($this->lang->navGroup->report == 'project' && isset($this->config->maxVersion))
- {
- $index = array_search('report', $this->lang->noMenuModule);
- unset($this->lang->noMenuModule[$index]);
- $this->lang->report->menu = $this->lang->report->projectMenu;
- }
if((isset($this->config->proVersion) || isset($this->config->bizVersion)) && $this->lang->navGroup->report == 'report' && common::hasPriv('report', 'custom')) $this->lang->report->mainMenuAction = html::a(helper::createLink('report', 'custom'), $this->lang->crystal->custom, '', "class='btn btn-link'");
}
diff --git a/module/story/config.php b/module/story/config.php
index 6641fd9f73..5a431255fd 100644
--- a/module/story/config.php
+++ b/module/story/config.php
@@ -92,22 +92,22 @@ $config->story->datatable->fieldList['sourceNote']['required'] = 'no';
$config->story->datatable->fieldList['status']['title'] = 'statusAB';
$config->story->datatable->fieldList['status']['fixed'] = 'no';
-$config->story->datatable->fieldList['status']['width'] = '80';
+$config->story->datatable->fieldList['status']['width'] = '60';
$config->story->datatable->fieldList['status']['required'] = 'no';
$config->story->datatable->fieldList['estimate']['title'] = 'estimateAB';
$config->story->datatable->fieldList['estimate']['fixed'] = 'no';
-$config->story->datatable->fieldList['estimate']['width'] = '80';
+$config->story->datatable->fieldList['estimate']['width'] = '50';
$config->story->datatable->fieldList['estimate']['required'] = 'no';
$config->story->datatable->fieldList['stage']['title'] = 'stageAB';
$config->story->datatable->fieldList['stage']['fixed'] = 'no';
-$config->story->datatable->fieldList['stage']['width'] = '95';
+$config->story->datatable->fieldList['stage']['width'] = '60';
$config->story->datatable->fieldList['stage']['required'] = 'no';
$config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->story->datatable->fieldList['openedBy']['fixed'] = 'no';
-$config->story->datatable->fieldList['openedBy']['width'] = '70';
+$config->story->datatable->fieldList['openedBy']['width'] = '60';
$config->story->datatable->fieldList['openedBy']['required'] = 'no';
$config->story->datatable->fieldList['openedDate']['title'] = 'openedDate';
@@ -117,7 +117,7 @@ $config->story->datatable->fieldList['openedDate']['required'] = 'no';
$config->story->datatable->fieldList['assignedTo']['title'] = 'assignedToAB';
$config->story->datatable->fieldList['assignedTo']['fixed'] = 'no';
-$config->story->datatable->fieldList['assignedTo']['width'] = '100';
+$config->story->datatable->fieldList['assignedTo']['width'] = '85';
$config->story->datatable->fieldList['assignedTo']['required'] = 'no';
$config->story->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
diff --git a/module/story/control.php b/module/story/control.php
index 9180c37940..c284afe3cc 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -648,14 +648,7 @@ class story extends control
elseif($executionID)
{
/* The stories of a execution. */
- $this->lang->navGroup->story = 'execution';
- $moduleIndex = array_search('story', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- $this->lang->story->menu = $this->lang->execution->menu;
-
- $this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
- $this->lang->story->menuOrder = $this->lang->execution->menuOrder;
-
+ $this->execution->setMenu($executionID);
$execution = $this->execution->getByID($executionID);
$branchProduct = false;
@@ -1464,10 +1457,6 @@ class story extends control
$this->session->set('productList', $this->app->getURI(true));
$products = $this->product->getPairs();
- $this->lang->navGroup->story = $from;
- $moduleIndex = array_search('story', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
-
if($from == 'qa')
{
$this->loadModel('qa');
diff --git a/module/task/control.php b/module/task/control.php
index ba6002bb72..347fb8ec83 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -476,9 +476,6 @@ class task extends control
{
/* Set my menu. */
$this->loadModel('my')->setMenu();
- $moduleIndex = array_search('task', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- $this->lang->task->menu = $this->lang->my->menu->work;
$this->lang->my->menu->work['subModule'] = 'task';
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
diff --git a/module/testcase/control.php b/module/testcase/control.php
index f111ea4708..0ff174ff08 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -46,7 +46,6 @@ class testcase extends control
{
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
- //$this->lang->noMenuModule[] = $this->app->rawModule;
}
elseif($this->app->openApp == 'project')
{
diff --git a/module/testtask/control.php b/module/testtask/control.php
index c9cc1f1e17..48e1b4b17a 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -43,17 +43,6 @@ class testtask extends control
{
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
- //$this->lang->noMenuModule[] = $this->app->rawModule;
- }
- elseif($this->app->openApp == 'project')
- {
- $this->lang->testcase->menu = $this->lang->projectQa->menu;
- $this->lang->testcase->subMenu = $this->lang->projectQa->subMenu;
- }
- elseif($this->app->openApp == 'execution')
- {
- $this->lang->testcase->menu = $this->lang->execution->qaMenu;
- $this->lang->testcase->subMenu = '';
}
$this->loadModel('product');
@@ -190,12 +179,26 @@ class testtask extends control
{
if(!empty($_POST))
{
- $taskID = $this->testtask->create();
+ $taskID = $this->testtask->create($projectID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('testtask', $taskID, 'opened');
$this->executeHooks($taskID);
- $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', "productID=$productID")));
+ $task = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch();
+ if($this->app->openApp == 'project') $link = $this->createLink('project', 'testtask', "projectID=$task->project");
+ if($this->app->openApp == 'execution') $link = $this->createLink('execution', 'testtask', "executionID=$task->execution");
+ if($this->app->openApp == 'qa') $link = $this->createLink('testtask', 'browse', "productID=$productID");
+ $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
+ }
+
+ /* Set menu. */
+ if($this->app->openApp == 'project')
+ {
+ $this->loadModel('project')->setMenu($projectID);
+ }
+ elseif($this->app->openApp == 'execution')
+ {
+ $this->loadModel('execution')->setMenu($executionID);
}
/* Create testtask from testtask of test.*/
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 386d346ee7..8875d430cc 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -16,15 +16,15 @@ class testtaskModel extends model
/**
* Create a test task.
*
- * @param int $productID
+ * @param int $projectID
* @access public
* @return void
*/
- function create()
+ function create($projectID)
{
$task = fixer::input('post')
->setDefault('build', '')
- ->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa', 'project', $this->session->project)
+ ->setIF($this->config->systemMode == 'new' and $this->app->openApp != 'qa', 'project', $projectID)
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('uid,contactListMenu')
diff --git a/module/tree/control.php b/module/tree/control.php
index 88053436c4..8892b6a224 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -77,15 +77,9 @@ class tree extends control
if($viewType == 'story')
{
/* Set menu.*/
- $moduleIndex = array_search('tree', $this->lang->noMenuModule);
- if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($rootID, 'story');
-
$products = $this->product->getPairs();
-
$this->product->saveState($rootID, $products);
- $this->product->setMenu($products, $rootID, $branch, 'story', '', 'story');
- $this->lang->tree->menu = $this->lang->product->setMenu;
+ $this->product->setMenu($rootID);
unset($products[$rootID]);
$currentProduct = key($products);
@@ -110,8 +104,6 @@ class tree extends control
}
elseif($from == 'qa')
{
- $this->lang->noMenuModule[] = 'tree';
- $this->lang->navGroup->tree = 'qa';
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
$productPairs = $this->product->getPairs();
@@ -127,9 +119,6 @@ class tree extends control
}
elseif($viewType == 'feedback')
{
- $this->lang->navGroup->tree = 'feedback';
- $this->lang->noMenuModule[] = 'tree';
-
$this->app->loadLang('feedback');
$this->lang->tree->menu = $this->lang->feedback->menu;
$root = new stdclass();
@@ -151,7 +140,6 @@ class tree extends control
}
elseif($from == 'qa')
{
- $this->lang->noMenuModule[] = 'tree';
$this->lang->navGroup->tree = 'qa';
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
@@ -175,7 +163,6 @@ class tree extends control
}
elseif($from == 'qa')
{
- $this->lang->noMenuModule[] = 'tree';
$this->lang->navGroup->tree = 'qa';
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
@@ -196,14 +183,11 @@ class tree extends control
if($from == 'product')
{
$productID = $lib->product;
- $this->lang->noMenuModule[] = 'tree';
unset($this->lang->product->menu->set['subModule']);
- $this->lang->navGroup->tree = 'product';
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, 'story');
$products = $this->product->getPairs();
$this->product->saveState($productID, $products);
- $this->product->setMenu($products, $productID, $branch);
+ $this->product->setMenu($productID, $branch);
}
elseif($from == 'project')
{
diff --git a/module/user/control.php b/module/user/control.php
index bcea641fd0..0416260a85 100644
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -79,9 +79,6 @@ class user extends control
$date = (int)$type == 0 ? helper::today() : $type;
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
/* set menus. */
$this->view->userList = $this->user->setUserList($users, $userID);
@@ -124,11 +121,6 @@ class user extends control
$account = $user->account;
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
- /* Set menu. */
-
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
/* Modify story title. */
$this->loadModel('story');
if($storyType == 'requirement') $this->lang->story->title = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->title);
@@ -175,9 +167,6 @@ class user extends control
/* Set the menu. */
$this->view->userList = $this->user->setUserList($users, $userID);
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
/* Assign. */
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task;
$this->view->position[] = $this->lang->user->task;
@@ -222,9 +211,6 @@ class user extends control
/* Load the lang of bug module. */
$this->app->loadLang('bug');
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->bug;
$this->view->position[] = $this->lang->user->bug;
$this->view->tabID = 'bug';
@@ -270,9 +256,6 @@ class user extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->testTask;
$this->view->position[] = $this->lang->user->testTask;
$this->view->tasks = $this->loadModel('testtask')->getByUser($account, $pager, $sort);
@@ -315,11 +298,6 @@ class user extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
- /* Set menu. */
-
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$cases = array();
if($type == 'case2Him')
{
@@ -376,9 +354,6 @@ class user extends control
$this->loadModel('project');
$this->view->userList = $this->user->setUserList($users, $userID);
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->execution;
$this->view->position[] = $this->lang->user->execution;
$this->view->tabID = 'project';
@@ -418,9 +393,6 @@ class user extends control
/* Set the menus. */
$this->view->userList = $this->user->setUserList($users, $userID);
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->issue;
$this->view->position[] = $this->lang->user->issue;
$this->view->issues = $this->loadModel('issue')->getUserIssues($type, $account, $orderBy, $pager);
@@ -461,9 +433,6 @@ class user extends control
/* Set the menus. */
$this->view->userList = $this->user->setUserList($users, $userID);
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->risk;
$this->view->position[] = $this->lang->user->risk;
$this->view->risks = $this->loadModel('risk')->getUserRisks($type, $account, $orderBy, $pager);
@@ -490,9 +459,6 @@ class user extends control
$account = $user->account;
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$this->view->title = "USER #$user->id $user->account/" . $this->lang->user->profile;
$this->view->position[] = $this->lang->user->common;
$this->view->position[] = $this->lang->user->profile;
@@ -1116,9 +1082,6 @@ class user extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
$date = empty($date) ? '' : date('Y-m-d', $date);
- /* Change the menu when in my module. */
- $this->user->resetMenu();
-
$actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', $date, $direction);
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic;
diff --git a/module/user/model.php b/module/user/model.php
index a2fe00432c..f815e0033e 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -2459,16 +2459,4 @@ class userModel extends model
return $personalData;
}
-
- /**
- * Reset menu when from my module.
- *
- * @access public
- * @return void
- */
- public function resetMenu()
- {
- $this->lang->navGroup->user = 'system';
- $this->lang->noMenuModule[] = 'user';
- }
}
diff --git a/www/js/my.full.js b/www/js/my.full.js
index 5f7d5586ea..239cb04c0b 100644
--- a/www/js/my.full.js
+++ b/www/js/my.full.js
@@ -832,6 +832,22 @@ function adjustMenuWidth()
}
}
+/**
+ * Scroll to selected item in drop menu.
+ *
+ * @access public
+ * @return void
+ */
+function scrollToSelected()
+{
+ $('#dropMenu .table-row .list-group').mouseout(function(){$(this).find('.active').removeClass('active')});
+ if($('#dropMenu .table-row .col-left .list-group .selected').length > 0)
+ {
+ var offsetHeight = 75;
+ $('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - offsetHeight);
+ }
+}
+
/* Ping the server every some minutes to keep the session. */
needPing = true;