* Refactor actions of the execution list.

This commit is contained in:
tianshujie
2023-10-24 09:22:29 +08:00
parent 5492af49c1
commit a894af9528
3 changed files with 9 additions and 18 deletions
+1
View File
@@ -197,6 +197,7 @@ $config->execution->actionList['edit']['icon'] = 'edit';
$config->execution->actionList['edit']['text'] = $lang->execution->edit;
$config->execution->actionList['edit']['hint'] = $lang->execution->edit;
$config->execution->actionList['edit']['url'] = helper::createLink('execution', 'edit', "executionID={rawID}");
$config->execution->actionList['edit']['data-size'] = 'lg';
$config->execution->actionList['edit']['data-toggle'] = 'modal';
$config->execution->actionList['close']['icon'] = 'off';
+4 -5
View File
@@ -1,11 +1,10 @@
function showTask()
$(document).off('click', '#showTask').on('click', '#showTask', function()
{
var show = $('#showTask').is(':checked') ? 1 : 0;
const show = $(this).is(':checked') ? 1 : 0;
$.cookie.set('showTask', show, {expires:config.cookieLife, path:config.webRoot});
const link = $.createLink('project', 'execution', 'status=' + status + '&projectID=' + projectID + '&orderBy=' + orderBy + '&productID=' + productID);
loadPage(link);
}
loadCurrentPage();
});
$(document).off('click','.batch-btn').on('click', '.batch-btn', function()
{
+4 -13
View File
@@ -35,20 +35,13 @@ if($canBatchAction)
if($canBatchChangeStatus)
{
$statusList = array();
$statusItems = array();
foreach($lang->execution->statusList as $key => $value)
{
$statusList[] = array('text' => $value, 'class' => 'batch-btn ajax-btn', 'data-url' => createLink('execution', 'batchChangeStatus', "status=$key"));
$statusItems[] = array('text' => $value, 'innerClass' => 'batch-btn ajax-btn', 'data-url' => createLink('execution', 'batchChangeStatus', "status=$key"));
}
menu
(
set::id('navStatus'),
set::className('dropdown-menu'),
set::items($statusList)
);
$footToolbar['items'][] = array('caret' => 'up', 'text' => $lang->statusAB, 'className' => 'btn btn-caret size-sm secondary', 'url' => '#navStatus', 'data-toggle' => 'dropdown', 'data-placement' => 'top-start');
$footToolbar['items'][] = array('caret' => 'up', 'text' => $lang->statusAB, 'className' => 'btn btn-caret size-sm secondary', 'items' => $statusItems, 'type' => 'dropdown', 'data-placement' => 'top-start');
}
}
@@ -73,7 +66,6 @@ $fnGenerateCols = function() use ($config, $project)
};
/* zin: Define the feature bar on main menu. */
$checked = $this->cookie->showTask ? 'checked' : '';
$productMenuLink = createLink(
$this->app->rawModule,
$this->app->rawMethod,
@@ -108,10 +100,9 @@ featureBar
(
set::id('showTask'),
set::name('showTask'),
set::checked($checked),
set::checked($this->cookie->showTask ? 'checked' : ''),
set::text($lang->programplan->stageCustom->task),
set::rootClass('ml-4'),
on::change('showTask')
)
)
);