From de66ea6ba2cec8e8132368055600d82b20781665 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 19 Oct 2023 10:42:30 +0800 Subject: [PATCH] + Add table sort to branch::manage. --- module/branch/config/dtable.php | 4 ++-- module/branch/ui/manage.html.php | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/module/branch/config/dtable.php b/module/branch/config/dtable.php index 66f408cbde..0dd799bd53 100644 --- a/module/branch/config/dtable.php +++ b/module/branch/config/dtable.php @@ -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'; diff --git a/module/branch/ui/manage.html.php b/module/branch/ui/manage.html.php index cf7d770929..c12cf8718f 100644 --- a/module/branch/ui/manage.html.php +++ b/module/branch/ui/manage.html.php @@ -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}")), ) );