Added GUID to selected views, and started updating JCB accordingly.

This commit is contained in:
2020-01-03 03:41:55 +02:00
parent a317ba855f
commit 46e52db097
122 changed files with 7142 additions and 6262 deletions

View File

@ -31,10 +31,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
'a.name_single','name_single',
'a.short_description','short_description',
'a.add_fadein','add_fadein',
'a.add_custom_import','add_custom_import',
'a.type','type',
'a.add_custom_button','add_custom_button',
'a.add_php_ajax','add_php_ajax'
'a.add_php_ajax','add_php_ajax',
'a.add_custom_import','add_custom_import'
);
}
@ -67,9 +67,6 @@ class ComponentbuilderModelAdmin_views extends JModelList
$add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein');
$this->setState('filter.add_fadein', $add_fadein);
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
$this->setState('filter.add_custom_import', $add_custom_import);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
@ -77,7 +74,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
$this->setState('filter.add_custom_button', $add_custom_button);
$add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax');
$this->setState('filter.add_php_ajax', $add_php_ajax);
$this->setState('filter.add_php_ajax', $add_php_ajax);
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
$this->setState('filter.add_custom_import', $add_custom_import);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -142,14 +142,14 @@ class ComponentbuilderModelAdmin_views extends JModelList
{
// convert add_fadein
$item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein');
// convert add_custom_import
$item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import');
// convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// convert add_custom_button
$item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button');
// convert add_php_ajax
$item->add_php_ajax = $this->selectionTranslation($item->add_php_ajax, 'add_php_ajax');
// convert add_custom_import
$item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import');
}
}
@ -178,19 +178,6 @@ class ComponentbuilderModelAdmin_views extends JModelList
return $add_fadeinArray[$value];
}
}
// Array of add_custom_import language strings
if ($name === 'add_custom_import')
{
$add_custom_importArray = array(
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_custom_importArray[$value]) && ComponentbuilderHelper::checkString($add_custom_importArray[$value]))
{
return $add_custom_importArray[$value];
}
}
// Array of type language strings
if ($name === 'type')
{
@ -230,6 +217,19 @@ class ComponentbuilderModelAdmin_views extends JModelList
return $add_php_ajaxArray[$value];
}
}
// Array of add_custom_import language strings
if ($name === 'add_custom_import')
{
$add_custom_importArray = array(
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_custom_importArray[$value]) && ComponentbuilderHelper::checkString($add_custom_importArray[$value]))
{
return $add_custom_importArray[$value];
}
}
return $value;
}
@ -297,11 +297,6 @@ class ComponentbuilderModelAdmin_views extends JModelList
{
$query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein)));
}
// Filter by Add_custom_import.
if ($add_custom_import = $this->getState('filter.add_custom_import'))
{
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
}
// Filter by Type.
if ($type = $this->getState('filter.type'))
{
@ -317,6 +312,11 @@ class ComponentbuilderModelAdmin_views extends JModelList
{
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax)));
}
// Filter by Add_custom_import.
if ($add_custom_import = $this->getState('filter.add_custom_import'))
{
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -389,82 +389,82 @@ class ComponentbuilderModelAdmin_views extends JModelList
continue;
}
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getform
$item->php_getform = base64_decode($item->php_getform);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode php_before_cancel
$item->php_before_cancel = base64_decode($item->php_before_cancel);
// decode php_after_cancel
$item->php_after_cancel = base64_decode($item->php_after_cancel);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_getform
$item->php_getform = base64_decode($item->php_getform);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode php_after_cancel
$item->php_after_cancel = base64_decode($item->php_after_cancel);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_import
$item->php_import = base64_decode($item->php_import);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode php_import
$item->php_import = base64_decode($item->php_import);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
@ -529,10 +529,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
$id .= ':' . $this->getState('filter.name_single');
$id .= ':' . $this->getState('filter.short_description');
$id .= ':' . $this->getState('filter.add_fadein');
$id .= ':' . $this->getState('filter.add_custom_import');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.add_custom_button');
$id .= ':' . $this->getState('filter.add_php_ajax');
$id .= ':' . $this->getState('filter.add_php_ajax');
$id .= ':' . $this->getState('filter.add_custom_import');
return parent::getStoreId($id);
}