* fix unable to reorder in dynamic view, bug #21046.
This commit is contained in:
@@ -204,7 +204,8 @@ class company extends control
|
||||
$pager = new pager($recTotal, $recPerPage = 50, $pageID = 1);
|
||||
|
||||
/* Append id for secend sort. */
|
||||
$orderBy = $direction == 'next' ? 'date_desc' : 'date_asc';
|
||||
if($direction == 'next') $orderBy = 'date_desc';
|
||||
if($direction == 'pre') $orderBy = 'date_asc';
|
||||
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$date = empty($date) ? '' : date('Y-m-d', $date);
|
||||
@@ -288,7 +289,6 @@ class company extends control
|
||||
$this->view->pager = $pager;
|
||||
$this->view->userID = $userID;
|
||||
$this->view->param = $param;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $browseType, $orderBy);
|
||||
$this->view->direction = $direction;
|
||||
$this->display();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
$('#account, #product, #project, #execution, #orderBy').change(function()
|
||||
{
|
||||
var userID = $('#account').val();
|
||||
var productID = $('#product').val();
|
||||
var productID = $('#product').length ? $('#product').val() : 0;
|
||||
var projectID = systemMode == 'new' ? $('#project').val() : 0;
|
||||
var executionID = $('#execution').val();
|
||||
var orderBy = $('#orderBy').val();
|
||||
|
||||
browseType = browseType == 'bysearch' ? 'all' : browseType;
|
||||
link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=next&userID=' + userID + '&productID=' + productID + '&projectID=' + projectID + '&executionID=' + executionID + '&orderBy=' + orderBy);
|
||||
link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=no&userID=' + userID + '&productID=' + productID + '&projectID=' + projectID + '&executionID=' + executionID + '&orderBy=' + orderBy);
|
||||
location.href = link;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user