From eae13dff06484354b5733df3c5b27aa6b1b4bbd0 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 12 Jun 2019 22:06:19 +0200 Subject: [PATCH] Resolved gh-418 by adding an on before cancel custom script area to the admin view. --- README.md | 12 +- admin/README.txt | 12 +- admin/compiler/joomla_3/JControllerForm.php | 2 +- admin/helpers/compiler/a_Get.php | 2 +- admin/helpers/compiler/f_Infusion.php | 4 + .../en-GB/en-GB.com_componentbuilder.ini | 9 +- admin/layouts/admin_view/php_fullwidth.php | 2 + admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../server/linked_components_fullwidth.php | 2 +- admin/models/admin_view.php | 180 +-- admin/models/admin_views.php | 26 +- admin/models/fieldtype.php | 12 +- admin/models/forms/admin_view.js | 456 +++--- admin/models/forms/admin_view.xml | 1169 +++++++-------- admin/models/forms/custom_admin_view.js | 354 ++--- admin/models/forms/custom_code.js | 76 +- admin/models/forms/dynamic_get.js | 1252 ++++++++--------- admin/models/forms/field.js | 428 +++--- admin/models/forms/fieldtype.js | 632 ++++----- admin/models/forms/help_document.js | 234 +-- admin/models/forms/layout.js | 20 +- admin/models/forms/library.js | 188 +-- admin/models/forms/server.js | 560 ++++---- admin/models/forms/site_view.js | 350 ++--- admin/models/forms/template.js | 20 +- admin/models/server.php | 2 +- admin/sql/install.mysql.utf8.sql | 27 +- admin/sql/updates/mysql/2.9.18.sql | 3 + admin/views/admin_view/tmpl/edit.php | 209 +-- admin/views/custom_admin_view/tmpl/edit.php | 100 +- admin/views/custom_code/tmpl/edit.php | 114 +- admin/views/dynamic_get/tmpl/edit.php | 336 ++--- admin/views/field/tmpl/edit.php | 132 +- admin/views/fieldtype/tmpl/edit.php | 412 +++--- admin/views/fieldtype/view.html.php | 2 +- admin/views/help_document/tmpl/edit.php | 54 +- admin/views/layout/tmpl/edit.php | 10 +- admin/views/library/tmpl/edit.php | 40 +- admin/views/server/tmpl/edit.php | 156 +- admin/views/server/view.html.php | 2 +- admin/views/site_view/tmpl/edit.php | 110 +- admin/views/template/tmpl/edit.php | 10 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 17 + script.php | 10 +- 45 files changed, 3943 insertions(+), 3813 deletions(-) create mode 100644 admin/sql/updates/mysql/2.9.18.sql diff --git a/README.md b/README.md index de45167cb..088ed10a2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,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.9.18) 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.9.19) 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) @@ -146,13 +146,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 11th June, 2019 -+ *Version*: 2.9.18 ++ *Last Build*: 12th June, 2019 ++ *Version*: 2.9.19 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206602** -+ *Field count*: **1136** -+ *File count*: **1344** ++ *Line count*: **206728** ++ *Field count*: **1138** ++ *File count*: **1345** + *Folder count*: **209** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index de45167cb..088ed10a2 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,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.9.18) 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.9.19) 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) @@ -146,13 +146,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 11th June, 2019 -+ *Version*: 2.9.18 ++ *Last Build*: 12th June, 2019 ++ *Version*: 2.9.19 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206602** -+ *Field count*: **1136** -+ *File count*: **1344** ++ *Line count*: **206728** ++ *Field count*: **1138** ++ *File count*: **1345** + *Folder count*: **209** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/JControllerForm.php b/admin/compiler/joomla_3/JControllerForm.php index 305a23fec..d5700c152 100644 --- a/admin/compiler/joomla_3/JControllerForm.php +++ b/admin/compiler/joomla_3/JControllerForm.php @@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm $this->refid = $this->input->get('refid', 0, 'int'); // Check if there is a return value - $return = $this->input->get('return', null, 'base64'); + $return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL### $cancel = parent::cancel($key); diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 3d5c81d8b..48fe02d08 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2046,7 +2046,7 @@ class Get } } // add_php - $addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document'); + $addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_cancel', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document'); foreach ($addArrayP as $scripter) { if (isset($view->{'add_' . $scripter}) && $view->{'add_' . $scripter} == 1) diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index af5d955c4..cfe129b60 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -527,9 +527,13 @@ class Infusion extends Interpretation // BATCH_ONCLICK_CANCEL_SCRIPT <<>> $this->fileContentDynamic[$viewName_list][$this->hhh . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh] = ''; // TODO <-- must still be build + // JCONTROLLERFORM_ALLOWADD <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh] = $this->setJcontrollerAllowAdd($viewName_single, $viewName_list); + // JCONTROLLERFORM_BEFORECANCEL <<>> + $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_before_cancel', $viewName_single, PHP_EOL, null, null, ''); + // JCONTROLLERFORM_ALLOWEDIT <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh] = $this->setJcontrollerAllowEdit($viewName_single, $viewName_list); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index ce57c939c..ca9b1b4d1 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -496,7 +496,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_NEW_CLOSE_BUTTON="Add New + New & Close COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE="Add Php After Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL="Add PHP (script - after delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH="Add Php After Publish" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after publish)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after state change)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX="Add Php Ajax" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL="Add PHP (AJAX)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD="Add Php Allowadd" @@ -507,10 +507,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY="Add Php Batchcopy" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL="Add PHP (batchCopy Method)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE="Add Php Batchmove" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL="Add PHP (batchMove Method)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL="Add Php Before Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL_LABEL="Add PHP (script - before cancel)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE="Add Php Before Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL="Add PHP (script - before delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH="Add Php Before Publish" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before publish)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before state change)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE="Add Php Before Save" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL="Add PHP (save Method - before data modeling)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT="Add Php Document" @@ -990,6 +992,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL="PHP batchCopy Method
< COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE="Php Batchmove" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION="Add PHP Here that should run in the batchMove Method. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL="PHP batchMove Method
submitted values are in $values, id's are in $pks" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL="Php Before Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_DESCRIPTION="Add PHP Here that should run in the Cancel Method before cancel. Do not add the php tags." +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_LABEL="PHP Cancel Method before
(string) $key is the name of the primary key of the URL variable." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE="Php Before Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION="Add PHP Here that should run in the delete Method before items are deleted. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL="PHP delete Method
Target (array) $pks is an array of record primary keys." diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index 0e66638d4..32e231549 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -38,6 +38,8 @@ $fields = $displayData->get('fields') ?: array( 'php_allowadd', 'add_php_allowedit', 'php_allowedit', + 'add_php_before_cancel', + 'php_before_cancel', 'add_php_batchcopy', 'php_batchcopy', 'add_php_batchmove', diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 9e78718bf..be5611b20 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wapfields; +$items = $displayData->waqfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 1b07ca66f..14a1587a7 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wazlinked_components; +$items = $displayData->wbalinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index f456d2198..ae0ec90f7 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -86,12 +86,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->php_import_headers)) - { - // base64 Decode php_import_headers. - $item->php_import_headers = base64_decode($item->php_import_headers); - } - if (!empty($item->html_import_view)) { // base64 Decode html_import_view. @@ -104,10 +98,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_save = base64_decode($item->php_import_save); } - if (!empty($item->php_getitems)) + if (!empty($item->php_import_headers)) { - // base64 Decode php_getitems. - $item->php_getitems = base64_decode($item->php_getitems); + // base64 Decode php_import_headers. + $item->php_import_headers = base64_decode($item->php_import_headers); } if (!empty($item->php_getitems_after_all)) @@ -182,42 +176,48 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->javascript_view_footer = base64_decode($item->javascript_view_footer); } + if (!empty($item->php_before_cancel)) + { + // base64 Decode php_before_cancel. + $item->php_before_cancel = base64_decode($item->php_before_cancel); + } + if (!empty($item->php_batchcopy)) { // base64 Decode php_batchcopy. $item->php_batchcopy = base64_decode($item->php_batchcopy); } - if (!empty($item->php_batchmove)) - { - // base64 Decode php_batchmove. - $item->php_batchmove = base64_decode($item->php_batchmove); - } - if (!empty($item->javascript_views_file)) { // base64 Decode javascript_views_file. $item->javascript_views_file = base64_decode($item->javascript_views_file); } + if (!empty($item->php_batchmove)) + { + // base64 Decode php_batchmove. + $item->php_batchmove = base64_decode($item->php_batchmove); + } + if (!empty($item->php_before_publish)) { // base64 Decode php_before_publish. $item->php_before_publish = base64_decode($item->php_before_publish); } - if (!empty($item->php_after_publish)) - { - // base64 Decode php_after_publish. - $item->php_after_publish = base64_decode($item->php_after_publish); - } - if (!empty($item->javascript_views_footer)) { // base64 Decode javascript_views_footer. $item->javascript_views_footer = base64_decode($item->javascript_views_footer); } + if (!empty($item->php_after_publish)) + { + // base64 Decode php_after_publish. + $item->php_after_publish = base64_decode($item->php_after_publish); + } + if (!empty($item->php_before_delete)) { // base64 Decode php_before_delete. @@ -230,18 +230,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_after_delete = base64_decode($item->php_after_delete); } - if (!empty($item->php_document)) - { - // base64 Decode php_document. - $item->php_document = base64_decode($item->php_document); - } - if (!empty($item->php_controller)) { // base64 Decode php_controller. $item->php_controller = base64_decode($item->php_controller); } + if (!empty($item->php_document)) + { + // base64 Decode php_document. + $item->php_document = base64_decode($item->php_document); + } + if (!empty($item->php_model)) { // base64 Decode php_model. @@ -284,30 +284,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import = base64_decode($item->php_import); } - if (!empty($item->php_import_setdata)) - { - // base64 Decode php_import_setdata. - $item->php_import_setdata = base64_decode($item->php_import_setdata); - } - if (!empty($item->php_getitem)) { // base64 Decode php_getitem. $item->php_getitem = base64_decode($item->php_getitem); } + if (!empty($item->php_import_setdata)) + { + // base64 Decode php_import_setdata. + $item->php_import_setdata = base64_decode($item->php_import_setdata); + } + if (!empty($item->php_import_ext)) { // base64 Decode php_import_ext. $item->php_import_ext = base64_decode($item->php_import_ext); } - if (!empty($item->addtables)) + if (!empty($item->php_getitems)) { - // Convert the addtables field to an array. - $addtables = new Registry; - $addtables->loadString($item->addtables); - $item->addtables = $addtables->toArray(); + // base64 Decode php_getitems. + $item->php_getitems = base64_decode($item->php_getitems); } if (!empty($item->addpermissions)) @@ -334,6 +332,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addlinked_views = $addlinked_views->toArray(); } + if (!empty($item->addtables)) + { + // Convert the addtables field to an array. + $addtables = new Registry; + $addtables->loadString($item->addtables); + $item->addtables = $addtables->toArray(); + } + if (!empty($item->alias_builder)) { // Convert the alias_builder field to an array. @@ -1238,19 +1244,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['system_name'] = $data['name_single']; } - // Set the addtables items to data. - if (isset($data['addtables']) && is_array($data['addtables'])) - { - $addtables = new JRegistry; - $addtables->loadArray($data['addtables']); - $data['addtables'] = (string) $addtables; - } - elseif (!isset($data['addtables'])) - { - // Set the empty addtables to data - $data['addtables'] = ''; - } - // Set the addpermissions items to data. if (isset($data['addpermissions']) && is_array($data['addpermissions'])) { @@ -1290,6 +1283,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addlinked_views'] = ''; } + // Set the addtables items to data. + if (isset($data['addtables']) && is_array($data['addtables'])) + { + $addtables = new JRegistry; + $addtables->loadArray($data['addtables']); + $data['addtables'] = (string) $addtables; + } + elseif (!isset($data['addtables'])) + { + // Set the empty addtables to data + $data['addtables'] = ''; + } + // Set the alias_builder items to data. if (isset($data['alias_builder']) && is_array($data['alias_builder'])) { @@ -1329,12 +1335,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['ajax_input'] = ''; } - // Set the php_import_headers string to base64 string. - if (isset($data['php_import_headers'])) - { - $data['php_import_headers'] = base64_encode($data['php_import_headers']); - } - // Set the html_import_view string to base64 string. if (isset($data['html_import_view'])) { @@ -1347,10 +1347,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_save'] = base64_encode($data['php_import_save']); } - // Set the php_getitems string to base64 string. - if (isset($data['php_getitems'])) + // Set the php_import_headers string to base64 string. + if (isset($data['php_import_headers'])) { - $data['php_getitems'] = base64_encode($data['php_getitems']); + $data['php_import_headers'] = base64_encode($data['php_import_headers']); } // Set the php_getitems_after_all string to base64 string. @@ -1425,42 +1425,48 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); } + // Set the php_before_cancel string to base64 string. + if (isset($data['php_before_cancel'])) + { + $data['php_before_cancel'] = base64_encode($data['php_before_cancel']); + } + // Set the php_batchcopy string to base64 string. if (isset($data['php_batchcopy'])) { $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); } - // Set the php_batchmove string to base64 string. - if (isset($data['php_batchmove'])) - { - $data['php_batchmove'] = base64_encode($data['php_batchmove']); - } - // Set the javascript_views_file string to base64 string. if (isset($data['javascript_views_file'])) { $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); } + // Set the php_batchmove string to base64 string. + if (isset($data['php_batchmove'])) + { + $data['php_batchmove'] = base64_encode($data['php_batchmove']); + } + // Set the php_before_publish string to base64 string. if (isset($data['php_before_publish'])) { $data['php_before_publish'] = base64_encode($data['php_before_publish']); } - // Set the php_after_publish string to base64 string. - if (isset($data['php_after_publish'])) - { - $data['php_after_publish'] = base64_encode($data['php_after_publish']); - } - // Set the javascript_views_footer string to base64 string. if (isset($data['javascript_views_footer'])) { $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); } + // Set the php_after_publish string to base64 string. + if (isset($data['php_after_publish'])) + { + $data['php_after_publish'] = base64_encode($data['php_after_publish']); + } + // Set the php_before_delete string to base64 string. if (isset($data['php_before_delete'])) { @@ -1473,18 +1479,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_after_delete'] = base64_encode($data['php_after_delete']); } - // Set the php_document string to base64 string. - if (isset($data['php_document'])) - { - $data['php_document'] = base64_encode($data['php_document']); - } - // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { $data['php_controller'] = base64_encode($data['php_controller']); } + // Set the php_document string to base64 string. + if (isset($data['php_document'])) + { + $data['php_document'] = base64_encode($data['php_document']); + } + // Set the php_model string to base64 string. if (isset($data['php_model'])) { @@ -1527,22 +1533,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import'] = base64_encode($data['php_import']); } - // Set the php_import_setdata string to base64 string. - if (isset($data['php_import_setdata'])) - { - $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); - } - // 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_setdata string to base64 string. + if (isset($data['php_import_setdata'])) + { + $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); + } + // Set the php_import_ext string to base64 string. if (isset($data['php_import_ext'])) { $data['php_import_ext'] = base64_encode($data['php_import_ext']); + } + + // Set the php_getitems string to base64 string. + if (isset($data['php_getitems'])) + { + $data['php_getitems'] = base64_encode($data['php_getitems']); } // Set the Params Items to data diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 6ee4f09f9..d45f5217b 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -376,14 +376,12 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode php_import_headers - $item->php_import_headers = base64_decode($item->php_import_headers); // decode html_import_view $item->html_import_view = base64_decode($item->html_import_view); // decode php_import_save $item->php_import_save = base64_decode($item->php_import_save); - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); + // decode php_import_headers + $item->php_import_headers = base64_decode($item->php_import_headers); // decode php_getitems_after_all $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); // decode php_getlistquery @@ -408,26 +406,28 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_allowedit = base64_decode($item->php_allowedit); // decode javascript_view_footer $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + // decode php_before_cancel + $item->php_before_cancel = base64_decode($item->php_before_cancel); // decode php_batchcopy $item->php_batchcopy = base64_decode($item->php_batchcopy); - // decode php_batchmove - $item->php_batchmove = base64_decode($item->php_batchmove); // decode javascript_views_file $item->javascript_views_file = base64_decode($item->javascript_views_file); + // decode php_batchmove + $item->php_batchmove = base64_decode($item->php_batchmove); // decode php_before_publish $item->php_before_publish = base64_decode($item->php_before_publish); - // decode php_after_publish - $item->php_after_publish = base64_decode($item->php_after_publish); // decode javascript_views_footer $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + // decode php_after_publish + $item->php_after_publish = base64_decode($item->php_after_publish); // decode php_before_delete $item->php_before_delete = base64_decode($item->php_before_delete); // decode php_after_delete $item->php_after_delete = base64_decode($item->php_after_delete); - // decode php_document - $item->php_document = base64_decode($item->php_document); // decode php_controller $item->php_controller = base64_decode($item->php_controller); + // decode php_document + $item->php_document = base64_decode($item->php_document); // decode php_model $item->php_model = base64_decode($item->php_model); // decode php_controller_list @@ -442,12 +442,14 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_import_display = base64_decode($item->php_import_display); // decode php_import $item->php_import = base64_decode($item->php_import); - // decode php_import_setdata - $item->php_import_setdata = base64_decode($item->php_import_setdata); // decode php_getitem $item->php_getitem = base64_decode($item->php_getitem); + // decode php_import_setdata + $item->php_import_setdata = base64_decode($item->php_import_setdata); // decode php_import_ext $item->php_import_ext = base64_decode($item->php_import_ext); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 6a2d0300e..23c476ebb 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -155,7 +155,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWapfields() + public function getWaqfields() { // Get the user object. $user = JFactory::getUser(); @@ -237,13 +237,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationWapfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationWaqfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationWapfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationWaqfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationWapfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationWaqfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationWapfields($item->store, 'store'); + $item->store = $this->selectionTranslationWaqfields($item->store, 'store'); } } @@ -257,7 +257,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationWapfields($value,$name) + public function selectionTranslationWaqfields($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 8e894c1c6..7feaaf4f8 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -35,17 +35,18 @@ jform_vvvvvxxvxn_required = false; jform_vvvvvxyvxo_required = false; jform_vvvvvxzvxp_required = false; jform_vvvvvyavxq_required = false; -jform_vvvvvyevxr_required = false; -jform_vvvvvyevxs_required = false; -jform_vvvvvyevxt_required = false; -jform_vvvvvyevxu_required = false; -jform_vvvvvyevxv_required = false; -jform_vvvvvyevxw_required = false; -jform_vvvvvyevxx_required = false; -jform_vvvvvygvxy_required = false; -jform_vvvvvygvxz_required = false; -jform_vvvvvygvya_required = false; -jform_vvvvvygvyb_required = false; +jform_vvvvvybvxr_required = false; +jform_vvvvvyfvxs_required = false; +jform_vvvvvyfvxt_required = false; +jform_vvvvvyfvxu_required = false; +jform_vvvvvyfvxv_required = false; +jform_vvvvvyfvxw_required = false; +jform_vvvvvyfvxx_required = false; +jform_vvvvvyfvxy_required = false; +jform_vvvvvyhvxz_required = false; +jform_vvvvvyhvya_required = false; +jform_vvvvvyhvyb_required = false; +jform_vvvvvyhvyc_required = false; // Initial Script jQuery(document).ready(function() @@ -101,46 +102,49 @@ jQuery(document).ready(function() var add_php_allowedit_vvvvvxr = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); vvvvvxr(add_php_allowedit_vvvvvxr); - var add_php_batchcopy_vvvvvxs = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxs(add_php_batchcopy_vvvvvxs); + var add_php_before_cancel_vvvvvxs = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvxs(add_php_before_cancel_vvvvvxs); - var add_php_batchmove_vvvvvxt = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxt(add_php_batchmove_vvvvvxt); + var add_php_batchcopy_vvvvvxt = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxt(add_php_batchcopy_vvvvvxt); - var add_php_before_publish_vvvvvxu = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxu(add_php_before_publish_vvvvvxu); + var add_php_batchmove_vvvvvxu = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxu(add_php_batchmove_vvvvvxu); - var add_php_after_publish_vvvvvxv = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxv(add_php_after_publish_vvvvvxv); + var add_php_before_publish_vvvvvxv = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxv(add_php_before_publish_vvvvvxv); - var add_php_before_delete_vvvvvxw = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxw(add_php_before_delete_vvvvvxw); + var add_php_after_publish_vvvvvxw = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxw(add_php_after_publish_vvvvvxw); - var add_php_after_delete_vvvvvxx = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxx(add_php_after_delete_vvvvvxx); + var add_php_before_delete_vvvvvxx = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvxx(add_php_before_delete_vvvvvxx); - var add_php_document_vvvvvxy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvxy(add_php_document_vvvvvxy); + var add_php_after_delete_vvvvvxy = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvxy(add_php_after_delete_vvvvvxy); - var add_sql_vvvvvxz = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxz(add_sql_vvvvvxz); + var add_php_document_vvvvvxz = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvxz(add_php_document_vvvvvxz); - var source_vvvvvya = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvya = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvya(source_vvvvvya,add_sql_vvvvvya); + vvvvvya(add_sql_vvvvvya); - var source_vvvvvyc = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvyc = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc); + var source_vvvvvyb = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyb = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyb(source_vvvvvyb,add_sql_vvvvvyb); - var add_custom_import_vvvvvye = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvye(add_custom_import_vvvvvye); + var source_vvvvvyd = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyd = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyd(source_vvvvvyd,add_sql_vvvvvyd); var add_custom_import_vvvvvyf = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvvyf(add_custom_import_vvvvvyf); - var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyg(add_custom_button_vvvvvyg); + var add_custom_import_vvvvvyg = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyg(add_custom_import_vvvvvyg); + + var add_custom_button_vvvvvyh = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyh(add_custom_button_vvvvvyh); }); // the vvvvvxb function @@ -690,298 +694,330 @@ function vvvvvxr(add_php_allowedit_vvvvvxr) } // the vvvvvxs function -function vvvvvxs(add_php_batchcopy_vvvvvxs) +function vvvvvxs(add_php_before_cancel_vvvvvxs) { // set the function logic - if (add_php_batchcopy_vvvvvxs == 1) + if (add_php_before_cancel_vvvvvxs == 1) { - jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); - // add required attribute to php_batchcopy field + jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); + // add required attribute to php_before_cancel field if (jform_vvvvvxsvxi_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_before_cancel',0); + jQuery('#jform_php_before_cancel').prop('required','required'); + jQuery('#jform_php_before_cancel').attr('aria-required',true); + jQuery('#jform_php_before_cancel').addClass('required'); jform_vvvvvxsvxi_required = false; } } else { - jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide(); - // remove required attribute from php_batchcopy field + jQuery('#jform_php_before_cancel-lbl').closest('.control-group').hide(); + // remove required attribute from php_before_cancel field if (!jform_vvvvvxsvxi_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_before_cancel',1); + jQuery('#jform_php_before_cancel').removeAttr('required'); + jQuery('#jform_php_before_cancel').removeAttr('aria-required'); + jQuery('#jform_php_before_cancel').removeClass('required'); jform_vvvvvxsvxi_required = true; } } } // the vvvvvxt function -function vvvvvxt(add_php_batchmove_vvvvvxt) +function vvvvvxt(add_php_batchcopy_vvvvvxt) { // set the function logic - if (add_php_batchmove_vvvvvxt == 1) + if (add_php_batchcopy_vvvvvxt == 1) { - jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); - // add required attribute to php_batchmove field + jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); + // add required attribute to php_batchcopy field if (jform_vvvvvxtvxj_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_vvvvvxtvxj_required = false; } } else { - jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide(); - // remove required attribute from php_batchmove field + jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide(); + // remove required attribute from php_batchcopy field if (!jform_vvvvvxtvxj_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_vvvvvxtvxj_required = true; } } } // the vvvvvxu function -function vvvvvxu(add_php_before_publish_vvvvvxu) +function vvvvvxu(add_php_batchmove_vvvvvxu) { // set the function logic - if (add_php_before_publish_vvvvvxu == 1) + if (add_php_batchmove_vvvvvxu == 1) { - jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); - // add required attribute to php_before_publish field + jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); + // add required attribute to php_batchmove field if (jform_vvvvvxuvxk_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_vvvvvxuvxk_required = false; } } else { - jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_publish field + jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide(); + // remove required attribute from php_batchmove field if (!jform_vvvvvxuvxk_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_vvvvvxuvxk_required = true; } } } // the vvvvvxv function -function vvvvvxv(add_php_after_publish_vvvvvxv) +function vvvvvxv(add_php_before_publish_vvvvvxv) { // set the function logic - if (add_php_after_publish_vvvvvxv == 1) + if (add_php_before_publish_vvvvvxv == 1) { - jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); - // add required attribute to php_after_publish field + jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); + // add required attribute to php_before_publish field if (jform_vvvvvxvvxl_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_vvvvvxvvxl_required = false; } } else { - jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_publish field + jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide(); + // remove required attribute from php_before_publish field if (!jform_vvvvvxvvxl_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_vvvvvxvvxl_required = true; } } } // the vvvvvxw function -function vvvvvxw(add_php_before_delete_vvvvvxw) +function vvvvvxw(add_php_after_publish_vvvvvxw) { // set the function logic - if (add_php_before_delete_vvvvvxw == 1) + if (add_php_after_publish_vvvvvxw == 1) { - jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); - // add required attribute to php_before_delete field + jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); + // add required attribute to php_after_publish field if (jform_vvvvvxwvxm_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_vvvvvxwvxm_required = false; } } else { - jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_delete field + jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide(); + // remove required attribute from php_after_publish field if (!jform_vvvvvxwvxm_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_vvvvvxwvxm_required = true; } } } // the vvvvvxx function -function vvvvvxx(add_php_after_delete_vvvvvxx) +function vvvvvxx(add_php_before_delete_vvvvvxx) { // set the function logic - if (add_php_after_delete_vvvvvxx == 1) + if (add_php_before_delete_vvvvvxx == 1) { - jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); - // add required attribute to php_after_delete field + jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); + // add required attribute to php_before_delete field if (jform_vvvvvxxvxn_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_vvvvvxxvxn_required = false; } } else { - jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_delete field + jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide(); + // remove required attribute from php_before_delete field if (!jform_vvvvvxxvxn_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_vvvvvxxvxn_required = true; } } } // the vvvvvxy function -function vvvvvxy(add_php_document_vvvvvxy) +function vvvvvxy(add_php_after_delete_vvvvvxy) { // set the function logic - if (add_php_document_vvvvvxy == 1) + if (add_php_after_delete_vvvvvxy == 1) { - jQuery('#jform_php_document-lbl').closest('.control-group').show(); - // add required attribute to php_document field + jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); + // add required attribute to php_after_delete field if (jform_vvvvvxyvxo_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_vvvvvxyvxo_required = false; } } else { - jQuery('#jform_php_document-lbl').closest('.control-group').hide(); - // remove required attribute from php_document field + jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide(); + // remove required attribute from php_after_delete field if (!jform_vvvvvxyvxo_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_vvvvvxyvxo_required = true; } } } // the vvvvvxz function -function vvvvvxz(add_sql_vvvvvxz) +function vvvvvxz(add_php_document_vvvvvxz) { // set the function logic - if (add_sql_vvvvvxz == 1) + if (add_php_document_vvvvvxz == 1) { - jQuery('#jform_source').closest('.control-group').show(); - // add required attribute to source field + jQuery('#jform_php_document-lbl').closest('.control-group').show(); + // add required attribute to php_document field if (jform_vvvvvxzvxp_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_vvvvvxzvxp_required = false; } } else { - jQuery('#jform_source').closest('.control-group').hide(); - // remove required attribute from source field + jQuery('#jform_php_document-lbl').closest('.control-group').hide(); + // remove required attribute from php_document field if (!jform_vvvvvxzvxp_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_vvvvvxzvxp_required = true; } } } // the vvvvvya function -function vvvvvya(source_vvvvvya,add_sql_vvvvvya) +function vvvvvya(add_sql_vvvvvya) { // set the function logic - if (source_vvvvvya == 2 && add_sql_vvvvvya == 1) + if (add_sql_vvvvvya == 1) + { + jQuery('#jform_source').closest('.control-group').show(); + // add required attribute to source field + if (jform_vvvvvyavxq_required) + { + updateFieldRequired('source',0); + jQuery('#jform_source').prop('required','required'); + jQuery('#jform_source').attr('aria-required',true); + jQuery('#jform_source').addClass('required'); + jform_vvvvvyavxq_required = false; + } + } + else + { + jQuery('#jform_source').closest('.control-group').hide(); + // remove required attribute from source field + if (!jform_vvvvvyavxq_required) + { + updateFieldRequired('source',1); + jQuery('#jform_source').removeAttr('required'); + jQuery('#jform_source').removeAttr('aria-required'); + jQuery('#jform_source').removeClass('required'); + jform_vvvvvyavxq_required = true; + } + } +} + +// the vvvvvyb function +function vvvvvyb(source_vvvvvyb,add_sql_vvvvvyb) +{ + // set the function logic + if (source_vvvvvyb == 2 && add_sql_vvvvvyb == 1) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field - if (jform_vvvvvyavxq_required) + if (jform_vvvvvybvxr_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvyavxq_required = false; + jform_vvvvvybvxr_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field - if (!jform_vvvvvyavxq_required) + if (!jform_vvvvvybvxr_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvyavxq_required = true; + jform_vvvvvybvxr_required = true; } } } -// the vvvvvyc function -function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) +// the vvvvvyd function +function vvvvvyd(source_vvvvvyd,add_sql_vvvvvyd) { // set the function logic - if (source_vvvvvyc == 1 && add_sql_vvvvvyc == 1) + if (source_vvvvvyd == 1 && add_sql_vvvvvyd == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -991,165 +1027,165 @@ function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) } } -// the vvvvvye function -function vvvvvye(add_custom_import_vvvvvye) +// the vvvvvyf function +function vvvvvyf(add_custom_import_vvvvvyf) { // set the function logic - if (add_custom_import_vvvvvye == 1) + if (add_custom_import_vvvvvyf == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field - if (jform_vvvvvyevxr_required) + if (jform_vvvvvyfvxs_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_vvvvvyevxr_required = false; + jform_vvvvvyfvxs_required = false; } jQuery('.note_advanced_import').closest('.control-group').show(); jQuery('#jform_php_import_display').closest('.control-group').show(); // add required attribute to php_import_display field - if (jform_vvvvvyevxs_required) + if (jform_vvvvvyfvxt_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_vvvvvyevxs_required = false; + jform_vvvvvyfvxt_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field - if (jform_vvvvvyevxt_required) + if (jform_vvvvvyfvxu_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_vvvvvyevxt_required = false; + jform_vvvvvyfvxu_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field - if (jform_vvvvvyevxu_required) + if (jform_vvvvvyfvxv_required) { updateFieldRequired('php_import_headers',0); jQuery('#jform_php_import_headers').prop('required','required'); jQuery('#jform_php_import_headers').attr('aria-required',true); jQuery('#jform_php_import_headers').addClass('required'); - jform_vvvvvyevxu_required = false; + jform_vvvvvyfvxv_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field - if (jform_vvvvvyevxv_required) + if (jform_vvvvvyfvxw_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_vvvvvyevxv_required = false; + jform_vvvvvyfvxw_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field - if (jform_vvvvvyevxw_required) + if (jform_vvvvvyfvxx_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_vvvvvyevxw_required = false; + jform_vvvvvyfvxx_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field - if (jform_vvvvvyevxx_required) + if (jform_vvvvvyfvxy_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_vvvvvyevxx_required = false; + jform_vvvvvyfvxy_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field - if (!jform_vvvvvyevxr_required) + if (!jform_vvvvvyfvxs_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_vvvvvyevxr_required = true; + jform_vvvvvyfvxs_required = true; } jQuery('.note_advanced_import').closest('.control-group').hide(); jQuery('#jform_php_import_display').closest('.control-group').hide(); // remove required attribute from php_import_display field - if (!jform_vvvvvyevxs_required) + if (!jform_vvvvvyfvxt_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_vvvvvyevxs_required = true; + jform_vvvvvyfvxt_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field - if (!jform_vvvvvyevxt_required) + if (!jform_vvvvvyfvxu_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_vvvvvyevxt_required = true; + jform_vvvvvyfvxu_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field - if (!jform_vvvvvyevxu_required) + if (!jform_vvvvvyfvxv_required) { updateFieldRequired('php_import_headers',1); jQuery('#jform_php_import_headers').removeAttr('required'); jQuery('#jform_php_import_headers').removeAttr('aria-required'); jQuery('#jform_php_import_headers').removeClass('required'); - jform_vvvvvyevxu_required = true; + jform_vvvvvyfvxv_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field - if (!jform_vvvvvyevxv_required) + if (!jform_vvvvvyfvxw_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_vvvvvyevxv_required = true; + jform_vvvvvyfvxw_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field - if (!jform_vvvvvyevxw_required) + if (!jform_vvvvvyfvxx_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_vvvvvyevxw_required = true; + jform_vvvvvyfvxx_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field - if (!jform_vvvvvyevxx_required) + if (!jform_vvvvvyfvxy_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_vvvvvyevxx_required = true; + jform_vvvvvyfvxy_required = true; } } } -// the vvvvvyf function -function vvvvvyf(add_custom_import_vvvvvyf) +// the vvvvvyg function +function vvvvvyg(add_custom_import_vvvvvyg) { // set the function logic - if (add_custom_import_vvvvvyf == 0) + if (add_custom_import_vvvvvyg == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -1159,52 +1195,52 @@ function vvvvvyf(add_custom_import_vvvvvyf) } } -// the vvvvvyg function -function vvvvvyg(add_custom_button_vvvvvyg) +// the vvvvvyh function +function vvvvvyh(add_custom_button_vvvvvyh) { // set the function logic - if (add_custom_button_vvvvvyg == 1) + if (add_custom_button_vvvvvyh == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); // add required attribute to php_controller field - if (jform_vvvvvygvxy_required) + if (jform_vvvvvyhvxz_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_vvvvvygvxy_required = false; + jform_vvvvvyhvxz_required = false; } jQuery('#jform_php_controller_list-lbl').closest('.control-group').show(); // add required attribute to php_controller_list field - if (jform_vvvvvygvxz_required) + if (jform_vvvvvyhvya_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_vvvvvygvxz_required = false; + jform_vvvvvyhvya_required = false; } jQuery('#jform_php_model-lbl').closest('.control-group').show(); // add required attribute to php_model field - if (jform_vvvvvygvya_required) + if (jform_vvvvvyhvyb_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_vvvvvygvya_required = false; + jform_vvvvvyhvyb_required = false; } jQuery('#jform_php_model_list-lbl').closest('.control-group').show(); // add required attribute to php_model_list field - if (jform_vvvvvygvyb_required) + if (jform_vvvvvyhvyc_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_vvvvvygvyb_required = false; + jform_vvvvvyhvyc_required = false; } } else @@ -1212,43 +1248,43 @@ function vvvvvyg(add_custom_button_vvvvvyg) jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); // remove required attribute from php_controller field - if (!jform_vvvvvygvxy_required) + if (!jform_vvvvvyhvxz_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_vvvvvygvxy_required = true; + jform_vvvvvyhvxz_required = true; } jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide(); // remove required attribute from php_controller_list field - if (!jform_vvvvvygvxz_required) + if (!jform_vvvvvyhvya_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_vvvvvygvxz_required = true; + jform_vvvvvyhvya_required = true; } jQuery('#jform_php_model-lbl').closest('.control-group').hide(); // remove required attribute from php_model field - if (!jform_vvvvvygvya_required) + if (!jform_vvvvvyhvyb_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_vvvvvygvya_required = true; + jform_vvvvvyhvyb_required = true; } jQuery('#jform_php_model_list-lbl').closest('.control-group').hide(); // remove required attribute from php_model_list field - if (!jform_vvvvvygvyb_required) + if (!jform_vvvvvyhvyc_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_vvvvvygvyb_required = true; + jform_vvvvvyhvyc_required = true; } } } diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 0b3278446..f140bd015 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -129,11 +129,11 @@ message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" /> - + @@ -207,11 +207,11 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION" directory="" /> - + @@ -265,6 +265,304 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION" directory="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + -