diff --git a/module/execution/js/all.ui.js b/module/execution/js/all.ui.js index 7841d221b7..6488cb19cb 100644 --- a/module/execution/js/all.ui.js +++ b/module/execution/js/all.ui.js @@ -16,4 +16,11 @@ $(document).off('click','.batch-btn').on('click', '.batch-btn', function() { postAndLoadPage(url, form); } +}).off('click', '#actionBar .export').on('click', '#actionBar .export', function() +{ + const dtable = zui.DTable.query($('#table-execution-all')); + const checkedList = dtable.$.getChecks(); + if(!checkedList.length) return; + + $.cookie.set('checkedItem', checkedList); }); diff --git a/module/execution/js/task.ui.js b/module/execution/js/task.ui.js index 2b0521714e..7c2343cf67 100644 --- a/module/execution/js/task.ui.js +++ b/module/execution/js/task.ui.js @@ -16,6 +16,13 @@ $(document).off('click','.batch-btn').on('click', '.batch-btn', function() { postAndLoadPage(url, form); } +}).off('click', '#actionBar .export').on('click', '#actionBar .export', function() +{ + const dtable = zui.DTable.query($('#table-execution-task')); + const checkedList = dtable.$.getChecks(); + if(!checkedList.length) return; + + $.cookie.set('checkedItem', checkedList); }); /** diff --git a/module/execution/ui/all.html.php b/module/execution/ui/all.html.php index ad6b615849..53e782e55d 100644 --- a/module/execution/ui/all.html.php +++ b/module/execution/ui/all.html.php @@ -59,10 +59,11 @@ toolbar ( hasPriv('execution', 'export') ? item(set(array ( - 'icon' => 'export', - 'text' => $lang->programplan->exporting, - 'class' => "ghost export", - 'url' => createLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy&from=$from"), + 'icon' => 'export', + 'text' => $lang->programplan->exporting, + 'class' => "ghost export", + 'url' => createLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy&from=$from"), + 'data-toggle' => 'modal' ))) : null, hasPriv('execution', 'create') ? item(set(array ( diff --git a/module/execution/ui/task.html.php b/module/execution/ui/task.html.php index 354850e0bf..199b87da06 100644 --- a/module/execution/ui/task.html.php +++ b/module/execution/ui/task.html.php @@ -62,7 +62,7 @@ toolbar hasPriv('task', 'export') ? item(set(array ( 'icon' => 'export', - 'class' => 'ghost', + 'class' => 'ghost export', 'url' => createLink('task', 'export', "execution={$execution->id}&orderBy={$orderBy}&type={$browseType}"), 'data-toggle' => 'modal' ))) : null, diff --git a/module/project/js/browse.ui.js b/module/project/js/browse.ui.js index 84bf13b51b..323b2cdd01 100644 --- a/module/project/js/browse.ui.js +++ b/module/project/js/browse.ui.js @@ -36,4 +36,11 @@ $(document).off('click', '.batch-btn').on('click', '.batch-btn', function() const url = $(this).data('url'); checkedList.forEach((id) => form.append('projectIdList[]', id)); postAndLoadPage(url, form); +}).off('click', '#actionBar .export').on('click', '#actionBar .export', function() +{ + const dtable = zui.DTable.query($('#table-project-browse')); + const checkedList = dtable.$.getChecks(); + if(!checkedList.length) return; + + $.cookie.set('checkedItem', checkedList); }); diff --git a/module/project/ui/browse.html.php b/module/project/ui/browse.html.php index 4367f00008..8907df2bf0 100644 --- a/module/project/ui/browse.html.php +++ b/module/project/ui/browse.html.php @@ -47,9 +47,11 @@ toolbar ))), item(set(array ( - 'icon' => 'export', - 'text' => $lang->project->export, - 'class' => "ghost export" + 'icon' => 'export', + 'text' => $lang->project->export, + 'class' => "ghost export", + 'url' => createLink('project', 'export', "status={$status}&orderBy={$orderBy}"), + 'data-toggle' => 'modal' ))), item(set(array (