diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 2ef8dc081e..e0fc22d820 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -213,16 +213,19 @@ $lang->scrum->menu->settings['subMenu']->whitelist = array('link' => "{$lang-> $lang->scrum->menu->settings['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|project=%s", 'subModule' => 'stakeholder'); $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->priv}|project|group|project=%s", 'alias' => 'group,manageview,managepriv'); +$lang->scrum->menu->devops['subMenu'] = new stdclass(); + /* Waterfall menu. */ $lang->waterfall->menu = new stdclass(); $lang->waterfall->menu->index = array('link' => "$lang->dashboard|project|index|project=%s"); $lang->waterfall->menu->programplan = array('link' => "{$lang->productplan->shortCommon}|programplan|browse|project=%s", 'subModule' => 'programplan'); $lang->waterfall->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=project&objectID=%s"); $lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s", 'subModule' => 'projectstory'); -$lang->waterfall->menu->design = array('link' => "$lang->design|design|browse|product=%s"); -$lang->waterfall->menu->repo = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo'); -$lang->waterfall->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase'); -$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse", 'subModule' => 'projectrelease'); +$lang->waterfall->menu->design = array('link' => "$lang->design|design|browse|project=%s"); +$lang->waterfall->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo'); +$lang->waterfall->menu->track = array('link' => "$lang->track|projectstory|track", 'alias' => 'track'); +$lang->waterfall->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase'); +$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease'); $lang->waterfall->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s"); $lang->waterfall->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s"); $lang->waterfall->menu->other = array('link' => "$lang->other|workestimation|index|project=%s", 'class' => 'dropdown dropdown-hover'); @@ -256,8 +259,8 @@ $lang->waterfall->menu->other['dropMenu'] = new stdclass(); $lang->waterfall->menu->other['dropMenu']->estimation = array('link' => "$lang->estimation|workestimation|index|projectID=%s", 'subModule' => 'workestimation,durationestimation,budget'); $lang->waterfall->menu->other['dropMenu']->issue = array('link' => "$lang->issue|issue|browse|projectID=%s", 'subModule' => 'issue'); $lang->waterfall->menu->other['dropMenu']->risk = array('link' => "$lang->risk|risk|browse|projectID=%s", 'subModule' => 'risk'); -$lang->waterfall->menu->other['dropMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|projectID=%s", 'subModule' => 'stakeholder'); +$lang->waterfall->menu->devops = $lang->scrum->menu->devops; $lang->waterfall->menu->settings = $lang->scrum->menu->settings; /* Execution menu. */ @@ -272,7 +275,7 @@ $lang->execution->menu->burn = array('link' => "$lang->burn|execution|burn|e $lang->execution->menu->view = array('link' => "$lang->view|execution|grouptask|executionID=%s", 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover'); $lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'batchcreate,linkstory,storykanban'); $lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|qa|executionID=%s", 'subModule' => 'bug,testcase,testtask,testreport', 'alias' => 'qa,bug,testcase,testtask,testreport'); -$lang->execution->menu->repo = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo'); +$lang->execution->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo'); $lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=execution&objectID=%s", 'subModule' => 'doc'); $lang->execution->menu->build = array('link' => "{$lang->build->common}|execution|build|executionID=%s", 'subModule' => 'build'); $lang->execution->menu->action = array('link' => "$lang->dynamic|execution|dynamic|executionID=%s"); @@ -297,6 +300,8 @@ $lang->execution->menu->view['subMenu'] = new stdclass(); $lang->execution->menu->view['subMenu']->groupTask = "$lang->groupView|execution|grouptask|executionID=%s"; $lang->execution->menu->view['subMenu']->tree = "$lang->treeView|execution|tree|executionID=%s"; +$lang->execution->menu->devops['subMenu'] = new stdclass(); + $lang->execution->menu->qa['subMenu'] = new stdclass(); $lang->execution->menu->qa['subMenu']->qa = array('link' => "$lang->dashboard|execution|qa|executionID=%s"); $lang->execution->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|execution|bug|executionID=%s", 'subModule' => 'bug'); @@ -344,8 +349,8 @@ $lang->qa->menu->testtask['subMenu'] = new stdclass(); $lang->qa->menu->testtask['subMenu']->testtask = array('link' => "{$lang->testtask->common}|testtask|browse|productID=%s", 'subModule' => 'testtask', 'alias' => 'linkcase,cases,start,close,batchrun,groupcase,report,importunitresult'); $lang->qa->menu->testtask['subMenu']->report = array('link' => "{$lang->testreport->common}|testreport|browse|productID=%s", 'subModule' => 'testreport'); -$lang->qa->menu->automation['subMenu'] = new stdclass(); -$lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => ''); +// $lang->qa->menu->automation['subMenu'] = new stdclass(); +// $lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => ''); // $lang->qa->menu->automation['subMenu']->framework = array('link' => '框架|automation|framework|productID=%s', 'alias' => ''); // $lang->qa->menu->automation['subMenu']->data = array('link' => '数据|automation|date|productID=%s', 'alias' => ''); // $lang->qa->menu->automation['subMenu']->interface = array('link' => '接口|automation|interface|productID=%s', 'alias' => ''); @@ -365,6 +370,8 @@ $lang->devops->menuOrder[15] = 'jenkins'; $lang->devops->menuOrder[20] = 'maintain'; $lang->devops->menuOrder[25] = 'rules'; +$lang->devops->menu->code['subMenu'] = new stdclass(); + /* Doc menu.*/ $lang->doc->menu = new stdclass(); $lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|recent"); diff --git a/module/common/model.php b/module/common/model.php index 715cc27603..a66c61bdf3 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -539,7 +539,7 @@ class commonModel extends model if(!$openApp) return; $icon = zget($lang->navIcons, $openApp, ''); - + if(!in_array($openApp, array('program', 'product', 'project'))) { $nav = $lang->mainNav->$openApp; @@ -1300,13 +1300,16 @@ EOD; global $lang, $app; if(isonlybody()) return false; + $moduleName = ($app->getModuleName() == 'story' and $app->openApp == 'project') ? 'projectstory' : $app->getModuleName(); echo "'; @@ -1486,7 +1490,8 @@ EOD; $id = $object->$key; $objectList[$id] = $object; } - $this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList)); + + $this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList), $this->app->openApp); $existsObjectList = $this->session->$objectIdListKey; } @@ -1545,8 +1550,8 @@ EOD; $queryCondition = trim($queryCondition); if(empty($queryCondition)) $queryCondition = "1=1"; - $this->session->set($objectType . 'QueryCondition', $queryCondition); - $this->session->set($objectType . 'OnlyCondition', $onlyCondition); + $this->session->set($objectType . 'QueryCondition', $queryCondition, $this->app->openApp); + $this->session->set($objectType . 'OnlyCondition', $onlyCondition, $this->app->openApp); /* Set the query condition session. */ $orderBy = explode(' ORDER BY ', $sql); @@ -1557,8 +1562,8 @@ EOD; $orderBy = $orderBy[0]; if($onlyCondition) $orderBy = str_replace('t1.', '', $orderBy); } - $this->session->set($objectType . 'OrderBy', $orderBy); - $this->session->set($objectType . 'BrowseList', array()); + $this->session->set($objectType . 'OrderBy', $orderBy, $this->app->openApp); + $this->session->set($objectType . 'BrowseList', array(), $this->app->openApp); } /** diff --git a/module/execution/control.php b/module/execution/control.php index 3a06f25f7c..5d3bb71392 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -186,9 +186,7 @@ class execution extends control /* Save to session. */ $uri = $this->app->getURI(true); - $this->app->session->set('taskList', $uri, 'execution'); - $this->app->session->set('storyList', $uri, 'product'); - $this->app->session->set('executionList', $uri, 'execution'); + $this->app->session->set('taskList', $uri, 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_desc'; @@ -720,7 +718,7 @@ class execution extends control } /* Save session. */ - $this->app->session->set('storyList', $this->app->getURI(true), 'product'); + $this->app->session->set('storyList', $this->app->getURI(true), 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionStoryOrder ? $this->cookie->executionStoryOrder : 'pri'; @@ -803,7 +801,7 @@ class execution extends control $this->view->orderBy = $orderBy; $this->view->type = $this->session->executionStoryBrowseType; $this->view->param = $param; - $this->view->moduleTree = $this->loadModel('tree')->getExecutionStoryTreeMenu($executionID, $startModuleID = 0, array('treeModel', 'createExecutionStoryLink')); + $this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($executionID, $startModuleID = 0, array('treeModel', 'createStoryLink')); $this->view->tabID = 'story'; $this->view->storyTasks = $storyTasks; $this->view->storyBugs = $storyBugs; @@ -851,7 +849,7 @@ class execution extends control $this->loadModel('user'); /* Save session. */ - $this->session->set('bugList', $this->app->getURI(true), 'qa'); + $this->session->set('bugList', $this->app->getURI(true), 'execution'); $type = strtolower($type); $queryID = ($type == 'bysearch') ? (int)$param : 0; @@ -921,6 +919,7 @@ class execution extends control $this->loadModel('testcase'); $this->loadModel('testtask'); $this->commonAction($executionID); + $this->session->set('caseList', $this->app->getURI(true), 'execution'); $products = $this->execution->getProducts($executionID); $productID = key($products); // Get the first product for creating testcase. @@ -930,6 +929,8 @@ class execution extends control $pager = pager::init($recTotal, $recPerPage, $pageID); $cases = $this->loadModel('testcase')->getExecutionCases($executionID, $orderBy, $pager, $type); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false); + $cases = $this->testcase->appendData($cases, 'run'); $this->view->title = $this->lang->execution->testcase; @@ -1020,8 +1021,9 @@ class execution extends control public function testtask($executionID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->loadModel('testtask'); + /* Save session. */ - $this->session->set('testtaskList', $this->app->getURI(true), 'qa'); + $this->session->set('testtaskList', $this->app->getURI(true), 'execution'); $execution = $this->commonAction($executionID); $executionID = $execution->id; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 6b6cc4dd86..22a20e5efc 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -69,9 +69,9 @@ execution->owner);?> execution->end);?> execution->execStatus : $lang->execution->status);?> - execution->totalEstimate;?> - execution->totalConsumed;?> - execution->totalLeft;?> + execution->totalEstimate;?> + execution->totalConsumed;?> + execution->totalLeft;?> execution->progress;?> execution->burn;?> diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index e1970283e3..237622c1bb 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -77,11 +77,12 @@ id"); ?> - id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?> id);?> @@ -94,7 +95,7 @@ pri?>' title='bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?> - createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color'");?> + title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?> openedBy, $bug->openedBy);?> bug->printAssignedHtml($bug, $users);?> resolvedBy, $bug->resolvedBy);?> diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php index 77843350d7..749cd277b0 100644 --- a/module/execution/view/grouptask.html.php +++ b/module/execution/view/grouptask.html.php @@ -74,7 +74,7 @@ execution = $executionID; - $link = $this->createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); + $link = $this->createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : '')); if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); ?> @@ -85,7 +85,7 @@

task->noTask;?> - createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')), " " . $lang->task->create, '', "class='btn btn-info'");?> + createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : '')), " " . $lang->task->create, '', "class='btn btn-info'");?>

diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php index c10a65da74..b3ef464618 100644 --- a/module/execution/view/testcase.html.php +++ b/module/execution/view/testcase.html.php @@ -4,7 +4,7 @@ {$lang->execution->all}", '', "class='btn btn-link btn-active-text'");?>
- id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-primary' data-app='execution'");?> + id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");?>
@@ -13,7 +13,7 @@

testcase->noCase;?> - id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='execution'");?> + id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->openApp}'");?>

@@ -49,7 +49,7 @@ pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> version";?> task";?> - createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-group='project'");?> + createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->openApp}'");?> testcase->typeList, $case->type);?> openedBy);?> lastRunner);?> diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 0d7d809ecf..9974ed4305 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -144,8 +144,6 @@ if($config->systemMode == 'new') { /* Program. */ $lang->resource->program = new stdclass(); - $lang->resource->program->createGuide = 'createGuide'; - //$lang->resource->program->index = 'index'; $lang->resource->program->browse = 'browse'; $lang->resource->program->product = 'product'; $lang->resource->program->create = 'create'; @@ -162,8 +160,6 @@ if($config->systemMode == 'new') $lang->resource->program->batchUnlinkStakeholders = 'batchUnlinkStakeholders'; $lang->resource->program->export = 'export'; - $lang->program->methodOrder[0] = 'createGuide'; - //$lang->program->methodOrder[5] = 'index'; $lang->program->methodOrder[10] = 'browse'; $lang->program->methodOrder[15] = 'product'; $lang->program->methodOrder[20] = 'create'; @@ -213,6 +209,7 @@ if($config->systemMode == 'new') $lang->resource->project->bug = 'bug'; $lang->resource->project->testcase = 'testcase'; $lang->resource->project->testtask = 'testtask'; + $lang->resource->project->execution = 'execution'; $lang->project->methodOrder[0] = 'index'; $lang->project->methodOrder[5] = 'browse'; @@ -246,6 +243,7 @@ if($config->systemMode == 'new') $lang->project->methodOrder[145] = 'bug'; $lang->project->methodOrder[150] = 'testcase'; $lang->project->methodOrder[155] = 'testtask'; + $lang->project->methodOrder[160] = 'execution'; /* Personnel . */ $lang->resource->personnel = new stdclass(); @@ -517,7 +515,7 @@ $lang->release->methodOrder[70] = 'changeStatus'; /* Execution. */ $lang->resource->execution = new stdclass(); -//$lang->resource->execution->index = 'index'; +$lang->resource->execution->index = 'index'; $lang->resource->execution->view = 'view'; $lang->resource->execution->browse = 'browse'; $lang->resource->execution->create = 'createExec'; @@ -561,10 +559,10 @@ $lang->resource->execution->printKanban = 'printKanbanAction'; $lang->resource->execution->tree = 'treeAction'; $lang->resource->execution->treeTask = 'treeOnlyTask'; $lang->resource->execution->treeStory = 'treeOnlyStory'; -//$lang->resource->execution->all = 'allExecutionAB'; +$lang->resource->execution->all = 'allExecutionAB'; $lang->resource->execution->kanbanHideCols = 'kanbanHideCols'; $lang->resource->execution->kanbanColsColor = 'kanbanColsColor'; -//$lang->resource->execution->export = 'exportAction'; +$lang->resource->execution->export = 'exportAction'; $lang->resource->execution->storyKanban = 'storyKanban'; $lang->resource->execution->storySort = 'storySort'; $lang->resource->execution->whitelist = 'whitelist'; @@ -618,8 +616,8 @@ $lang->execution->methodOrder[205] = 'kanbanColsColor'; $lang->execution->methodOrder[210] = 'tree'; $lang->execution->methodOrder[215] = 'treeTask'; $lang->execution->methodOrder[220] = 'treeStory'; -//$lang->execution->methodOrder[225] = 'all'; -//$lang->execution->methodOrder[230] = 'export'; +$lang->execution->methodOrder[225] = 'all'; +$lang->execution->methodOrder[230] = 'export'; $lang->execution->methodOrder[235] = 'storyKanban'; $lang->execution->methodOrder[240] = 'storySort'; $lang->execution->methodOrder[245] = 'whitelist'; diff --git a/module/index/control.php b/module/index/control.php index 9d8983d7c1..8d9fbd1d5f 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -80,7 +80,9 @@ class index extends control { $objectType = $this->post->objectType; $appGroup = zget($this->config->index->appGroup, $objectType, ''); - if($objectType == 'testcase') $objectType = 'case'; + if($objectType == 'testcase') $objectType = 'case'; + if($objectType == 'testreport') $objectType = 'report'; + if($objectType == 'productplan') $objectType = 'productPlan'; $this->session->set($objectType . 'List', '', $appGroup); } diff --git a/module/index/css/index.css b/module/index/css/index.css index 0bf9ee737f..2a0ac8830a 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -23,6 +23,13 @@ body.menu-hide {padding-left: 0;} .menu-hide #menu .nav > li > a {padding: 6px 4px; text-align: center;} .menu-hide #menu .nav > li > a > .text {display: none;} .menu-hide #menu .nav > li.has-avatar > a {padding: 2px 0;} +#menuMoreNav {display: none;} +.show-more-nav #menuMoreNav {display: block;} +#menuMoreList {left: 100%; margin-left: -2px; top: -5px; background-color: #3c495c;} +#menuMoreList > li {padding: 2px 6px;} +#menuMoreList > li > a {color: #fff; padding: 4px 6px 4px 12px; border-radius: 2px; margin: 0;} +#menuMoreList > li.divider {opacity: .2; margin: 6px; padding: 0;} +#menu .dropdown-hover:hover > a, #menu .dropdown.open > a {background-color: rgba(0,0,0,.3);} #moreExecution {display: none; max-height: 520px; min-height: 520px; max-width: 360px; min-width: 150px; position: fixed; bottom: 40px; z-index: 999; background: white; padding: 20px 10px; border: 1px solid #efefef;} .more-execution-show {left: 96px;} diff --git a/module/index/js/index.js b/module/index/js/index.js index 4c887d0570..406cc8401d 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -416,6 +416,52 @@ appsMap: appsMap }; + /** + * Refresh more menu in #menuNav + * @return {void} + */ + function refreshMoreMenu() + { + var $mainNav = $('#menuMainNav'); + var $list = $('#menuMoreList'); + var $menuNav = $('#menuNav'); + var $menuItems = $mainNav.children('li'); + var maxHeight = $menuNav.height(); + var showMoreMenu = false; + var currentHeight = 40; + var moreMenuHeight = 13; + + $menuItems.each(function() + { + var $item = $(this); + var isDivider = $item.hasClass('divider'); + var height = isDivider ? 17 : 40; + currentHeight += height; + if(currentHeight > maxHeight) + { + $item.addClass('hidden'); + if(!showMoreMenu) + { + showMoreMenu = true; + $list.empty(); + + var $prevItem = $item.prev(); + if($prevItem.hasClass('divider')) $prevItem.addClass('hidden'); + + if(isDivider) return; + } + moreMenuHeight += isDivider ? 13 : 31; + $list.append($item.clone().removeClass('hidden')); + } + else + { + $item.removeClass('hidden'); + } + }); + $list.css('top', moreMenuHeight > 111 ? 111 - moreMenuHeight : ''); + $menuNav.toggleClass('show-more-nav', showMoreMenu); + } + /* Init after current page load */ $(function() { @@ -468,6 +514,13 @@ options.y = bounding.top; } } + var $dropdown = $btn.closest('.dropdown'); + if($dropdown.length) + { + $dropdown.addClass('open'); + options.onHide = function(){$dropdown.removeClass('open');} + } + $.zui.ContextMenu.show(items, options); event.preventDefault(); }); @@ -485,6 +538,10 @@ } if(defaultOpenUrl) openApp(defaultOpenUrl); else openApp(defaultApp); + + /* Refresh more menu on window resize */ + $(window).on('resize', refreshMoreMenu); + refreshMoreMenu(); }); }()); diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index e803b801b5..37a566236f 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -36,6 +36,13 @@ js::set('defaultOpen', $open);
@@ -79,7 +86,7 @@ js::set('defaultOpen', $open);
- +

index->upgradeVersion;?>

diff --git a/module/my/lang/de.php b/module/my/lang/de.php index 4c91fcb7fd..7c946d94c5 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -45,7 +45,7 @@ $lang->my->myExecutions = "My Stage/Sprint/Iteration"; $lang->my->name = 'Name'; $lang->my->code = 'Code'; $lang->my->projects = 'Project'; -$lang->my->executions = $lang->executionCommon; +$lang->my->executions = 'Executions'; $lang->my->executionMenu = new stdclass(); $lang->my->executionMenu->undone = 'Undone'; diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 4c91fcb7fd..7c946d94c5 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -45,7 +45,7 @@ $lang->my->myExecutions = "My Stage/Sprint/Iteration"; $lang->my->name = 'Name'; $lang->my->code = 'Code'; $lang->my->projects = 'Project'; -$lang->my->executions = $lang->executionCommon; +$lang->my->executions = 'Executions'; $lang->my->executionMenu = new stdclass(); $lang->my->executionMenu->undone = 'Undone'; diff --git a/module/my/lang/fr.php b/module/my/lang/fr.php index 4c91fcb7fd..7c946d94c5 100644 --- a/module/my/lang/fr.php +++ b/module/my/lang/fr.php @@ -45,7 +45,7 @@ $lang->my->myExecutions = "My Stage/Sprint/Iteration"; $lang->my->name = 'Name'; $lang->my->code = 'Code'; $lang->my->projects = 'Project'; -$lang->my->executions = $lang->executionCommon; +$lang->my->executions = 'Executions'; $lang->my->executionMenu = new stdclass(); $lang->my->executionMenu->undone = 'Undone'; diff --git a/module/my/lang/vi.php b/module/my/lang/vi.php index 4c91fcb7fd..7c946d94c5 100644 --- a/module/my/lang/vi.php +++ b/module/my/lang/vi.php @@ -45,7 +45,7 @@ $lang->my->myExecutions = "My Stage/Sprint/Iteration"; $lang->my->name = 'Name'; $lang->my->code = 'Code'; $lang->my->projects = 'Project'; -$lang->my->executions = $lang->executionCommon; +$lang->my->executions = 'Executions'; $lang->my->executionMenu = new stdclass(); $lang->my->executionMenu->undone = 'Undone'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index 5bbc6cf9a7..84ed89ed58 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -45,7 +45,7 @@ $lang->my->myExecutions = "我参与的阶段/冲刺/迭代"; $lang->my->name = '名称'; $lang->my->code = '代号'; $lang->my->projects = '所属项目'; -$lang->my->executions = '所属' . $lang->executionCommon; +$lang->my->executions = '所属执行'; $lang->my->executionMenu = new stdclass(); $lang->my->executionMenu->undone = '未结束'; diff --git a/module/my/lang/zh-tw.php b/module/my/lang/zh-tw.php index 86b24ac7ac..ac312d6131 100644 --- a/module/my/lang/zh-tw.php +++ b/module/my/lang/zh-tw.php @@ -46,7 +46,7 @@ $lang->my->myExecutions = "我參與的階段/衝刺/迭代"; $lang->my->name = '名稱'; $lang->my->code = '代號'; $lang->my->projects = '所屬項目'; -$lang->my->executions = '所屬' . $lang->executionCommon; +$lang->my->executions = '所屬執行'; $lang->my->executionMenu = new stdclass(); $lang->my->executionMenu->undone = '未結束'; diff --git a/module/product/control.php b/module/product/control.php index a5b85ba588..9be40fb686 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -122,7 +122,11 @@ class product extends control $productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID; if($this->app->openApp == 'product') $this->product->setMenu($productID, $branch); - if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($projectID); + if($this->app->openApp == 'project') + { + $this->session->set('storyList', $this->app->getURI(true), 'project'); + $this->loadModel('project')->setMenu($projectID); + } /* Lower browse type. */ $browseType = strtolower($browseType); @@ -170,25 +174,20 @@ class product extends control { setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false); $browseType = 'unclosed'; - if($this->app->rawModule == 'projectstory' and empty($productID)) - { - $moduleTree = $this->tree->getExecutionStoryTreeMenu($this->session->project, 0, array('treeModel', 'createProjectStoryLink')); - } - else - { - $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType"); - } } else { - if($this->app->rawModule == 'projectstory' and empty($productID)) - { - $moduleTree = $this->tree->getExecutionStoryTreeMenu($this->session->project, 0, array('treeModel', 'createProjectStoryLink')); - } - else - { - $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType"); - } + $branch = (int)$this->cookie->treeBranch; + } + + /* If in project story and not chose product, get project story mdoules. */ + if($this->app->rawModule == 'projectstory' and empty($productID)) + { + $moduleTree = $this->tree->getProjectStoryTreeMenu($projectID, 0, array('treeModel', $createModuleLink)); + } + else + { + $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), array('projectID' => $projectID, 'productID' => $productID), $branch, "¶m=$param&storyType=$storyType"); } if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType); @@ -211,12 +210,12 @@ class product extends control if($this->app->rawModule == 'projectstory') { if(!empty($product)) $this->session->set('currentProductType', $product->type); - $this->products = $this->loadModel('project')->getProducts($this->session->project, false); - $projectProducts = $this->product->getProducts($this->session->project); + $this->products = $this->loadModel('project')->getProducts($projectID, false); + $projectProducts = $this->product->getProducts($projectID); $productPlans = $this->execution->getPlans($projectProducts); if($browseType == 'bybranch') $param = $branch; - $stories = $this->story->getExecutionStories($this->session->project, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager); + $stories = $this->story->getExecutionStories($projectID, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager); } else { @@ -1172,18 +1171,6 @@ class product extends control $this->display(); } - /** - * Doc for compatible. - * - * @param int $productID - * @access public - * @return void - */ - public function doc($productID) - { - $this->locate($this->createLink('doc', 'objectLibs', "type=product&objectID=$productID&from=product")); - } - /** * Build of product. * diff --git a/module/product/model.php b/module/product/model.php index eda1a50f8a..7662eb4efd 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -448,6 +448,7 @@ class productModel extends model if(isset($currentProduct->type) && $currentProduct->type != 'normal') { + $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); $branches = $this->loadModel('branch')->getPairs($productID); $branch = empty($branch) ? (int)$this->cookie->preBranch : $branch; $branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0]; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 901ed294f4..01a86832db 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -142,7 +142,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';