mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: replace 'sapphire' with 'framework' in those legacy fields: TableField, TableListField and ComplexTableField.
This commit is contained in:
parent
8153326360
commit
1fca4911e1
@ -129,20 +129,20 @@ class ComplexTableField extends TableListField {
|
|||||||
public $actions = array(
|
public $actions = array(
|
||||||
'show' => array(
|
'show' => array(
|
||||||
'label' => 'Show',
|
'label' => 'Show',
|
||||||
'icon' => 'sapphire/images/show.png',
|
'icon' => 'framework/images/show.png',
|
||||||
'icon_disabled' => 'sapphire/images/show_disabled.png',
|
'icon_disabled' => 'framework/images/show_disabled.png',
|
||||||
'class' => 'popuplink showlink',
|
'class' => 'popuplink showlink',
|
||||||
),
|
),
|
||||||
'edit' => array(
|
'edit' => array(
|
||||||
'label' => 'Edit',
|
'label' => 'Edit',
|
||||||
'icon' => 'sapphire/images/edit.gif',
|
'icon' => 'framework/images/edit.gif',
|
||||||
'icon_disabled' => 'sapphire/images/edit_disabled.gif',
|
'icon_disabled' => 'framework/images/edit_disabled.gif',
|
||||||
'class' => 'popuplink editlink',
|
'class' => 'popuplink editlink',
|
||||||
),
|
),
|
||||||
'delete' => array(
|
'delete' => array(
|
||||||
'label' => 'Delete',
|
'label' => 'Delete',
|
||||||
'icon' => 'sapphire/images/delete.gif',
|
'icon' => 'framework/images/delete.gif',
|
||||||
'icon_disabled' => 'sapphire/images/delete_disabled.gif',
|
'icon_disabled' => 'framework/images/delete_disabled.gif',
|
||||||
'class' => 'popuplink deletelink',
|
'class' => 'popuplink deletelink',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -104,8 +104,8 @@ class TableListField extends FormField {
|
|||||||
* array(
|
* array(
|
||||||
* 'delete' => array(
|
* 'delete' => array(
|
||||||
* 'label' => 'Delete',
|
* 'label' => 'Delete',
|
||||||
* 'icon' => 'sapphire/images/delete.gif',
|
* 'icon' => 'framework/images/delete.gif',
|
||||||
* 'icon_disabled' => 'sapphire/images/delete_disabled.gif',
|
* 'icon_disabled' => 'framework/images/delete_disabled.gif',
|
||||||
* 'class' => 'deletelink',
|
* 'class' => 'deletelink',
|
||||||
* )
|
* )
|
||||||
* )
|
* )
|
||||||
@ -113,8 +113,8 @@ class TableListField extends FormField {
|
|||||||
public $actions = array(
|
public $actions = array(
|
||||||
'delete' => array(
|
'delete' => array(
|
||||||
'label' => 'Delete',
|
'label' => 'Delete',
|
||||||
'icon' => 'sapphire/images/delete.gif',
|
'icon' => 'framework/images/delete.gif',
|
||||||
'icon_disabled' => 'sapphire/images/delete_disabled.gif',
|
'icon_disabled' => 'framework/images/delete_disabled.gif',
|
||||||
'class' => 'deletelink'
|
'class' => 'deletelink'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -238,9 +238,6 @@ class TableListField extends FormField {
|
|||||||
*/
|
*/
|
||||||
public function __construct($name, $sourceClass = null, $fieldList = null, $sourceFilter = null,
|
public function __construct($name, $sourceClass = null, $fieldList = null, $sourceFilter = null,
|
||||||
$sourceSort = null, $sourceJoin = null) {
|
$sourceSort = null, $sourceJoin = null) {
|
||||||
if(FRAMEWORK_DIR != 'sapphire' && !SapphireTest::is_running_test()) {
|
|
||||||
user_error('TableListField requires FRAMEWORK_DIR to be sapphire.', E_USER_WARNING);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($sourceClass) {
|
if($sourceClass) {
|
||||||
// You can optionally pass a list
|
// You can optionally pass a list
|
||||||
@ -1106,7 +1103,6 @@ JS
|
|||||||
Requirements::css(CMS_DIR . '/css/typography.css');
|
Requirements::css(CMS_DIR . '/css/typography.css');
|
||||||
Requirements::css(CMS_DIR . '/css/cms_right.css');
|
Requirements::css(CMS_DIR . '/css/cms_right.css');
|
||||||
}
|
}
|
||||||
Requirements::css('sapphire/css/TableListField_print.css');
|
|
||||||
|
|
||||||
$this->cachedSourceItems = null;
|
$this->cachedSourceItems = null;
|
||||||
$oldShowPagination = $this->showPagination;
|
$oldShowPagination = $this->showPagination;
|
||||||
|
@ -61,10 +61,10 @@ TableField.prototype = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire
|
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in framework
|
||||||
var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?'));
|
var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?'));
|
||||||
if(confirmed){
|
if(confirmed){
|
||||||
img.setAttribute("src",'sapphire/images/network-save.gif'); // TODO doesn't work
|
img.setAttribute("src",'framework/images/network-save.gif'); // TODO doesn't work
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
'url': link.getAttribute("href"),
|
'url': link.getAttribute("href"),
|
||||||
'method': 'post',
|
'method': 'post',
|
||||||
|
@ -92,11 +92,11 @@ TableListField.prototype = {
|
|||||||
var row = Event.findElement(e,"tr");
|
var row = Event.findElement(e,"tr");
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire
|
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in framework
|
||||||
var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?'));
|
var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?'));
|
||||||
if(confirmed)
|
if(confirmed)
|
||||||
{
|
{
|
||||||
img.setAttribute("src",'sapphire/images/network-save.gif'); // TODO doesn't work
|
img.setAttribute("src",'framework/images/network-save.gif'); // TODO doesn't work
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
'url': link.getAttribute("href"),
|
'url': link.getAttribute("href"),
|
||||||
'method': 'post',
|
'method': 'post',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user