diff --git a/module/execution/control.php b/module/execution/control.php index a8a7f93e52..4587a7c61e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3675,7 +3675,6 @@ class execution extends control * All execution. * * @param string $status - * @param int $projectID * @param string $orderBy * @param int $productID * @param string $param @@ -3685,7 +3684,7 @@ class execution extends control * @access public * @return void */ - public function all($status = 'undone', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) + public function all($status = 'undone', $orderBy = 'order_asc', $productID = 0, $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) { $this->app->loadLang('my'); $this->app->loadLang('product'); @@ -3698,17 +3697,8 @@ class execution extends control if($this->app->viewType == 'mhtml') { - if($this->app->rawModule == 'project' and $this->app->rawMethod == 'execution') - { - $projects = $this->project->getPairsByProgram(); - $projectID = $this->project->saveState($projectID, $projects); - $this->project->setMenu($projectID); - } - else - { - $executionID = $this->execution->saveState(0, $this->executions); - $this->execution->setMenu($executionID); - } + $executionID = $this->execution->saveState(0, $this->executions); + $this->execution->setMenu($executionID); } /* Load pager and get tasks. */ @@ -3716,13 +3706,13 @@ class execution extends control $pager = new pager($recTotal, $recPerPage, $pageID); $queryID = ($status == 'bySearch') ? (int)$param : 0; - $actionURL = $this->createLink('execution', 'all', "status=bySearch&projectID=$projectID&orderBy=$orderBy&productID=$productID¶m=myQueryID"); + $actionURL = $this->createLink('execution', 'all', "status=bySearch&orderBy=$orderBy&productID=$productID¶m=myQueryID"); $this->execution->buildSearchFrom($queryID, $actionURL); $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager, false, $queryID); + $executionStats = $this->project->getStats(0, $status, $productID, 0, 30, $orderBy, $pager, false, $queryID); $parentIdList = array(); foreach($executionStats as $execution) @@ -3733,15 +3723,13 @@ class execution extends control $parents = array(); if($parentIdList) $parents = $this->execution->getByIdList($parentIdList); - $allExecutionsNum = $this->project->getStats($projectID, 'all'); + $allExecutionsNum = $this->project->getStats(0, 'all'); $this->view->allExecutionsNum = count($allExecutionsNum); $this->view->executionStats = $executionStats; - $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); + $this->view->productList = $this->loadModel('product')->getProductPairsByProject(0); $this->view->productID = $productID; - $this->view->projectID = $projectID; $this->view->parents = $parents; - $this->view->projects = array('') + $this->project->getPairsByProgram(); $this->view->pager = $pager; $this->view->orderBy = $orderBy; $this->view->users = $this->loadModel('user')->getPairs('noletter'); diff --git a/module/execution/css/all.css b/module/execution/css/all.css index 9c4267f0c4..3d4796798e 100644 --- a/module/execution/css/all.css +++ b/module/execution/css/all.css @@ -32,6 +32,8 @@ td.flex span.project-type-label {min-width: 40px;} .c-project{text-overflow: unset !important;} canvas {height: 28px;} .parent.has-child.c-name.flex, .table-child-bottom > .c-name.flex {border-bottom: 0px solid #cbd0db !important;} -.parent.has-child.c-name.flex {margin-bottom: -2px !important;} #tableCustomBtn {padding-bottom: 5px;} -#bysearchTab {margin-left: 5px;} +#datatable-executionList .table-child-bottom > .c-name.flex {border-bottom: 1px solid #cbd0db !important;} +#datatable-executionList .table-child-bottom.table-child-top > .c-name.flex {border-bottom: 2px solid #cbd0db !important;} +#datatable-executionList .parent.has-child.c-name.flex {border-bottom: 1px solid #cbd0db !important;} +#datatable-executionList tr:last-child .c-name.flex {margin-top: 1px !important;} diff --git a/module/execution/js/all.js b/module/execution/js/all.js index a58da77738..7d52829c0b 100644 --- a/module/execution/js/all.js +++ b/module/execution/js/all.js @@ -11,7 +11,7 @@ $(function() if(isCNLang && nameWidth < 150 && !useDatatable) $('#executionsForm thead th.c-name').css('width', '150px'); if(!isCNLang && nameWidth < 200 && !useDatatable) $('#executionsForm thead th.c-name').css('width', '200px'); - toggleFold('#executionsForm', unfoldExecutions, projectID, 'execution'); + toggleFold('#executionsForm', unfoldExecutions, 0, 'execution'); $('.table td.has-child > .plan-toggle').each(function() { diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index beb720a7e2..715cf14aae 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -16,14 +16,11 @@ $datatableId = $this->moduleName . ucfirst($this->methodName); $useDatatable = (isset($config->datatable->$datatableId->mode) and $config->datatable->$datatableId->mode == 'datatable'); ?> + - execution->all->unfoldExecutions) ? json_decode($config->execution->all->unfoldExecutions, true) : array(); -$unfoldExecutions = zget($unfoldExecutions, $projectID, array()); -js::set('unfoldExecutions', $unfoldExecutions); js::set('unfoldAll', $lang->execution->treeLevel['all']); js::set('foldAll', $lang->execution->treeLevel['root']); js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) @@ -38,11 +35,11 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) " . html::a($this->createLink('project', 'execution', "status=$status&projectID=$projectID&orderby=$orderBy"), $lang->product->allProduct) . ""; + echo "
  • " . html::a($this->createLink('project', 'execution', "status=$status&orderby=$orderBy"), $lang->product->allProduct) . "
  • "; foreach($productList as $key => $product) { $class = $productID == $key ? 'class="active"' : ''; - echo "
  • " . html::a($this->createLink('project', 'execution', "status=$status&projectID=$projectID&orderby=$orderBy&productID=$key"), $product) . "
  • "; + echo "
  • " . html::a($this->createLink('project', 'execution', "status=$status&orderby=$orderBy&productID=$key"), $product) . "
  • "; } ?> @@ -52,22 +49,13 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) execution->featureBar['all'] as $key => $label):?> $label";?> {$pager->recTotal}";?> - createLink($this->app->rawModule, $this->app->rawMethod, "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), $label, '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?> + createLink($this->app->rawModule, $this->app->rawMethod, "status=$key&orderBy=$orderBy&productID=$productID"), $label, '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?> - config->systemMode == 'new'):?> -
    - execution->selectProject}'");?> -
    - execution->byQuery;?>
    " . $lang->export, '', "class='btn btn-link export'")?> - - createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-primary'");?> - - createLink('execution', 'create', "projectID=$projectID"), " " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?> - + createLink('execution', 'create'), " " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?>
    @@ -77,12 +65,8 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())

    execution->noExecutions : $lang->execution->noExecution;?> - - createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-info'");?> - - - createLink('execution', 'create', "projectID=$projectID"), " " . (($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?> - + + createLink('execution', 'create'), " " . (($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?>

    @@ -94,7 +78,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
    recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; + $vars = "status=$status&orderBy=%s&productID=$productID¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; if($useDatatable) include '../../common/view/datatable.html.php'; else include '../../common/view/tablesorter.html.php'; @@ -167,12 +151,6 @@ $(document).on('click', '.plan-toggle', function(e) e.stopPropagation(); e.preventDefault(); }); - -$('#project').change(function() -{ - var projectID = $('#project').val(); - location.href = createLink('execution', 'all', 'status=' + status + '&projectID=' + projectID); -});