From 65e0a19dee70d885759cd2330d333e8b3b49e1b0 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 30 Mar 2018 03:29:24 +0200 Subject: [PATCH] Fixed the edit-view for front-end to insure ajax also gets moved to site ajax. Also updated the UIkit notify to target uikit2 convention. --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler/a_Get.php | 25 +++++++++++++++---------- admin/models/ajax.php | 4 ++-- componentbuilder.xml | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 221d734e5..75f028284 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 28th March, 2018 ++ *Last Build*: 30th March, 2018 + *Version*: 2.7.1 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/README.txt b/admin/README.txt index 221d734e5..75f028284 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -126,7 +126,7 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 28th March, 2018 ++ *Last Build*: 30th March, 2018 + *Version*: 2.7.1 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 5a524a373..51728b0bb 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -926,17 +926,19 @@ class Get // build the admin_views settings $component->admin_views = array_map(function($array) { - $array = array_map(function($value) - { + $array = array_map(function($value) { if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) && strval($value) === strval(intval($value))) { return (int) $value; } return $value; }, $array); - // has become a lacacy issue, can't remove this - $array['view'] = $array['adminview']; - $array['settings'] = $this->getAdminViewData($array['view']); + // check if we must add to site + if (isset($array['edit_create_site_view']) && $array['edit_create_site_view']) + { + $this->siteEditView[$array['adminview']] = true; + $this->lang = 'both'; + } if (isset($array['port']) && $array['port'] && !$this->addEximport) { $this->addEximport = true; @@ -945,14 +947,13 @@ class Get { $this->setTagHistory = true; } - if (isset($array['edit_create_site_view']) && $array['edit_create_site_view']) - { - $this->siteEditView[$array['adminview']] = true; - } + // has become a lacacy issue, can't remove this + $array['view'] = $array['adminview']; + // get the admin settings/data + $array['settings'] = $this->getAdminViewData($array['view']); return $array; }, array_values($component->addadmin_views)); } - // set the site_view data $component->addsite_views = (isset($component->addsite_views) && ComponentbuilderHelper::checkJson($component->addsite_views)) ? json_decode($component->addsite_views, true) : null; if (ComponentbuilderHelper::checkArray($component->addsite_views)) @@ -1617,6 +1618,10 @@ class Get unset($view->addlinked_views); // set the lang target $this->lang = 'admin'; + if (isset($this->siteEditView[$id])) + { + $this->lang = 'both'; + } // add_javascript $addArrayJ = array('javascript_view_file', 'javascript_view_footer', 'javascript_views_file', 'javascript_views_footer'); foreach ($addArrayJ as $scripter) diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 4e03dfaed..55a14cb8f 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -246,7 +246,7 @@ class ComponentbuilderModelAjax extends JModelList $ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; } // build url (A tag) - $startAtag = ''; + $startAtag = ''; // build the smaller button if (2 == $size) { @@ -317,7 +317,7 @@ class ComponentbuilderModelAjax extends JModelList $button[] = ''; $button[] = '
'; } - $button[] = ''; + $button[] = ''; if (1 == $size) { $button[] = ''; diff --git a/componentbuilder.xml b/componentbuilder.xml index 201cc73ff..94ec78643 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 28th March, 2018 + 30th March, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://joomlacomponentbuilder.com