From bbae037e9f897fa2ab20ac79328a452502182c30 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Jul 2018 09:08:20 +0800 Subject: [PATCH 01/25] * finish task #4529. --- module/bug/control.php | 6 +++--- module/bug/model.php | 25 +++++++++++++++++-------- module/testtask/js/common.js | 16 ++++++++++++++++ module/testtask/view/results.html.php | 6 +++--- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 1cd4977818..4d460a554d 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -254,7 +254,7 @@ class bug extends control $this->view->users = $this->user->getPairs('devfirst|noclosed|nodeleted'); $this->app->loadLang('release'); - if(!empty($_POST) and !isset($_POST['stepIDList'])) + if(!empty($_POST)) { $response['result'] = 'success'; $response['message'] = ''; @@ -332,8 +332,8 @@ class bug extends control $extras = str_replace(array(',', ' '), array('&', ''), $extras); parse_str($extras); - if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID));// If set runID and resultID, get the result info by resultID as template. - if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info. + if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID, 0, 0, isset($stepIdList) ? $stepIdList : ''));// If set runID and resultID, get the result info by resultID as template. + if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version, isset($stepIdList) ? $stepIdList : ''));// If not set runID but set caseID, get the result info by resultID and case info. /* If bugID setted, use this bug as template. */ if(isset($bugID)) diff --git a/module/bug/model.php b/module/bug/model.php index dc97cd92fd..d68f1e0227 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1610,11 +1610,11 @@ class bugModel extends model * @access public * @return array */ - public function getBugInfoFromResult($resultID, $caseID = 0, $version = 0) + public function getBugInfoFromResult($resultID, $caseID = 0, $version = 0, $stepIdList = '') { $title = ''; $bugSteps = ''; - $steps = zget($_POST, 'stepIDList', array()); + $steps = explode('_', trim($stepIdList, '_')); $result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch(); if($caseID > 0) @@ -1635,38 +1635,47 @@ class bugModel extends model $bugSteps = "

[" . $this->lang->testcase->precondition . "]

" . "\n" . $run->case->precondition; } - $bugSteps .= $this->lang->bug->tplStep; if(!empty($stepResults)) { $i = 1; + $bugStep = ''; foreach($steps as $stepId) { if(!isset($caseSteps[$stepId])) continue; $step = $caseSteps[$stepId]; - $bugSteps .= $i . '. ' . $step->desc . "
"; + $bugStep .= $i . '. ' . $step->desc . "
"; $i++; } + $bugSteps .= $bugStep ? str_replace('
', '', $this->lang->bug->tplStep) . $bugStep : $this->lang->bug->tplStep; - $bugSteps .= $this->lang->bug->tplResult; $i = 1; + $bugResult = ''; foreach($steps as $stepId) { if(!isset($stepResults[$stepId]) or empty($stepResults[$stepId]['real'])) continue; - $bugSteps .= $i . '. ' . $stepResults[$stepId]['real'] . "
"; + $bugResult .= $i . '. ' . $stepResults[$stepId]['real'] . "
"; $i++; } + $bugSteps .= $bugResult ? str_replace('
', '', $this->lang->bug->tplResult) . $bugResult : $this->lang->bug->tplResult; - $bugSteps .= $this->lang->bug->tplExpect; $i = 1; + $bugExpect = ''; foreach($steps as $stepId) { if(!isset($caseSteps[$stepId])) continue; $step = $caseSteps[$stepId]; - if($step->expect) $bugSteps .= $i . '. ' . $step->expect . "
"; + if($step->expect) $bugExpect .= $i . '. ' . $step->expect . "
"; $i++; } + $bugSteps .= $bugExpect ? str_replace('
', '', $this->lang->bug->tplExpect) . $bugExpect : $this->lang->bug->tplExpect; + } + else + { + $bugSteps .= $this->lang->bug->tplStep; + $bugSteps .= $this->lang->bug->tplResult; + $bugSteps .= $this->lang->bug->tplExpect; } return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version); diff --git a/module/testtask/js/common.js b/module/testtask/js/common.js index fcee896bf6..1c67ebf668 100644 --- a/module/testtask/js/common.js +++ b/module/testtask/js/common.js @@ -28,3 +28,19 @@ function adjustPriBoxWidth() var addonWidth = $('#ownerAndPriBox .input-group-addon').outerWidth(); $('#pri,#pri_chosen .chosen-single').css('width', boxWidth - beginWidth -addonWidth); } + +function createBug(obj) +{ + var $form = $(obj).closest('form'); + var params = $form.data('params'); + var stepIdList = ''; + $form.find('.step .step-id :checkbox').each(function() + { + if($(this).prop('checked')) stepIdList += $(this).val() + '_'; + }); + + var onlybody = config.onlybody; + config.onlybody = 'no'; + window.open(createLink('bug', 'create', params + ',stepIdList=' + stepIdList), '_blank'); + config.onlybody = onlybody; +} diff --git a/module/testtask/view/results.html.php b/module/testtask/view/results.html.php index a8b2386b5b..5842848947 100644 --- a/module/testtask/view/results.html.php +++ b/module/testtask/view/results.html.php @@ -49,7 +49,7 @@ id,projectID=$testtask->project,buildID=$testtask->build" : '';?> -
product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,resultID=$result->id,runID=$runID" . $params)?>' target='_blank' method='post'> + @@ -82,7 +82,7 @@ - + From cb65bcbc12f64f4c67528f352ccf84a540b74061 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 09:22:34 +0800 Subject: [PATCH 02/25] * Set nowrap for modal header. --- www/theme/default/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/www/theme/default/style.css b/www/theme/default/style.css index f1298dcc33..d50e1f96cc 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -9,3 +9,4 @@ * @link http://www.zentao.net */ .divider + .divider{display:none;} +.body-modal .main-header > h2{width: 100%; overflow:hidden; text-overflow: ellipsis; white-space: nowrap;} From f055eed1ef8d771364d5f6c5c158af5956df587a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Jul 2018 09:48:19 +0800 Subject: [PATCH 03/25] * finish task #4590. --- config/filter.php | 2 +- module/testtask/control.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/filter.php b/config/filter.php index 6b684691fd..eaa7706976 100644 --- a/config/filter.php +++ b/config/filter.php @@ -153,7 +153,7 @@ $filter->testsuite->library->cookie['libCaseModule'] = 'int'; $filter->testsuite->library->cookie['preCaseLibID'] = 'int'; $filter->testtask->browse->cookie['preBranch'] = 'int'; -$filter->testtask->cases->cookie['preProductID'] = 'int'; +$filter->testtask->cases->cookie['preTaskID'] = 'int'; $filter->testtask->cases->cookie['taskCaseModule'] = 'int'; $filter->testtask->default->cookie['lastProduct'] = 'int'; $filter->testtask->default->cookie['preProductID'] = 'int'; diff --git a/module/testtask/control.php b/module/testtask/control.php index d31fb26907..54255159c9 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -260,9 +260,9 @@ class testtask extends control if(!$task) die(js::error($this->lang->notFound) . js::locate('back')); $productID = $task->product; $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); - setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot); + setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot); - if($this->cookie->preProductID != $productID) + if($this->cookie->preTaskID != $taskID) { $_COOKIE['taskCaseModule'] = 0; setcookie('taskCaseModule', 0, $this->config->cookieLife, $this->config->webRoot); From fbbc51db488b63e1fdffe9a08137dd8e9b03cd23 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 4 Jul 2018 09:59:54 +0800 Subject: [PATCH 04/25] * Finish task #4543. --- module/project/view/story.html.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index b3dabe6868..3e66d14f2d 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -46,16 +46,13 @@ else { echo "'; } From e0529846e345aa859363e439d4475cd1741d261c Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Jul 2018 10:08:49 +0800 Subject: [PATCH 05/25] * finish task #4585. --- module/doc/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index 3d7424e651..dc2d1e0045 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -562,12 +562,12 @@ class docModel extends model ->add('version', 1) ->setDefault('product,project,module', 0) ->stripTags($this->config->doc->editor->create['id'], $this->config->allowedTags) - ->stripTags($this->config->doc->markdown->create['id'], $this->config->allowedTags) ->cleanInt('product,project,module') ->join('groups', ',') ->join('users', ',') ->remove('files,labels,uid') ->get(); + $doc->contentMarkdown = strip_tags($this->post->contentMarkdown, $this->config->allowedTags); if($doc->acl == 'private') $doc->users = $this->app->user->account; $condition = "lib = '$doc->lib' AND module = $doc->module"; @@ -638,6 +638,7 @@ class docModel extends model ->join('users', ',') ->remove('comment,files,labels,uid') ->get(); + if($doc->contentType == 'markdown') $doc->content = strip_tags($this->post->content, $this->config->allowedTags); if($doc->acl == 'private') $doc->users = $oldDoc->addedBy; $oldDocContent = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->eq($docID)->andWhere('version')->eq($oldDoc->version)->fetch(); From a6e0fce73ebd65d8c70ef795e285203306d0d107 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Jul 2018 10:38:12 +0800 Subject: [PATCH 06/25] * finish task #4523. --- module/product/control.php | 1 + module/product/model.php | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 0536959547..0df8c1a293 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -214,6 +214,7 @@ class product extends control } $rootID = key($this->products); + if($this->session->product) $rootID = $this->session->product; $this->product->setMenu($this->products, $rootID); $this->view->title = $this->lang->product->create; diff --git a/module/product/model.php b/module/product/model.php index 8a88879390..971ff72fc7 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -352,11 +352,11 @@ class productModel extends model public function create() { $product = fixer::input('post') - ->setIF($this->post->acl != 'custom', 'whitelist', '') - ->setDefault('status', 'normal') - ->setDefault('createdBy', $this->app->user->account) - ->setDefault('createdDate', helper::now()) - ->setDefault('createdVersion', $this->config->version) + ->setIF($this->post->acl != 'custom', 'whitelist', '') + ->setDefault('status', 'normal') + ->setDefault('createdBy', $this->app->user->account) + ->setDefault('createdDate', helper::now()) + ->setDefault('createdVersion', $this->config->version) ->join('whitelist', ',') ->stripTags($this->config->product->editor->create['id'], $this->config->allowedTags) ->remove('uid') From e842c24e657279928847ae79600580612a6a5314 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Jul 2018 11:01:22 +0800 Subject: [PATCH 07/25] * finish task #4581. --- module/testreport/model.php | 2 +- module/testreport/view/blockcases.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testreport/model.php b/module/testreport/model.php index 799300f20b..15742911e1 100644 --- a/module/testreport/model.php +++ b/module/testreport/model.php @@ -321,7 +321,7 @@ class testreportModel extends model */ public function getTaskCases($tasks, $idList = '') { - return $this->dao->select('t2.*,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status')->from(TABLE_TESTRUN)->alias('t1') + return $this->dao->select('t2.*,t1.task,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status')->from(TABLE_TESTRUN)->alias('t1') ->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id') ->where('t1.task')->in(array_keys($tasks)) ->beginIF($idList)->andWhere('t2.id')->in($idList)->fi() diff --git a/module/testreport/view/blockcases.html.php b/module/testreport/view/blockcases.html.php index b9e474f395..2360790f06 100644 --- a/module/testreport/view/blockcases.html.php +++ b/module/testreport/view/blockcases.html.php @@ -19,7 +19,7 @@ - + From 31a7f1f9a2482f6beeb496681c1d872802a2763c Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 11:05:01 +0800 Subject: [PATCH 08/25] * Adjust size for ranzhi logo. --- module/upgrade/css/afterexec.css | 11 +++-------- module/upgrade/view/afterexec.html.php | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/module/upgrade/css/afterexec.css b/module/upgrade/css/afterexec.css index b5cd835689..d25a8583a6 100644 --- a/module/upgrade/css/afterexec.css +++ b/module/upgrade/css/afterexec.css @@ -1,13 +1,5 @@ .adbox{margin-top:20px;} -.card.ad{margin-bottom:0px;} -.card.ad > .img-wrapper { - background-position: center; - background-repeat: no-repeat; - height: 115px; - width: 100%; -} - .card { position: relative; display: block; @@ -61,6 +53,9 @@ height: 115px; width: 100%; } + +.card.ad.ad-ranzhi > .img-wrapper {background-size: 100%;} + .card.ad > .img-wrapper > img{display: none;} .card.ad > .card-heading {text-align: center;} .card.ad > .card-reveal > .card-heading { padding: 12px 10px 10px 15px;} diff --git a/module/upgrade/view/afterexec.html.php b/module/upgrade/view/afterexec.html.php index 0590377b09..e506e66f21 100644 --- a/module/upgrade/view/afterexec.html.php +++ b/module/upgrade/view/afterexec.html.php @@ -25,7 +25,7 @@
install->product as $product):?>
- +
install->{$product}->name?>
From a596142ec59209f93ea3a50f79fdbad0aebed079 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 11:08:11 +0800 Subject: [PATCH 09/25] * Remove useless file. --- module/upgrade/js/common.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 module/upgrade/js/common.js diff --git a/module/upgrade/js/common.js b/module/upgrade/js/common.js deleted file mode 100644 index a5e10e3c26..0000000000 --- a/module/upgrade/js/common.js +++ /dev/null @@ -1 +0,0 @@ -$(function(){$.ajustModalPosition('fit', $('.modal-dialog'))}); From 9889775cc7a7dab4dcf5c393a69f81d8caa4dd4e Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 13:24:09 +0800 Subject: [PATCH 10/25] * Set assignedTo as closed when close todo. --- db/update10.0.sql | 1 + module/todo/model.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/db/update10.0.sql b/db/update10.0.sql index 3fe85f06c1..b5b242c41c 100644 --- a/db/update10.0.sql +++ b/db/update10.0.sql @@ -1 +1,2 @@ ALTER TABLE `zt_storyspec` CHANGE `title` `title` varchar(255) NOT NULL; +update `zt_todo` set assignedTo = 'closed', assignedDate = closedDate where status = 'closed'; diff --git a/module/todo/model.php b/module/todo/model.php index 4d56610740..6b755dd69d 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -530,10 +530,13 @@ class todoModel extends model */ public function close($todoID) { + $now = helper::now(); $this->dao->update(TABLE_TODO) ->set('status')->eq('closed') ->set('closedBy')->eq($this->app->user->account) - ->set('closedDate')->eq(helper::now()) + ->set('closedDate')->eq($now) + ->set('assignedTo')->eq('closed') + ->set('assignedDate')->eq($now) ->where('id')->eq((int)$todoID) ->exec(); $this->loadModel('action')->create('todo', $todoID, 'closed', '', 'closed'); From ce9cf8a0c7d787256967fb55d98475a7d4d27b8d Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 13:28:04 +0800 Subject: [PATCH 11/25] * Add 10.0 upgrade sql. --- module/upgrade/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 30cd05a221..1ba716287f 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -337,6 +337,7 @@ class upgradeModel extends model case '9_8_3': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.3')); case '10_0_alpha': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.alpha')); case '10_0_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.beta')); + case '10_0': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0')); } return str_replace('zt_', $this->config->db->prefix, $confirmContent); } From a703d045e05c881d92a9644da475bc5202ee719d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Jul 2018 13:28:23 +0800 Subject: [PATCH 12/25] * finish task #4587. --- module/task/model.php | 5 +++++ module/task/view/assignto.html.php | 2 ++ 2 files changed, 7 insertions(+) diff --git a/module/task/model.php b/module/task/model.php index bea8fd7a40..104e736e9e 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -822,6 +822,11 @@ class taskModel extends model ->setDefault('assignedDate', $now) ->remove('comment,showModule') ->get(); + if($oldTask->status != 'done' and $oldTask->status != 'closed' and $task->left == 0) + { + dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->left); + return false; + } if(!empty($oldTask->team)) { diff --git a/module/task/view/assignto.html.php b/module/task/view/assignto.html.php index dca7f7b55c..befb86256e 100644 --- a/module/task/view/assignto.html.php +++ b/module/task/view/assignto.html.php @@ -39,10 +39,12 @@
+ status != 'done' and $task->status != 'closed'):?> + From 58bf0c3e5643f32b4ced3844cfca34c4751fba94 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 4 Jul 2018 13:58:43 +0800 Subject: [PATCH 13/25] * fix bug. --- module/task/model.php | 5 +++++ module/task/view/assignto.html.php | 2 ++ module/todo/model.php | 5 ++++- module/upgrade/model.php | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index bea8fd7a40..104e736e9e 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -822,6 +822,11 @@ class taskModel extends model ->setDefault('assignedDate', $now) ->remove('comment,showModule') ->get(); + if($oldTask->status != 'done' and $oldTask->status != 'closed' and $task->left == 0) + { + dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->left); + return false; + } if(!empty($oldTask->team)) { diff --git a/module/task/view/assignto.html.php b/module/task/view/assignto.html.php index dca7f7b55c..befb86256e 100644 --- a/module/task/view/assignto.html.php +++ b/module/task/view/assignto.html.php @@ -39,10 +39,12 @@ + status != 'done' and $task->status != 'closed'):?> + diff --git a/module/todo/model.php b/module/todo/model.php index 4d56610740..6b755dd69d 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -530,10 +530,13 @@ class todoModel extends model */ public function close($todoID) { + $now = helper::now(); $this->dao->update(TABLE_TODO) ->set('status')->eq('closed') ->set('closedBy')->eq($this->app->user->account) - ->set('closedDate')->eq(helper::now()) + ->set('closedDate')->eq($now) + ->set('assignedTo')->eq('closed') + ->set('assignedDate')->eq($now) ->where('id')->eq((int)$todoID) ->exec(); $this->loadModel('action')->create('todo', $todoID, 'closed', '', 'closed'); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 30cd05a221..1ba716287f 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -337,6 +337,7 @@ class upgradeModel extends model case '9_8_3': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.3')); case '10_0_alpha': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.alpha')); case '10_0_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.beta')); + case '10_0': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0')); } return str_replace('zt_', $this->config->db->prefix, $confirmContent); } From f7bd51a86177d83334e141812df529db4544e4b9 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 4 Jul 2018 14:05:59 +0800 Subject: [PATCH 14/25] * Finish task #4549, 4550 --- config/filter.php | 8 ++- module/doc/control.php | 8 ++- module/doc/css/common.css | 3 - module/doc/js/browse.js | 6 -- module/doc/js/common.js | 6 ++ module/doc/lang/en.php | 1 + module/doc/lang/zh-cn.php | 1 + module/doc/view/alllibs.html.php | 18 +++++- module/doc/view/alllibsbylist.html.php | 68 +++++++++++++++++++++ module/doc/view/objectlibs.html.php | 8 +++ module/doc/view/objectlibsbylist.html.php | 74 +++++++++++++++++++++++ 11 files changed, 184 insertions(+), 17 deletions(-) create mode 100644 module/doc/view/alllibsbylist.html.php create mode 100644 module/doc/view/objectlibsbylist.html.php diff --git a/config/filter.php b/config/filter.php index 6b684691fd..7f2e5468db 100644 --- a/config/filter.php +++ b/config/filter.php @@ -97,9 +97,11 @@ $filter->bug->default->cookie['preProductID'] = 'int'; $filter->bug->create->cookie['preBranch'] = 'int'; $filter->bug->export->cookie['checkedItem'] = 'reg::checked'; -$filter->doc->browse->cookie['browseType'] = 'reg::browseType'; -$filter->doc->default->cookie['from'] = 'code'; -$filter->doc->default->cookie['product'] = 'int'; +$filter->doc->browse->cookie['browseType'] = 'reg::browseType'; +$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType'; +$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType'; +$filter->doc->default->cookie['from'] = 'code'; +$filter->doc->default->cookie['product'] = 'int'; $filter->doc->showfiles->cookie['docFilesViewType'] = 'code'; $filter->file->download->cookie[$config->sessionVar] = 'code'; diff --git a/module/doc/control.php b/module/doc/control.php index f2e36ff588..1121c71599 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -619,7 +619,11 @@ class doc extends control $libs = $this->doc->getAllLibsByType($type, $pager, $product); $subLibs = array(); - if($type == 'product' or $type == 'project') $subLibs = $this->doc->getSubLibGroups($type, array_keys($libs)); + if($type == 'product' or $type == 'project') + { + $subLibs = $this->doc->getSubLibGroups($type, array_keys($libs)); + if($this->cookie->browseType == 'bylist') $this->view->users = $this->loadModel('user')->getPairs('noletter'); + } if($type == 'custom') $this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs)); $this->view->type = $type; @@ -739,7 +743,7 @@ class doc extends control public function objectLibs($type, $objectID, $from = 'doc') { $this->from = $from; - setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot); + setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot); $table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT; $object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch(); diff --git a/module/doc/css/common.css b/module/doc/css/common.css index 23926c7d45..b0dcd89fc1 100644 --- a/module/doc/css/common.css +++ b/module/doc/css/common.css @@ -26,9 +26,6 @@ .col-md-size .table .c-datetime {display: none;} .table-files .btn {padding:0 6px;} -.table-files .c-actions .btn > .icon {opacity: 0;} -.table-files .c-actions .btn > .icon.text-yellow, -.table-files tr:hover .c-actions .btn > .icon {opacity: 1;} #docsTree li > a > .icon {opacity: .65;} diff --git a/module/doc/js/browse.js b/module/doc/js/browse.js index be2e21c800..240dfcabf5 100644 --- a/module/doc/js/browse.js +++ b/module/doc/js/browse.js @@ -17,12 +17,6 @@ function browseBySearch() $('#queryBox').addClass('show'); } -function setBrowseType(type) -{ - $.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot}); - location.href = location.href; -} - $(function(){ $('#' + browseType + 'Tab').addClass('active'); if(browseType == "bysearch") diff --git a/module/doc/js/common.js b/module/doc/js/common.js index b737d4b5e9..e2e3e42572 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -16,6 +16,12 @@ function toggleAcl(acl) } } +function setBrowseType(type) +{ + $.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot}); + location.href = location.href; +} + $(document).ready(function() { $('.libs-group.sort').sortable( diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 34ef61f29c..d1ad62aa86 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -44,6 +44,7 @@ $lang->doc->acl = 'Right'; $lang->doc->groups = 'Groups'; $lang->doc->users = 'Users'; $lang->doc->item = ' Item'; +$lang->doc->num = 'Docs'; $lang->doc->searchResult = 'Search Result'; $lang->doc->moduleDoc = 'By Module'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 278af6fb23..4f2fd54078 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -44,6 +44,7 @@ $lang->doc->acl = '权限'; $lang->doc->groups = '分组'; $lang->doc->users = '用户'; $lang->doc->item = '项'; +$lang->doc->num = '文档数量'; $lang->doc->searchResult = '搜索结果'; $lang->doc->moduleDoc = '按模块浏览'; diff --git a/module/doc/view/alllibs.html.php b/module/doc/view/alllibs.html.php index a8c1074660..def2ed82a0 100644 --- a/module/doc/view/alllibs.html.php +++ b/module/doc/view/alllibs.html.php @@ -11,11 +11,14 @@ */ ?> -app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?> +app->user->feedback) && !$this->cookie->feedbackView) ? true : false;?>
+ cookie->browseType == 'bylist'):?> + +
@@ -25,6 +28,12 @@ projectCommon;?>
+
@@ -36,7 +45,7 @@
-
name;?>
+
collector, $this->app->user->account) !== false ? " " : '') . $lib->name;?>
id] . $lang->doc->item;?>
@@ -45,7 +54,9 @@
- id&objectType=lib", "", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?> + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> + id&objectType=doclib");?>" title="" class='btn btn-link ajaxCollect'> id", "", '', "title='{$lang->edit}' class='btn btn-link iframe'")?> id", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> id&type=doc", "", '', "title='{$lang->tree->manage}' class='btn btn-link'")?> @@ -58,5 +69,6 @@
+
diff --git a/module/doc/view/alllibsbylist.html.php b/module/doc/view/alllibsbylist.html.php new file mode 100644 index 0000000000..fcd5c50f25 --- /dev/null +++ b/module/doc/view/alllibsbylist.html.php @@ -0,0 +1,68 @@ +
+
+
+
+ + doc->custom;?> + productCommon;?> + projectCommon;?> + +
+ +
+
+
caseResult == 'fail'):?> - +
@@ -113,7 +113,7 @@ caseResult == 'fail'):?>
testcase->createBug);?>testcase->createBug, "onclick='createBug(this)'", "btn btn-primary createBtn");?>
id) . html::hidden('cases[]', $case->id)?> testcase->priList, $case->pri);?>createLink('testcase', 'view', "caseID=$case->id", '', true), $case->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?>createLink('testcase', 'view', "caseID=$case->id&version=$case->version&from=testtask&taskID=$case->task", '', true), $case->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> testcase->typeList, $case->type);?> assignedTo);?> lastRunner);?>team) ? $lang->task->assign : $lang->task->transferTo;?> team) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?>
task->left;?>
left, "class='form-control' autocomplete='off'");?> task->hour;?>
comment;?> team) ? $lang->task->assign : $lang->task->transferTo;?> team) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?>
task->left;?>
left, "class='form-control' autocomplete='off'");?> task->hour;?>
comment;?>
+ + + + product->name;?> + project->name;?> + doc->libName;?> + + + + + + + + + + + + + createLink('doc', 'objectLibs', "type=$type&objectID=$lib->id") : $this->createLink('doc', 'browse', "libID=$lib->id");?> + + + + + + + + + + + + +
doc->num;?>doc->addedBy;?>doc->addedDate;?>actions;?>
name);?> + + id] . $lang->doc->item;?> + + id]) . $lang->doc->item;?> + + createdBy) echo zget($users, $lib->createdBy);?>createdDate != '00-00-00 00:00:00') echo formatTime($lib->createdDate, 'm-d h:i');?> + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> + id&objectType=doclib");?>" title="" class='btn btn-link ajaxCollect'> + id", "", '', "title='{$lang->edit}' class='btn btn-link iframe'")?> + id", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> + id&type=doc", "", '', "title='{$lang->tree->manage}' class='btn btn-link'")?> +
+ + + + diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index 8e3c4ceea9..36155a33b8 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -15,6 +15,9 @@ from == 'doc'):?> + cookie->browseType == 'bylist'):?> + +
@@ -22,6 +25,10 @@ name;?>
+
diff --git a/module/doc/view/objectlibsbylist.html.php b/module/doc/view/objectlibsbylist.html.php new file mode 100644 index 0000000000..1e7768410d --- /dev/null +++ b/module/doc/view/objectlibsbylist.html.php @@ -0,0 +1,74 @@ +
+
+
+
+ name;?> +
+ +
+
+ + + + + + + + + + $lib):?> + + doc->custom->objectLibs, 'files') === false && $libID == 'files') continue;?> + doc->custom->objectLibs, 'customFiles') === false && isset($lib->main) && !$lib->main) continue;?> + + + id");?> + id");?> + + + + + + + +
doc->libName;?>doc->num;?>actions;?>
name);?>allCount . $lang->doc->item;?> + + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> + " title="" class='btn btn-link ajaxCollect'> + ", '', "title='{$lang->edit}' class='btn btn-link iframe'")?> + main)) common::printLink('doc', 'deleteLib', "libID=$libID", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> + ", '', "title='{$lang->doc->manageType}' class='btn btn-link'")?> + +
+
+
+
From be092decc56b0ace08556f47f4b897bc911a7a75 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 4 Jul 2018 14:08:51 +0800 Subject: [PATCH 15/25] * Finish task #4553. --- module/project/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/control.php b/module/project/control.php index 6894c34c91..80ac7e1b56 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1656,7 +1656,7 @@ class project extends control if($from == 'buildCreate' && $this->session->buildCreate) $browseProjectLink = $this->session->buildCreate; $this->project->updateProducts($projectID); - if(dao::isError()) dis(js::error(dao::getError())); + if(dao::isError()) die(js::error(dao::getError())); die(js::locate($browseProjectLink)); } From babcaa6d7f26e2797d31df81970702825d636f30 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 4 Jul 2018 14:13:14 +0800 Subject: [PATCH 16/25] * finish task #4516. --- module/project/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/control.php b/module/project/control.php index 6894c34c91..ce5ca4157f 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -2301,7 +2301,7 @@ class project extends control public function importPlanStories($projectID, $planID) { $planStories = $planProducts = array(); - $planStory = $this->loadModel('story')->getPlanStories($planID); + $planStory = $this->loadModel('story')->getPlanStories($planID, 'changed,active,reviewing'); if(!empty($planStory)) { $planStories = array_keys($planStory); From c4f054234fe066df3c6d629f8fa68cb216f73490 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 4 Jul 2018 14:26:40 +0800 Subject: [PATCH 17/25] * Finish task #4554 --- module/my/view/project.html.php | 30 ++++++++++++++++-------------- module/user/model.php | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 98cc1f206c..72ccdf3df1 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -33,32 +33,34 @@ - + - - - - - - - + + + + + + + createLink('project', 'browse', "projectID=$project->id");?> - + - delay)):?> - - - - + diff --git a/module/user/model.php b/module/user/model.php index f6a209ccc2..14f0a372bd 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -842,7 +842,7 @@ class userModel extends model /* Judge whether the project is delayed. */ foreach($projects as $project) { - if($project->status != 'done') + if($project->status != 'done' and $project->status != 'closed' and $project->status != 'suspended') { $delay = helper::diffDate(helper::today(), $project->end); if($delay > 0) $project->delay = $delay; From b62a8e7193d1d05316e49c59123a91ade536df6b Mon Sep 17 00:00:00 2001 From: reneteng Date: Wed, 4 Jul 2018 14:27:30 +0800 Subject: [PATCH 18/25] * change trans --- module/company/lang/en.php | 4 ++-- module/report/lang/en.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/module/company/lang/en.php b/module/company/lang/en.php index 06eb84d09a..35bd18740d 100644 --- a/module/company/lang/en.php +++ b/module/company/lang/en.php @@ -12,7 +12,7 @@ $lang->company->common = 'Company'; $lang->company->index = "Home"; $lang->company->edit = "Edit Company"; -$lang->company->view = "Company Info"; +$lang->company->view = "Company Information"; $lang->company->browse = "User List"; $lang->company->dynamic = "Dynamic"; $lang->company->orgView = 'View'; @@ -24,7 +24,7 @@ $lang->company->address = 'Mailing Address'; $lang->company->zipcode = 'Zip Code'; $lang->company->website = 'Website'; $lang->company->backyard = 'Intranet'; -$lang->company->guest = 'Anonymous Login'; +$lang->company->guest = 'Guest Login'; $lang->company->admins = 'Administrators'; $lang->company->product = $lang->productCommon; diff --git a/module/report/lang/en.php b/module/report/lang/en.php index a5ced624c4..efd8cf87a5 100644 --- a/module/report/lang/en.php +++ b/module/report/lang/en.php @@ -38,11 +38,11 @@ $lang->report->singleColor[] = 'F6BD0F'; $lang->report->projectDeviation = $lang->projectCommon . ' Deviation'; $lang->report->productSummary = $lang->productCommon . ' Summary'; -$lang->report->bugCreate = 'Bug Submission Report'; -$lang->report->bugAssign = 'Bug Assignment Report'; -$lang->report->workload = 'Workload'; -$lang->report->workloadAB = 'Workload'; -$lang->report->bugOpenedDate = 'Bug Created From'; +$lang->report->bugCreate = 'Bug Reported Statement'; +$lang->report->bugAssign = 'Bug Assigned Statement'; +$lang->report->workload = 'Team Workload Statement'; +$lang->report->workloadAB = 'Workload Statement'; +$lang->report->bugOpenedDate = 'Bug reported from'; $lang->report->taskAssignedDate = 'From'; $lang->report->beginAndEnd = ' From'; $lang->report->dept = 'Dept'; @@ -50,9 +50,9 @@ $lang->report->deviationChart = $lang->projectCommon . ' Deviation Chart'; $lang->reportList->project->lists[10] = $lang->projectCommon . ' Deviation|report|projectdeviation'; $lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary'; -$lang->reportList->test->lists[10] = 'Bugs Reported|report|bugcreate'; -$lang->reportList->test->lists[13] = 'Bugs Assigned|report|bugassign'; -$lang->reportList->staff->lists[10] = 'Workload|report|workload'; +$lang->reportList->test->lists[10] = 'Bugs Reported Statement|report|bugcreate'; +$lang->reportList->test->lists[13] = 'Bugs Assigned Statement|report|bugassign'; +$lang->reportList->staff->lists[10] = 'Team Workload Statement|report|workload'; $lang->report->id = 'ID'; $lang->report->project = $lang->projectCommon; From 19fdb9358c6cce7ccb0585388f3ac3bf2b8c6a72 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 4 Jul 2018 14:34:47 +0800 Subject: [PATCH 19/25] * finish task #4588. --- module/story/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/story/model.php b/module/story/model.php index dcee73ecde..e6c801684f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1685,6 +1685,7 @@ class storyModel extends model ->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t2.product = t4.id') ->where($storyQuery) ->andWhere('t1.project')->eq((int)$projectID) + ->andWhere('t2.deleted')->eq(0) ->orderBy($orderBy) ->page($pager, 't2.id') ->fetchAll('id'); From ddea3afd97f2b6881e54eece42befd25392b6707 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 15:20:06 +0800 Subject: [PATCH 20/25] * Set build field word-wrap. --- module/bug/css/view.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/bug/css/view.css b/module/bug/css/view.css index 7908c48a09..3e5652d2ac 100644 --- a/module/bug/css/view.css +++ b/module/bug/css/view.css @@ -1,2 +1,3 @@ .content .stepTitle{display:block; color: green; margin:0px;} .table-fixed td{white-space: unset} +.table-data tr > td{word-break: break-all; word-wrap: break-word;} From d32830d49e7a00de2238138f37013034c48ac0f7 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 4 Jul 2018 15:39:16 +0800 Subject: [PATCH 21/25] * Finish task #4560 --- module/product/control.php | 7 ++----- module/product/view/view.html.php | 2 +- module/project/control.php | 6 ++---- module/project/css/view.css | 1 + module/project/view/view.html.php | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 0df8c1a293..e50f83637d 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -383,9 +383,6 @@ class product extends control $this->product->setMenu($this->products, $productID); - $actions = $this->dao->select('*')->from(TABLE_ACTION)->where('product')->like("%,$productID,%")->orderBy('date_desc')->limit(6)->fetchAll(); - if($actions) $this->loadModel('action')->transformActions($actions); - $releases = $this->dao->select('*')->from(TABLE_RELEASE)->where('deleted')->eq(0)->andWhere('product')->eq($productID)->orderBy('date')->fetchAll(); $this->view->title = $product->name . $this->lang->colon . $this->lang->product->view; @@ -397,7 +394,7 @@ class product extends control $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->lines = array('') + $this->loadModel('tree')->getLinePairs(); $this->view->branches = $this->loadModel('branch')->getPairs($productID); - $this->view->actions = $actions; + $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, $productID); $this->view->releases = $releases; $this->display(); @@ -465,7 +462,7 @@ class product extends control public function dynamic($productID = 0, $type = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next') { /* Save session. */ - $uri = $this->app->getURI(true); + $uri = $this->app->getURI(true); $this->session->set('productList', $uri); $this->session->set('productPlanList', $uri); $this->session->set('releaseList', $uri); diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index 6655a6079c..e7f6766895 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -51,7 +51,7 @@
    - +
  • major) echo "class='active'";?>>
    date;?> diff --git a/module/project/control.php b/module/project/control.php index 80ac7e1b56..aef67193b3 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1362,9 +1362,6 @@ class project extends control $this->project->setMenu($this->projects, $project->id); $this->app->loadLang('bug'); - $actions = $this->dao->select('*')->from(TABLE_ACTION)->where('project')->eq("$projectID")->orderBy('date_desc')->limit(6)->fetchAll(); - if($actions) $this->loadModel('action')->transformActions($actions); - list($dateList, $interval) = $this->project->getDateList($project->begin, $project->end, 'noweekend', 0, 'Y-m-d'); $chartData = $this->project->buildBurnData($projectID, $dateList, 'noweekend'); @@ -1377,7 +1374,8 @@ class project extends control $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); $this->view->planGroups = $this->project->getPlans($products); $this->view->groups = $this->loadModel('group')->getPairs(); - $this->view->actions = $actions; + $this->view->actions = $this->loadModel('action')->getList('project', $projectID); + $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, 'all', $projectID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->teamMembers = $this->project->getTeamMembers($projectID); $this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID); diff --git a/module/project/css/view.css b/module/project/css/view.css index 6c88638b83..771b0e9847 100644 --- a/module/project/css/view.css +++ b/module/project/css/view.css @@ -7,3 +7,4 @@ #burnLegend > div:before {content: ' '; display: block; position: absolute; width: 20px; left: 0; top: 8px; height: 2px; background: #EEEEEE;} #burnLegend > div.line-real:before {background: #006AF1;} +.block-dynamic .panel-body {height: 230px; overflow: auto; position: relative;} diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index 4d2e0650a2..b4adbbe2a6 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -48,7 +48,7 @@
      - +
    • major) echo "class='active'";?>>
      date;?> From 327aeba49d44148e3583a3249a8a6d8bca293299 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 4 Jul 2018 15:50:28 +0800 Subject: [PATCH 22/25] * Finish task #4591 --- module/user/view/batchcreate.html.php | 2 +- module/user/view/batchedit.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/user/view/batchcreate.html.php b/module/user/view/batchcreate.html.php index c184b184b9..c4fd08d177 100644 --- a/module/user/view/batchcreate.html.php +++ b/module/user/view/batchcreate.html.php @@ -38,7 +38,7 @@
- + diff --git a/module/user/view/batchedit.html.php b/module/user/view/batchedit.html.php index c09ce2982a..1ae6718c05 100644 --- a/module/user/view/batchedit.html.php +++ b/module/user/view/batchedit.html.php @@ -37,7 +37,7 @@ - + From b3aaab4f0c32e59d12e54a143253dfd5536298bb Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 4 Jul 2018 17:05:53 +0800 Subject: [PATCH 23/25] * Finish task #4598 --- module/project/control.php | 7 +++++++ module/project/js/common.js | 2 +- module/project/view/edit.html.php | 11 +++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/module/project/control.php b/module/project/control.php index 28e3bfb457..b95b6d502e 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1090,6 +1090,12 @@ class project extends control if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name; if($product->branch) $linkedBranches[$product->branch] = $product->branch; } + $this->loadModel('productplan'); + $productPlans = array(0 => ''); + foreach($linkedProducts as $product) + { + $productPlans[$product->id] = $this->productplan->getPairs($product->id); + } $this->view->title = $title; $this->view->position = $position; @@ -1102,6 +1108,7 @@ class project extends control $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->allProducts = $allProducts; $this->view->linkedProducts = $linkedProducts; + $this->view->productPlans = $productPlans; $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches); $this->display(); diff --git a/module/project/js/common.js b/module/project/js/common.js index e0d57f4d37..db6009f509 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -177,7 +177,7 @@ function loadPlans(product, branchID) { if(typeof(planID) == 'undefined') planID = 0; planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID; - $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + (config.currentMethod == 'create' ? 'unexpired' : '')), function(data) + $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data) { if(data) { diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index d2d71311ac..3fbf7b4483 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -133,6 +133,17 @@ + global->flow == 'onlyTask') echo "class='hidden'";?>> + + + From 5a79ac1a3d2a3372336757911d561a0ce193b622 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 17:15:27 +0800 Subject: [PATCH 24/25] * Get group pairs order by id. --- module/group/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/group/model.php b/module/group/model.php index 1e28da57ce..3d33a35c9c 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -114,7 +114,7 @@ class groupModel extends model */ public function getPairs() { - return $this->dao->select('id, name')->from(TABLE_GROUP)->fetchPairs(); + return $this->dao->select('id, name')->from(TABLE_GROUP)->orderBy('id')->fetchPairs(); } /** From a886e98b261f49b2b8246c942092521b2a83c9c2 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 4 Jul 2018 17:23:19 +0800 Subject: [PATCH 25/25] * Set word wrap. --- module/common/view/action.html.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/common/view/action.html.php b/module/common/view/action.html.php index 802d192c2e..ea779ef062 100755 --- a/module/common/view/action.html.php +++ b/module/common/view/action.html.php @@ -1,4 +1,7 @@ getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> +
idAB;?>project->code;?>project->name;?>project->begin;?>project->end;?>statusAB;?>team->role;?>team->join;?>project->code;?>project->name;?>project->begin;?>project->end;?>statusAB;?>team->role;?>team->join;?> team->hours;?>
id);?> code;?> name);?> begin;?> end;?>project->delayed;?>project->statusList[$project->status];?> + delay)):?> + project->delayed;?> + + project->statusList, $project->status, '');?> + + role;?> join;?> hours;?>'>user->dept;?> user->account;?> user->realname;?>user->role;?>user->role;?> user->group;?> '>user->email;?> '>user->gender;?>'> user->dept;?> user->account;?> user->realname;?>user->role;?>user->role;?> '>user->commiter;?> '> user->email;?> '> user->join;?>
project->linkPlan;?> +
+ + id, array(0 => ''));?> +
id . "]", $plans, $product->plan, "class='form-control chosen'");?>
+ +
+
project->desc;?> desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?>