diff --git a/framework/router.class.php b/framework/router.class.php index c2f8aad0cf..aee3096281 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -193,7 +193,7 @@ class router extends baseRouter /* Record system mode. */ $config->systemMode = $mode; - if($config->systemMode == 'old') $this->config->executionCommonList = $this->config->projectCommonList; + if($config->systemMode == 'classic') $this->config->executionCommonList = $this->config->projectCommonList; /* Record hour unit. */ $config->hourUnit = 'H'; diff --git a/module/action/model.php b/module/action/model.php index 7ddda01bbc..6c85085eee 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -208,7 +208,7 @@ class actionModel extends model */ public function getList($objectType, $objectID) { - if($this->config->systemMode == 'old' and $objectType == 'execution') $objectType = 'project'; + if($this->config->systemMode == 'classic' and $objectType == 'execution') $objectType = 'project'; $commiters = $this->loadModel('user')->getCommiters(); $actions = $this->dao->select('*')->from(TABLE_ACTION) ->beginIF($objectType == 'project') diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 9a0b88ed45..ee65172ed6 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -966,7 +966,7 @@ $lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|'); $lang->nc->menu = $lang->auditplan->menu; $lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', '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'); -if($config->systemMode == 'old') +if($config->systemMode == 'classic') { $lang->noMenuModule[] = 'project'; $lang->noMenuModule[] = 'task'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 0c6ec83792..956e4eb4f1 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -966,7 +966,7 @@ $lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|'); $lang->nc->menu = $lang->auditplan->menu; $lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', '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'); -if($config->systemMode == 'old') +if($config->systemMode == 'classic') { $lang->noMenuModule[] = 'project'; $lang->noMenuModule[] = 'task'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 137c574c11..cd995d8b05 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -966,7 +966,7 @@ $lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|'); $lang->nc->menu = $lang->auditplan->menu; $lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', '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'); -if($config->systemMode == 'old') +if($config->systemMode == 'classic') { $lang->noMenuModule[] = 'project'; $lang->noMenuModule[] = 'task'; diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index f5187e2250..540b659fc1 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -965,7 +965,7 @@ $lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|'); $lang->nc->menu = $lang->auditplan->menu; $lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', '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'); -if($config->systemMode == 'old') +if($config->systemMode == 'classic') { $lang->noMenuModule[] = 'project'; $lang->noMenuModule[] = 'task'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 64d63f0af3..9d06c692f0 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -964,7 +964,7 @@ $lang->stakeholder->menu->issue = array('link' => '问题管理|stakeholder|issu $lang->nc->menu = $lang->auditplan->menu; $lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', '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'); -if($config->systemMode == 'old') +if($config->systemMode == 'classic') { $lang->noMenuModule[] = 'project'; $lang->noMenuModule[] = 'task'; diff --git a/module/common/model.php b/module/common/model.php index 58e3654100..fb9d4e769d 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1169,7 +1169,7 @@ EOD; if(strtolower($module) == 'story' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create'); if(strtolower($module) == 'bug' and strtolower($method) == 'tostory') ($module = 'story') and ($method = 'create'); if(strtolower($module) == 'bug' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create'); - if($config->systemMode == 'old' and strtolower($module) == 'program' and strpos($method, 'PRJ') === 0) ($module = 'project') and ($method = substr(strtolower($method), 3)); + if($config->systemMode == 'classic' and strtolower($module) == 'program' and strpos($method, 'PRJ') === 0) ($module = 'project') and ($method = substr(strtolower($method), 3)); if(!commonModel::hasPriv($module, $method, $object)) return false; $link = helper::createLink($module, $method, $vars, '', $onlyBody, $programID); diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 768502fb3e..4f5b210944 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -24,7 +24,7 @@ $isQa = $rawModule == 'qa'; config->systemMode == 'new'):?> program->switcherMenu) ? $lang->program->switcherMenu : '';?> loadModel('program')->getPRJSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?> - config->systemMode == 'old'):?> + config->systemMode == 'classic'):?> project->switcherMenu) ? $lang->project->switcherMenu : '';;?> diff --git a/module/custom/control.php b/module/custom/control.php index e9507c383e..9ad1379ab2 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -553,7 +553,7 @@ class custom extends control if($mode == 'new') die(js::locate($this->createLink('upgrade', 'mergeTips'), 'parent')); } - $mode = zget($this->config->global, 'mode', 'old'); + $mode = zget($this->config->global, 'mode', 'classic'); if($mode == 'new') { if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') $this->locate($this->createLink('upgrade', 'mergeProgram')); diff --git a/module/custom/view/header.html.php b/module/custom/view/header.html.php index 0b7a3e3da2..b15c85b196 100644 --- a/module/custom/view/header.html.php +++ b/module/custom/view/header.html.php @@ -12,7 +12,7 @@ { common::printLink('custom', $sysObject, "", "{$lang->custom->$sysObject}", '', "class='btn btn-link' id='{$sysObject}Tab'"); } - if((isset($config->systemMode) and $config->systemMode == 'old') || (isset($config->global->upgradeStep) and $config->global->upgradeStep == 'mergeProgram')) + if((isset($config->systemMode) and $config->systemMode == 'classic') || (isset($config->global->upgradeStep) and $config->global->upgradeStep == 'mergeProgram')) { common::printLink('custom', 'mode', "", "{$lang->custom->mode}", '', "class='btn btn-link' id='modeTab'"); } diff --git a/module/doc/control.php b/module/doc/control.php index 78c93a92d5..d8ce9663f7 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -125,7 +125,7 @@ class doc extends control $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 == 'old') $this->lang->noMenuModule[] = 'doc'; + if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; $this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $lib->project); $this->lang->set('menugroup.doc', 'project'); } @@ -362,7 +362,7 @@ class doc extends control $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 == 'old') $this->lang->noMenuModule[] = 'doc'; + if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; $this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $lib->project); $this->lang->set('menugroup.doc', 'project'); @@ -449,7 +449,7 @@ class doc extends control $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 == 'old') $this->lang->noMenuModule[] = 'doc'; + if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; $this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID); $this->lang->set('menugroup.doc', 'project'); } @@ -515,7 +515,7 @@ class doc extends control $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 == 'old') $this->lang->noMenuModule[] = 'doc'; + if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; $this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID); $this->lang->set('menugroup.doc', 'project'); } @@ -845,7 +845,7 @@ class doc extends control $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 == 'old') $this->lang->noMenuModule[] = 'doc'; + if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; $this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID); $this->lang->set('menugroup.doc', 'project'); } @@ -945,7 +945,7 @@ class doc extends control $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 == 'old') $this->lang->noMenuModule[] = 'doc'; + if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc'; $this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID); $this->lang->set('menugroup.doc', 'project'); } diff --git a/module/group/control.php b/module/group/control.php index b37da3bf52..3059ff31cc 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -183,7 +183,7 @@ class group extends control $group = $this->group->getById($groupID); $groupPrivs = $this->group->getPrivs($groupID); - if($this->config->systemMode == 'old') + if($this->config->systemMode == 'classic') { if(isset($groupPrivs['program']['prjbrowse'])) { diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 5f1d26ec44..05c1a62f35 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -570,10 +570,10 @@ $lang->resource->project->storySort = 'storySort'; $lang->resource->project->whitelist = 'whitelist'; $lang->resource->project->addWhitelist = 'addWhitelist'; $lang->resource->project->unbindWhielist = 'unbindWhielist'; -if($config->systemMode == 'old') $lang->resource->project->list = 'list'; +if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; $lang->project->methodOrder[0] = 'index'; -if($config->systemMode == 'old') $lang->project->methodOrder[1] = 'list'; +if($config->systemMode == 'classic') $lang->project->methodOrder[1] = 'list'; $lang->project->methodOrder[5] = 'view'; $lang->project->methodOrder[10] = 'browse'; $lang->project->methodOrder[15] = 'create'; diff --git a/module/group/model.php b/module/group/model.php index 2c2f8a130b..5bcfbfacb3 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -332,7 +332,7 @@ class groupModel extends model } } - if($this->config->systemMode == 'old') + if($this->config->systemMode == 'classic') { $prjBrowse = $this->dao->select('module')->from(TABLE_GROUPPRIV) ->where('module')->eq('program') diff --git a/module/product/control.php b/module/product/control.php index 55497a9450..f370edb422 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -470,7 +470,7 @@ class product extends control $lines = array(); if($product->program) $lines = array('') + $this->product->getLinePairs($product->program); - if($this->config->systemMode == 'old') $lines = array('') + $this->product->getLinePairs(); + if($this->config->systemMode == 'classic') $lines = array('') + $this->product->getLinePairs(); $this->view->title = $this->lang->product->edit . $this->lang->colon . $product->name; $this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name); diff --git a/module/program/model.php b/module/program/model.php index 89c3d0d513..452c1f3fe1 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -926,7 +926,8 @@ class programModel extends model ->beginIF($this->config->systemMode == 'new')->andWhere('type')->eq('project')->fi() ->beginIF($browseType != 'all')->andWhere('status')->eq($browseType)->fi() ->beginIF($path)->andWhere('path')->like($path . '%')->fi() - ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() + ->beginIF(!$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('id')->in($this->app->user->view->projects)->fi() + ->beginIF(!$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('id')->in($this->app->user->view->sprints)->fi() ->beginIF($this->cookie->PRJMine or $PRJMine) ->andWhere('openedBy', true)->eq($this->app->user->account) ->orWhere('PM')->eq($this->app->user->account) diff --git a/module/project/control.php b/module/project/control.php index 5e05525523..a30509981f 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -42,7 +42,7 @@ class project extends control $this->projects = $this->project->getExecutionPairs($this->session->PRJ, 'all', 'nocode'); if(!$this->projects and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('project', 'create')); } - $this->objectType = $this->config->systemMode == 'old' ? 'project' : 'exection'; + $this->objectType = $this->config->systemMode == 'classic' ? 'project' : 'exection'; } /** diff --git a/module/project/model.php b/module/project/model.php index d74152fead..aab344d461 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -203,7 +203,7 @@ class projectModel extends model $currentProjectName = ''; if(isset($currentProject->name)) $currentProjectName = $currentProject->name; - if($this->config->systemMode == 'old') + if($this->config->systemMode == 'classic') { $this->session->set('moreProjectLink', $this->app->getURI(true)); $output = "
- config->systemMode == 'old' or $project->grade == 1):?> + config->systemMode == 'classic' or $project->grade == 1):?>
project->unlinkedProducts;?>
diff --git a/module/task/control.php b/module/task/control.php index 2161dc0b99..b0bd27fb45 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -206,7 +206,7 @@ class task extends control $this->view->title = $title; $this->view->position = $position; $this->view->project = $project; - $this->view->projects = $this->config->systemMode == 'old' ? $projects : $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true); + $this->view->projects = $this->config->systemMode == 'classic' ? $projects : $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true); $this->view->task = $task; $this->view->users = $users; $this->view->stories = $stories; @@ -392,7 +392,7 @@ class task extends control $this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}"); $this->view->showAllModule = isset($this->config->project->task->allModule) ? $this->config->project->task->allModule : ''; $this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->project, 0, 0, $this->view->showAllModule ? 'allModule' : ''); - $this->view->projects = $this->config->systemMode == 'old' ? $this->project->getExecutionPairs() : $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true); + $this->view->projects = $this->config->systemMode == 'classic' ? $this->project->getExecutionPairs() : $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true); $this->display(); } diff --git a/module/testtask/control.php b/module/testtask/control.php index 2b0b5ae9cb..264757b558 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1217,10 +1217,10 @@ class testtask extends control } /** - * Ajax get test tasks - * - * @param int $productID - * @param int $projectID + * Ajax get test tasks. + * + * @param int $productID + * @param int $projectID * @access public * @return void */ diff --git a/module/tree/js/browse.js b/module/tree/js/browse.js index 5738cfee20..2661c9b8ab 100644 --- a/module/tree/js/browse.js +++ b/module/tree/js/browse.js @@ -63,15 +63,13 @@ function syncProductOrProject(obj, type) $('#copyModule').bind('click', function(){syncModule(obj.value, viewType)}); } -function toggleCopy() +function toggleCopy(toggle) { - var $copy = $('.table-row.copy'); - if($copy.size() == 0) return false; - $copy.toggle(); + $('.table-row.copy').toggle(toggle); } $(document).ready(function() { - toggleCopy(); + toggleCopy(false); $('[data-id="edit"] a').modalTrigger({type: 'iframe', width: 500}); }); diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 7746f937ea..d69ea8c7b3 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -104,7 +104,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;}
-
+