BUGFIX: replace 'sapphire' with 'framework' in those legacy fields: TableField, TableListField and ComplexTableField.

This commit is contained in:
Normann Lou 2012-07-16 15:18:31 +12:00
parent 8153326360
commit 1fca4911e1
4 changed files with 14 additions and 18 deletions

View File

@ -129,20 +129,20 @@ class ComplexTableField extends TableListField {
public $actions = array(
'show' => array(
'label' => 'Show',
'icon' => 'sapphire/images/show.png',
'icon_disabled' => 'sapphire/images/show_disabled.png',
'icon' => 'framework/images/show.png',
'icon_disabled' => 'framework/images/show_disabled.png',
'class' => 'popuplink showlink',
),
'edit' => array(
'label' => 'Edit',
'icon' => 'sapphire/images/edit.gif',
'icon_disabled' => 'sapphire/images/edit_disabled.gif',
'icon' => 'framework/images/edit.gif',
'icon_disabled' => 'framework/images/edit_disabled.gif',
'class' => 'popuplink editlink',
),
'delete' => array(
'label' => 'Delete',
'icon' => 'sapphire/images/delete.gif',
'icon_disabled' => 'sapphire/images/delete_disabled.gif',
'icon' => 'framework/images/delete.gif',
'icon_disabled' => 'framework/images/delete_disabled.gif',
'class' => 'popuplink deletelink',
),
);

View File

@ -104,8 +104,8 @@ class TableListField extends FormField {
* array(
* 'delete' => array(
* 'label' => 'Delete',
* 'icon' => 'sapphire/images/delete.gif',
* 'icon_disabled' => 'sapphire/images/delete_disabled.gif',
* 'icon' => 'framework/images/delete.gif',
* 'icon_disabled' => 'framework/images/delete_disabled.gif',
* 'class' => 'deletelink',
* )
* )
@ -113,8 +113,8 @@ class TableListField extends FormField {
public $actions = array(
'delete' => array(
'label' => 'Delete',
'icon' => 'sapphire/images/delete.gif',
'icon_disabled' => 'sapphire/images/delete_disabled.gif',
'icon' => 'framework/images/delete.gif',
'icon_disabled' => 'framework/images/delete_disabled.gif',
'class' => 'deletelink'
)
);
@ -238,9 +238,6 @@ class TableListField extends FormField {
*/
public function __construct($name, $sourceClass = null, $fieldList = null, $sourceFilter = 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) {
// You can optionally pass a list
@ -1106,7 +1103,6 @@ JS
Requirements::css(CMS_DIR . '/css/typography.css');
Requirements::css(CMS_DIR . '/css/cms_right.css');
}
Requirements::css('sapphire/css/TableListField_print.css');
$this->cachedSourceItems = null;
$oldShowPagination = $this->showPagination;

View File

@ -61,10 +61,10 @@ TableField.prototype = {
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?'));
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({
'url': link.getAttribute("href"),
'method': 'post',

View File

@ -92,11 +92,11 @@ TableListField.prototype = {
var row = Event.findElement(e,"tr");
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?'));
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({
'url': link.getAttribute("href"),
'method': 'post',