* Add table sorting function.

This commit is contained in:
tianshujie
2022-11-11 15:49:49 +08:00
parent 718817d9fa
commit feb9f2cfa9
5 changed files with 52 additions and 41 deletions
+3 -2
View File
@@ -14,7 +14,7 @@ if(common::hasPriv('project', 'batchEdit') and $programType != 'bygrid' and $has
$toolbar->append(html::checkbox('editProject', array('1' => $lang->project->edit), '', $this->cookie->editProject ? 'checked=checked' : ''));
}
$toolbar->append('<a id="searchFormBtn"><i class="icon icon-search"></i> <span>' . $lang->user->search . '</span></a>');
$toolbar->append('<a class="querybox-toggle" id="searchFormBtn"><i class="icon icon-search"></i> <span>' . $lang->user->search . '</span></a>');
/* Set actionbar. */
$actionbar = actionbar();
@@ -46,7 +46,8 @@ foreach($programs as $program)
}
$table->search($status, $moduleName);
$table->form('programForm', 'main-table', "data-preserve-nested='true'");
$sortLink = $this->createLink('program', 'browse', "status=$status&orderBy=\${orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}&param=$param");
$table->setSort($sortLink, $orderBy);
$table->data($rows);
$content = block();