diff --git a/config/filter.php b/config/filter.php index d54e28622e..89ee1296f0 100755 --- a/config/filter.php +++ b/config/filter.php @@ -97,6 +97,7 @@ $filter->mail->batchdelete = new stdclass(); $filter->misc->checkupdate = new stdclass(); $filter->file->download = new stdclass(); $filter->product->browse = new stdclass(); +$filter->product->all = new stdclass(); $filter->product->default = new stdclass(); $filter->product->index = new stdclass(); $filter->product->export = new stdclass(); @@ -108,6 +109,7 @@ $filter->program->default = new stdclass(); $filter->program->pgmproject = new stdclass(); $filter->program->prjbrowse = new stdclass(); $filter->program->project = new stdclass(); +$filter->program->product = new stdclass(); $filter->program->browse = new stdclass(); $filter->program->export = new stdclass(); $filter->program->pgmbrowse = new stdclass(); @@ -236,6 +238,7 @@ $filter->product->browse->cookie['productStoryOrder'] = 'reg::orderBy'; $filter->product->browse->cookie['storyModule'] = 'int'; $filter->product->browse->cookie['storyBranch'] = 'int'; $filter->product->browse->cookie['treeBranch'] = 'reg::word'; +$filter->product->all->cookie['showProductBatchEdit'] = 'int'; $filter->product->default->cookie['lastProduct'] = 'int'; $filter->product->default->cookie['preProductID'] = 'int'; $filter->product->index->cookie['preBranch'] = 'reg::word'; @@ -247,19 +250,22 @@ $filter->product->dynamic->cookie['preBranch'] = 'reg::word'; $filter->branch->default->cookie['preBranch'] = 'reg::word'; -$filter->program->default->cookie['lastPGM'] = 'int'; -$filter->program->default->cookie['lastPRJ'] = 'int'; -$filter->program->prjbrowse->cookie['programType'] = 'code'; -$filter->program->project->cookie['involved'] = 'code'; -$filter->program->browse->cookie['showClosed'] = 'code'; -$filter->program->export->cookie['checkedItem'] = 'reg::checked'; -$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code'; +$filter->program->default->cookie['lastPGM'] = 'int'; +$filter->program->default->cookie['lastPRJ'] = 'int'; +$filter->program->prjbrowse->cookie['programType'] = 'code'; +$filter->program->project->cookie['involved'] = 'code'; +$filter->program->project->cookie['showProjectBatchEdit'] = 'int'; +$filter->program->product->cookie['showProductBatchEdit'] = 'int'; +$filter->program->browse->cookie['showClosed'] = 'code'; +$filter->program->export->cookie['checkedItem'] = 'reg::checked'; +$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code'; $filter->project->default->cookie['lastProject'] = 'int'; $filter->project->default->cookie['lastPRJ'] = 'int'; $filter->project->default->cookie['projectMode'] = 'code'; $filter->project->default->cookie['kanbanview'] = 'code'; $filter->project->browse->cookie['involved'] = 'code'; +$filter->project->browse->cookie['showProjectBatchEdit'] = 'int'; $filter->project->export->cookie['involved'] = 'code'; $filter->project->browse->cookie['projectType'] = 'code'; $filter->project->story->cookie['storyModuleParam'] = 'int'; diff --git a/extension/lite/product/ext/view/browse.html.php b/extension/lite/product/ext/view/browse.html.php index 5e563f9c1a..524ca6c491 100644 --- a/extension/lite/product/ext/view/browse.html.php +++ b/extension/lite/product/ext/view/browse.html.php @@ -18,6 +18,7 @@ body {margin-bottom: 25px;} #mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;} .body-modal #mainMenu>.btn-toolbar {width: auto;} .assignedTo{border-radius: 4px !important;} +#productStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} diff --git a/module/bug/config.php b/module/bug/config.php index d17bbaaa9e..5ac6e7d586 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -300,11 +300,11 @@ $config->bug->datatable->fieldList['openedBuild']['required'] = 'no'; $config->bug->datatable->fieldList['openedBuild']['control'] = 'multiple'; $config->bug->datatable->fieldList['openedBuild']['dataSource'] = array('module' => 'build', 'method' =>'getBuildPairs', 'params' => '$productID&$branch&noempty,noterminate,nodone,withbranch'); -$config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB'; -$config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no'; -$config->bug->datatable->fieldList['assignedTo']['width'] = '120'; -$config->bug->datatable->fieldList['assignedTo']['required'] = 'no'; -$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'bug', 'method' =>'getProductMemberPairs', 'params' => '$productID&$branch'); +$config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB'; +$config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no'; +$config->bug->datatable->fieldList['assignedTo']['width'] = '120'; +$config->bug->datatable->fieldList['assignedTo']['required'] = 'no'; +$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'user', 'method' =>'getPairs', 'params' => 'noclosed|noletter'); $config->bug->datatable->fieldList['assignedDate']['title'] = 'assignedDate'; $config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no'; diff --git a/module/common/model.php b/module/common/model.php index 1c8bd3ec2d..c820584238 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2149,6 +2149,8 @@ EOD; { if(strpos($orderBy, 'priOrder') !== false) $select .= ", IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder"; if(strpos($orderBy, 'severityOrder') !== false) $select .= ", IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder"; + $queryCondition = str_replace('t4.status', 'status', $queryCondition); + $sql = $this->dao->select("*$select")->from($table) ->where($queryCondition) ->beginIF($orderBy != false)->orderBy($orderBy)->fi() diff --git a/module/dept/view/browse.html.php b/module/dept/view/browse.html.php index 94e608857b..9f9e2ae8c4 100644 --- a/module/dept/view/browse.html.php +++ b/module/dept/view/browse.html.php @@ -50,7 +50,7 @@ ?> - + '); + changedInput.closest('span').addClass('dataField'); - $.each($('input[name*="depts[id"]'), function(index, value) + $('input[name^="depts"]').not($(this)).each(function() { if($(this).val()) depts.push($(this).val()); }); - for(var i = 0; i < postDept.length; i++) + if(depts.indexOf(modifyData) > -1) { - if(depts.indexOf(postDept[i]) > -1 || postDept[i] == postDept[i + 1]) - { - if(confirm(repeatDepart)) - { - var link = createLink('dept', 'manageChild'); - break; - } - else - { - setTimeout(function() - { - $('#submit').removeAttr('disabled'); - },10) - return false; - } - } + $('.dataField #depts\\[\\]').addClass('intro'); + $('.intro').css({"margin" : "5px 0px 5px 0px", "display" : "inline", "width" : "50%"}); + changedInput.after('' + repeatDepart + ''); + } + }); + + $("input[name*='depts']").focus(function () + { + if($('.dataField').length) + { + $('.intro').removeAttr('style'); + $('.intro').unwrap(); + $('#depts\\[\\]').removeClass('intro'); + $('.tips').remove(); } }); }); diff --git a/module/doc/control.php b/module/doc/control.php index cbadd7763d..5db8c0614e 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -629,6 +629,18 @@ class doc extends control if($this->config->systemMode == 'classic' and $objectType == 'project') $objectType = 'execution'; $this->doc->delete(TABLE_DOC, $docID); + /* Delete doc files. */ + $this->loadModel('file'); + foreach($doc->files as $fileID => $file) + { + $file = $this->file->getById($fileID); + $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); + $this->loadModel('action')->create($file->objectType, $file->objectID, 'deletedFile', '', $extra=$file->title); + + $fileRecord = $this->dao->select('id')->from(TABLE_FILE)->where('pathname')->eq($file->pathname)->fetch(); + if(empty($fileRecord)) @unlink($file->realPath); + } + /* if ajax request, send result. */ if($this->server->ajax) { diff --git a/module/doc/js/create.js b/module/doc/js/create.js index 7c70650790..9745391a60 100644 --- a/module/doc/js/create.js +++ b/module/doc/js/create.js @@ -62,7 +62,7 @@ $(function() if($(".createCustomLib").length == 1) $(".createCustomLib").click(); // Fix bug #15139. - if(!fromGlobal && textType.indexOf(docType) != -1) + if(!fromGlobal && textType.indexOf(docType) != -1 && from == 'doc') { var basicInfo = JSON.parse(sessionStorage.getItem('docBasicInfo')); diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 5ce268c485..ff22a206ab 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -10,6 +10,7 @@ * @link http://www.zentao.net */ ?> + doc->textTypes, $docType) !== false and $from == 'doc'):?> diff --git a/module/execution/css/story.css b/module/execution/css/story.css index 3c75842a66..edef11c0c7 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -20,3 +20,4 @@ th.c-pri{width:50px;} .switchBtn {background-color: #fff !important;} .switchBtn > i {padding-left: 7px;} #main>.container {padding: 0 20px 20px 23px;} +#executionStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 853272afe3..9c88536042 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -467,7 +467,7 @@ $lang->execution->kanban = "Kanban"; $lang->execution->kanbanSetting = "Kanban Einstellung"; $lang->execution->setKanban = "Kanban Einstellung"; $lang->execution->resetKanban = "Einstellungen zurücksetzen"; -$lang->execution->printKanban = "Kanban drucken"; +$lang->execution->printKanban = "drucken Kanban"; $lang->execution->fullScreen = "Full Screen"; $lang->execution->bugList = "Bugs"; @@ -487,7 +487,7 @@ $lang->kanbanSetting->optionList['0'] = 'Verstecken'; $lang->kanbanSetting->optionList['1'] = 'Anzeigen'; $lang->printKanban = new stdclass(); -$lang->printKanban->common = 'Kanban drucken'; +$lang->printKanban->common = 'drucken Kanban'; $lang->printKanban->content = 'Inhanlt'; $lang->printKanban->print = 'Drucken'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 1a5bb94f77..e5cfcf3eeb 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -467,7 +467,7 @@ $lang->execution->kanban = "Kanban"; $lang->execution->kanbanSetting = "Settings"; $lang->execution->setKanban = "Set Kanban"; $lang->execution->resetKanban = "Reset"; -$lang->execution->printKanban = "Print"; +$lang->execution->printKanban = "Print Kanban"; $lang->execution->fullScreen = "Full Screen"; $lang->execution->bugList = "Bugs"; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 068d55bd72..6764593377 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -467,7 +467,7 @@ $lang->execution->kanban = "Kanban"; $lang->execution->kanbanSetting = "Paramétrage"; $lang->execution->setKanban = "Paramétrage"; $lang->execution->resetKanban = "Réinitialiser"; -$lang->execution->printKanban = "Impression"; +$lang->execution->printKanban = "Imprimer Kanban"; $lang->execution->fullScreen = "Full Screen"; $lang->execution->bugList = "Bugs"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 07eede8d97..5d3bd56de2 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -487,7 +487,7 @@ $lang->kanbanSetting->optionList['0'] = '隐藏'; $lang->kanbanSetting->optionList['1'] = '显示'; $lang->printKanban = new stdclass(); -$lang->printKanban->common = '看板打印'; +$lang->printKanban->common = '打印看板'; $lang->printKanban->content = '内容'; $lang->printKanban->print = '打印'; diff --git a/module/execution/lang/zh-tw.php b/module/execution/lang/zh-tw.php index 17bf814a6f..1c06be7dd3 100644 --- a/module/execution/lang/zh-tw.php +++ b/module/execution/lang/zh-tw.php @@ -410,7 +410,7 @@ $lang->kanbanSetting->optionList['0'] = '隱藏'; $lang->kanbanSetting->optionList['1'] = '顯示'; $lang->printKanban = new stdclass(); -$lang->printKanban->common = '看板打印'; +$lang->printKanban->common = '打印看板'; $lang->printKanban->content = '內容'; $lang->printKanban->print = '打印'; diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index 1a860e96f3..d3503c0e8a 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -185,3 +185,4 @@ .region.active.notAll {margin-top: -5px;} .region.active.notAll .region-header {display: none;} .region.active.notAll .kanban, .region.active.notAll .kanban .kanban-header {background-color: #efefef;} +.kanban-card a[disabled] {color: #313c52;} diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 14fbb1196e..0511b75ab4 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -1507,6 +1507,7 @@ $(function() $(window).on('resize', function(a) { adjustAddBtnPosition(); + initRegionTabs(); }); resetLaneHeight(); @@ -1558,8 +1559,6 @@ $(function() distance = 0; radiusWidth = 10; - $(window).on('resize', initRegionTabs); - initRegionTabs(); $('.leftBtn').click(function() { diff --git a/module/mr/model.php b/module/mr/model.php index 7506d041d3..c0601d2f9d 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -686,7 +686,7 @@ class mrModel extends model } $mergeResult = json_decode(commonModel::http($url, $MRObject)); - if(isset($mergeResult->number)) $mergeResult->iid = $host->type == 'gitea' ? $mergeResult->number : $mergeResult->id; + if(isset($mergeResult->number)) $mergeResult->iid = $mergeResult->number; if(isset($mergeResult->mergeable)) { if($mergeResult->mergeable) $mergeResult->merge_status = 'can_be_merged'; @@ -867,7 +867,16 @@ class mrModel extends model */ public function apiGetMRCommits($hostID, $projectID, $MRID) { - $url = sprintf($this->gitlab->getApiRoot($hostID), "/projects/$projectID/merge_requests/$MRID/commits"); + $host = $this->loadModel('pipeline')->getByID($hostID); + if($host->type == 'gitlab') + { + $url = sprintf($this->gitlab->getApiRoot($hostID), "/projects/$projectID/merge_requests/$MRID/commits"); + } + else + { + $url = sprintf($this->loadModel($host->type)->getApiRoot($hostID), "/repos/$projectID/pulls/$MRID/commits"); + } + return json_decode(commonModel::http($url)); } @@ -1797,6 +1806,8 @@ class mrModel extends model /* Get commits by MR. */ $commits = $this->apiGetMRCommits($MR->hostID, $MR->targetProject, $MR->mriid); + if(empty($commits)) return true; + foreach($commits as $commit) { $objects = $this->repo->parseComment($commit->message); diff --git a/module/my/css/common.css b/module/my/css/common.css index 7f537d48f0..8b139ae11f 100644 --- a/module/my/css/common.css +++ b/module/my/css/common.css @@ -8,3 +8,4 @@ .dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;} .btn-toolbar .nav-title {float: left; display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 13px; font-weight: bolder; line-height: 18px; text-align: center; white-space: nowrap; vertical-align: middle;} +#myStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} diff --git a/module/my/css/story.css b/module/my/css/story.css index 13919b8117..58b9c22c7d 100644 --- a/module/my/css/story.css +++ b/module/my/css/story.css @@ -10,3 +10,4 @@ .table td.c-hours {padding-right: 12px;} .main-table tbody > tr.table-children > td:first-child::before {width: 3px;} @-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};} +.c-actions-6 {width: 185px;} diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 0be44dc79a..4f40e12b9a 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -51,12 +51,7 @@ id);?> - model === 'waterfall') echo "{$lang->project->waterfall} "; - if($project->model === 'scrum') echo "{$lang->project->scrum} "; - if($project->model === 'kanban') echo "{$lang->project->kanban} "; - echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project'"); - ?> + createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project' title='{$project->name} ({$this->lang->project->{$project->model}})'");?> project->statusList, $project->status, '');?> diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index 37248276c6..d607ca8e1c 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -114,8 +114,21 @@ echo common::buildIconButton('story', 'review', "$vars&from=product&storyType=requirement", $story, 'list', 'search', '', 'iframe', true); } echo common::buildIconButton('story', 'recall', "$vars&from=list&storyType=requirement", $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall); - echo common::buildIconButton('story', 'close', "$vars&from=&storyType=requirement", $story, 'list', '', '', 'iframe', true); echo common::buildIconButton('story', 'edit', "$vars&from=default&storyType=requirement", $story, 'list', '', '', 'iframe', true, "data-width='95%'"); + + $storyType = 'storyType=requirement'; + $canChange = common::hasPriv('story', 'change', '', $storyType); + $canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview', '', $storyType)); + $canReview = (strpos('draft,changing', $story->status) === false and common::hasPriv('story', 'review', '', $storyType)); + $canRecall = common::hasPriv('story', 'recall', '', $storyType); + $canEdit = common::hasPriv('story', 'edit', '', $storyType); + $canClose = common::hasPriv('story', 'close', '', $storyType); + if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and $canClose) + { + echo "
"; + } + + echo common::buildIconButton('story', 'close', "$vars&from=&storyType=requirement", $story, 'list', '', '', 'iframe', true); } ?> @@ -163,8 +176,19 @@ } common::printIcon('story', 'recall', "$vars&from=list&storyType=story", $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall); - common::printIcon('story', 'close', "$vars&from=&storyType=story", $child, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', "$vars&from=default&storyType=story", $child, 'list'); + $storyType = 'storyType=story'; + $canChange = common::hasPriv('story', 'change', '', $storyType); + $canSubmitReview = (strpos('draft,changing', $child->status) !== false and common::hasPriv('story', 'submitReview', '', $storyType)); + $canReview = (strpos('draft,draft', $child->status) === false and common::hasPriv('story', 'review', '', $storyType)); + $canRecall = common::hasPriv('story', 'recall', '', $storyType); + $canEdit = common::hasPriv('story', 'edit', '', $storyType); + $canClose = common::hasPriv('story', 'close', '', $storyType); + if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and $canClose) + { + echo "
"; + } + common::printIcon('story', 'close', "$vars&from=&storyType=story", $child, 'list', '', '', 'iframe', true); } } ?> diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index b309858436..933b5ce449 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -50,6 +50,11 @@ $canBatchReview = common::hasPriv('story', 'batchReview'); $canBatchAssignTo = common::hasPriv('story', 'batchAssignTo'); $canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchAssignTo); + $canChange = common::hasPriv('story', 'change'); + $canRecall = common::hasPriv('story', 'recall'); + $canEdit = common::hasPriv('story', 'edit'); + $canCreateCase = common::hasPriv('testcase', 'create'); + $canClose = common::hasPriv('story', 'close'); ?> @@ -116,9 +121,21 @@ } echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall); - echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'"); - echo common::buildIconButton('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'"); + + $canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview')); + $canReview = (strpos('draft,changing', $story->status) === false and common::hasPriv('story', 'review')); + + if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and ($canCreateCase or $canClose)) + { + echo "
"; + } + + echo common::buildIconButton('testcase', 'create', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'"); + + if($canCreateCase and $canClose) echo "
"; + + echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); } ?> @@ -165,9 +182,21 @@ common::printIcon('story', 'review', $vars, $child, 'list', 'search', '', 'iframe', true); } common::printIcon('story', 'recall', $vars, $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall); - common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars, $child, 'list', '', '', 'iframe', true, "data-width='95%'"); - common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'"); + + $canSubmitReview = (strpos('draft,changing', $child->status) !== false and common::hasPriv('story', 'submitReview')); + $canReview = (strpos('draft,changing', $child->status) === false and common::hasPriv('story', 'review')); + + if(($canChange or $canSubmitReview or $canReview or $canRecall or $canEdit) and ($canCreateCase or $canClose)) + { + echo "
"; + } + + common::printIcon('testcase', 'create', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'"); + + if($canCreateCase and $canClose) echo "
"; + + common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true); } ?> diff --git a/module/product/control.php b/module/product/control.php index 87631bc5cc..2bd4c6fb33 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1292,6 +1292,7 @@ class product extends control $this->view->orderBy = $orderBy; $this->view->browseType = $browseType; $this->view->pager = $pager; + $this->view->showBatchEdit = $this->cookie->showProductBatchEdit; $this->display(); } diff --git a/module/product/css/all.css b/module/product/css/all.css index 146f6bdf0e..21fbea6ed5 100644 --- a/module/product/css/all.css +++ b/module/product/css/all.css @@ -40,13 +40,12 @@ th.c-name {width: 400px;} th.c-PO {width: 100px;} th.c-story {width: 290px;} -th.c-bug {width: 200px;} +th.c-bug {width: 150px;} th.c-plan {width: 45px;} th.c-release {width: 50px;} th.c-actions {width: 50px;} [lang='en'] .en-wrap-text {white-space: normal; height: 24px; line-height: 1; font-size: 12px;} - #productListForm thead>tr>th, #productListForm tbody>tr>td {text-align: center; text-overflow: unset!important} #productListForm thead>tr>th {padding: 0; line-height: 24px;} @@ -86,9 +85,11 @@ th.c-actions {width: 50px;} [lang^='zh-'] th.c-story {width: 220px;} } +#productTableList .c-name > span.table-nest-icon {width: 0; visibility: hidden;} #productTableList > tr.row-line.is-nest-child > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;} #productTableList > tr.row-line.no-nest > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;} .statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;} .table-footer.fixed-footer .statistic {color: #fff;} #productTableList .c-manager {padding-left: 14px;} #productTableList .c-manager a {top: 7px; left: 22px;} +.checkbox-primary {margin-right: 10px;} diff --git a/module/product/js/all.js b/module/product/js/all.js index 9d18908c92..9aed531aa3 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -1,6 +1,13 @@ $("#" + browseType + "Tab").addClass('btn-active-text'); $(function() { + $('input[name^="showEdit"]').click(function() + { + $.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot}); + setCheckbox(); + }); + setCheckbox(); + /* Init table sort. */ $('#productTableList').addClass('sortable').sortable( { @@ -36,6 +43,23 @@ $(function() } }); + /** + * Set batch edit checkbox. + * + * @access public + * @return void + */ + function setCheckbox() + { + $('#productListForm .c-checkbox, #productListForm .check-all').hide(); + $('.c-name').css('border-left', 'none'); + if($.cookie('showProductBatchEdit') == 1) + { + $('#productListForm .c-checkbox, #productListForm .check-all').show(); + $('.c-name').css('border-left', '1px solid #ddd'); + } + } + /* Update parent checkbox */ function updatePrarentCheckbox($parent) { @@ -69,17 +93,21 @@ $(function() function addStatistic() { var checkedLength = $(":checkbox[name^='productIDList']:checked").length; - var summary = checkedProducts.replace('%s', checkedLength); - if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product'); - var statistic = "
" + summary + "
"; - if(checkedLength > 0) { + var summary = checkedProducts.replace('%s', checkedLength); + if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product'); + + var statistic = "
" + summary + "
"; + $('#productsCount').hide(); $('#productsSummary').remove(); $('#editBtn').after(statistic); + $('.table-actions').show(); } else { + $('.table-actions').hide(); + $('#productsCount').show(); $('#productsSummary').addClass('hidden'); } } diff --git a/module/product/lang/de.php b/module/product/lang/de.php index 448a936116..913c2c6eda 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->track = 'View Stories Matrix'; $lang->product->checkedProducts = '%s products selected'; +$lang->product->pageSummary = 'Total products: %s.'; +$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Close {$lang->productCommon}"; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index d5c1248166..bf6a91a961 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Unbind Whitelist'; $lang->product->track = 'View Stories Matrix'; $lang->product->checkedProducts = '%s products selected'; +$lang->product->pageSummary = 'Total products: %s.'; +$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Close {$lang->productCommon}"; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index 5dd20995a5..6154559fac 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->track = 'Consulter Stories Matrice'; $lang->product->checkedProducts = '%s produits s électionnés'; +$lang->product->pageSummary = 'Total products: %s.'; +$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Fermer {$lang->productCommon}"; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 9f3bc3955b..6d33a54d1f 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = '添加白名单'; $lang->product->unbindWhitelist = '移除白名单'; $lang->product->track = "查看需求矩阵"; $lang->product->checkedProducts = '已选择%s项产品'; +$lang->product->pageSummary = '本页共%s个产品。'; +$lang->product->lineSummary = '本页共%s个产品线,%s个产品。'; $lang->product->indexAction = "所有{$lang->productCommon}仪表盘"; $lang->product->closeAction = "关闭{$lang->productCommon}"; diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 4ef7660583..a562604777 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -11,13 +11,16 @@ ?> + +