API CHANGE: TableListField::ajax_refresh is deprecated. Removed all calls to it from the core, instead getting HTML fragments by visiting the field's URL.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61683 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-08-28 04:14:22 +00:00
parent a52d99297b
commit 0075040f87
2 changed files with 9 additions and 6 deletions

View File

@ -256,9 +256,11 @@ JS;
* Returns the content of this formfield without surrounding layout. Triggered by Javascript
* to update content after a DetailForm-save-action.
*
* @deprecated Use the field link itself, instead - Form/fields/TableFieldName
* @return String
*/
function ajax_render() {
user_error("Deprecated; access the field's root link instead", E_USER_NOTICE);
return $this->renderWith($this->template);
}

View File

@ -727,7 +727,7 @@ JS
if(!isset($_REQUEST['ctf'][$this->Name()]['start']) || !is_numeric($_REQUEST['ctf'][$this->Name()]['start']) || $_REQUEST['ctf'][$this->Name()]['start'] == 0) {
return null;
}
$link = Controller::join_links($this->Link(), "ajax_refresh?ctf[{$this->Name()}][start]={$start}");
$link = Controller::join_links($this->Link(), "?ctf[{$this->Name()}][start]={$start}");
if($this->extraLinkParams) $link .= "&" . http_build_query($this->extraLinkParams);
return $link;
}
@ -741,7 +741,7 @@ JS
$start = ($_REQUEST['ctf'][$this->Name()]['start'] - $this->pageSize < 0) ? 0 : $_REQUEST['ctf'][$this->Name()]['start'] - $this->pageSize;
$link = Controller::join_links($this->Link(), "ajax_refresh?ctf[{$this->Name()}][start]={$start}");
$link = Controller::join_links($this->Link(), "?ctf[{$this->Name()}][start]={$start}");
if($this->extraLinkParams) $link .= "&" . http_build_query($this->extraLinkParams);
return $link;
}
@ -753,7 +753,7 @@ JS
if($currentStart >= $start-1) {
return null;
}
$link = Controller::join_links($this->Link(), "ajax_refresh?ctf[{$this->Name()}][start]={$start}");
$link = Controller::join_links($this->Link(), "?ctf[{$this->Name()}][start]={$start}");
if($this->extraLinkParams) $link .= "&" . http_build_query($this->extraLinkParams);
return $link;
}
@ -766,7 +766,7 @@ JS
return null;
}
$link = Controller::join_links($this->Link(), "ajax_refresh?ctf[{$this->Name()}][start]={$start}");
$link = Controller::join_links($this->Link(), "?ctf[{$this->Name()}][start]={$start}");
if($this->extraLinkParams) $link .= "&" . http_build_query($this->extraLinkParams);
return $link;
}
@ -980,7 +980,8 @@ JS
}
/**
* @deprecated Please use the standard URL through Link() which gives you the FieldHolder
* Returns the content of the TableListField as a piece of FormResponse javascript
* @deprecated Please use the standard URL through Link() which gives you the FieldHolder as an HTML fragment.
*/
function ajax_refresh() {
// compute sourceItems here instead of Items() to ensure that
@ -1244,7 +1245,7 @@ class TableListField_Item extends ViewableData {
function BaseLink() {
user_error("TableListField_Item::BaseLink() deprecated, use Link() instead", E_USER_NOTICE);
return $this->Link() . '/ajax_refresh';
return $this->Link();
}
function DeleteLink() {