diff --git a/config/filter.php b/config/filter.php
index 89ee1296f0..c700ab2094 100755
--- a/config/filter.php
+++ b/config/filter.php
@@ -172,6 +172,7 @@ $filter->tree->browse = new stdclass();
$filter->productplan->browse = new stdclass();
$filter->kanban->space = new stdclass();
$filter->execution->kanban = new stdclass();
+$filter->execution->all = new stdclass();
$filter->index->index->get['open'] = 'reg::base64';
@@ -300,14 +301,15 @@ $filter->productplan->browse->cookie['viewType'] = 'code';
$filter->task->create->cookie['lastTaskModule'] = 'int';
$filter->task->export->cookie['checkedItem'] = 'reg::checked';
-$filter->execution->default->cookie['kanbanview'] = 'code';
-$filter->execution->story->cookie['storyPreExecutionID'] = 'int';
-$filter->execution->story->cookie['storyModuleParam'] = 'int';
-$filter->execution->story->cookie['storyProductParam'] = 'int';
-$filter->execution->story->cookie['storyBranchParam'] = 'int';
-$filter->execution->story->cookie['executionStoryOrder'] = 'code';
-$filter->execution->export->cookie['checkedItem'] = 'reg::checked';
-$filter->execution->kanban->cookie['taskToOpen'] = 'int';
+$filter->execution->default->cookie['kanbanview'] = 'code';
+$filter->execution->story->cookie['storyPreExecutionID'] = 'int';
+$filter->execution->story->cookie['storyModuleParam'] = 'int';
+$filter->execution->story->cookie['storyProductParam'] = 'int';
+$filter->execution->story->cookie['storyBranchParam'] = 'int';
+$filter->execution->story->cookie['executionStoryOrder'] = 'code';
+$filter->execution->export->cookie['checkedItem'] = 'reg::checked';
+$filter->execution->kanban->cookie['taskToOpen'] = 'int';
+$filter->execution->all->cookie['showExecutionBatchEdit'] = 'int';
$filter->testcase->browse->cookie['caseModule'] = 'int';
$filter->testcase->browse->cookie['caseSuite'] = 'int';
diff --git a/module/execution/control.php b/module/execution/control.php
index efc0e4a767..5d92d3ed7e 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -3760,6 +3760,7 @@ class execution extends control
$this->view->from = $from;
$this->view->param = $param;
$this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false;
+ $this->view->showBatchEdit = $this->cookie->showExecutionBatchEdit;
$this->display();
}
diff --git a/module/execution/js/all.js b/module/execution/js/all.js
index 7d52829c0b..09f2fd3767 100644
--- a/module/execution/js/all.js
+++ b/module/execution/js/all.js
@@ -79,9 +79,45 @@ $(function()
});
}
})
+
+ $('input[name^="showEdit"]').click(function()
+ {
+ $.cookie('showExecutionBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
+ setCheckbox();
+ });
+ setCheckbox();
+
+ $('#executionTableList tr').on('click', function(e)
+ {
+ if($.cookie('showExecutionBatchEdit') != 1) e.stopPropagation();
+ });
});
+/**
+ * Location to product list.
+ *
+ * @param int productID
+ * @param int projectID
+ * @param string status
+ * @access public
+ * @return void
+ */
function byProduct(productID, projectID, status)
{
location.href = createLink('project', 'all', "status=" + status + "&project=" + projectID + "&orderBy=" + orderBy + '&productID=' + productID);
}
+
+/**
+ * Set batch edit checkbox.
+ *
+ * @access public
+ * @return void
+ */
+function setCheckbox()
+{
+ $('#executionsForm .checkbox-primary').hide();
+ $('.check-all, .sortable tr').removeClass('checked');
+ $(":checkbox[name^='executionIDList']").prop('checked', false);
+ $('#executionsForm').removeClass('has-row-checked');
+ if($.cookie('showExecutionBatchEdit') == 1) $('#executionsForm .checkbox-primary').show();
+}
diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php
index 715cf14aae..4b86eb16ac 100644
--- a/module/execution/view/all.html.php
+++ b/module/execution/view/all.html.php
@@ -25,8 +25,9 @@ js::set('unfoldAll', $lang->execution->treeLevel['all']);
js::set('foldAll', $lang->execution->treeLevel['root']);
js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
?>
+