From 98510ae504527759e0049691fafdd264b20500b0 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 15 Jan 2018 17:54:05 +0200 Subject: [PATCH 1/2] Added (Linked To) back in related areas, so we can see where what is linked. Added ajax fields to the custom admin view. Added some backward compatibility to stylesheets and scripts being added, resolved gh-217. Fixed gh-212 no access lang string. Added the site CSS area to Joomla Component view resolved gh-216. --- README.md | 12 +- admin/README.txt | 12 +- admin/compiler/joomla_3/Helper.php | 18 + admin/compiler/joomla_3/Helper_site.php | 26 +- .../joomla_3/JViewLegacy_custom_admin.php | 2 +- admin/compiler/joomla_3/JViewLegacy_edit.php | 6 +- .../joomla_3/JViewLegacy_edit_site.php | 10 +- admin/compiler/joomla_3/JViewLegacy_list.php | 2 +- .../JViewLegacy_list_custom_admin.php | 2 +- .../joomla_3/JViewLegacy_list_site.php | 2 +- admin/compiler/joomla_3/JViewLegacy_site.php | 2 +- admin/controllers/ajax.json.php | 59 +- admin/helpers/compiler/a_Get.php | 56 +- admin/helpers/compiler/e_Interpretation.php | 51 +- admin/helpers/compiler/f_Infusion.php | 4 +- admin/helpers/componentbuilder.php | 23 + .../en-GB/en-GB.com_componentbuilder.ini | 130 +- .../layouts/admin_view/details_fullwidth.php | 48 + .../linked_components_fullwidth.php | 48 + .../custom_admin_view/php_fullwidth.php | 3 + admin/layouts/dynamic_get/main_fullwidth.php | 3 +- admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../ftp/linked_components_fullwidth.php | 2 +- .../libs_helpers_fullwidth.php | 6 +- .../translation_fullwidth.php | 2 +- admin/layouts/library/linked_fullwidth.php | 48 + .../site_view/linked_components_fullwidth.php | 48 + admin/models/admin_view.php | 48 +- admin/models/admin_views.php | 8 +- admin/models/ajax.php | 408 +++--- admin/models/componentbuilder.php | 8 +- admin/models/custom_admin_view.php | 155 +- admin/models/custom_admin_views.php | 26 +- admin/models/dynamic_get.php | 110 +- admin/models/field.php | 26 + admin/models/fields/ftps.php | 171 --- admin/models/fieldtype.php | 12 +- admin/models/forms/admin_view.js | 894 ++++++------ admin/models/forms/admin_view.xml | 221 +-- admin/models/forms/custom_admin_view.js | 338 +++-- admin/models/forms/custom_admin_view.xml | 364 +++-- admin/models/forms/custom_code.js | 84 +- admin/models/forms/dynamic_get.js | 1268 +++++++++-------- admin/models/forms/dynamic_get.xml | 903 ++++++------ admin/models/forms/field.js | 578 ++++---- admin/models/forms/field.xml | 1 - admin/models/forms/help_document.js | 334 ++--- admin/models/forms/joomla_component.js | 595 ++++---- admin/models/forms/joomla_component.xml | 396 ++--- admin/models/forms/layout.js | 20 +- admin/models/forms/library.js | 286 ++-- admin/models/forms/library.xml | 89 +- admin/models/forms/site_view.js | 397 +++--- admin/models/forms/site_view.xml | 529 +++---- admin/models/forms/template.js | 20 +- admin/models/ftp.php | 2 +- admin/models/joomla_component.php | 122 +- admin/models/joomla_components.php | 30 +- admin/models/site_view.php | 236 +-- admin/models/site_views.php | 32 +- admin/sql/install.mysql.utf8.sql | 70 +- admin/sql/updates/mysql/2.6.9.sql | 13 + admin/views/admin_fields/view.html.php | 6 +- .../admin_fields_conditions/view.html.php | 6 +- admin/views/admin_view/tmpl/edit.php | 349 ++--- admin/views/admin_view/view.html.php | 19 +- admin/views/admin_views/view.html.php | 2 +- admin/views/admins_fields/view.html.php | 2 +- .../admins_fields_conditions/view.html.php | 2 +- admin/views/compiler/view.html.php | 10 +- .../views/component_admin_views/view.html.php | 6 +- admin/views/component_config/view.html.php | 6 +- .../view.html.php | 6 +- .../view.html.php | 6 +- admin/views/component_dashboard/view.html.php | 6 +- .../component_files_folders/view.html.php | 6 +- .../component_mysql_tweaks/view.html.php | 6 +- .../views/component_site_views/view.html.php | 6 +- admin/views/component_updates/view.html.php | 6 +- .../components_admin_views/view.html.php | 2 +- admin/views/components_config/view.html.php | 2 +- .../view.html.php | 2 +- .../view.html.php | 2 +- .../views/components_dashboard/view.html.php | 2 +- .../components_files_folders/view.html.php | 2 +- .../components_mysql_tweaks/view.html.php | 2 +- .../views/components_site_views/view.html.php | 2 +- admin/views/components_updates/view.html.php | 2 +- admin/views/custom_admin_view/tmpl/edit.php | 130 +- admin/views/custom_admin_view/view.html.php | 17 +- admin/views/custom_admin_views/view.html.php | 2 +- admin/views/custom_code/tmpl/edit.php | 144 +- admin/views/custom_code/view.html.php | 19 +- admin/views/custom_codes/view.html.php | 2 +- admin/views/dynamic_get/tmpl/edit.php | 419 +++--- admin/views/dynamic_get/view.html.php | 17 +- admin/views/dynamic_gets/view.html.php | 2 +- admin/views/field/tmpl/edit.php | 177 +-- admin/views/field/view.html.php | 17 +- admin/views/fields/view.html.php | 2 +- admin/views/fieldtype/view.html.php | 12 +- admin/views/fieldtypes/view.html.php | 2 +- admin/views/ftp/view.html.php | 12 +- admin/views/ftps/view.html.php | 2 +- admin/views/get_snippets/view.html.php | 12 +- admin/views/help_document/tmpl/edit.php | 90 +- admin/views/help_document/view.html.php | 6 +- admin/views/help_documents/view.html.php | 2 +- admin/views/joomla_component/tmpl/edit.php | 363 ++--- admin/views/joomla_component/view.html.php | 25 +- admin/views/joomla_components/view.html.php | 2 +- admin/views/language/view.html.php | 6 +- .../views/language_translation/view.html.php | 6 +- .../views/language_translations/view.html.php | 2 +- admin/views/languages/view.html.php | 2 +- admin/views/layout/tmpl/edit.php | 10 +- admin/views/layout/view.html.php | 6 +- admin/views/layouts/view.html.php | 2 +- admin/views/libraries/tmpl/default_body.php | 10 + admin/views/libraries/view.html.php | 2 +- admin/views/libraries_config/view.html.php | 2 +- .../view.html.php | 2 +- admin/views/library/tmpl/edit.php | 80 +- admin/views/library/view.html.php | 19 +- admin/views/library_config/view.html.php | 6 +- .../library_files_folders_urls/view.html.php | 6 +- admin/views/site_view/tmpl/edit.php | 135 +- admin/views/site_view/view.html.php | 17 +- admin/views/site_views/view.html.php | 2 +- admin/views/snippet/view.html.php | 8 +- admin/views/snippet_type/view.html.php | 6 +- admin/views/snippet_types/view.html.php | 2 +- admin/views/snippets/view.html.php | 2 +- admin/views/template/tmpl/edit.php | 10 +- admin/views/template/view.html.php | 6 +- admin/views/templates/view.html.php | 2 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 17 + script.php | 38 +- site/assets/css/site.css | 4 +- site/helpers/componentbuilder.php | 26 +- .../en-GB/en-GB.com_componentbuilder.ini | 1 + .../en-GB/en-GB.com_componentbuilder.sys.ini | 1 + site/views/api/view.html.php | 6 +- 144 files changed, 6453 insertions(+), 5362 deletions(-) create mode 100644 admin/layouts/admin_view/details_fullwidth.php create mode 100644 admin/layouts/custom_admin_view/linked_components_fullwidth.php create mode 100644 admin/layouts/library/linked_fullwidth.php create mode 100644 admin/layouts/site_view/linked_components_fullwidth.php delete mode 100644 admin/models/fields/ftps.php create mode 100644 admin/sql/updates/mysql/2.6.9.sql diff --git a/README.md b/README.md index 1a987be40..11568a2b8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.9) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.10) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -126,13 +126,13 @@ 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*: 29th December, 2017 -+ *Version*: 2.6.9 ++ *Last Build*: 15th January, 2018 ++ *Version*: 2.6.10 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **178630** -+ *Field count*: **1539** -+ *File count*: **1147** ++ *Line count*: **179644** ++ *Field count*: **1571** ++ *File count*: **1151** + *Folder count*: **184** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 1a987be40..11568a2b8 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.9) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.10) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -126,13 +126,13 @@ 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*: 29th December, 2017 -+ *Version*: 2.6.9 ++ *Last Build*: 15th January, 2018 ++ *Version*: 2.6.10 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **178630** -+ *Field count*: **1539** -+ *File count*: **1147** ++ *Line count*: **179644** ++ *Field count*: **1571** ++ *File count*: **1151** + *Folder count*: **184** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index 7fdcd2b52..b7410f773 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -42,6 +42,24 @@ abstract class ###Component###Helper $manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml"; return simplexml_load_file($manifestUrl); } + + /** + * Joomla version object + **/ + protected static $JVersion; + + /** + * set/get Joomla version + **/ + public static function jVersion() + { + // check if set + if (!self::checkObject(self::$JVersion)) + { + self::$JVersion = new JVersion(); + } + return self::$JVersion; + } /** * Load the Contributors details. diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index c84f8c55f..7be66c600 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -61,10 +61,10 @@ abstract class ###Component###Helper } return (string) implode($sperator,$result); } - return (string) json_decode($value); - } - return $value; - } + return (string) json_decode($value); + } + return $value; + } /** * Load the Component xml manifest. @@ -74,6 +74,24 @@ abstract class ###Component###Helper $manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml"; return simplexml_load_file($manifestUrl); } + + /** + * Joomla version object + **/ + protected static $JVersion; + + /** + * set/get Joomla version + **/ + public static function jVersion() + { + // check if set + if (!self::checkObject(self::$JVersion)) + { + self::$JVersion = new JVersion(); + } + return self::$JVersion; + } /** * Load the Contributors details. diff --git a/admin/compiler/joomla_3/JViewLegacy_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_custom_admin.php index bfda48403..1c7591ab8 100644 --- a/admin/compiler/joomla_3/JViewLegacy_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_custom_admin.php @@ -56,7 +56,7 @@ class ###Component###View###SView### extends JViewLegacy protected function setDocument() {###CUSTOM_ADMIN_LIBRARIES_LOADER### ###CUSTOM_ADMIN_DOCUMENT_METADATA### ###CUSTOM_ADMIN_UIKIT_LOADER### ###CUSTOM_ADMIN_GOOGLECHART_LOADER### ###CUSTOM_ADMIN_FOOTABLE_LOADER### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sview###.css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_edit.php b/admin/compiler/joomla_3/JViewLegacy_edit.php index 6ac457c7a..280c17f58 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit.php @@ -122,9 +122,9 @@ class ###Component###View###View### extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css", array('version' => 'auto'));###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### - $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); - $this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js", array('version' => 'auto')); ###DOCUMENT_CUSTOM_PHP### + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### + $this->document->addScript(JURI::root() . $this->script, (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); ###DOCUMENT_CUSTOM_PHP### JText::script('view not acceptable. Error'); } } diff --git a/admin/compiler/joomla_3/JViewLegacy_edit_site.php b/admin/compiler/joomla_3/JViewLegacy_edit_site.php index 63d5d0e73..7d11ec1e8 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit_site.php @@ -127,13 +127,13 @@ class ###Component###View###View### extends JViewLegacy } $this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // we need this to fix the form display - $this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css", array('version' => 'auto')); - $this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js", array('version' => 'auto')); + $this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); // the default style of this view - $this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css", array('version' => 'auto'));###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### + $this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### // default javascript of this view - $this->document->addScript(JURI::root().$this->script, array('version' => 'auto')); - $this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js", array('version' => 'auto')); ###DOCUMENT_CUSTOM_PHP### + $this->document->addScript(JURI::root().$this->script, (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); ###DOCUMENT_CUSTOM_PHP### JText::script('view not acceptable. Error'); } } diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index 1c114be8b..0bcff84ee 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -202,7 +202,7 @@ class ###Component###View###Views### extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_###COMPONENT###_###VIEWS###')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css", array('version' => 'auto')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php index 6242152ee..2fbfce638 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php @@ -56,7 +56,7 @@ class ###Component###View###SViews### extends JViewLegacy protected function setDocument() {###CUSTOM_ADMIN_LIBRARIES_LOADER### ###CUSTOM_ADMIN_UIKIT_LOADER### ###CUSTOM_ADMIN_GOOGLECHART_LOADER### ###CUSTOM_ADMIN_FOOTABLE_LOADER### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css', array('version' => 'auto'));###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_list_site.php b/admin/compiler/joomla_3/JViewLegacy_list_site.php index d3832c31c..ffb2113f0 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_site.php @@ -54,7 +54,7 @@ class ###Component###View###SViews### extends JViewLegacy protected function _prepareDocument() {###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_site.php b/admin/compiler/joomla_3/JViewLegacy_site.php index aab75da62..ae2e5b1b6 100644 --- a/admin/compiler/joomla_3/JViewLegacy_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_site.php @@ -54,7 +54,7 @@ class ###Component###View###SView### extends JViewLegacy protected function _prepareDocument() {###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 6fba22dda..c9f554f5d 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -52,7 +52,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getButton', 'ajax'); $this->registerTask('getButtonID', 'ajax'); $this->registerTask('getAjaxDisplay', 'ajax'); - $this->registerTask('getSnippets', 'ajax'); + $this->registerTask('getLinked', 'ajax'); $this->registerTask('templateDetails', 'ajax'); $this->registerTask('getLayoutDetails', 'ajax'); $this->registerTask('dbTableColumns', 'ajax'); @@ -60,9 +60,10 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getDynamicValues', 'ajax'); $this->registerTask('checkFunctionName', 'ajax'); $this->registerTask('usedin', 'ajax'); + $this->registerTask('fieldOptions', 'ajax'); $this->registerTask('snippetDetails', 'ajax'); $this->registerTask('setSnippetGithub', 'ajax'); - $this->registerTask('fieldOptions', 'ajax'); + $this->registerTask('getSnippets', 'ajax'); } public function ajax() @@ -458,14 +459,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; - case 'getSnippets': + case 'getLinked': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $librariesValue = $jinput->get('libraries', NULL, 'STRING'); - if($librariesValue && $user->id != 0) + $typeValue = $jinput->get('type', NULL, 'INT'); + if($typeValue && $user->id != 0) { - $result = $this->getModel('ajax')->getSnippets($librariesValue); + $result = $this->getModel('ajax')->getLinked($typeValue); } else { @@ -770,6 +771,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'fieldOptions': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $idValue = $jinput->get('id', NULL, 'INT'); + if($idValue) + { + $result = $this->getModel('ajax')->getFieldOptions($idValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'snippetDetails': try { @@ -847,14 +886,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; - case 'fieldOptions': + case 'getSnippets': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $idValue = $jinput->get('id', NULL, 'INT'); - if($idValue) + $librariesValue = $jinput->get('libraries', NULL, 'STRING'); + if($librariesValue && $user->id != 0) { - $result = $this->getModel('ajax')->getFieldOptions($idValue); + $result = $this->getModel('ajax')->getSnippets($librariesValue); } else { diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 3c691a5aa..f29c49e7f 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -989,17 +989,21 @@ class Get } unset($component->javascript); - // add_css - if ($component->add_css == 1) + // add global CSS + $addGlobalCss = array('admin', 'site'); + foreach ($addGlobalCss as $area) { - $this->customScriptBuilder['component_css'] = base64_decode($component->css); + // add_css if found + if (isset($component->{'add_css_'.$area}) && $component->{'add_css_'.$area} == 1 && isset($component->{'css_'.$area}) && ComponentbuilderHelper::checkString($component->{'css_'.$area})) + { + $this->customScriptBuilder['component_css_'.$area] = base64_decode($component->{'css_'.$area}); + } + else + { + $this->customScriptBuilder['component_css_'.$area] = ''; + } + unset($component->{'css_'.$area}); } - else - { - $this->customScriptBuilder['component_css'] = ''; - } - unset($component->css); - // set the lang target $this->lang = 'admin'; // add PHP in ADMIN @@ -1212,6 +1216,7 @@ class Get // Load the results as a list of stdClass objects (see later for more options on retrieving data). $view = $this->db->loadObject(); + // setup view name to use in storing the data $name_single = ComponentbuilderHelper::safeString($view->name_single); $name_list = ComponentbuilderHelper::safeString($view->name_list); @@ -1613,6 +1618,7 @@ class Get unset($this->placeholders['[[[Views]]]']); unset($this->placeholders['[[[VIEW]]]']); unset($this->placeholders['[[[VIEWS]]]']); + // store this view to class object $this->_adminViewData[$id] = $view; } @@ -1811,23 +1817,45 @@ class Get // add_Ajax for this view if (isset($view->add_php_ajax) && $view->add_php_ajax == 1) { + // ajax target (since we only have two options really) + if ('site' === $this->target) + { + $target = 'site'; + } + else + { + $target = 'admin'; + } + $setAjax = false; // check if controller input as been set $view->ajax_input = (isset($view->ajax_input) && ComponentbuilderHelper::checkJson($view->ajax_input)) ? json_decode($view->ajax_input, true) : null; if (ComponentbuilderHelper::checkArray($view->ajax_input)) { - $this->customScriptBuilder[$this->target]['ajax_controller'][$view->code] = array_values($view->ajax_input); - $this->addSiteAjax = true; + $this->customScriptBuilder[$target]['ajax_controller'][$view->code] = array_values($view->ajax_input); + $setAjax = true; } unset($view->ajax_input); // load the ajax class mathods (if set) if (ComponentbuilderHelper::checkString($view->php_ajaxmethod)) { - - $this->customScriptBuilder[$this->target]['ajax_model'][$view->code] = $this->setDynamicValues(base64_decode($view->php_ajaxmethod)); - $this->addSiteAjax = true; + $this->customScriptBuilder[$target]['ajax_model'][$view->code] = $this->setDynamicValues(base64_decode($view->php_ajaxmethod)); + $setAjax = true; } // unset anyway unset($view->php_ajaxmethod); + // should ajax be set + if ($setAjax) + { + // turn on ajax area + if ('site' === $this->target) + { + $this->addSiteAjax = true; + } + else + { + $this->addAjax = true; + } + } } // add the custom buttons if (isset($view->add_custom_button) && $view->add_custom_button == 1) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b744798b7..087d229ec 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -3493,9 +3493,9 @@ class Interpretation extends Fields $chart[] = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " add the google chart builder class."; $chart[] = "\t\trequire_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/chartbuilder.php';"; $chart[] = "\t\t//" . $this->setLine(__LINE__) . " load the google chart js."; - $chart[] = "\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/js/google.jsapi.js', array('version' => 'auto'));"; - $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js', array('version' => 'auto'));"; - $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js', array('version' => 'auto'));"; + $chart[] = "\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/js/google.jsapi.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; return implode(PHP_EOL, $chart); } return ''; @@ -3699,11 +3699,11 @@ class Interpretation extends Fields switch ($pathInfo['extension']) { case 'js': - return '$this->document->addScript(' . $JURI . '"' . $path . '", array("version" => "auto"));'; + return '$this->document->addScript(' . $JURI . '"' . $path . '", (' . $this->fileContentStatic['###Component###'] . 'Helper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript");'; break; case 'css': case 'less': - return '$this->document->addStyleSheet(' . $JURI . '"' . $path . '", array("version" => "auto"));'; + return '$this->document->addStyleSheet(' . $JURI . '"' . $path . '", (' . $this->fileContentStatic['###Component###'] . 'Helper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/css");'; break; case 'php': if (strpos($path, 'http') === false) @@ -3765,12 +3765,12 @@ class Interpretation extends Fields $setter .= PHP_EOL . PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit css."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->css_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/uikit'.\$style.\$size.'.css', array('version' => 'auto'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/uikit'.\$style.\$size.'.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . "\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit js."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/uikit'.\$size.'.js', array('version' => 'auto'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/uikit'.\$size.'.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $setter .= PHP_EOL . $tabV . "\t\t}"; } // load the components need @@ -3818,13 +3818,13 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the css."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', array('version' => 'auto'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t//" . $this->setLine(__LINE__) . " check if the JavaScript file exists."; $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the js."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t}"; @@ -3847,13 +3847,13 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the css."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', array('version' => 'auto'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t//" . $this->setLine(__LINE__) . " check if the JavaScript file exists."; $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the js."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t}"; @@ -3873,12 +3873,12 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit css."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->css_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/css/uikit'.\$size.'.css', array('version' => 'auto'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/css/uikit'.\$size.'.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . "\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit js."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/js/uikit'.\$size.'.js', array('version' => 'auto'));"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/js/uikit'.\$size.'.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $setter .= PHP_EOL . $tabV . "\t\t}"; if (2 == $this->uikit) { @@ -5756,7 +5756,7 @@ class Interpretation extends Fields $componentName = JFilterOutput::cleanText($this->componentData->name); $this->langContent['adminsys'][$this->langPrefix] = $componentName; $this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration'; - $this->langContent[$this->lang][$this->langPrefix] = $componentName; + $this->langContent['admin'][$this->langPrefix] = $componentName; $this->langContent['admin'][$this->langPrefix . '_BACK'] = 'Back'; $this->langContent['admin'][$this->langPrefix . '_DASH'] = 'Dashboard'; $this->langContent['admin'][$this->langPrefix . '_VERSION'] = 'Version'; @@ -5781,6 +5781,8 @@ class Interpretation extends Fields $this->langContent['admin'][$this->langPrefix . '_INACTIVE'] = 'Inactive'; $this->langContent['admin'][$this->langPrefix . '_ARCHIVED'] = 'Archived'; $this->langContent['admin'][$this->langPrefix . '_TRASHED'] = 'Trashed'; + $this->langContent['admin'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; + $this->langContent['admin'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!"; if ($this->componentData->add_license && $this->componentData->license_type == 3) { $this->langContent['admin']['NIE_REG_NIE'] = "

License not set for " . $componentName . ".

Notify your administrator!
The license can be obtained from " . $this->componentData->companyname . ".

"; @@ -5822,7 +5824,6 @@ class Interpretation extends Fields $this->langContent['admin'][$this->langPrefix . '_IMPORT_FILE_COLUMNS'] = "File Columns"; $this->langContent['admin'][$this->langPrefix . '_IMPORT_PLEASE_SELECT_COLUMN'] = "-- Please Select Column --"; $this->langContent['admin'][$this->langPrefix . '_IMPORT_IGNORE_COLUMN'] = "-- Ignore This Column --"; - $this->langContent['admin'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; } // check if the both array is set if (isset($this->langContent['both']) && ComponentbuilderHelper::checkArray($this->langContent['both'])) @@ -5875,6 +5876,7 @@ class Interpretation extends Fields $this->langContent['site'][$this->langPrefix . '_CREATE_NEW_S'] = "Create New %s"; $this->langContent['site'][$this->langPrefix . '_EDIT_S'] = "Edit %s"; $this->langContent['site'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; + $this->langContent['site'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!"; // check if the both array is set if (isset($this->langContent['both']) && ComponentbuilderHelper::checkArray($this->langContent['both'])) @@ -5910,6 +5912,7 @@ class Interpretation extends Fields // add final list of needed lang strings $this->langContent['sitesys'][$this->langPrefix] = ComponentbuilderHelper::safeString($this->componentData->name, 'W'); $this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; + $this->langContent['sitesys'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!"; // check if the both site array is set if (isset($this->langContent['bothsite']) && ComponentbuilderHelper::checkArray($this->langContent['bothsite'])) @@ -7176,22 +7179,22 @@ class Interpretation extends Fields if (!isset($this->footableVersion) || 2 == $this->footableVersion) // loading version 2 { $foo = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the CSS for Footable."; - $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.core.min.css', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.core.min.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Use the Metro Style"; $foo .= PHP_EOL . "\t\tif (!isset(\$this->fooTableStyle) || 0 == \$this->fooTableStyle)"; $foo .= PHP_EOL . "\t\t{"; - $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.metro.min.css', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.metro.min.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . "\t\t}"; $foo .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Use the Legacy Style."; $foo .= PHP_EOL . "\t\telseif (isset(\$this->fooTableStyle) && 1 == \$this->fooTableStyle)"; $foo .= PHP_EOL . "\t\t{"; - $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.standalone.min.css', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.standalone.min.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . "\t\t}"; $foo .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the JavaScript for Footable"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.js', array('version' => 'auto'));"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.sort.js', array('version' => 'auto'));"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.filter.js', array('version' => 'auto'));"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.paginate.js', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.sort.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.filter.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.paginate.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; if ($init) { $foo .= PHP_EOL . PHP_EOL . "\t\t" . '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery(' . "'.footable'" . ').footable(); }); jQuery(' . "'.nav-tabs'" . ').on(' . "'click'" . ', ' . "'li'" . ', function() { setTimeout(tableFix, 10); }); }); function tableFix() { jQuery(' . "'.footable'" . ').trigger(' . "'footable_resize'" . '); }";'; @@ -7203,9 +7206,9 @@ class Interpretation extends Fields $foo = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the CSS for Footable"; $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');"; - $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/css/footable.standalone.min.css', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/css/footable.standalone.min.css', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the JavaScript for Footable (adding all funtions)"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/js/footable.min.js', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/js/footable.min.js', (" . $this->fileContentStatic['###Component###'] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; if ($init) { $foo .= PHP_EOL . PHP_EOL . "\t\t" . '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery(' . "'.footable'" . ').footable();});});";'; diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 0e31f77aa..790495e89 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -173,9 +173,9 @@ class Infusion extends Interpretation $this->fileContentStatic['###SITEJS###'] = $this->setPlaceholders($this->customScriptBuilder['component_js'], $this->placeholders); // ###ADMINCSS### - $this->fileContentStatic['###ADMINCSS###'] = $this->setPlaceholders($this->customScriptBuilder['component_css'], $this->placeholders); + $this->fileContentStatic['###ADMINCSS###'] = $this->setPlaceholders($this->customScriptBuilder['component_css_admin'], $this->placeholders); // ###SITECSS### - $this->fileContentStatic['###SITECSS###'] = $this->setPlaceholders($this->customScriptBuilder['component_css'], $this->placeholders); + $this->fileContentStatic['###SITECSS###'] = $this->setPlaceholders($this->customScriptBuilder['component_css_site'], $this->placeholders); // ###CUSTOM_HELPER_SCRIPT### $this->fileContentStatic['###CUSTOM_HELPER_SCRIPT###'] = $this->setPlaceholders($this->customScriptBuilder['component_php_helper_admin'], $this->placeholders); diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index cf8b28172..48f055ea3 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1853,6 +1853,24 @@ abstract class ComponentbuilderHelper $manifestUrl = JPATH_ADMINISTRATOR."/components/com_componentbuilder/componentbuilder.xml"; return simplexml_load_file($manifestUrl); } + + /** + * Joomla version object + **/ + protected static $JVersion; + + /** + * set/get Joomla version + **/ + public static function jVersion() + { + // check if set + if (!self::checkObject(self::$JVersion)) + { + self::$JVersion = new JVersion(); + } + return self::$JVersion; + } /** * Load the Contributors details. @@ -2018,6 +2036,11 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_SNIPPETS'), 'index.php?option=com_componentbuilder&view=snippets', $submenu === 'snippets'); } + // Access control (get_snippets.submenu). + if ($user->authorise('get_snippets.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_GET_SNIPPETS'), 'index.php?option=com_componentbuilder&view=get_snippets', $submenu === 'get_snippets'); + } if ($user->authorise('field.access', 'com_componentbuilder') && $user->authorise('field.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FIELDS'), 'index.php?option=com_componentbuilder&view=fields', $submenu === 'fields'); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 4dbfec224..ee87af24f 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -598,6 +598,8 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="Some Short COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="

Linked Fields

Display of the fields will load here!

Field Conditions

Display of the fields conditions will load here!
" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="
Welcome to the new improved fields and conditions layout.

We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.

You can still watch the tutorials, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.

" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields & Conditions" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="
Searching the database.
" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this tutorial for more info. " COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL="Linked Views Options" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION="Only if you add permissions here will this view have permissions. Please watch this tutorial for more info." @@ -2466,6 +2468,8 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JAVASCRIPT_FILE_DESCRIPTION="Add Java COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JAVASCRIPT_FILE_LABEL="Add JavaScript (file)" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JS_DOCUMENT="Add Js Document" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JS_DOCUMENT_LABEL="Add JS (custom document script)" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX="Add Php Ajax" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL="Add PHP (AJAX)" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_DOCUMENT="Add Php Document" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL="Add PHP (custom document script)" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_JVIEW="Add Php Jview" @@ -2474,7 +2478,11 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_JVIEW_DISPLAY_LABEL="Add PHP (cus COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_JVIEW_LABEL="Add PHP (custom JViewLegacy methods)" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_VIEW="Add Php View" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_VIEW_LABEL="Add PHP (custom view script)" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_AJAX_INPUT="Ajax Input" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_AJAX_INPUT_LABEL="Ajax Input" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ALNUM="ALNUM" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ARCHIVE="Archive" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ARRAY="ARRAY" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ARROW_DOWN="Arrow Down" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ARROW_DOWN_FOUR="Arrow Down 4" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ARROW_DOWN_THREE="Arrow Down 3" @@ -2497,10 +2505,12 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ATTACHMENT="Attachment" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BACKWARD_CIRCLE="Backward Circle" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BAN_CIRCLE="Ban Circle" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BARS="Bars" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BASESIXTY_FOUR="BASE64" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BASKET="Basket" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOOK="Book" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOOKMARK="Bookmark" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOOKMARK_TWO="Bookmark 2" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOOLEAN="BOOLEAN" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOTH="Both" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOX_ADD="Box Add" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_BOX_REMOVE="Box Remove" @@ -2522,6 +2532,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CHECKMARK_CIRCLE="Checkmark Circle" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CHECKMARK_TWO="Checkmark 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CIRCLE="Circle" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CLOCK="Clock" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CMD="CMD" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME="Codename" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_DESCRIPTION="Add Name in Code Here" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_HINT="codename" @@ -2598,6 +2609,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FIRST="First" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FLAG="Flag" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FLAG_THREE="Flag 3" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FLASH="Flash" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FLOAT="FLOAT" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FOLDER_CLOSE="Folder Close" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FOLDER_MINUS="Folder Minus" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FOLDER_OPEN="Folder Open" @@ -2617,6 +2629,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HEART="Heart" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HEART_TWO="Heart 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HOME="Home" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HOME_TWO="Home 2" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HTML="HTML" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICOMOON_DESCRIPTION="Joomla Standard Icomoon Fonts" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICOMOON_LABEL="Icon" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON="Icon" @@ -2627,6 +2640,13 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_IMAGE="Image" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_IMAGES="Images" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INFO="Info" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INFO_CIRCLE="Info Circle" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_DEFAULT_DESCRIPTION="Enter default input value" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_DEFAULT_HINT="Default Value Here" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_DEFAULT_LABEL="Default" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_DEFAULT_MESSAGE="Error! Please add default input value here." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_FILTER_DESCRIPTION="Select the filter used to sanitized the input value." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_FILTER_LABEL="Select a Filter" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INT="INT" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_CSS="JavaScript & CSS" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_FILE="Javascript File" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_FILE_DESCRIPTION="Add your JavaScript here! [Do not add the script tags]" @@ -2644,6 +2664,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES="Libraries" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LINK="Link" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LINKED_COMPONENTS="Linked - Components" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIST="List" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIST_TWO="List 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LOCATION="Location" @@ -2659,6 +2680,10 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_DESCRIPTION="Add Controller Method COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_HINT="methodName" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_LABEL="Target Controller Method" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_MESSAGE="Error! Please add controller method name here." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_NAME_DESCRIPTION="Enter method name." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_NAME_HINT="Method Name Here" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_NAME_LABEL="Method Name" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_METHOD_NAME_MESSAGE="Error! Please add method name here." COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MINUS="Minus" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MINUS_SIGN="Minus Sign" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MOBILE="Mobile" @@ -2682,6 +2707,8 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="Linked Files, Folders & URLs
Display of the files, folders & urls will load here!
" COM_COMPONENTBUILDER_LIBRARY_NOTE_LIBRARY_INSTRUCTION_DESCRIPTION="Watch a tutorial overview of the new library manager concept." COM_COMPONENTBUILDER_LIBRARY_NOTE_LIBRARY_INSTRUCTION_LABEL="Quick overview" +COM_COMPONENTBUILDER_LIBRARY_NOTE_LINKED_TO_NOTICE_DESCRIPTION="
Searching the database.
" +COM_COMPONENTBUILDER_LIBRARY_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_DESCRIPTION="There is no behaviour set for this library. This means JCB will not add any files unless you custom code it in somewhere." COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_LABEL="No Behaviour" COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_DESCRIPTION="There is no behaviour set for this library. This means JCB will not add any files unless you custom code it in somewhere." @@ -5102,13 +5169,14 @@ COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_S COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" -COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." +COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" COM_COMPONENTBUILDER_NOT_SET="not set" COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested." COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked" +COM_COMPONENTBUILDER_NO_FOUND="No Found" COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found" COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version" @@ -5425,6 +5493,7 @@ COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES="Libraries" COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_SITE_VIEW_LINK="Link" +COM_COMPONENTBUILDER_SITE_VIEW_LINKED_COMPONENTS="Linked - Components" COM_COMPONENTBUILDER_SITE_VIEW_LIST="List" COM_COMPONENTBUILDER_SITE_VIEW_LIST_TWO="List 2" COM_COMPONENTBUILDER_SITE_VIEW_LOCATION="Location" @@ -5469,6 +5538,8 @@ COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language Stri COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body [[[SITE_TOOLBAR]]] to add the custom position of the toolbar." COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" +COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="
Searching the database.
" +COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_UIKIT_SNIPPET_LABEL="Snippet Details" COM_COMPONENTBUILDER_SITE_VIEW_NOTIFICATION="Notification" @@ -5832,6 +5903,7 @@ COM_COMPONENTBUILDER_SUBMENU_DYNAMIC_GETS="Dynamic Gets" COM_COMPONENTBUILDER_SUBMENU_FIELDS="Fields" COM_COMPONENTBUILDER_SUBMENU_FIELDTYPES="Fieldtypes" COM_COMPONENTBUILDER_SUBMENU_FTPS="FTP's" +COM_COMPONENTBUILDER_SUBMENU_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS="Joomla Components" COM_COMPONENTBUILDER_SUBMENU_LANGUAGES="Languages" @@ -5985,6 +6057,8 @@ COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks" COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views" COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates" COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package." +COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields" +COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS="The library files, folders & URLs" COM_COMPONENTBUILDER_THE_NAME_OF_THIS_LIBRARY_BSB_CAN_NOT_BE_CHANGED_TO_BSB_OR_THINGS_WILL_BREAK="The name of this library (%s) can not be changed to %s or things will break." COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: %s" @@ -5994,7 +6068,7 @@ COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CH COM_COMPONENTBUILDER_THE_SNIPPETS_WERE_SUCCESSFULLY_EXPORTED="The Snippets Were Successfully Exported!" COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Successfully Exported!" COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading" -COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_S="This %s is not linked to any (%s)!" +COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This %s is not linked to any other areas of JCB at this time!" COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_TITLE="Title" COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" diff --git a/admin/layouts/admin_view/details_fullwidth.php b/admin/layouts/admin_view/details_fullwidth.php new file mode 100644 index 000000000..e4ec249ee --- /dev/null +++ b/admin/layouts/admin_view/details_fullwidth.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_linked_to_notice' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php new file mode 100644 index 000000000..197d8f141 --- /dev/null +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_linked_to_notice' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/custom_admin_view/php_fullwidth.php b/admin/layouts/custom_admin_view/php_fullwidth.php index d592322f2..641013366 100644 --- a/admin/layouts/custom_admin_view/php_fullwidth.php +++ b/admin/layouts/custom_admin_view/php_fullwidth.php @@ -30,6 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( + 'add_php_ajax', + 'php_ajaxmethod', + 'ajax_input', 'add_php_document', 'php_document', 'add_php_view', diff --git a/admin/layouts/dynamic_get/main_fullwidth.php b/admin/layouts/dynamic_get/main_fullwidth.php index daabf3a2d..c81885a0b 100644 --- a/admin/layouts/dynamic_get/main_fullwidth.php +++ b/admin/layouts/dynamic_get/main_fullwidth.php @@ -30,7 +30,8 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'php_custom_get' + 'php_custom_get', + 'note_linked_to_notice' ); ?> diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 12b5d8ed1..c41c6cff0 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzyfields; +$items = $displayData->waafields; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/ftp/linked_components_fullwidth.php index bae7c0792..785f8e156 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/ftp/linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzzlinked_components; +$items = $displayData->wablinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index 17490f21e..ae099f39a 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -46,8 +46,10 @@ $fields = $displayData->get('fields') ?: array( 'php_site_event', 'add_javascript', 'javascript', - 'add_css', - 'css' + 'add_css_admin', + 'css_admin', + 'add_css_site', + 'css_site' ); ?> diff --git a/admin/layouts/joomla_component/translation_fullwidth.php b/admin/layouts/joomla_component/translation_fullwidth.php index 151081f8c..11a586ad2 100644 --- a/admin/layouts/joomla_component/translation_fullwidth.php +++ b/admin/layouts/joomla_component/translation_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vwmtranslation; +$items = $displayData->vwntranslation; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=language_translations&task=language_translation.edit"; diff --git a/admin/layouts/library/linked_fullwidth.php b/admin/layouts/library/linked_fullwidth.php new file mode 100644 index 000000000..dea1c5fb2 --- /dev/null +++ b/admin/layouts/library/linked_fullwidth.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_linked_to_notice' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php new file mode 100644 index 000000000..197d8f141 --- /dev/null +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_linked_to_notice' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index f1b4790e1..9db4fd8ff 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -166,12 +166,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_batchmove = base64_decode($item->php_batchmove); } - if (!empty($item->php_getlistquery)) - { - // base64 Decode php_getlistquery. - $item->php_getlistquery = base64_decode($item->php_getlistquery); - } - if (!empty($item->php_allowedit)) { // base64 Decode php_allowedit. @@ -196,6 +190,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import = base64_decode($item->php_import); } + if (!empty($item->php_getlistquery)) + { + // base64 Decode php_getlistquery. + $item->php_getlistquery = base64_decode($item->php_getlistquery); + } + + if (!empty($item->php_getitem)) + { + // base64 Decode php_getitem. + $item->php_getitem = base64_decode($item->php_getitem); + } + if (!empty($item->php_getitems_after_all)) { // base64 Decode php_getitems_after_all. @@ -250,12 +256,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_display = base64_decode($item->php_import_display); } - if (!empty($item->php_getitem)) - { - // base64 Decode php_getitem. - $item->php_getitem = base64_decode($item->php_getitem); - } - if (!empty($item->php_import_save)) { // base64 Decode php_import_save. @@ -1282,12 +1282,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_batchmove'] = base64_encode($data['php_batchmove']); } - // Set the php_getlistquery string to base64 string. - if (isset($data['php_getlistquery'])) - { - $data['php_getlistquery'] = base64_encode($data['php_getlistquery']); - } - // Set the php_allowedit string to base64 string. if (isset($data['php_allowedit'])) { @@ -1312,6 +1306,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import'] = base64_encode($data['php_import']); } + // Set the php_getlistquery string to base64 string. + if (isset($data['php_getlistquery'])) + { + $data['php_getlistquery'] = base64_encode($data['php_getlistquery']); + } + + // Set the php_getitem string to base64 string. + if (isset($data['php_getitem'])) + { + $data['php_getitem'] = base64_encode($data['php_getitem']); + } + // Set the php_getitems_after_all string to base64 string. if (isset($data['php_getitems_after_all'])) { @@ -1366,12 +1372,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_display'] = base64_encode($data['php_import_display']); } - // Set the php_getitem string to base64 string. - if (isset($data['php_getitem'])) - { - $data['php_getitem'] = base64_encode($data['php_getitem']); - } - // Set the php_import_save string to base64 string. if (isset($data['php_import_save'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 3fc3ba037..f419a6d8d 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -268,8 +268,6 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_save = base64_decode($item->php_save); // decode php_batchmove $item->php_batchmove = base64_decode($item->php_batchmove); - // decode php_getlistquery - $item->php_getlistquery = base64_decode($item->php_getlistquery); // decode php_allowedit $item->php_allowedit = base64_decode($item->php_allowedit); // decode php_after_publish @@ -278,6 +276,10 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_getitems = base64_decode($item->php_getitems); // decode php_import $item->php_import = base64_decode($item->php_import); + // decode php_getlistquery + $item->php_getlistquery = base64_decode($item->php_getlistquery); + // decode php_getitem + $item->php_getitem = base64_decode($item->php_getitem); // decode php_getitems_after_all $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); // decode php_before_save @@ -296,8 +298,6 @@ class ComponentbuilderModelAdmin_views extends JModelList $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_save $item->php_import_save = base64_decode($item->php_import_save); // decode css_view diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 88c695e1d..8ad6a21a4 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -826,7 +826,7 @@ class ComponentbuilderModelAjax extends JModelList protected function addEditLink($id, $view, $views) { // can edit - if ($this->canEdit($id)) + if ($this->canEdit($id, $view)) { $edit = "index.php?option=com_componentbuilder&view=".$views."&task=".$view.".edit&id=".$id.$this->ref; return ' '; @@ -970,24 +970,21 @@ class ComponentbuilderModelAjax extends JModelList } public function getFieldSelectOptions($id) - { - // Get a db connection. - $db = JFactory::getDbo(); - + { // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.xml', 'b.name'))); - $query->from($db->quoteName('#__componentbuilder_field', 'a')); - $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('b.id') . ')'); - $query->where($db->quoteName('a.published') . ' = 1'); - $query->where($db->quoteName('a.id') . ' = '. (int) $id); + $query = $this->_db->getQuery(true); + $query->select($this->_db->quoteName(array('a.xml', 'b.name'))); + $query->from($this->_db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', $this->_db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $this->_db->quoteName('a.fieldtype') . ' = ' . $this->_db->quoteName('b.id') . ')'); + $query->where($this->_db->quoteName('a.published') . ' = 1'); + $query->where($this->_db->quoteName('a.id') . ' = '. (int) $id); // Reset the query using our newly populated query object. - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) + $this->_db->setQuery($query); + $this->_db->execute(); + if ($this->_db->getNumRows()) { - $result = $db->loadObject(); + $result = $this->_db->loadObject(); $result->name = strtolower($result->name); if (ComponentbuilderHelper::typeField($result->name,'list')) { @@ -1056,10 +1053,8 @@ class ComponentbuilderModelAjax extends JModelList public function getTableColumns($tableName) { - // Get a db connection. - $db = JFactory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__".$tableName); + $columns = $this->_db->getTableColumns("#__".$tableName); if (ComponentbuilderHelper::checkArray($columns)) { // build the return string @@ -1073,189 +1068,184 @@ class ComponentbuilderModelAjax extends JModelList return false; } + protected $linkedKeys = array( + 'field' => array( + array('table' => 'component_config', 'tables' => 'components_config', 'fields' => array('addconfig' => 'field', 'joomla_component' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT', 'name' => 'system_name'), + array('table' => 'admin_fields', 'tables' => 'admins_fields', 'fields' => array('addfields' => 'field', 'admin_view' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_ADMIN_VIEW', 'name' => 'system_name') + ), + 'admin_view' => array( + array('table' => 'component_admin_views', 'tables' => 'components_admin_views', 'fields' => array('addadmin_views' => 'adminview', 'joomla_component' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT', 'name' => 'system_name') + ), + 'custom_admin_view' => array( + array('table' => 'component_custom_admin_views', 'tables' => 'components_custom_admin_views', 'fields' => array('addcustom_admin_views' => 'customadminview', 'joomla_component' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT', 'name' => 'system_name') + ), + 'site_view' => array( + array('table' => 'component_site_views', 'tables' => 'components_site_views', 'fields' => array('addsite_views' => 'siteview', 'joomla_component' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT', 'name' => 'system_name') + ), + 'library' => array( + array('table' => 'template', 'tables' => 'templates', 'fields' => array('libraries' => 'ARRAY', 'name' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_TEMPLATE'), + array('table' => 'layout', 'tables' => 'layouts', 'fields' => array('libraries' => 'ARRAY', 'name' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_LAYOUT'), + array('table' => 'site_view', 'tables' => 'site_views', 'fields' => array('libraries' => 'ARRAY', 'system_name' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_SITE_VIEW'), + array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('libraries' => 'ARRAY', 'system_name' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW') + ), + 'dynamic_get' => array( + array('table' => 'site_view', 'tables' => 'site_views', 'fields' => array('custom_get' => 'ARRAY', 'main_get' => 'INT', 'system_name' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_SITE_VIEW'), + array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('custom_get' => 'ARRAY', 'main_get' => 'INT', 'system_name' => 'NAME'), 'type' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW') + ) + ); + /** - * Get Linked to + * Get Linked * - * @param string $type Item Name - * @param int $id Item ID + * @param int $type The display return type * - * @return string The table of the linked to result + * @return string The display return type on success * */ - protected function getLinked($to) + public function getLinked($type) { // get the view name & id $values = $this->getViewID(); // check if item is set if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view'])) { - // get linked to - $linkedToArray = (array) explode('__', $to); - // check if item is linked to component - if (in_array('component', $linkedToArray)) + // check if we have any linked to config + if (isset($this->linkedKeys[$values['a_view']])) { - if (!$components = getComponentLinked($values['a_view'], $values['a_id'])) + // make sure the ref is set + $this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; + // get the linked to + if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id'])) { - $linkedToString = implode(', ', array_map( function($name) { return ComponentbuilderHelper::safeString($name, 'w'); }, $linkedToArray)); - return '

' . JText::sprintf('COM_COMPONENTBUILDER_S_NOT_LINKED', ComponentbuilderHelper::safeString($values['a_view'], 'Ww')) . '

' . JText::sprintf('COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_S', $values['a_view'], $linkedToString) . '

'; + // just return it for now as an unordered list + return '
  • ' .implode('
  • ', $linked) . '
'; } } - // if fields and components found get admin views - + } + // if not found but has session view name + if (strlen($values['a_view'])) + { + return '

' . JText::sprintf('COM_COMPONENTBUILDER_S_NOT_LINKED', ComponentbuilderHelper::safeString($values['a_view'], 'Ww')) . '

' . JText::sprintf('COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME', $values['a_view']) . '

'; } // no view or id found in session, or view not allowed to access area return '

' . JText::_('COM_COMPONENTBUILDER_ERROR') . '

' . JText::_('COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR') . '

'; } /** - * Get Component Linked to Item + * Get Linked to Items * - * @param string $type Item Name - * @param int $id Item ID + * @param string $view View that is being searched for + * @param int $id ID * - * @return array Components Id if found + * @return array Found items * */ - protected function getComponentLinked($type, $id) + protected function getLinkedTo($view, $id) { // reset bucket - $componentsLinked = array(); - // Create a new query object. - $query = $this->db->getQuery(true); - // get all history values - $query->select('h.*'); - $query->from('#__ucm_history AS h'); - $query->where($this->db->quoteName('h.ucm_item_id') . ' = ' . (int) $id); - // Join over the content type for the type id - $query->join('LEFT', '#__content_types AS ct ON ct.type_id = h.ucm_type_id'); - $query->where('ct.type_alias = ' . $this->db->quote('com_componentbuilder.' . $type)); - $this->db->setQuery($query); - $this->db->execute(); - if ($this->db->getNumRows()) + $linked = array(); + // start search + foreach ($this->linkedKeys[$view] as $search) { - // load all item history - $items = $db->loadObjectList(); - // load the components ids - foreach ($items as $item) + // Create a new query object. + $query = $this->_db->getQuery(true); + // get all history values + $selection = array_keys($search['fields']); + $selection[] = 'id'; + $query->select($selection); + $query->from('#__componentbuilder_' . $search['table']); + $this->_db->setQuery($query); + $this->_db->execute(); + if ($this->_db->getNumRows()) { - // only work with those who have notes - if (ComponentbuilderHelper::checkJson($item->version_note)) + // load all items + $items = $this->_db->loadObjectList(); + // search the items + foreach ($items as $item) { - $note = json_decode($item->version_note, true); - if (ComponentbuilderHelper::checkArray($note)) + $found = false; + foreach ($search['fields'] as $key => $target) { - foreach($note as $ids) + if ('NAME' === $target) { - if (ComponentbuilderHelper::checkArray($ids)) + $name = $item->{$key}; + $nameTable = $key; + continue; + } + elseif (!$found) + { + if ('INT' === $target) { - foreach ($ids as $_id) + // check if ID match + if ($item->{$key} == $id) { - $componentsLinked[(int) $_id] = array('component' => (int) $_id); + $found = true; } } - elseif (is_numeric($ids)) + else { - $componentsLinked[(int) $ids] = array('component' => (int) $ids); + // check if we have a json + if (ComponentbuilderHelper::checkJson($item->{$key})) + { + $item->{$key} = json_decode($item->{$key}, true); + } + // if array + if (ComponentbuilderHelper::checkArray($item->{$key})) + { + if ('ARRAY' === $target) + { + // check if ID match + foreach ($item->{$key} as $_id) + { + if ($_id == $id) + { + $found = true; + } + } + } + else + { + foreach ($item->{$key} as $row) + { + if (isset($row[$target]) && $row[$target] == $id) + { + $found = true; + } + } + } + } } } } + // check if found + if ($found) + { + // build the name + $edit = true; + if (is_numeric($name) && isset($search['name'])) + { + if (!$name = ComponentbuilderHelper::getVar($nameTable, (int) $name, 'id', $search['name'])) + { + $name = JText::_('COM_COMPONENTBUILDER_NO_FOUND'); + $edit = false; + } + } + // set edit link + $link = ($edit) ? $this->addEditLink($item->id, $search['table'], $search['tables']) : ''; + // build the linked + $linked[] = JText::_($search['type']) . ' - ' . $name . ' ' . $link; + } } } - // check if we found any - if (ComponentbuilderHelper::checkArray($componentLinked)) - { - return $componentLinked; - } + } + // check if we found any + if (ComponentbuilderHelper::checkArray($linked)) + { + return $linked; } return false; } - // Used in site_view - - public function getSnippets($libraries) - { - if (ComponentbuilderHelper::checkJson($libraries)) - { - $libraries = json_decode($libraries, true); - } - // check if we have an array - if (ComponentbuilderHelper::checkArray($libraries)) - { - // insure we only have int values - if ($libraries = $this->checkLibraries($libraries)) - { - // Get a db connection. - $db = JFactory::getDbo(); - // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName( array('a.id') )); - $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); - $query->where($db->quoteName('a.published') . ' = 1'); - // check for country and region - $query->where($db->quoteName('a.library') . ' IN ('. implode(',',$libraries) .')'); - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - return $db->loadColumn(); - } - } - } - return false; - } - - protected function checkLibraries($libraries) - { - $bucket = array(); - $libraries = array_map( function($id) use (&$bucket) { - // now get bundled libraries - $type = ComponentbuilderHelper::getVar('library', (int) $id, 'id', 'type'); - if (2 == $type && $bundled = ComponentbuilderHelper::getVar('library', (int) $id, 'id', 'libraries')) - { - // make sure we have an array if it was json - if (ComponentbuilderHelper::checkJson($bundled)) - { - $bundled = json_decode($bundled, true); - } - // load in the values if we have an array - if (ComponentbuilderHelper::checkArray($bundled)) - { - foreach ($bundled as $lib) - { - $bucket[$lib] = $lib; - } - } - elseif (is_numeric($bundled)) - { - $bucket[(int) $bundled] = (int) $bundled; - } - } - else - { - return (int) $id; - } - }, $libraries); - // check if we have any bundled libraries - if (ComponentbuilderHelper::checkArray($bucket)) - { - foreach ($bucket as $lib) - { - $libraries[] = (int) $lib; - } - } - // check that we have libraries - if (ComponentbuilderHelper::checkArray($libraries)) - { - $libraries = array_values(array_unique(array_filter($libraries, function($id){return is_int($id);}))); - // check if we have any libraries remaining - if (ComponentbuilderHelper::checkArray($libraries)) - { - return $libraries; - } - } - return false; - } - // Used in template public function getTemplateDetails($id) { @@ -1964,7 +1954,102 @@ class ComponentbuilderModelAjax extends JModelList return false; } - // Used in snippet + // Used in field + public function getFieldOptions($id) + { + if ($field = ComponentbuilderHelper::getFieldOptions($id, 'id')) + { + // return found field options + return $field; + } + return false; + } + + // Used in get_snippets + + public function getSnippets($libraries) + { + if (ComponentbuilderHelper::checkJson($libraries)) + { + $libraries = json_decode($libraries, true); + } + // check if we have an array + if (ComponentbuilderHelper::checkArray($libraries)) + { + // insure we only have int values + if ($libraries = $this->checkLibraries($libraries)) + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName( array('a.id') )); + $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); + $query->where($db->quoteName('a.published') . ' = 1'); + // check for country and region + $query->where($db->quoteName('a.library') . ' IN ('. implode(',',$libraries) .')'); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadColumn(); + } + } + } + return false; + } + + protected function checkLibraries($libraries) + { + $bucket = array(); + $libraries = array_map( function($id) use (&$bucket) { + // now get bundled libraries + $type = ComponentbuilderHelper::getVar('library', (int) $id, 'id', 'type'); + if (2 == $type && $bundled = ComponentbuilderHelper::getVar('library', (int) $id, 'id', 'libraries')) + { + // make sure we have an array if it was json + if (ComponentbuilderHelper::checkJson($bundled)) + { + $bundled = json_decode($bundled, true); + } + // load in the values if we have an array + if (ComponentbuilderHelper::checkArray($bundled)) + { + foreach ($bundled as $lib) + { + $bucket[$lib] = $lib; + } + } + elseif (is_numeric($bundled)) + { + $bucket[(int) $bundled] = (int) $bundled; + } + } + else + { + return (int) $id; + } + }, $libraries); + // check if we have any bundled libraries + if (ComponentbuilderHelper::checkArray($bucket)) + { + foreach ($bucket as $lib) + { + $libraries[] = (int) $lib; + } + } + // check that we have libraries + if (ComponentbuilderHelper::checkArray($libraries)) + { + $libraries = array_values(array_unique(array_filter($libraries, function($id){return is_int($id);}))); + // check if we have any libraries remaining + if (ComponentbuilderHelper::checkArray($libraries)) + { + return $libraries; + } + } + return false; + } public function getSnippetDetails($id) { // Get a db connection. @@ -2126,16 +2211,5 @@ class ComponentbuilderModelAjax extends JModelList return $item->get('id'); } return 0; - } - - // Used in field - public function getFieldOptions($id) - { - if ($field = ComponentbuilderHelper::getFieldOptions($id, 'id')) - { - // return found field options - return $field; - } - return false; } } diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 708dd0852..5ba658a25 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -384,10 +384,10 @@ class ComponentbuilderModelComponentbuilder extends JModelList } else { // split versions in to array var activeVersionArray = activeVersion.split("."); - var localVersionArray = manifest.version.split("."); - if (localVersionArray[0] > activeVersionArray[0] || - (localVersionArray[0] == activeVersionArray[0] && localVersionArray[1] > activeVersionArray[1]) || - (localVersionArray[0] == activeVersionArray[0] && localVersionArray[1] == activeVersionArray[1] && localVersionArray[2] > activeVersionArray[2])) { + var localVersionArray = manifest.version.split("."); + if ((+localVersionArray[0] > +activeVersionArray[0]) || + (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] > +activeVersionArray[1]) || + (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] == +activeVersionArray[1] && +localVersionArray[2] > +activeVersionArray[2])) { // local version head latest release jQuery(".update-notice").html("'.JText::_('COM_COMPONENTBUILDER_BETA_RELEASE').'"); } else { diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index b140494af..ee5abd489 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -64,6 +64,11 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin public function getTable($type = 'custom_admin_view', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); + } + + public function getVDM() + { + return $this->vastDevMod; } /** @@ -103,6 +108,14 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->libraries = $libraries->toArray(); } + if (!empty($item->ajax_input)) + { + // Convert the ajax_input field to an array. + $ajax_input = new Registry; + $ajax_input->loadString($item->ajax_input); + $item->ajax_input = $ajax_input->toArray(); + } + if (!empty($item->custom_get)) { // Convert the custom_get field to an array. @@ -119,10 +132,28 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->custom_button = $custom_button->toArray(); } - if (!empty($item->php_controller)) + if (!empty($item->php_document)) { - // base64 Decode php_controller. - $item->php_controller = base64_decode($item->php_controller); + // base64 Decode php_document. + $item->php_document = base64_decode($item->php_document); + } + + if (!empty($item->php_jview_display)) + { + // base64 Decode php_jview_display. + $item->php_jview_display = base64_decode($item->php_jview_display); + } + + if (!empty($item->php_view)) + { + // base64 Decode php_view. + $item->php_view = base64_decode($item->php_view); + } + + if (!empty($item->php_jview)) + { + // base64 Decode php_jview. + $item->php_jview = base64_decode($item->php_jview); } if (!empty($item->default)) @@ -131,12 +162,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->default = base64_decode($item->default); } - if (!empty($item->php_model)) - { - // base64 Decode php_model. - $item->php_model = base64_decode($item->php_model); - } - if (!empty($item->js_document)) { // base64 Decode js_document. @@ -161,30 +186,45 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->css = base64_decode($item->css); } - if (!empty($item->php_document)) + if (!empty($item->php_ajaxmethod)) { - // base64 Decode php_document. - $item->php_document = base64_decode($item->php_document); + // base64 Decode php_ajaxmethod. + $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); } - if (!empty($item->php_view)) + if (!empty($item->php_controller)) { - // base64 Decode php_view. - $item->php_view = base64_decode($item->php_view); + // base64 Decode php_controller. + $item->php_controller = base64_decode($item->php_controller); } - if (!empty($item->php_jview_display)) + if (!empty($item->php_model)) { - // base64 Decode php_jview_display. - $item->php_jview_display = base64_decode($item->php_jview_display); - } - - if (!empty($item->php_jview)) - { - // base64 Decode php_jview. - $item->php_jview = base64_decode($item->php_jview); + // base64 Decode php_model. + $item->php_model = base64_decode($item->php_model); } + + if (empty($item->id)) + { + $id = 0; + } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id); + ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod); + } + // check what type of custom_button array we have here (should be subform... but just incase) // This could happen due to huge data sets if (isset($item->custom_button) && isset($item->custom_button['name'])) @@ -945,6 +985,19 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['libraries'] = ''; } + // Set the ajax_input items to data. + if (isset($data['ajax_input']) && is_array($data['ajax_input'])) + { + $ajax_input = new JRegistry; + $ajax_input->loadArray($data['ajax_input']); + $data['ajax_input'] = (string) $ajax_input; + } + elseif (!isset($data['ajax_input'])) + { + // Set the empty ajax_input to data + $data['ajax_input'] = ''; + } + // Set the custom_get items to data. if (isset($data['custom_get']) && is_array($data['custom_get'])) { @@ -971,10 +1024,28 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['custom_button'] = ''; } - // Set the php_controller string to base64 string. - if (isset($data['php_controller'])) + // Set the php_document string to base64 string. + if (isset($data['php_document'])) { - $data['php_controller'] = base64_encode($data['php_controller']); + $data['php_document'] = base64_encode($data['php_document']); + } + + // Set the php_jview_display string to base64 string. + if (isset($data['php_jview_display'])) + { + $data['php_jview_display'] = base64_encode($data['php_jview_display']); + } + + // Set the php_view string to base64 string. + if (isset($data['php_view'])) + { + $data['php_view'] = base64_encode($data['php_view']); + } + + // Set the php_jview string to base64 string. + if (isset($data['php_jview'])) + { + $data['php_jview'] = base64_encode($data['php_jview']); } // Set the default string to base64 string. @@ -983,12 +1054,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['default'] = base64_encode($data['default']); } - // Set the php_model string to base64 string. - if (isset($data['php_model'])) - { - $data['php_model'] = base64_encode($data['php_model']); - } - // Set the js_document string to base64 string. if (isset($data['js_document'])) { @@ -1013,28 +1078,22 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['css'] = base64_encode($data['css']); } - // Set the php_document string to base64 string. - if (isset($data['php_document'])) + // Set the php_ajaxmethod string to base64 string. + if (isset($data['php_ajaxmethod'])) { - $data['php_document'] = base64_encode($data['php_document']); + $data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']); } - // Set the php_view string to base64 string. - if (isset($data['php_view'])) + // Set the php_controller string to base64 string. + if (isset($data['php_controller'])) { - $data['php_view'] = base64_encode($data['php_view']); + $data['php_controller'] = base64_encode($data['php_controller']); } - // Set the php_jview_display string to base64 string. - if (isset($data['php_jview_display'])) + // Set the php_model string to base64 string. + if (isset($data['php_model'])) { - $data['php_jview_display'] = base64_encode($data['php_jview_display']); - } - - // Set the php_jview string to base64 string. - if (isset($data['php_jview'])) - { - $data['php_jview'] = base64_encode($data['php_jview']); + $data['php_model'] = base64_encode($data['php_model']); } // Set the Params Items to data diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 2b50c4801..b4b6f9f8b 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -266,12 +266,16 @@ class ComponentbuilderModelCustom_admin_views extends JModelList continue; } - // decode php_controller - $item->php_controller = base64_decode($item->php_controller); + // decode php_document + $item->php_document = base64_decode($item->php_document); + // decode php_jview_display + $item->php_jview_display = base64_decode($item->php_jview_display); + // decode php_view + $item->php_view = base64_decode($item->php_view); + // decode php_jview + $item->php_jview = base64_decode($item->php_jview); // decode default $item->default = base64_decode($item->default); - // decode php_model - $item->php_model = base64_decode($item->php_model); // decode js_document $item->js_document = base64_decode($item->js_document); // decode javascript_file @@ -280,14 +284,12 @@ class ComponentbuilderModelCustom_admin_views extends JModelList $item->css_document = base64_decode($item->css_document); // decode css $item->css = base64_decode($item->css); - // decode php_document - $item->php_document = base64_decode($item->php_document); - // decode php_view - $item->php_view = base64_decode($item->php_view); - // decode php_jview_display - $item->php_jview_display = base64_decode($item->php_jview_display); - // decode php_jview - $item->php_jview = base64_decode($item->php_jview); + // decode php_ajaxmethod + $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); + // decode php_controller + $item->php_controller = base64_decode($item->php_controller); + // decode php_model + $item->php_model = base64_decode($item->php_model); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index f37f06333..f68403bc9 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -64,6 +64,11 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin public function getTable($type = 'dynamic_get', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); + } + + public function getVDM() + { + return $this->vastDevMod; } /** @@ -95,6 +100,22 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin $item->metadata = $registry->toArray(); } + if (!empty($item->join_view_table)) + { + // Convert the join_view_table field to an array. + $join_view_table = new Registry; + $join_view_table->loadString($item->join_view_table); + $item->join_view_table = $join_view_table->toArray(); + } + + if (!empty($item->join_db_table)) + { + // Convert the join_db_table field to an array. + $join_db_table = new Registry; + $join_db_table->loadString($item->join_db_table); + $item->join_db_table = $join_db_table->toArray(); + } + if (!empty($item->filter)) { // Convert the filter field to an array. @@ -127,22 +148,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin $item->global = $global->toArray(); } - if (!empty($item->join_db_table)) - { - // Convert the join_db_table field to an array. - $join_db_table = new Registry; - $join_db_table->loadString($item->join_db_table); - $item->join_db_table = $join_db_table->toArray(); - } - - if (!empty($item->join_view_table)) - { - // Convert the join_view_table field to an array. - $join_view_table = new Registry; - $join_view_table->loadString($item->join_view_table); - $item->join_view_table = $join_view_table->toArray(); - } - if (!empty($item->php_custom_get)) { // base64 Decode php_custom_get. @@ -185,6 +190,27 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin $item->php_calculation = base64_decode($item->php_calculation); } + + if (empty($item->id)) + { + $id = 0; + } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id); + ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod); + } + // update the fields $objectUpdate = new stdClass(); $objectUpdate->id = (int) $item->id; @@ -944,6 +970,32 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin $data['metadata'] = (string) $metadata; } + // Set the join_view_table items to data. + if (isset($data['join_view_table']) && is_array($data['join_view_table'])) + { + $join_view_table = new JRegistry; + $join_view_table->loadArray($data['join_view_table']); + $data['join_view_table'] = (string) $join_view_table; + } + elseif (!isset($data['join_view_table'])) + { + // Set the empty join_view_table to data + $data['join_view_table'] = ''; + } + + // Set the join_db_table items to data. + if (isset($data['join_db_table']) && is_array($data['join_db_table'])) + { + $join_db_table = new JRegistry; + $join_db_table->loadArray($data['join_db_table']); + $data['join_db_table'] = (string) $join_db_table; + } + elseif (!isset($data['join_db_table'])) + { + // Set the empty join_db_table to data + $data['join_db_table'] = ''; + } + // Set the filter items to data. if (isset($data['filter']) && is_array($data['filter'])) { @@ -996,32 +1048,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin $data['global'] = ''; } - // Set the join_db_table items to data. - if (isset($data['join_db_table']) && is_array($data['join_db_table'])) - { - $join_db_table = new JRegistry; - $join_db_table->loadArray($data['join_db_table']); - $data['join_db_table'] = (string) $join_db_table; - } - elseif (!isset($data['join_db_table'])) - { - // Set the empty join_db_table to data - $data['join_db_table'] = ''; - } - - // Set the join_view_table items to data. - if (isset($data['join_view_table']) && is_array($data['join_view_table'])) - { - $join_view_table = new JRegistry; - $join_view_table->loadArray($data['join_view_table']); - $data['join_view_table'] = (string) $join_view_table; - } - elseif (!isset($data['join_view_table'])) - { - // Set the empty join_view_table to data - $data['join_view_table'] = ''; - } - // Set the php_custom_get string to base64 string. if (isset($data['php_custom_get'])) { diff --git a/admin/models/field.php b/admin/models/field.php index dd36c9b55..ea38efb14 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -64,6 +64,11 @@ class ComponentbuilderModelField extends JModelAdmin public function getTable($type = 'field', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); + } + + public function getVDM() + { + return $this->vastDevMod; } /** @@ -123,7 +128,28 @@ class ComponentbuilderModelField extends JModelAdmin { // base64 Decode javascript_views_footer. $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + } + + + if (empty($item->id)) + { + $id = 0; } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('field__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id); + ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod); + } if (!empty($item->id)) { diff --git a/admin/models/fields/ftps.php b/admin/models/fields/ftps.php deleted file mode 100644 index 938f5562b..000000000 --- a/admin/models/fields/ftps.php +++ /dev/null @@ -1,171 +0,0 @@ - - @github Joomla Component Builder - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// import the list field type -jimport('joomla.form.helper'); -JFormHelper::loadFieldClass('list'); - -/** - * Ftps Form Field class for the Componentbuilder component - */ -class JFormFieldFtps extends JFormFieldList -{ - /** - * The ftps field type. - * - * @var string - */ - public $type = 'ftps'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $setButton = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($setButton === 'true') - { - $button = array(); - $script = array(); - $buttonName = $this->getAttribute('name'); - // get the input from url - $app = JFactory::getApplication(); - $jinput = $app->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - } - $user = JFactory::getUser(); - // only add if user allowed to create ftp - if ($user->authorise('ftp.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. - { - // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' - '; - } - // only add if user allowed to edit ftp - if (($buttonName === 'ftp' || $buttonName === 'ftps') && $user->authorise('ftp.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. - { - // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { - e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); - }); - function ".$buttonName."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$buttonName."Create').hide(); - // show edit button - jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_componentbuilder&view=ftps&task=ftp.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$buttonName."Create').show(); - // hide edit button - jQuery('#".$buttonName."Edit').hide(); - } - }"; - } - // check if button was created for ftp field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } - - /** - * Method to get a list of options for a list input. - * - * @return array An array of JHtml options. - */ - public function getOptions() - { - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','sales_server_ftp_name'))); - $query->from($db->quoteName('#__componentbuilder_ftp', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); - $query->order('a.name ASC'); - $db->setQuery((string)$query); - $items = $db->loadObjectList(); - $options = array(); - if ($items) - { - $options[] = JHtml::_('select.option', '', 'Select an option'); - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->id, $item->sales_server_ftp_name); - } - } - return $options; - } -} diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 086b35548..54cb01dd7 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -139,7 +139,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVzyfields() + public function getWaafields() { // Get the user object. $user = JFactory::getUser(); @@ -223,13 +223,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVzyfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationWaafields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVzyfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationWaafields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVzyfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationWaafields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVzyfields($item->store, 'store'); + $item->store = $this->selectionTranslationWaafields($item->store, 'store'); } } @@ -243,7 +243,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVzyfields($value,$name) + public function selectionTranslationWaafields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index 0be551203..c6228c10f 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -23,7 +23,6 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvwwvwn_required = false; jform_vvvvvwxvwo_required = false; jform_vvvvvwyvwp_required = false; jform_vvvvvwzvwq_required = false; @@ -47,308 +46,309 @@ jform_vvvvvxqvxh_required = false; jform_vvvvvxrvxi_required = false; jform_vvvvvxsvxj_required = false; jform_vvvvvxtvxk_required = false; -jform_vvvvvxxvxl_required = false; -jform_vvvvvxxvxm_required = false; -jform_vvvvvxxvxn_required = false; -jform_vvvvvxxvxo_required = false; -jform_vvvvvxxvxp_required = false; -jform_vvvvvxxvxq_required = false; -jform_vvvvvxzvxr_required = false; -jform_vvvvvxzvxs_required = false; -jform_vvvvvxzvxt_required = false; -jform_vvvvvxzvxu_required = false; +jform_vvvvvxuvxl_required = false; +jform_vvvvvxyvxm_required = false; +jform_vvvvvxyvxn_required = false; +jform_vvvvvxyvxo_required = false; +jform_vvvvvxyvxp_required = false; +jform_vvvvvxyvxq_required = false; +jform_vvvvvxyvxr_required = false; +jform_vvvvvyavxs_required = false; +jform_vvvvvyavxt_required = false; +jform_vvvvvyavxu_required = false; +jform_vvvvvyavxv_required = false; // Initial Script jQuery(document).ready(function() { - var add_css_view_vvvvvww = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvvww(add_css_view_vvvvvww); + var add_css_view_vvvvvwx = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvvwx(add_css_view_vvvvvwx); - var add_css_views_vvvvvwx = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvvwx(add_css_views_vvvvvwx); + var add_css_views_vvvvvwy = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvvwy(add_css_views_vvvvvwy); - var add_javascript_view_file_vvvvvwy = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); - vvvvvwy(add_javascript_view_file_vvvvvwy); + var add_javascript_view_file_vvvvvwz = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); + vvvvvwz(add_javascript_view_file_vvvvvwz); - var add_javascript_views_file_vvvvvwz = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); - vvvvvwz(add_javascript_views_file_vvvvvwz); + var add_javascript_views_file_vvvvvxa = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); + vvvvvxa(add_javascript_views_file_vvvvvxa); - var add_javascript_view_footer_vvvvvxa = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvvxa(add_javascript_view_footer_vvvvvxa); + var add_javascript_view_footer_vvvvvxb = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvvxb(add_javascript_view_footer_vvvvvxb); - var add_javascript_views_footer_vvvvvxb = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvvxb(add_javascript_views_footer_vvvvvxb); + var add_javascript_views_footer_vvvvvxc = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvvxc(add_javascript_views_footer_vvvvvxc); - var add_php_ajax_vvvvvxc = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvxc(add_php_ajax_vvvvvxc); + var add_php_ajax_vvvvvxd = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvxd(add_php_ajax_vvvvvxd); - var add_php_getitem_vvvvvxd = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); - vvvvvxd(add_php_getitem_vvvvvxd); + var add_php_getitem_vvvvvxe = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); + vvvvvxe(add_php_getitem_vvvvvxe); - var add_php_getitems_vvvvvxe = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); - vvvvvxe(add_php_getitems_vvvvvxe); + var add_php_getitems_vvvvvxf = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); + vvvvvxf(add_php_getitems_vvvvvxf); - var add_php_getitems_after_all_vvvvvxf = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); - vvvvvxf(add_php_getitems_after_all_vvvvvxf); + var add_php_getitems_after_all_vvvvvxg = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); + vvvvvxg(add_php_getitems_after_all_vvvvvxg); - var add_php_getlistquery_vvvvvxg = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); - vvvvvxg(add_php_getlistquery_vvvvvxg); + var add_php_getlistquery_vvvvvxh = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + vvvvvxh(add_php_getlistquery_vvvvvxh); - var add_php_before_save_vvvvvxh = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); - vvvvvxh(add_php_before_save_vvvvvxh); + var add_php_before_save_vvvvvxi = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); + vvvvvxi(add_php_before_save_vvvvvxi); - var add_php_save_vvvvvxi = jQuery("#jform_add_php_save input[type='radio']:checked").val(); - vvvvvxi(add_php_save_vvvvvxi); + var add_php_save_vvvvvxj = jQuery("#jform_add_php_save input[type='radio']:checked").val(); + vvvvvxj(add_php_save_vvvvvxj); - var add_php_postsavehook_vvvvvxj = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); - vvvvvxj(add_php_postsavehook_vvvvvxj); + var add_php_postsavehook_vvvvvxk = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); + vvvvvxk(add_php_postsavehook_vvvvvxk); - var add_php_allowedit_vvvvvxk = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); - vvvvvxk(add_php_allowedit_vvvvvxk); + var add_php_allowedit_vvvvvxl = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); + vvvvvxl(add_php_allowedit_vvvvvxl); - var add_php_batchcopy_vvvvvxl = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxl(add_php_batchcopy_vvvvvxl); + var add_php_batchcopy_vvvvvxm = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxm(add_php_batchcopy_vvvvvxm); - var add_php_batchmove_vvvvvxm = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxm(add_php_batchmove_vvvvvxm); + var add_php_batchmove_vvvvvxn = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxn(add_php_batchmove_vvvvvxn); - var add_php_before_publish_vvvvvxn = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxn(add_php_before_publish_vvvvvxn); + var add_php_before_publish_vvvvvxo = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxo(add_php_before_publish_vvvvvxo); - var add_php_after_publish_vvvvvxo = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxo(add_php_after_publish_vvvvvxo); + var add_php_after_publish_vvvvvxp = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxp(add_php_after_publish_vvvvvxp); - var add_php_before_delete_vvvvvxp = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxp(add_php_before_delete_vvvvvxp); + var add_php_before_delete_vvvvvxq = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvxq(add_php_before_delete_vvvvvxq); - var add_php_after_delete_vvvvvxq = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxq(add_php_after_delete_vvvvvxq); + var add_php_after_delete_vvvvvxr = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvxr(add_php_after_delete_vvvvvxr); - var add_php_document_vvvvvxr = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvxr(add_php_document_vvvvvxr); + var add_php_document_vvvvvxs = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvxs(add_php_document_vvvvvxs); - var add_sql_vvvvvxs = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxs(add_sql_vvvvvxs); - - var source_vvvvvxt = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvxt = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxt(source_vvvvvxt,add_sql_vvvvvxt); + vvvvvxt(add_sql_vvvvvxt); - var source_vvvvvxv = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvxv = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxv(source_vvvvvxv,add_sql_vvvvvxv); + var source_vvvvvxu = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvxu = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvxu(source_vvvvvxu,add_sql_vvvvvxu); - var add_custom_import_vvvvvxx = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvxx(add_custom_import_vvvvvxx); + var source_vvvvvxw = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvxw = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvxw(source_vvvvvxw,add_sql_vvvvvxw); var add_custom_import_vvvvvxy = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvvxy(add_custom_import_vvvvvxy); - var add_custom_button_vvvvvxz = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvxz(add_custom_button_vvvvvxz); + var add_custom_import_vvvvvxz = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvxz(add_custom_import_vvvvvxz); + + var add_custom_button_vvvvvya = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvya(add_custom_button_vvvvvya); }); -// the vvvvvww function -function vvvvvww(add_css_view_vvvvvww) +// the vvvvvwx function +function vvvvvwx(add_css_view_vvvvvwx) { // set the function logic - if (add_css_view_vvvvvww == 1) + if (add_css_view_vvvvvwx == 1) { jQuery('#jform_css_view').closest('.control-group').show(); - if (jform_vvvvvwwvwn_required) + if (jform_vvvvvwxvwo_required) { updateFieldRequired('css_view',0); jQuery('#jform_css_view').prop('required','required'); jQuery('#jform_css_view').attr('aria-required',true); jQuery('#jform_css_view').addClass('required'); - jform_vvvvvwwvwn_required = false; - } - - } - else - { - jQuery('#jform_css_view').closest('.control-group').hide(); - if (!jform_vvvvvwwvwn_required) - { - updateFieldRequired('css_view',1); - jQuery('#jform_css_view').removeAttr('required'); - jQuery('#jform_css_view').removeAttr('aria-required'); - jQuery('#jform_css_view').removeClass('required'); - jform_vvvvvwwvwn_required = true; - } - } -} - -// the vvvvvwx function -function vvvvvwx(add_css_views_vvvvvwx) -{ - // set the function logic - if (add_css_views_vvvvvwx == 1) - { - jQuery('#jform_css_views').closest('.control-group').show(); - if (jform_vvvvvwxvwo_required) - { - updateFieldRequired('css_views',0); - jQuery('#jform_css_views').prop('required','required'); - jQuery('#jform_css_views').attr('aria-required',true); - jQuery('#jform_css_views').addClass('required'); jform_vvvvvwxvwo_required = false; } } else { - jQuery('#jform_css_views').closest('.control-group').hide(); + jQuery('#jform_css_view').closest('.control-group').hide(); if (!jform_vvvvvwxvwo_required) { - updateFieldRequired('css_views',1); - jQuery('#jform_css_views').removeAttr('required'); - jQuery('#jform_css_views').removeAttr('aria-required'); - jQuery('#jform_css_views').removeClass('required'); + updateFieldRequired('css_view',1); + jQuery('#jform_css_view').removeAttr('required'); + jQuery('#jform_css_view').removeAttr('aria-required'); + jQuery('#jform_css_view').removeClass('required'); jform_vvvvvwxvwo_required = true; } } } // the vvvvvwy function -function vvvvvwy(add_javascript_view_file_vvvvvwy) +function vvvvvwy(add_css_views_vvvvvwy) { // set the function logic - if (add_javascript_view_file_vvvvvwy == 1) + if (add_css_views_vvvvvwy == 1) { - jQuery('#jform_javascript_view_file').closest('.control-group').show(); + jQuery('#jform_css_views').closest('.control-group').show(); if (jform_vvvvvwyvwp_required) { - updateFieldRequired('javascript_view_file',0); - jQuery('#jform_javascript_view_file').prop('required','required'); - jQuery('#jform_javascript_view_file').attr('aria-required',true); - jQuery('#jform_javascript_view_file').addClass('required'); + updateFieldRequired('css_views',0); + jQuery('#jform_css_views').prop('required','required'); + jQuery('#jform_css_views').attr('aria-required',true); + jQuery('#jform_css_views').addClass('required'); jform_vvvvvwyvwp_required = false; } } else { - jQuery('#jform_javascript_view_file').closest('.control-group').hide(); + jQuery('#jform_css_views').closest('.control-group').hide(); if (!jform_vvvvvwyvwp_required) { - updateFieldRequired('javascript_view_file',1); - jQuery('#jform_javascript_view_file').removeAttr('required'); - jQuery('#jform_javascript_view_file').removeAttr('aria-required'); - jQuery('#jform_javascript_view_file').removeClass('required'); + updateFieldRequired('css_views',1); + jQuery('#jform_css_views').removeAttr('required'); + jQuery('#jform_css_views').removeAttr('aria-required'); + jQuery('#jform_css_views').removeClass('required'); jform_vvvvvwyvwp_required = true; } } } // the vvvvvwz function -function vvvvvwz(add_javascript_views_file_vvvvvwz) +function vvvvvwz(add_javascript_view_file_vvvvvwz) { // set the function logic - if (add_javascript_views_file_vvvvvwz == 1) + if (add_javascript_view_file_vvvvvwz == 1) { - jQuery('#jform_javascript_views_file').closest('.control-group').show(); + jQuery('#jform_javascript_view_file').closest('.control-group').show(); if (jform_vvvvvwzvwq_required) { - updateFieldRequired('javascript_views_file',0); - jQuery('#jform_javascript_views_file').prop('required','required'); - jQuery('#jform_javascript_views_file').attr('aria-required',true); - jQuery('#jform_javascript_views_file').addClass('required'); + updateFieldRequired('javascript_view_file',0); + jQuery('#jform_javascript_view_file').prop('required','required'); + jQuery('#jform_javascript_view_file').attr('aria-required',true); + jQuery('#jform_javascript_view_file').addClass('required'); jform_vvvvvwzvwq_required = false; } } else { - jQuery('#jform_javascript_views_file').closest('.control-group').hide(); + jQuery('#jform_javascript_view_file').closest('.control-group').hide(); if (!jform_vvvvvwzvwq_required) { - updateFieldRequired('javascript_views_file',1); - jQuery('#jform_javascript_views_file').removeAttr('required'); - jQuery('#jform_javascript_views_file').removeAttr('aria-required'); - jQuery('#jform_javascript_views_file').removeClass('required'); + updateFieldRequired('javascript_view_file',1); + jQuery('#jform_javascript_view_file').removeAttr('required'); + jQuery('#jform_javascript_view_file').removeAttr('aria-required'); + jQuery('#jform_javascript_view_file').removeClass('required'); jform_vvvvvwzvwq_required = true; } } } // the vvvvvxa function -function vvvvvxa(add_javascript_view_footer_vvvvvxa) +function vvvvvxa(add_javascript_views_file_vvvvvxa) { // set the function logic - if (add_javascript_view_footer_vvvvvxa == 1) + if (add_javascript_views_file_vvvvvxa == 1) { - jQuery('#jform_javascript_view_footer').closest('.control-group').show(); + jQuery('#jform_javascript_views_file').closest('.control-group').show(); if (jform_vvvvvxavwr_required) { - updateFieldRequired('javascript_view_footer',0); - jQuery('#jform_javascript_view_footer').prop('required','required'); - jQuery('#jform_javascript_view_footer').attr('aria-required',true); - jQuery('#jform_javascript_view_footer').addClass('required'); + updateFieldRequired('javascript_views_file',0); + jQuery('#jform_javascript_views_file').prop('required','required'); + jQuery('#jform_javascript_views_file').attr('aria-required',true); + jQuery('#jform_javascript_views_file').addClass('required'); jform_vvvvvxavwr_required = false; } } else { - jQuery('#jform_javascript_view_footer').closest('.control-group').hide(); + jQuery('#jform_javascript_views_file').closest('.control-group').hide(); if (!jform_vvvvvxavwr_required) { - updateFieldRequired('javascript_view_footer',1); - jQuery('#jform_javascript_view_footer').removeAttr('required'); - jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_view_footer').removeClass('required'); + updateFieldRequired('javascript_views_file',1); + jQuery('#jform_javascript_views_file').removeAttr('required'); + jQuery('#jform_javascript_views_file').removeAttr('aria-required'); + jQuery('#jform_javascript_views_file').removeClass('required'); jform_vvvvvxavwr_required = true; } } } // the vvvvvxb function -function vvvvvxb(add_javascript_views_footer_vvvvvxb) +function vvvvvxb(add_javascript_view_footer_vvvvvxb) { // set the function logic - if (add_javascript_views_footer_vvvvvxb == 1) + if (add_javascript_view_footer_vvvvvxb == 1) { - jQuery('#jform_javascript_views_footer').closest('.control-group').show(); + jQuery('#jform_javascript_view_footer').closest('.control-group').show(); if (jform_vvvvvxbvws_required) { - updateFieldRequired('javascript_views_footer',0); - jQuery('#jform_javascript_views_footer').prop('required','required'); - jQuery('#jform_javascript_views_footer').attr('aria-required',true); - jQuery('#jform_javascript_views_footer').addClass('required'); + updateFieldRequired('javascript_view_footer',0); + jQuery('#jform_javascript_view_footer').prop('required','required'); + jQuery('#jform_javascript_view_footer').attr('aria-required',true); + jQuery('#jform_javascript_view_footer').addClass('required'); jform_vvvvvxbvws_required = false; } } else { - jQuery('#jform_javascript_views_footer').closest('.control-group').hide(); + jQuery('#jform_javascript_view_footer').closest('.control-group').hide(); if (!jform_vvvvvxbvws_required) { - updateFieldRequired('javascript_views_footer',1); - jQuery('#jform_javascript_views_footer').removeAttr('required'); - jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_views_footer').removeClass('required'); + updateFieldRequired('javascript_view_footer',1); + jQuery('#jform_javascript_view_footer').removeAttr('required'); + jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); + jQuery('#jform_javascript_view_footer').removeClass('required'); jform_vvvvvxbvws_required = true; } } } // the vvvvvxc function -function vvvvvxc(add_php_ajax_vvvvvxc) +function vvvvvxc(add_javascript_views_footer_vvvvvxc) { // set the function logic - if (add_php_ajax_vvvvvxc == 1) + if (add_javascript_views_footer_vvvvvxc == 1) + { + jQuery('#jform_javascript_views_footer').closest('.control-group').show(); + if (jform_vvvvvxcvwt_required) + { + updateFieldRequired('javascript_views_footer',0); + jQuery('#jform_javascript_views_footer').prop('required','required'); + jQuery('#jform_javascript_views_footer').attr('aria-required',true); + jQuery('#jform_javascript_views_footer').addClass('required'); + jform_vvvvvxcvwt_required = false; + } + + } + else + { + jQuery('#jform_javascript_views_footer').closest('.control-group').hide(); + if (!jform_vvvvvxcvwt_required) + { + updateFieldRequired('javascript_views_footer',1); + jQuery('#jform_javascript_views_footer').removeAttr('required'); + jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); + jQuery('#jform_javascript_views_footer').removeClass('required'); + jform_vvvvvxcvwt_required = true; + } + } +} + +// the vvvvvxd function +function vvvvvxd(add_php_ajax_vvvvvxd) +{ + // set the function logic + if (add_php_ajax_vvvvvxd == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod').closest('.control-group').show(); - if (jform_vvvvvxcvwt_required) + if (jform_vvvvvxdvwu_required) { updateFieldRequired('php_ajaxmethod',0); jQuery('#jform_php_ajaxmethod').prop('required','required'); jQuery('#jform_php_ajaxmethod').attr('aria-required',true); jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvxcvwt_required = false; + jform_vvvvvxdvwu_required = false; } } @@ -356,549 +356,549 @@ function vvvvvxc(add_php_ajax_vvvvvxc) { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod').closest('.control-group').hide(); - if (!jform_vvvvvxcvwt_required) + if (!jform_vvvvvxdvwu_required) { updateFieldRequired('php_ajaxmethod',1); jQuery('#jform_php_ajaxmethod').removeAttr('required'); jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvxcvwt_required = true; - } - } -} - -// the vvvvvxd function -function vvvvvxd(add_php_getitem_vvvvvxd) -{ - // set the function logic - if (add_php_getitem_vvvvvxd == 1) - { - jQuery('#jform_php_getitem').closest('.control-group').show(); - if (jform_vvvvvxdvwu_required) - { - updateFieldRequired('php_getitem',0); - jQuery('#jform_php_getitem').prop('required','required'); - jQuery('#jform_php_getitem').attr('aria-required',true); - jQuery('#jform_php_getitem').addClass('required'); - jform_vvvvvxdvwu_required = false; - } - - } - else - { - jQuery('#jform_php_getitem').closest('.control-group').hide(); - if (!jform_vvvvvxdvwu_required) - { - updateFieldRequired('php_getitem',1); - jQuery('#jform_php_getitem').removeAttr('required'); - jQuery('#jform_php_getitem').removeAttr('aria-required'); - jQuery('#jform_php_getitem').removeClass('required'); jform_vvvvvxdvwu_required = true; } } } // the vvvvvxe function -function vvvvvxe(add_php_getitems_vvvvvxe) +function vvvvvxe(add_php_getitem_vvvvvxe) { // set the function logic - if (add_php_getitems_vvvvvxe == 1) + if (add_php_getitem_vvvvvxe == 1) { - jQuery('#jform_php_getitems').closest('.control-group').show(); + jQuery('#jform_php_getitem').closest('.control-group').show(); if (jform_vvvvvxevwv_required) { - updateFieldRequired('php_getitems',0); - jQuery('#jform_php_getitems').prop('required','required'); - jQuery('#jform_php_getitems').attr('aria-required',true); - jQuery('#jform_php_getitems').addClass('required'); + updateFieldRequired('php_getitem',0); + jQuery('#jform_php_getitem').prop('required','required'); + jQuery('#jform_php_getitem').attr('aria-required',true); + jQuery('#jform_php_getitem').addClass('required'); jform_vvvvvxevwv_required = false; } } else { - jQuery('#jform_php_getitems').closest('.control-group').hide(); + jQuery('#jform_php_getitem').closest('.control-group').hide(); if (!jform_vvvvvxevwv_required) { - updateFieldRequired('php_getitems',1); - jQuery('#jform_php_getitems').removeAttr('required'); - jQuery('#jform_php_getitems').removeAttr('aria-required'); - jQuery('#jform_php_getitems').removeClass('required'); + updateFieldRequired('php_getitem',1); + jQuery('#jform_php_getitem').removeAttr('required'); + jQuery('#jform_php_getitem').removeAttr('aria-required'); + jQuery('#jform_php_getitem').removeClass('required'); jform_vvvvvxevwv_required = true; } } } // the vvvvvxf function -function vvvvvxf(add_php_getitems_after_all_vvvvvxf) +function vvvvvxf(add_php_getitems_vvvvvxf) { // set the function logic - if (add_php_getitems_after_all_vvvvvxf == 1) + if (add_php_getitems_vvvvvxf == 1) { - jQuery('#jform_php_getitems_after_all').closest('.control-group').show(); + jQuery('#jform_php_getitems').closest('.control-group').show(); if (jform_vvvvvxfvww_required) { - updateFieldRequired('php_getitems_after_all',0); - jQuery('#jform_php_getitems_after_all').prop('required','required'); - jQuery('#jform_php_getitems_after_all').attr('aria-required',true); - jQuery('#jform_php_getitems_after_all').addClass('required'); + updateFieldRequired('php_getitems',0); + jQuery('#jform_php_getitems').prop('required','required'); + jQuery('#jform_php_getitems').attr('aria-required',true); + jQuery('#jform_php_getitems').addClass('required'); jform_vvvvvxfvww_required = false; } } else { - jQuery('#jform_php_getitems_after_all').closest('.control-group').hide(); + jQuery('#jform_php_getitems').closest('.control-group').hide(); if (!jform_vvvvvxfvww_required) { - updateFieldRequired('php_getitems_after_all',1); - jQuery('#jform_php_getitems_after_all').removeAttr('required'); - jQuery('#jform_php_getitems_after_all').removeAttr('aria-required'); - jQuery('#jform_php_getitems_after_all').removeClass('required'); + updateFieldRequired('php_getitems',1); + jQuery('#jform_php_getitems').removeAttr('required'); + jQuery('#jform_php_getitems').removeAttr('aria-required'); + jQuery('#jform_php_getitems').removeClass('required'); jform_vvvvvxfvww_required = true; } } } // the vvvvvxg function -function vvvvvxg(add_php_getlistquery_vvvvvxg) +function vvvvvxg(add_php_getitems_after_all_vvvvvxg) { // set the function logic - if (add_php_getlistquery_vvvvvxg == 1) + if (add_php_getitems_after_all_vvvvvxg == 1) { - jQuery('#jform_php_getlistquery').closest('.control-group').show(); + jQuery('#jform_php_getitems_after_all').closest('.control-group').show(); if (jform_vvvvvxgvwx_required) { - updateFieldRequired('php_getlistquery',0); - jQuery('#jform_php_getlistquery').prop('required','required'); - jQuery('#jform_php_getlistquery').attr('aria-required',true); - jQuery('#jform_php_getlistquery').addClass('required'); + updateFieldRequired('php_getitems_after_all',0); + jQuery('#jform_php_getitems_after_all').prop('required','required'); + jQuery('#jform_php_getitems_after_all').attr('aria-required',true); + jQuery('#jform_php_getitems_after_all').addClass('required'); jform_vvvvvxgvwx_required = false; } } else { - jQuery('#jform_php_getlistquery').closest('.control-group').hide(); + jQuery('#jform_php_getitems_after_all').closest('.control-group').hide(); if (!jform_vvvvvxgvwx_required) { - updateFieldRequired('php_getlistquery',1); - jQuery('#jform_php_getlistquery').removeAttr('required'); - jQuery('#jform_php_getlistquery').removeAttr('aria-required'); - jQuery('#jform_php_getlistquery').removeClass('required'); + updateFieldRequired('php_getitems_after_all',1); + jQuery('#jform_php_getitems_after_all').removeAttr('required'); + jQuery('#jform_php_getitems_after_all').removeAttr('aria-required'); + jQuery('#jform_php_getitems_after_all').removeClass('required'); jform_vvvvvxgvwx_required = true; } } } // the vvvvvxh function -function vvvvvxh(add_php_before_save_vvvvvxh) +function vvvvvxh(add_php_getlistquery_vvvvvxh) { // set the function logic - if (add_php_before_save_vvvvvxh == 1) + if (add_php_getlistquery_vvvvvxh == 1) { - jQuery('#jform_php_before_save').closest('.control-group').show(); + jQuery('#jform_php_getlistquery').closest('.control-group').show(); if (jform_vvvvvxhvwy_required) { - updateFieldRequired('php_before_save',0); - jQuery('#jform_php_before_save').prop('required','required'); - jQuery('#jform_php_before_save').attr('aria-required',true); - jQuery('#jform_php_before_save').addClass('required'); + updateFieldRequired('php_getlistquery',0); + jQuery('#jform_php_getlistquery').prop('required','required'); + jQuery('#jform_php_getlistquery').attr('aria-required',true); + jQuery('#jform_php_getlistquery').addClass('required'); jform_vvvvvxhvwy_required = false; } } else { - jQuery('#jform_php_before_save').closest('.control-group').hide(); + jQuery('#jform_php_getlistquery').closest('.control-group').hide(); if (!jform_vvvvvxhvwy_required) { - updateFieldRequired('php_before_save',1); - jQuery('#jform_php_before_save').removeAttr('required'); - jQuery('#jform_php_before_save').removeAttr('aria-required'); - jQuery('#jform_php_before_save').removeClass('required'); + updateFieldRequired('php_getlistquery',1); + jQuery('#jform_php_getlistquery').removeAttr('required'); + jQuery('#jform_php_getlistquery').removeAttr('aria-required'); + jQuery('#jform_php_getlistquery').removeClass('required'); jform_vvvvvxhvwy_required = true; } } } // the vvvvvxi function -function vvvvvxi(add_php_save_vvvvvxi) +function vvvvvxi(add_php_before_save_vvvvvxi) { // set the function logic - if (add_php_save_vvvvvxi == 1) + if (add_php_before_save_vvvvvxi == 1) { - jQuery('#jform_php_save').closest('.control-group').show(); + jQuery('#jform_php_before_save').closest('.control-group').show(); if (jform_vvvvvxivwz_required) { - updateFieldRequired('php_save',0); - jQuery('#jform_php_save').prop('required','required'); - jQuery('#jform_php_save').attr('aria-required',true); - jQuery('#jform_php_save').addClass('required'); + updateFieldRequired('php_before_save',0); + jQuery('#jform_php_before_save').prop('required','required'); + jQuery('#jform_php_before_save').attr('aria-required',true); + jQuery('#jform_php_before_save').addClass('required'); jform_vvvvvxivwz_required = false; } } else { - jQuery('#jform_php_save').closest('.control-group').hide(); + jQuery('#jform_php_before_save').closest('.control-group').hide(); if (!jform_vvvvvxivwz_required) { - updateFieldRequired('php_save',1); - jQuery('#jform_php_save').removeAttr('required'); - jQuery('#jform_php_save').removeAttr('aria-required'); - jQuery('#jform_php_save').removeClass('required'); + updateFieldRequired('php_before_save',1); + jQuery('#jform_php_before_save').removeAttr('required'); + jQuery('#jform_php_before_save').removeAttr('aria-required'); + jQuery('#jform_php_before_save').removeClass('required'); jform_vvvvvxivwz_required = true; } } } // the vvvvvxj function -function vvvvvxj(add_php_postsavehook_vvvvvxj) +function vvvvvxj(add_php_save_vvvvvxj) { // set the function logic - if (add_php_postsavehook_vvvvvxj == 1) + if (add_php_save_vvvvvxj == 1) { - jQuery('#jform_php_postsavehook').closest('.control-group').show(); + jQuery('#jform_php_save').closest('.control-group').show(); if (jform_vvvvvxjvxa_required) { - updateFieldRequired('php_postsavehook',0); - jQuery('#jform_php_postsavehook').prop('required','required'); - jQuery('#jform_php_postsavehook').attr('aria-required',true); - jQuery('#jform_php_postsavehook').addClass('required'); + updateFieldRequired('php_save',0); + jQuery('#jform_php_save').prop('required','required'); + jQuery('#jform_php_save').attr('aria-required',true); + jQuery('#jform_php_save').addClass('required'); jform_vvvvvxjvxa_required = false; } } else { - jQuery('#jform_php_postsavehook').closest('.control-group').hide(); + jQuery('#jform_php_save').closest('.control-group').hide(); if (!jform_vvvvvxjvxa_required) { - updateFieldRequired('php_postsavehook',1); - jQuery('#jform_php_postsavehook').removeAttr('required'); - jQuery('#jform_php_postsavehook').removeAttr('aria-required'); - jQuery('#jform_php_postsavehook').removeClass('required'); + updateFieldRequired('php_save',1); + jQuery('#jform_php_save').removeAttr('required'); + jQuery('#jform_php_save').removeAttr('aria-required'); + jQuery('#jform_php_save').removeClass('required'); jform_vvvvvxjvxa_required = true; } } } // the vvvvvxk function -function vvvvvxk(add_php_allowedit_vvvvvxk) +function vvvvvxk(add_php_postsavehook_vvvvvxk) { // set the function logic - if (add_php_allowedit_vvvvvxk == 1) + if (add_php_postsavehook_vvvvvxk == 1) { - jQuery('#jform_php_allowedit').closest('.control-group').show(); + jQuery('#jform_php_postsavehook').closest('.control-group').show(); if (jform_vvvvvxkvxb_required) { - updateFieldRequired('php_allowedit',0); - jQuery('#jform_php_allowedit').prop('required','required'); - jQuery('#jform_php_allowedit').attr('aria-required',true); - jQuery('#jform_php_allowedit').addClass('required'); + updateFieldRequired('php_postsavehook',0); + jQuery('#jform_php_postsavehook').prop('required','required'); + jQuery('#jform_php_postsavehook').attr('aria-required',true); + jQuery('#jform_php_postsavehook').addClass('required'); jform_vvvvvxkvxb_required = false; } } else { - jQuery('#jform_php_allowedit').closest('.control-group').hide(); + jQuery('#jform_php_postsavehook').closest('.control-group').hide(); if (!jform_vvvvvxkvxb_required) { - updateFieldRequired('php_allowedit',1); - jQuery('#jform_php_allowedit').removeAttr('required'); - jQuery('#jform_php_allowedit').removeAttr('aria-required'); - jQuery('#jform_php_allowedit').removeClass('required'); + updateFieldRequired('php_postsavehook',1); + jQuery('#jform_php_postsavehook').removeAttr('required'); + jQuery('#jform_php_postsavehook').removeAttr('aria-required'); + jQuery('#jform_php_postsavehook').removeClass('required'); jform_vvvvvxkvxb_required = true; } } } // the vvvvvxl function -function vvvvvxl(add_php_batchcopy_vvvvvxl) +function vvvvvxl(add_php_allowedit_vvvvvxl) { // set the function logic - if (add_php_batchcopy_vvvvvxl == 1) + if (add_php_allowedit_vvvvvxl == 1) { - jQuery('#jform_php_batchcopy').closest('.control-group').show(); + jQuery('#jform_php_allowedit').closest('.control-group').show(); if (jform_vvvvvxlvxc_required) { - updateFieldRequired('php_batchcopy',0); - jQuery('#jform_php_batchcopy').prop('required','required'); - jQuery('#jform_php_batchcopy').attr('aria-required',true); - jQuery('#jform_php_batchcopy').addClass('required'); + updateFieldRequired('php_allowedit',0); + jQuery('#jform_php_allowedit').prop('required','required'); + jQuery('#jform_php_allowedit').attr('aria-required',true); + jQuery('#jform_php_allowedit').addClass('required'); jform_vvvvvxlvxc_required = false; } } else { - jQuery('#jform_php_batchcopy').closest('.control-group').hide(); + jQuery('#jform_php_allowedit').closest('.control-group').hide(); if (!jform_vvvvvxlvxc_required) { - updateFieldRequired('php_batchcopy',1); - jQuery('#jform_php_batchcopy').removeAttr('required'); - jQuery('#jform_php_batchcopy').removeAttr('aria-required'); - jQuery('#jform_php_batchcopy').removeClass('required'); + updateFieldRequired('php_allowedit',1); + jQuery('#jform_php_allowedit').removeAttr('required'); + jQuery('#jform_php_allowedit').removeAttr('aria-required'); + jQuery('#jform_php_allowedit').removeClass('required'); jform_vvvvvxlvxc_required = true; } } } // the vvvvvxm function -function vvvvvxm(add_php_batchmove_vvvvvxm) +function vvvvvxm(add_php_batchcopy_vvvvvxm) { // set the function logic - if (add_php_batchmove_vvvvvxm == 1) + if (add_php_batchcopy_vvvvvxm == 1) { - jQuery('#jform_php_batchmove').closest('.control-group').show(); + jQuery('#jform_php_batchcopy').closest('.control-group').show(); if (jform_vvvvvxmvxd_required) { - updateFieldRequired('php_batchmove',0); - jQuery('#jform_php_batchmove').prop('required','required'); - jQuery('#jform_php_batchmove').attr('aria-required',true); - jQuery('#jform_php_batchmove').addClass('required'); + updateFieldRequired('php_batchcopy',0); + jQuery('#jform_php_batchcopy').prop('required','required'); + jQuery('#jform_php_batchcopy').attr('aria-required',true); + jQuery('#jform_php_batchcopy').addClass('required'); jform_vvvvvxmvxd_required = false; } } else { - jQuery('#jform_php_batchmove').closest('.control-group').hide(); + jQuery('#jform_php_batchcopy').closest('.control-group').hide(); if (!jform_vvvvvxmvxd_required) { - updateFieldRequired('php_batchmove',1); - jQuery('#jform_php_batchmove').removeAttr('required'); - jQuery('#jform_php_batchmove').removeAttr('aria-required'); - jQuery('#jform_php_batchmove').removeClass('required'); + updateFieldRequired('php_batchcopy',1); + jQuery('#jform_php_batchcopy').removeAttr('required'); + jQuery('#jform_php_batchcopy').removeAttr('aria-required'); + jQuery('#jform_php_batchcopy').removeClass('required'); jform_vvvvvxmvxd_required = true; } } } // the vvvvvxn function -function vvvvvxn(add_php_before_publish_vvvvvxn) +function vvvvvxn(add_php_batchmove_vvvvvxn) { // set the function logic - if (add_php_before_publish_vvvvvxn == 1) + if (add_php_batchmove_vvvvvxn == 1) { - jQuery('#jform_php_before_publish').closest('.control-group').show(); + jQuery('#jform_php_batchmove').closest('.control-group').show(); if (jform_vvvvvxnvxe_required) { - updateFieldRequired('php_before_publish',0); - jQuery('#jform_php_before_publish').prop('required','required'); - jQuery('#jform_php_before_publish').attr('aria-required',true); - jQuery('#jform_php_before_publish').addClass('required'); + updateFieldRequired('php_batchmove',0); + jQuery('#jform_php_batchmove').prop('required','required'); + jQuery('#jform_php_batchmove').attr('aria-required',true); + jQuery('#jform_php_batchmove').addClass('required'); jform_vvvvvxnvxe_required = false; } } else { - jQuery('#jform_php_before_publish').closest('.control-group').hide(); + jQuery('#jform_php_batchmove').closest('.control-group').hide(); if (!jform_vvvvvxnvxe_required) { - updateFieldRequired('php_before_publish',1); - jQuery('#jform_php_before_publish').removeAttr('required'); - jQuery('#jform_php_before_publish').removeAttr('aria-required'); - jQuery('#jform_php_before_publish').removeClass('required'); + updateFieldRequired('php_batchmove',1); + jQuery('#jform_php_batchmove').removeAttr('required'); + jQuery('#jform_php_batchmove').removeAttr('aria-required'); + jQuery('#jform_php_batchmove').removeClass('required'); jform_vvvvvxnvxe_required = true; } } } // the vvvvvxo function -function vvvvvxo(add_php_after_publish_vvvvvxo) +function vvvvvxo(add_php_before_publish_vvvvvxo) { // set the function logic - if (add_php_after_publish_vvvvvxo == 1) + if (add_php_before_publish_vvvvvxo == 1) { - jQuery('#jform_php_after_publish').closest('.control-group').show(); + jQuery('#jform_php_before_publish').closest('.control-group').show(); if (jform_vvvvvxovxf_required) { - updateFieldRequired('php_after_publish',0); - jQuery('#jform_php_after_publish').prop('required','required'); - jQuery('#jform_php_after_publish').attr('aria-required',true); - jQuery('#jform_php_after_publish').addClass('required'); + updateFieldRequired('php_before_publish',0); + jQuery('#jform_php_before_publish').prop('required','required'); + jQuery('#jform_php_before_publish').attr('aria-required',true); + jQuery('#jform_php_before_publish').addClass('required'); jform_vvvvvxovxf_required = false; } } else { - jQuery('#jform_php_after_publish').closest('.control-group').hide(); + jQuery('#jform_php_before_publish').closest('.control-group').hide(); if (!jform_vvvvvxovxf_required) { - updateFieldRequired('php_after_publish',1); - jQuery('#jform_php_after_publish').removeAttr('required'); - jQuery('#jform_php_after_publish').removeAttr('aria-required'); - jQuery('#jform_php_after_publish').removeClass('required'); + updateFieldRequired('php_before_publish',1); + jQuery('#jform_php_before_publish').removeAttr('required'); + jQuery('#jform_php_before_publish').removeAttr('aria-required'); + jQuery('#jform_php_before_publish').removeClass('required'); jform_vvvvvxovxf_required = true; } } } // the vvvvvxp function -function vvvvvxp(add_php_before_delete_vvvvvxp) +function vvvvvxp(add_php_after_publish_vvvvvxp) { // set the function logic - if (add_php_before_delete_vvvvvxp == 1) + if (add_php_after_publish_vvvvvxp == 1) { - jQuery('#jform_php_before_delete').closest('.control-group').show(); + jQuery('#jform_php_after_publish').closest('.control-group').show(); if (jform_vvvvvxpvxg_required) { - updateFieldRequired('php_before_delete',0); - jQuery('#jform_php_before_delete').prop('required','required'); - jQuery('#jform_php_before_delete').attr('aria-required',true); - jQuery('#jform_php_before_delete').addClass('required'); + updateFieldRequired('php_after_publish',0); + jQuery('#jform_php_after_publish').prop('required','required'); + jQuery('#jform_php_after_publish').attr('aria-required',true); + jQuery('#jform_php_after_publish').addClass('required'); jform_vvvvvxpvxg_required = false; } } else { - jQuery('#jform_php_before_delete').closest('.control-group').hide(); + jQuery('#jform_php_after_publish').closest('.control-group').hide(); if (!jform_vvvvvxpvxg_required) { - updateFieldRequired('php_before_delete',1); - jQuery('#jform_php_before_delete').removeAttr('required'); - jQuery('#jform_php_before_delete').removeAttr('aria-required'); - jQuery('#jform_php_before_delete').removeClass('required'); + updateFieldRequired('php_after_publish',1); + jQuery('#jform_php_after_publish').removeAttr('required'); + jQuery('#jform_php_after_publish').removeAttr('aria-required'); + jQuery('#jform_php_after_publish').removeClass('required'); jform_vvvvvxpvxg_required = true; } } } // the vvvvvxq function -function vvvvvxq(add_php_after_delete_vvvvvxq) +function vvvvvxq(add_php_before_delete_vvvvvxq) { // set the function logic - if (add_php_after_delete_vvvvvxq == 1) + if (add_php_before_delete_vvvvvxq == 1) { - jQuery('#jform_php_after_delete').closest('.control-group').show(); + jQuery('#jform_php_before_delete').closest('.control-group').show(); if (jform_vvvvvxqvxh_required) { - updateFieldRequired('php_after_delete',0); - jQuery('#jform_php_after_delete').prop('required','required'); - jQuery('#jform_php_after_delete').attr('aria-required',true); - jQuery('#jform_php_after_delete').addClass('required'); + updateFieldRequired('php_before_delete',0); + jQuery('#jform_php_before_delete').prop('required','required'); + jQuery('#jform_php_before_delete').attr('aria-required',true); + jQuery('#jform_php_before_delete').addClass('required'); jform_vvvvvxqvxh_required = false; } } else { - jQuery('#jform_php_after_delete').closest('.control-group').hide(); + jQuery('#jform_php_before_delete').closest('.control-group').hide(); if (!jform_vvvvvxqvxh_required) { - updateFieldRequired('php_after_delete',1); - jQuery('#jform_php_after_delete').removeAttr('required'); - jQuery('#jform_php_after_delete').removeAttr('aria-required'); - jQuery('#jform_php_after_delete').removeClass('required'); + updateFieldRequired('php_before_delete',1); + jQuery('#jform_php_before_delete').removeAttr('required'); + jQuery('#jform_php_before_delete').removeAttr('aria-required'); + jQuery('#jform_php_before_delete').removeClass('required'); jform_vvvvvxqvxh_required = true; } } } // the vvvvvxr function -function vvvvvxr(add_php_document_vvvvvxr) +function vvvvvxr(add_php_after_delete_vvvvvxr) { // set the function logic - if (add_php_document_vvvvvxr == 1) + if (add_php_after_delete_vvvvvxr == 1) { - jQuery('#jform_php_document').closest('.control-group').show(); + jQuery('#jform_php_after_delete').closest('.control-group').show(); if (jform_vvvvvxrvxi_required) { - updateFieldRequired('php_document',0); - jQuery('#jform_php_document').prop('required','required'); - jQuery('#jform_php_document').attr('aria-required',true); - jQuery('#jform_php_document').addClass('required'); + updateFieldRequired('php_after_delete',0); + jQuery('#jform_php_after_delete').prop('required','required'); + jQuery('#jform_php_after_delete').attr('aria-required',true); + jQuery('#jform_php_after_delete').addClass('required'); jform_vvvvvxrvxi_required = false; } } else { - jQuery('#jform_php_document').closest('.control-group').hide(); + jQuery('#jform_php_after_delete').closest('.control-group').hide(); if (!jform_vvvvvxrvxi_required) { - updateFieldRequired('php_document',1); - jQuery('#jform_php_document').removeAttr('required'); - jQuery('#jform_php_document').removeAttr('aria-required'); - jQuery('#jform_php_document').removeClass('required'); + updateFieldRequired('php_after_delete',1); + jQuery('#jform_php_after_delete').removeAttr('required'); + jQuery('#jform_php_after_delete').removeAttr('aria-required'); + jQuery('#jform_php_after_delete').removeClass('required'); jform_vvvvvxrvxi_required = true; } } } // the vvvvvxs function -function vvvvvxs(add_sql_vvvvvxs) +function vvvvvxs(add_php_document_vvvvvxs) { // set the function logic - if (add_sql_vvvvvxs == 1) + if (add_php_document_vvvvvxs == 1) { - jQuery('#jform_source').closest('.control-group').show(); + jQuery('#jform_php_document').closest('.control-group').show(); if (jform_vvvvvxsvxj_required) { - updateFieldRequired('source',0); - jQuery('#jform_source').prop('required','required'); - jQuery('#jform_source').attr('aria-required',true); - jQuery('#jform_source').addClass('required'); + updateFieldRequired('php_document',0); + jQuery('#jform_php_document').prop('required','required'); + jQuery('#jform_php_document').attr('aria-required',true); + jQuery('#jform_php_document').addClass('required'); jform_vvvvvxsvxj_required = false; } } else { - jQuery('#jform_source').closest('.control-group').hide(); + jQuery('#jform_php_document').closest('.control-group').hide(); if (!jform_vvvvvxsvxj_required) { - updateFieldRequired('source',1); - jQuery('#jform_source').removeAttr('required'); - jQuery('#jform_source').removeAttr('aria-required'); - jQuery('#jform_source').removeClass('required'); + updateFieldRequired('php_document',1); + jQuery('#jform_php_document').removeAttr('required'); + jQuery('#jform_php_document').removeAttr('aria-required'); + jQuery('#jform_php_document').removeClass('required'); jform_vvvvvxsvxj_required = true; } } } // the vvvvvxt function -function vvvvvxt(source_vvvvvxt,add_sql_vvvvvxt) +function vvvvvxt(add_sql_vvvvvxt) { // set the function logic - if (source_vvvvvxt == 2 && add_sql_vvvvvxt == 1) + if (add_sql_vvvvvxt == 1) { - jQuery('#jform_sql').closest('.control-group').show(); + jQuery('#jform_source').closest('.control-group').show(); if (jform_vvvvvxtvxk_required) { - updateFieldRequired('sql',0); - jQuery('#jform_sql').prop('required','required'); - jQuery('#jform_sql').attr('aria-required',true); - jQuery('#jform_sql').addClass('required'); + updateFieldRequired('source',0); + jQuery('#jform_source').prop('required','required'); + jQuery('#jform_source').attr('aria-required',true); + jQuery('#jform_source').addClass('required'); jform_vvvvvxtvxk_required = false; } } else { - jQuery('#jform_sql').closest('.control-group').hide(); + jQuery('#jform_source').closest('.control-group').hide(); if (!jform_vvvvvxtvxk_required) { - updateFieldRequired('sql',1); - jQuery('#jform_sql').removeAttr('required'); - jQuery('#jform_sql').removeAttr('aria-required'); - jQuery('#jform_sql').removeClass('required'); + updateFieldRequired('source',1); + jQuery('#jform_source').removeAttr('required'); + jQuery('#jform_source').removeAttr('aria-required'); + jQuery('#jform_source').removeClass('required'); jform_vvvvvxtvxk_required = true; } } } -// the vvvvvxv function -function vvvvvxv(source_vvvvvxv,add_sql_vvvvvxv) +// the vvvvvxu function +function vvvvvxu(source_vvvvvxu,add_sql_vvvvvxu) { // set the function logic - if (source_vvvvvxv == 1 && add_sql_vvvvvxv == 1) + if (source_vvvvvxu == 2 && add_sql_vvvvvxu == 1) + { + jQuery('#jform_sql').closest('.control-group').show(); + if (jform_vvvvvxuvxl_required) + { + updateFieldRequired('sql',0); + jQuery('#jform_sql').prop('required','required'); + jQuery('#jform_sql').attr('aria-required',true); + jQuery('#jform_sql').addClass('required'); + jform_vvvvvxuvxl_required = false; + } + + } + else + { + jQuery('#jform_sql').closest('.control-group').hide(); + if (!jform_vvvvvxuvxl_required) + { + updateFieldRequired('sql',1); + jQuery('#jform_sql').removeAttr('required'); + jQuery('#jform_sql').removeAttr('aria-required'); + jQuery('#jform_sql').removeClass('required'); + jform_vvvvvxuvxl_required = true; + } + } +} + +// the vvvvvxw function +function vvvvvxw(source_vvvvvxw,add_sql_vvvvvxw) +{ + // set the function logic + if (source_vvvvvxw == 1 && add_sql_vvvvvxw == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -908,139 +908,139 @@ function vvvvvxv(source_vvvvvxv,add_sql_vvvvvxv) } } -// the vvvvvxx function -function vvvvvxx(add_custom_import_vvvvvxx) +// the vvvvvxy function +function vvvvvxy(add_custom_import_vvvvvxy) { // set the function logic - if (add_custom_import_vvvvvxx == 1) + if (add_custom_import_vvvvvxy == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); - if (jform_vvvvvxxvxl_required) + if (jform_vvvvvxyvxm_required) { updateFieldRequired('html_import_view',0); jQuery('#jform_html_import_view').prop('required','required'); jQuery('#jform_html_import_view').attr('aria-required',true); jQuery('#jform_html_import_view').addClass('required'); - jform_vvvvvxxvxl_required = false; + jform_vvvvvxyvxm_required = false; } jQuery('.note_advanced_import').closest('.control-group').show(); jQuery('#jform_php_import_display').closest('.control-group').show(); - if (jform_vvvvvxxvxm_required) + if (jform_vvvvvxyvxn_required) { updateFieldRequired('php_import_display',0); jQuery('#jform_php_import_display').prop('required','required'); jQuery('#jform_php_import_display').attr('aria-required',true); jQuery('#jform_php_import_display').addClass('required'); - jform_vvvvvxxvxm_required = false; + jform_vvvvvxyvxn_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); - if (jform_vvvvvxxvxn_required) + if (jform_vvvvvxyvxo_required) { updateFieldRequired('php_import_ext',0); jQuery('#jform_php_import_ext').prop('required','required'); jQuery('#jform_php_import_ext').attr('aria-required',true); jQuery('#jform_php_import_ext').addClass('required'); - jform_vvvvvxxvxn_required = false; + jform_vvvvvxyvxo_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); - if (jform_vvvvvxxvxo_required) + if (jform_vvvvvxyvxp_required) { updateFieldRequired('php_import',0); jQuery('#jform_php_import').prop('required','required'); jQuery('#jform_php_import').attr('aria-required',true); jQuery('#jform_php_import').addClass('required'); - jform_vvvvvxxvxo_required = false; + jform_vvvvvxyvxp_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); - if (jform_vvvvvxxvxp_required) + if (jform_vvvvvxyvxq_required) { updateFieldRequired('php_import_save',0); jQuery('#jform_php_import_save').prop('required','required'); jQuery('#jform_php_import_save').attr('aria-required',true); jQuery('#jform_php_import_save').addClass('required'); - jform_vvvvvxxvxp_required = false; + jform_vvvvvxyvxq_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); - if (jform_vvvvvxxvxq_required) + if (jform_vvvvvxyvxr_required) { updateFieldRequired('php_import_setdata',0); jQuery('#jform_php_import_setdata').prop('required','required'); jQuery('#jform_php_import_setdata').attr('aria-required',true); jQuery('#jform_php_import_setdata').addClass('required'); - jform_vvvvvxxvxq_required = false; + jform_vvvvvxyvxr_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); - if (!jform_vvvvvxxvxl_required) + if (!jform_vvvvvxyvxm_required) { updateFieldRequired('html_import_view',1); jQuery('#jform_html_import_view').removeAttr('required'); jQuery('#jform_html_import_view').removeAttr('aria-required'); jQuery('#jform_html_import_view').removeClass('required'); - jform_vvvvvxxvxl_required = true; + jform_vvvvvxyvxm_required = true; } jQuery('.note_advanced_import').closest('.control-group').hide(); jQuery('#jform_php_import_display').closest('.control-group').hide(); - if (!jform_vvvvvxxvxm_required) + if (!jform_vvvvvxyvxn_required) { updateFieldRequired('php_import_display',1); jQuery('#jform_php_import_display').removeAttr('required'); jQuery('#jform_php_import_display').removeAttr('aria-required'); jQuery('#jform_php_import_display').removeClass('required'); - jform_vvvvvxxvxm_required = true; + jform_vvvvvxyvxn_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); - if (!jform_vvvvvxxvxn_required) + if (!jform_vvvvvxyvxo_required) { updateFieldRequired('php_import_ext',1); jQuery('#jform_php_import_ext').removeAttr('required'); jQuery('#jform_php_import_ext').removeAttr('aria-required'); jQuery('#jform_php_import_ext').removeClass('required'); - jform_vvvvvxxvxn_required = true; + jform_vvvvvxyvxo_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); - if (!jform_vvvvvxxvxo_required) + if (!jform_vvvvvxyvxp_required) { updateFieldRequired('php_import',1); jQuery('#jform_php_import').removeAttr('required'); jQuery('#jform_php_import').removeAttr('aria-required'); jQuery('#jform_php_import').removeClass('required'); - jform_vvvvvxxvxo_required = true; + jform_vvvvvxyvxp_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); - if (!jform_vvvvvxxvxp_required) + if (!jform_vvvvvxyvxq_required) { updateFieldRequired('php_import_save',1); jQuery('#jform_php_import_save').removeAttr('required'); jQuery('#jform_php_import_save').removeAttr('aria-required'); jQuery('#jform_php_import_save').removeClass('required'); - jform_vvvvvxxvxp_required = true; + jform_vvvvvxyvxq_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); - if (!jform_vvvvvxxvxq_required) + if (!jform_vvvvvxyvxr_required) { updateFieldRequired('php_import_setdata',1); jQuery('#jform_php_import_setdata').removeAttr('required'); jQuery('#jform_php_import_setdata').removeAttr('aria-required'); jQuery('#jform_php_import_setdata').removeClass('required'); - jform_vvvvvxxvxq_required = true; + jform_vvvvvxyvxr_required = true; } } } -// the vvvvvxy function -function vvvvvxy(add_custom_import_vvvvvxy) +// the vvvvvxz function +function vvvvvxz(add_custom_import_vvvvvxz) { // set the function logic - if (add_custom_import_vvvvvxy == 0) + if (add_custom_import_vvvvvxz == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -1050,51 +1050,51 @@ function vvvvvxy(add_custom_import_vvvvvxy) } } -// the vvvvvxz function -function vvvvvxz(add_custom_button_vvvvvxz) +// the vvvvvya function +function vvvvvya(add_custom_button_vvvvvya) { // set the function logic - if (add_custom_button_vvvvvxz == 1) + if (add_custom_button_vvvvvya == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvxzvxr_required) + if (jform_vvvvvyavxs_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvxzvxr_required = false; + jform_vvvvvyavxs_required = false; } jQuery('#jform_php_controller_list').closest('.control-group').show(); - if (jform_vvvvvxzvxs_required) + if (jform_vvvvvyavxt_required) { updateFieldRequired('php_controller_list',0); jQuery('#jform_php_controller_list').prop('required','required'); jQuery('#jform_php_controller_list').attr('aria-required',true); jQuery('#jform_php_controller_list').addClass('required'); - jform_vvvvvxzvxs_required = false; + jform_vvvvvyavxt_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvxzvxt_required) + if (jform_vvvvvyavxu_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvxzvxt_required = false; + jform_vvvvvyavxu_required = false; } jQuery('#jform_php_model_list').closest('.control-group').show(); - if (jform_vvvvvxzvxu_required) + if (jform_vvvvvyavxv_required) { updateFieldRequired('php_model_list',0); jQuery('#jform_php_model_list').prop('required','required'); jQuery('#jform_php_model_list').attr('aria-required',true); jQuery('#jform_php_model_list').addClass('required'); - jform_vvvvvxzvxu_required = false; + jform_vvvvvyavxv_required = false; } } @@ -1102,40 +1102,40 @@ function vvvvvxz(add_custom_button_vvvvvxz) { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvxzvxr_required) + if (!jform_vvvvvyavxs_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvxzvxr_required = true; + jform_vvvvvyavxs_required = true; } jQuery('#jform_php_controller_list').closest('.control-group').hide(); - if (!jform_vvvvvxzvxs_required) + if (!jform_vvvvvyavxt_required) { updateFieldRequired('php_controller_list',1); jQuery('#jform_php_controller_list').removeAttr('required'); jQuery('#jform_php_controller_list').removeAttr('aria-required'); jQuery('#jform_php_controller_list').removeClass('required'); - jform_vvvvvxzvxs_required = true; + jform_vvvvvyavxt_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvxzvxt_required) + if (!jform_vvvvvyavxu_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvxzvxt_required = true; + jform_vvvvvyavxu_required = true; } jQuery('#jform_php_model_list').closest('.control-group').hide(); - if (!jform_vvvvvxzvxu_required) + if (!jform_vvvvvyavxv_required) { updateFieldRequired('php_model_list',1); jQuery('#jform_php_model_list').removeAttr('required'); jQuery('#jform_php_model_list').removeAttr('aria-required'); jQuery('#jform_php_model_list').removeClass('required'); - jform_vvvvvxzvxu_required = true; + jform_vvvvvyavxv_required = true; } } } @@ -1178,6 +1178,8 @@ function isSet(val) jQuery(document).ready(function() { + // get the linked details + getLinked(); // set button addButtonID('admin_fields','create_edit_buttons', 1); // <-- first var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); @@ -1264,6 +1266,28 @@ function addButton(type,where){ } }) } + +function getLinked_server(type){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod; + if(token.length > 0 && type > 0){ + var request = 'token='+token+'&type='+type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getLinked(){ + getLinked_server(1).done(function(result) { + if(result){ + jQuery('#display_linked_to').html(result); + } + }); +} function getTableColumns_server(tableName){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json"; diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 14de9cdd7..73fe5b727 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -170,6 +170,24 @@ filter="raw" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_HINT" required="true" /> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE - - - - - + + class="note_linked_to_notice" /> + + + + - - + + + + - - - - + + + + - - - - + + + + - - - - - + + name="note_create_edit_notice" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" + heading="h4" + class="alert alert-info note_create_edit_notice" /> - + + name="note_create_edit_buttons" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" + class="note_create_edit_buttons" /> - - + + 0 && type > 0){ + var request = 'token='+token+'&type='+type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getLinked(){ + getLinked_server(1).done(function(result) { + if(result){ + jQuery('#display_linked_to').html(result); + } + }); +} function getSnippetDetails_server(snippetId){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"; diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml index 952e2ac8b..3e4e32efe 100644 --- a/admin/models/forms/custom_admin_view.xml +++ b/admin/models/forms/custom_admin_view.xml @@ -155,21 +155,20 @@ label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION" directory="" /> - - + - - - - - + required="false" + button="true" /> + @@ -184,17 +183,17 @@ description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" /> - - - - - - + + - - + + - - - - - - - - - - - - - + + +