mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed sorting in TableListField and subclasses
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@63524 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b9052753be
commit
adee6b0e4a
@ -242,7 +242,7 @@ JS
|
|||||||
"Name" => $fieldName,
|
"Name" => $fieldName,
|
||||||
"Title" => $fieldTitle,
|
"Title" => $fieldTitle,
|
||||||
"IsSortable" => $isSortable,
|
"IsSortable" => $isSortable,
|
||||||
"SortLink" => Convert::raw2xml($sortLink),
|
"SortLink" => $sortLink,
|
||||||
"SortBy" => $isSorted,
|
"SortBy" => $isSorted,
|
||||||
"SortDirection" => (isset($_REQUEST['ctf'][$this->Name()]['dir'])) ? $_REQUEST['ctf'][$this->Name()]['dir'] : null
|
"SortDirection" => (isset($_REQUEST['ctf'][$this->Name()]['dir'])) ? $_REQUEST['ctf'][$this->Name()]['dir'] : null
|
||||||
));
|
));
|
||||||
@ -921,7 +921,14 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
function BaseLink() {
|
function BaseLink() {
|
||||||
return $this->FormAction() . "&action_callfieldmethod&fieldName={$this->Name()}&ctf[ID]={$this->sourceID()}&methodName=ajax_refresh&SecurityID=" . Session::get('SecurityID');
|
$link = $this->FormAction() . "&action_callfieldmethod&fieldName={$this->Name()}&ctf[ID]={$this->sourceID()}&methodName=ajax_refresh&SecurityID=" . Session::get('SecurityID');
|
||||||
|
if(isset($_REQUEST['ctf'][$this->Name()]['sort'])) {
|
||||||
|
$link = HTTP::setGetVar("ctf[{$this->Name()}][sort]", $_REQUEST['ctf'][$this->Name()]['sort']);
|
||||||
|
}
|
||||||
|
if(isset($_REQUEST['ctf'][$this->Name()]['dir'])) {
|
||||||
|
$link = HTTP::setGetVar("ctf[{$this->Name()}][dir]", $_REQUEST['ctf'][$this->Name()]['dir']);
|
||||||
|
}
|
||||||
|
return str_replace('&','&',$link);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user