diff --git a/config/filter.php b/config/filter.php index d54e28622e..b740cdafc0 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(); @@ -236,6 +237,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'; @@ -260,6 +262,7 @@ $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/module/product/control.php b/module/product/control.php index ee3d3e1427..057a829786 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1289,6 +1289,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 9d08b8c152..8edf8114a7 100644 --- a/module/product/css/all.css +++ b/module/product/css/all.css @@ -38,7 +38,6 @@ #sidebar>.cell {width: 100%;} th.c-name {width: 400px;} -th.c-requirement {width: 290px;} th.c-story {width: 290px;} th.c-bug {width: 150px;} th.c-plan {width: 45px;} @@ -46,7 +45,6 @@ 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;} diff --git a/module/product/js/all.js b/module/product/js/all.js index 093c154f65..6f75f1b1f3 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -6,15 +6,10 @@ $(function() $('input[name^="showEdit"]').click(function() { - $('#productListForm .c-checkbox, #productListForm .check-all').hide(); - $('.c-name').css('border-left', 'none'); - var showEdit = $(this).is(':checked') ? 1 : 0; - if(showEdit) - { - $('#productListForm .c-checkbox, #productListForm .check-all').show(); - $('.c-name').css('border-left', '1px solid #ddd'); - } + $.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot}); + setCheckbox(); }); + setCheckbox(); /* Init table sort. */ $('#productTableList').addClass('sortable').sortable( @@ -51,6 +46,17 @@ $(function() } }); + 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) { diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index f890cf234a..eebbbfe61f 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -20,7 +20,7 @@ {$recTotal}" : '';?> {$label}" . $recTotalLabel, '', "class='btn btn-link' id='{$key}Tab'");?> - $lang->product->edit));?> + $lang->product->edit), $showBatchEdit);?> product->searchStory;?>
@@ -52,9 +52,6 @@ product->name);?> - config->URAndSR):?> - story->requirement;?> - story->story;?> bug->common;?> product->plan;?> @@ -66,13 +63,6 @@ actions;?> - config->URAndSR):?> - story->draft;?> - story->activate;?> - story->change;?> - story->statusList['reviewing'];?> -
story->completeRate;?>
- story->draft;?> story->activate;?> story->change;?> @@ -113,13 +103,6 @@ - config->URAndSR):?> - - - - - % - @@ -159,13 +142,6 @@ - config->URAndSR):?> - - - - - % - @@ -219,13 +195,6 @@ echo "" . $productLink; ?> - config->URAndSR):?> - requirements['draft'];?> - requirements['active'];?> - requirements['changing'];?> - requirements['reviewing'];?> - requirements['closed'] / $totalRequirements, 3) * 100;?>% - stories['draft'];?> stories['active'];?> stories['changing'];?> diff --git a/module/project/control.php b/module/project/control.php index 382f8ffc6a..437d945cce 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -378,6 +378,7 @@ class project extends control $this->view->recTotal = $recTotal; $this->view->recPerPage = $recPerPage; $this->view->pageID = $pageID; + $this->view->showBatchEdit = $this->cookie->showProjectBatchEdit; $this->view->allProjectsNum = $this->loadModel('program')->getProjectStats($programID, 'all'); $this->display(); diff --git a/module/project/js/browse.js b/module/project/js/browse.js index efe05b7a51..4f62be6d15 100644 --- a/module/project/js/browse.js +++ b/module/project/js/browse.js @@ -1,30 +1,35 @@ $(function() { - $('#projectForm .checkbox-primary').hide(); $('input[name^="involved"]').click(function() { var involved = $(this).is(':checked') ? 1 : 0; - $.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot}); + $.cookie('involved', involved, {expires: config.cookieLife, path: config.webRoot}); window.location.reload(); }); $('[id="switchButton"]').click(function() { var projectType = $(this).attr('data-type'); - $.cookie('projectType', projectType, {expires:config.cookieLife, path:config.webRoot}); + $.cookie('projectType', projectType, {expires: config.cookieLife, path: config.webRoot}); window.location.reload(); }); $('input[name^="showEdit"]').click(function() { - $('#projectForm .checkbox-primary').hide(); - var showEdit = $(this).is(':checked') ? 1 : 0; - if(showEdit) $('#projectForm .checkbox-primary').show(); + $.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot}); + setCheckbox(); }); + setCheckbox(); if(!useDatatable) resetNameWidth(); }); +function setCheckbox() +{ + $('#projectForm .checkbox-primary').hide(); + if($.cookie('showProjectBatchEdit') == 1) $('#projectForm .checkbox-primary').show(); +} + function resetNameWidth() { $name = $('#projectForm thead th.c-name'); diff --git a/module/project/view/browsebylist.html.php b/module/project/view/browsebylist.html.php index b937266b0f..04fce604f3 100644 --- a/module/project/view/browsebylist.html.php +++ b/module/project/view/browsebylist.html.php @@ -41,7 +41,7 @@ {$pager->recTotal}";?> - $lang->project->edit));?> + $lang->project->edit), $showBatchEdit);?> $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?> search->common;?>