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;?>