+ Add table sort to branch::manage.

This commit is contained in:
tianshujie
2023-10-19 10:42:43 +08:00
parent cc341a196c
commit de66ea6ba2
2 changed files with 3 additions and 9 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ $config->branch->dtable->fieldList['id']['width'] = 30;
$config->branch->dtable->fieldList['id']['sortType'] = false;
$config->branch->dtable->fieldList['name']['type'] = 'title';
$config->branch->dtable->fieldList['name']['sortType'] = false;
$config->branch->dtable->fieldList['name']['sortType'] = true;
$config->branch->dtable->fieldList['status']['type'] = 'status';
$config->branch->dtable->fieldList['status']['sortType'] = false;
$config->branch->dtable->fieldList['status']['sortType'] = true;
$config->branch->dtable->fieldList['status']['statusMap'] = $lang->branch->statusList;
$config->branch->dtable->fieldList['createdDate']['type'] = 'date';
+1 -7
View File
@@ -29,9 +29,6 @@ toolbar
jsVar('confirmclose', $lang->branch->confirmClose);
jsVar('confirmactivate', $lang->branch->confirmActivate);
jsVar('orderBy', $orderBy);
jsVar('sortLink', helper::createLink('branch', 'manage', "productID={$product->id}&browseType={$browseType}&orderBy={orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"));
modal
(
setID('mergeModal'),
@@ -138,14 +135,11 @@ dtable
set::data($tableData),
set::checkable(true),
set::canRowCheckable(jsRaw("(rowID) => {return rowID == '0' ? false : true}")),
set::sortLink(jsRaw('createSortLink')),
set::sortLink(createLink('branch', 'manage', "productID={$product->id}&browseType={$browseType}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}")),
set::onCheckChange(jsRaw('checkedChange')),
set::footToolbar($footToolbar),
set::footPager(
usePager(),
set::recPerPage($pager->recPerPage),
set::recTotal($pager->recTotal),
set::linkCreator(helper::createLink('branch', 'manage', "productID={$product->id}&browseType={$browseType}&orderBy={$orderBy}&recTotal={recTotal}&recPerPage={recPerPage}&pageID={page}")),
)
);