diff --git a/README.md b/README.md index 06bd9dc85..4d52cb65b 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.35) 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.36) 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,14 +146,14 @@ 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*: 4th August, 2019 -+ *Version*: 2.9.35 ++ *Last Build*: 8th August, 2019 ++ *Version*: 2.9.36 + *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*: **242379** -+ *Field count*: **1302** -+ *File count*: **1566** -+ *Folder count*: **240** ++ *Line count*: **245973** ++ *Field count*: **1319** ++ *File count*: **1594** ++ *Folder count*: **244** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index 06bd9dc85..4d52cb65b 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.35) 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.36) 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,14 +146,14 @@ 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*: 4th August, 2019 -+ *Version*: 2.9.35 ++ *Last Build*: 8th August, 2019 ++ *Version*: 2.9.36 + *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*: **242379** -+ *Field count*: **1302** -+ *File count*: **1566** -+ *Folder count*: **240** ++ *Line count*: **245973** ++ *Field count*: **1319** ++ *File count*: **1594** ++ *Folder count*: **244** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/access.xml b/admin/access.xml index d85296839..d6962a605 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -353,6 +353,16 @@ + + + + + + + + + + @@ -905,6 +915,17 @@
+
+ + + + + + + + + +
diff --git a/admin/assets/css/joomla_plugin_updates.css b/admin/assets/css/joomla_plugin_updates.css new file mode 100644 index 000000000..d24bb17e2 --- /dev/null +++ b/admin/assets/css/joomla_plugin_updates.css @@ -0,0 +1,15 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* CSS Document */ + + +.mysql_update { width: 100%; height: 392px; } +.version_url { min-width: 100%; } diff --git a/admin/assets/css/joomla_plugins_updates.css b/admin/assets/css/joomla_plugins_updates.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/joomla_plugins_updates.css @@ -0,0 +1,13 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* CSS Document */ + + diff --git a/admin/compiler/joomla_3/script.php b/admin/compiler/joomla_3/script.php index 9609154d4..e480f966b 100644 --- a/admin/compiler/joomla_3/script.php +++ b/admin/compiler/joomla_3/script.php @@ -5,7 +5,7 @@ * @created 30th April, 2015 * @author Llewellyn van der Merwe * @github Joomla Component Builder - * @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -25,21 +25,27 @@ JHTML::_('behavior.modal'); class com_###component###InstallerScript { /** - * method to install the component + * Constructor * - * @return void + * @param JAdapterInstance $parent The object responsible for running this script */ - function install($parent) - { - - } + public function __construct(JAdapterInstance $parent) {} /** - * method to uninstall the component + * Called on installation * - * @return void + * @param JAdapterInstance $parent The object responsible for running this script + * + * @return boolean True on success */ - function uninstall($parent) + public function install(JAdapterInstance $parent) {} + + /** + * Called on uninstallation + * + * @param JAdapterInstance $parent The object responsible for running this script + */ + public function uninstall(JAdapterInstance $parent) {###UNINSTALLSCRIPT### // little notice as after service, in case of bad experience with component. echo '

Did something go wrong? Are you disappointed?

@@ -50,62 +56,69 @@ class com_###component###InstallerScript } /** - * method to update the component + * Called on update * - * @return void + * @param JAdapterInstance $parent The object responsible for running this script + * + * @return boolean True on success */ - function update($parent) - { - - } + public function update(JAdapterInstance $parent){} /** - * method to run before an install/update/uninstall method + * Called before any type of action * - * @return void + * @param string $type Which action is happening (install|uninstall|discover_install|update) + * @param JAdapterInstance $parent The object responsible for running this script + * + * @return boolean True on success */ - function preflight($type, $parent) + public function preflight($type, JAdapterInstance $parent) { // get application $app = JFactory::getApplication(); - // is redundant ...hmmm - if ($type == 'uninstall') + // is redundant or so it seems ...hmmm let me know if it works again + if ($type === 'uninstall') { return true; } // the default for both install and update $jversion = new JVersion(); - if (!$jversion->isCompatible('3.6.0')) + if (!$jversion->isCompatible('3.8.0')) { - $app->enqueueMessage('Please upgrade to at least Joomla! 3.6.0 before continuing!', 'error'); + $app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error'); return false; } // do any updates needed - if ($type == 'update') + if ($type === 'update') {###PREUPDATESCRIPT### } // do any install needed - if ($type == 'install') + if ($type === 'install') {###PREINSTALLSCRIPT### } + return true; } /** - * method to run after an install/update/uninstall method + * Called after any type of action * - * @return void + * @param string $type Which action is happening (install|uninstall|discover_install|update) + * @param JAdapterInstance $parent The object responsible for running this script + * + * @return boolean True on success */ - function postflight($type, $parent) + public function postflight($type, JAdapterInstance $parent) { // get application $app = JFactory::getApplication();###MOVEFOLDERSSCRIPT### // set the default component settings - if ($type == 'install') + if ($type === 'install') {###POSTINSTALLSCRIPT### } // do any updates needed - if ($type == 'update') + if ($type === 'update') {###POSTUPDATESCRIPT### } + return true; }###MOVEFOLDERSMETHOD### } diff --git a/admin/compiler/joomla_3/vdm.php b/admin/compiler/joomla_3/vdm.php new file mode 100644 index 000000000..3c541e902 --- /dev/null +++ b/admin/compiler/joomla_3/vdm.php @@ -0,0 +1,32 @@ + + @my wife Roline van der Merwe + @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'); +?> +###BOM### + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +###VDM_ENCRYPTION_BODY### diff --git a/admin/controller.php b/admin/controller.php index 14943db18..b31cff972 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -131,6 +131,7 @@ class ComponentbuilderController extends JControllerLegacy 'library_files_folders_urls' => 'libraries_files_folders_urls', 'class_extends' => 'class_extendings', 'joomla_plugin_group' => 'joomla_plugin_groups', + 'joomla_plugin_updates' => 'joomla_plugins_updates', 'joomla_plugin_files_folders_urls' => 'joomla_plugins_files_folders_urls' ); // check if this is a list view diff --git a/admin/controllers/compiler.php b/admin/controllers/compiler.php index 720f41699..d096fe24f 100644 --- a/admin/controllers/compiler.php +++ b/admin/controllers/compiler.php @@ -77,9 +77,9 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin if (empty($redirect_url) && $componentId > 0) { $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false); - if (($pos = strpos($model->compiler->filepath, "/tmp/")) !== FALSE) + if (($pos = strpos($model->compiler->filepath['component'], "/tmp/")) !== FALSE) { - $url = JURI::root() . substr($model->compiler->filepath, $pos + 1); + $url = JURI::root() . substr($model->compiler->filepath['component'], $pos + 1); } // Message of successful build $message = '

The ('.$model->compiler->componentFolderName.') Was Successfully Compiled!

'; @@ -101,7 +101,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin $message .= '(if creating a folder and file took 5 seconds and writing one line of code took 10 seconds, with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)

'; $message .= '

Project duration: '.$model->compiler->projectWeekTime. ' weeks or '.$model->compiler->projectMonthTime.' months

'; $message .= '

Path to Zip File

'; - $message .= '

Path: '.$model->compiler->filepath.'
'; + $message .= '

Path: '.$model->compiler->filepath['component'].'
'; $message .= 'URL: '.$url.'

'; $message .= 'Hey! you can also download the file right now!
Download

'; $message .= '

Remember! This file is in your tmp folder and therefore publicly accessible untill you click [Clear tmp]!

'; diff --git a/admin/controllers/joomla_plugin.php b/admin/controllers/joomla_plugin.php index 9ed910e52..efea13c74 100644 --- a/admin/controllers/joomla_plugin.php +++ b/admin/controllers/joomla_plugin.php @@ -315,6 +315,32 @@ class ComponentbuilderControllerJoomla_plugin extends JControllerForm */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { + // get the state object (Joomla\CMS\Object\CMSObject) + $state = $model->get('state'); + // if we save2copy we need to also copy linked tables found! + if ($state->task === 'save2copy' && $state->{'joomla_plugin.new'}) + { + // get new ID + $newID = $state->{'joomla_plugin.id'}; + // get old ID + $oldID = $this->input->get('id', 0, 'INT'); + // linked tables to update + $_tablesArray = array( + 'joomla_plugin_updates' => 'joomla_plugin', + 'joomla_plugin_files_folders_urls' => 'joomla_plugin' + ); + foreach($_tablesArray as $_updateTable => $_key) + { + // get the linked ID + if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, $_key, 'id')) + { + // copy fields to new linked table + ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array($_key => $newID)); + } + } + } + + return; } diff --git a/admin/controllers/joomla_plugin_updates.php b/admin/controllers/joomla_plugin_updates.php new file mode 100644 index 000000000..210222991 --- /dev/null +++ b/admin/controllers/joomla_plugin_updates.php @@ -0,0 +1,339 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Joomla_plugin_updates Controller + */ +class ComponentbuilderControllerJoomla_plugin_updates extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + /** + * Class constructor. + * + * @param array $config A named array of configuration variables. + * + * @since 1.6 + */ + public function __construct($config = array()) + { + $this->view_list = 'Joomla_plugins_updates'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Get user object. + $user = JFactory::getUser(); + // Access check. + $access = $user->authorise('joomla_plugin_updates.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('joomla_plugin_updates.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('joomla_plugin_updates.access', 'com_componentbuilder.joomla_plugin_updates.' . (int) $recordId) && $user->authorise('joomla_plugin_updates.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('joomla_plugin_updates.edit', 'com_componentbuilder.joomla_plugin_updates.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('joomla_plugin_updates.edit.own', 'com_componentbuilder.joomla_plugin_updates.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('joomla_plugin_updates.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('joomla_plugin_updates.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 1.6 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + // get the referral options (old method use return instead see parent) + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // get redirect info. + $append = parent::getRedirectToItemAppend($recordId, $urlVar); + + // set the referral options + if ($refid && $ref) + { + $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + } + elseif ($ref) + { + $append = '&ref='. (string)$ref . $append; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Joomla_plugin_updates', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins_updates' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referral options + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + // Check if there is a return value + $return = $this->input->get('return', null, 'base64'); + + $cancel = parent::cancel($key); + + if (!is_null($return) && JUri::isInternal(base64_decode($return))) + { + $redirect = base64_decode($return); + + // Redirect to the return value. + $this->setRedirect( + JRoute::_( + $redirect, false + ) + ); + } + elseif ($this->refid && $this->ref) + { + $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referral options + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + // Check if there is a return value + $return = $this->input->get('return', null, 'base64'); + $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + + if ($this->ref || $this->refid || $canReturn) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + // This is not needed since parent save already does this + // Due to the ref and refid implementation we need to add this + if ($canReturn) + { + $redirect = base64_decode($return); + + // Redirect to the return value. + $this->setRedirect( + JRoute::_( + $redirect, false + ) + ); + } + elseif ($this->refid && $this->ref) + { + $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view=' . (string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + // update the component version to match the updated last version + if (isset($validData['joomla_plugin']) && is_numeric($validData['joomla_plugin']) && $validData['joomla_plugin'] > 0) + { + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $validData['joomla_plugin']; + if (isset($validData['version_update']) && ComponentbuilderHelper::checkArray($validData['version_update']) + && ($plugin_version = end($validData['version_update'])['version']) + && ComponentbuilderHelper::checkString($plugin_version)) + { + $objectUpdate->plugin_version = $plugin_version; + } + // be sure to update the table if we have a value + if (isset($objectUpdate->plugin_version)) + { + JFactory::getDbo()->updateObject('#__componentbuilder_joomla_plugin', $objectUpdate, 'id'); + } + } + + return; + } + +} diff --git a/admin/controllers/joomla_plugins_updates.php b/admin/controllers/joomla_plugins_updates.php new file mode 100644 index 000000000..4f00edceb --- /dev/null +++ b/admin/controllers/joomla_plugins_updates.php @@ -0,0 +1,43 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Joomla_plugins_updates Controller + */ +class ComponentbuilderControllerJoomla_plugins_updates extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES'; + + /** + * Method to get a model object, loading it if required. + * + * @param string $name The model name. Optional. + * @param string $prefix The class prefix. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JModelLegacy The model. + * + * @since 1.6 + */ + public function getModel($name = 'Joomla_plugin_updates', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } +} diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index 875c48061..59af27f51 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -35,7 +35,7 @@ class Compiler extends Infusion private $time_start; private $time_end; public $secondsCompiled; - public $filepath = ''; + public $filepath = array('component' => '', 'package' => '', 'plugins' => array(), 'modules' => array()); // fixed pathes protected $dynamicIntegration = false; protected $backupPath = false; @@ -61,6 +61,7 @@ class Compiler extends Infusion $this->backupPath = $this->params->get('backup_folder_path', $this->tempPath) . '/' . $this->componentBackupName . '.zip'; $this->dynamicIntegration = true; } + // set local repos switch if ($config['repository']) { $this->repoPath = $this->params->get('git_folder_path', null); @@ -125,12 +126,16 @@ class Compiler extends Infusion $this->setCountingStuff(); // build read me $this->buildReadMe(); + // set local repos + $this->setLocalRepos(); // zip the component if (!$this->zipComponent()) { // done with error return false; } + // if there are plugins zip them + $this->zipPlugins(); // do lang mismatch check if (ComponentbuilderHelper::checkArray($this->langMismatch)) { @@ -321,17 +326,37 @@ class Compiler extends Infusion */ protected function setUpdateServer() { - // move the update server to host - if ($this->componentData->add_update_server == 1 && $this->componentData->update_server_target == 1 && isset($this->updateServerFileName) && $this->dynamicIntegration) + // move the component update server to host + if ($this->componentData->add_update_server == 1 && $this->componentData->update_server_target == 1 + && isset($this->updateServerFileName) && $this->dynamicIntegration) { - $xml_update_server_path = $this->componentPath . '/' . $this->updateServerFileName . '.xml'; + $update_server_xml_path = $this->componentPath . '/' . $this->updateServerFileName . '.xml'; // make sure we have the correct file - if (JFile::exists($xml_update_server_path) && isset($this->componentData->update_server)) + if (JFile::exists($update_server_xml_path) && isset($this->componentData->update_server)) { // move to server - ComponentbuilderHelper::moveToServer($xml_update_server_path, $this->updateServerFileName . '.xml', (int) $this->componentData->update_server, $this->componentData->update_server_protocol); + ComponentbuilderHelper::moveToServer($update_server_xml_path, $this->updateServerFileName . '.xml', (int) $this->componentData->update_server, $this->componentData->update_server_protocol); // remove the local file - JFile::delete($xml_update_server_path); + JFile::delete($update_server_xml_path); + } + } + // move the plugins update server to host + if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins)) + { + foreach ($this->componentData->joomla_plugins as $plugin) + { + if (ComponentbuilderHelper::checkObject($plugin) + && isset($plugin->add_update_server) && $plugin->add_update_server == 1 + && isset($plugin->update_server_target) && $plugin->update_server_target == 1 + && isset($plugin->update_server) && is_numeric($plugin->update_server) && $plugin->update_server > 0 + && isset($plugin->update_server_xml_path) && JFile::exists($plugin->update_server_xml_path) + && isset($plugin->update_server_xml_file_name) && ComponentbuilderHelper::checkString($plugin->update_server_xml_file_name)) + { + // move to server + ComponentbuilderHelper::moveToServer($plugin->update_server_xml_path, $plugin->update_server_xml_file_name, (int) $plugin->update_server, $plugin->update_server_protocol); + // remove the local file + JFile::delete($plugin->update_server_xml_path); + } } } } @@ -472,10 +497,10 @@ class Compiler extends Infusion $this->fileContentStatic[$this->hhh . 'projectMonthTime' . $this->hhh] = $this->projectMonthTime; } - private function zipComponent() + private function setLocalRepos() { - // before we zip the component we first need to move it to the repo folder if set - if (ComponentbuilderHelper::checkString($this->repoPath)) + // move it to the repo folder if set + if (isset($this->repoPath) && ComponentbuilderHelper::checkString($this->repoPath)) { // set the repo path $repoFullPath = $this->repoPath . '/com_' . $this->componentData->sales_name . '__joomla_' . $this->joomlaVersion; @@ -487,21 +512,47 @@ class Compiler extends Infusion JFolder::copy($this->componentPath, $repoFullPath, '', true); // Trigger Event: jcb_ce_onAfterUpdateRepo $this->triggerEvent('jcb_ce_onAfterUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData)); + + // move the plugins to local folder repos + if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins)) + { + foreach ($this->componentData->joomla_plugins as $plugin) + { + if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->file_name)) + { + $plugin_context = 'plugin.' . $plugin->file_name . '.' . $plugin->id; + // set the repo path + $repoFullPath = $this->repoPath . '/' . $plugin->folder_name . '__joomla_' . $this->joomlaVersion; + // Trigger Event: jcb_ce_onBeforeUpdateRepo + $this->triggerEvent('jcb_ce_onBeforeUpdateRepo', array(&$plugin_context, &$plugin->folder_path, &$repoFullPath, &$plugin)); + // remove old data + $this->removeFolder($repoFullPath, $this->componentData->toignore); + // set the new data + JFolder::copy($plugin->folder_path, $repoFullPath, '', true); + // Trigger Event: jcb_ce_onAfterUpdateRepo + $this->triggerEvent('jcb_ce_onAfterUpdateRepo', array(&$plugin_context, &$plugin->folder_path, &$repoFullPath, &$plugin)); + } + } + } } + } + + private function zipComponent() + { // the name of the zip file to create - $this->filepath = $this->tempPath . '/' . $this->componentFolderName . '.zip'; + $this->filepath['component'] = $this->tempPath . '/' . $this->componentFolderName . '.zip'; // Trigger Event: jcb_ce_onBeforeZipComponent - $this->triggerEvent('jcb_ce_onBeforeZipComponent', array(&$this->componentContext, &$this->componentPath, &$this->filepath, &$this->tempPath, &$this->componentFolderName, &$this->componentData)); + $this->triggerEvent('jcb_ce_onBeforeZipComponent', array(&$this->componentContext, &$this->componentPath, &$this->filepath['component'], &$this->tempPath, &$this->componentFolderName, &$this->componentData)); //create the zip file - if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath)) + if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath['component'])) { // now move to backup if zip was made and backup is required if ($this->backupPath && $this->dynamicIntegration) { // Trigger Event: jcb_ce_onBeforeBackupZip - $this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->backupPath, &$this->componentData)); + $this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->backupPath, &$this->componentData)); // copy the zip to backup path - JFile::copy($this->filepath, $this->backupPath); + JFile::copy($this->filepath['component'], $this->backupPath); } // move to sales server host @@ -511,13 +562,13 @@ class Compiler extends Infusion if (isset($this->componentData->sales_server)) { // Trigger Event: jcb_ce_onBeforeMoveToServer - $this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentSalesName, &$this->componentData)); + $this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->componentSalesName, &$this->componentData)); // move to server - ComponentbuilderHelper::moveToServer($this->filepath, $this->componentSalesName . '.zip', (int) $this->componentData->sales_server, $this->componentData->sales_server_protocol); + ComponentbuilderHelper::moveToServer($this->filepath['component'], $this->componentSalesName . '.zip', (int) $this->componentData->sales_server, $this->componentData->sales_server_protocol); } } // Trigger Event: jcb_ce_onAfterZipComponent - $this->triggerEvent('jcb_ce_onAfterZipComponent', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentFolderName, &$this->componentData)); + $this->triggerEvent('jcb_ce_onAfterZipComponent', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->componentFolderName, &$this->componentData)); // remove the component folder since we are done if ($this->removeFolder($this->componentPath)) { @@ -527,6 +578,58 @@ class Compiler extends Infusion return false; } + private function zipPlugins() + { + if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins)) + { + foreach ($this->componentData->joomla_plugins as $plugin) + { + if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->zip_name) + && ComponentbuilderHelper::checkString($plugin->zip_name) + && isset($plugin->folder_path) + && ComponentbuilderHelper::checkString($plugin->folder_path)) + { + // set plugin context + $plugin_context = $plugin->file_name . '.' . $plugin->id; + // the name of the zip file to create + $this->filepath['plugins'][$plugin->id] = $this->tempPath . '/' . $plugin->zip_name . '.zip'; + // Trigger Event: jcb_ce_onBeforeZipPlugin + $this->triggerEvent('jcb_ce_onBeforeZipPlugin', array(&$plugin_context, &$plugin->folder_path, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$plugin->zip_name, &$plugin)); + //create the zip file + if (ComponentbuilderHelper::zip($plugin->folder_path, $this->filepath['plugins'][$plugin->id])) + { + // now move to backup if zip was made and backup is required + if ($this->backupPath) + { + $__plugin_context = 'plugin.' . $plugin_context; + // Trigger Event: jcb_ce_onBeforeBackupZip + $this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$__plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$this->backupPath, &$plugin)); + // copy the zip to backup path + JFile::copy($this->filepath['plugins'][$plugin->id], $this->backupPath); + } + + // move to sales server host + if ($plugin->add_sales_server == 1) + { + // make sure we have the correct file + if (isset($plugin->sales_server)) + { + // Trigger Event: jcb_ce_onBeforeMoveToServer + $this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$__plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$plugin->zip_name, &$plugin)); + // move to server + ComponentbuilderHelper::moveToServer($this->filepath['plugins'][$plugin->id], $plugin->zip_name . '.zip', (int) $plugin->sales_server, $plugin->sales_server_protocol); + } + } + // Trigger Event: jcb_ce_onAfterZipPlugin + $this->triggerEvent('jcb_ce_onAfterZipPlugin', array(&$plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$plugin->zip_name, &$plugin)); + // remove the plugin folder since we are done + $this->removeFolder($plugin->folder_path); + } + } + } + } + } + protected function addCustomCode() { // reset all these diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 396501f33..a2e07ff5c 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -18,6 +18,13 @@ defined('_JEXEC') or die('Restricted access'); class Get { + /** + * The Joomla Version + * + * @var string + */ + public $joomlaVersion; + /** * The hash placeholder * @@ -769,6 +776,8 @@ class Get } } } + // set the Joomla version + $this->joomlaVersion = $config['version']; // set the minfy switch of the JavaScript $this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0); // set the global language @@ -950,24 +959,24 @@ class Get { $code = base64_decode($code); } - // set component place holders - $bucket[$this->hhh . 'component' . $this->hhh] = $this->componentCodeName; - $bucket[$this->hhh . 'Component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentCodeName, 'F'); - $bucket[$this->hhh . 'COMPONENT' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentCodeName, 'U'); - $bucket[$this->bbb . 'component' . $this->ddd] = $bucket[$this->hhh . 'component' . $this->hhh]; - $bucket[$this->bbb . 'Component' . $this->ddd] = $bucket[$this->hhh . 'Component' . $this->hhh]; - $bucket[$this->bbb . 'COMPONENT' . $this->ddd] = $bucket[$this->hhh . 'COMPONENT' . $this->hhh]; - // get the current components overides - if (($_placeholders = ComponentbuilderHelper::getVar('component_placeholders', $this->componentID, 'joomla_component', 'addplaceholders')) !== false - && ComponentbuilderHelper::checkJson($_placeholders)) + } + // set component place holders + $bucket[$this->hhh . 'component' . $this->hhh] = $this->componentCodeName; + $bucket[$this->hhh . 'Component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentCodeName, 'F'); + $bucket[$this->hhh . 'COMPONENT' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentCodeName, 'U'); + $bucket[$this->bbb . 'component' . $this->ddd] = $bucket[$this->hhh . 'component' . $this->hhh]; + $bucket[$this->bbb . 'Component' . $this->ddd] = $bucket[$this->hhh . 'Component' . $this->hhh]; + $bucket[$this->bbb . 'COMPONENT' . $this->ddd] = $bucket[$this->hhh . 'COMPONENT' . $this->hhh]; + // get the current components overides + if (($_placeholders = ComponentbuilderHelper::getVar('component_placeholders', $this->componentID, 'joomla_component', 'addplaceholders')) !== false + && ComponentbuilderHelper::checkJson($_placeholders)) + { + $_placeholders = json_decode($_placeholders, true); + if (ComponentbuilderHelper::checkArray($_placeholders)) { - $_placeholders = json_decode($_placeholders, true); - if (ComponentbuilderHelper::checkArray($_placeholders)) + foreach($_placeholders as $row) { - foreach($_placeholders as $row) - { - $bucket[$row['target']] = $row['value']; - } + $bucket[$row['target']] = $row['value']; } } } @@ -6165,25 +6174,32 @@ class Get $query->select( $this->db->quoteName( array( - 'g.name', - 'e.name', - 'e.head', - 'e.comment', - 'e.id', - 'j.addfiles', - 'j.addfolders', - 'j.addfilesfullpath', - 'j.addfoldersfullpath' + 'g.name', + 'e.name', + 'e.head', + 'e.comment', + 'e.id', + 'f.addfiles', + 'f.addfolders', + 'f.addfilesfullpath', + 'f.addfoldersfullpath', + 'f.addurls', + 'u.version_update', + 'u.id' ), array( - 'group', - 'extends', - 'class_head', - 'comment', - 'class_id', - 'addfiles', - 'addfolders', - 'addfilesfullpath', - 'addfoldersfullpath' + 'group', + 'extends', + 'class_head', + 'comment', + 'class_id', + 'addfiles', + 'addfolders', + 'addfilesfullpath', + 'addfoldersfullpath', + 'addurls', + 'version_update', + 'version_update_id' + ) ) ); @@ -6191,7 +6207,8 @@ class Get $query->from('#__componentbuilder_joomla_plugin AS a'); $query->join('LEFT', $this->db->quoteName('#__componentbuilder_joomla_plugin_group', 'g') . ' ON (' . $this->db->quoteName('a.joomla_plugin_group') . ' = ' . $this->db->quoteName('g.id') . ')'); $query->join('LEFT', $this->db->quoteName('#__componentbuilder_class_extends', 'e') . ' ON (' . $this->db->quoteName('a.class_extends') . ' = ' . $this->db->quoteName('e.id') . ')'); - $query->join('LEFT', $this->db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls', 'j') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('j.joomla_plugin') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_joomla_plugin_updates', 'u') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('u.joomla_plugin') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls', 'f') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('f.joomla_plugin') . ')'); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); $query->where($this->db->quoteName('a.published') . ' >= 1'); $this->db->setQuery($query); @@ -6210,8 +6227,11 @@ class Get // update to point to plugin $this->target = $plugin->key; $this->lang = $plugin->key; - // set version - $plugin->version = '1.0.' . (int) $plugin->version; // (TODO) add versioning to plugin + // set version if not set + if (empty($plugin->plugin_version)) + { + $plugin->plugin_version = '1.0.0'; + } // set GUI mapper $guiMapper = array( 'table' => 'joomla_plugin', 'id' => (int) $id, 'type' => 'php'); // update the name if it has dynamic values @@ -6228,6 +6248,8 @@ class Get $plugin->installer_class_name = 'plg' . ucfirst($plugin->group) . ucfirst($plugin->name) . 'InstallerScript'; // set plugin folder name $plugin->folder_name = 'plg_' . strtolower($plugin->group) . '_' . strtolower($plugin->name); + // set the zip name + $plugin->zip_name = $plugin->folder_name . '_v' . str_replace('.', '_', $plugin->plugin_version). '__J' . $this->joomlaVersion; // set plugin file name $plugin->file_name = strtolower($plugin->name); // set official_name lang strings @@ -6242,7 +6264,7 @@ class Get $this->setLangContent($plugin->key, $plugin->lang_prefix . '_DESCRIPTION', $plugin->description); $plugin->description = '

' . $plugin->description . '

'; } - $plugin->xml_description = "

" . $plugin->official_name . " (v." . $plugin->version . ")

" . $plugin->description . "

Created by " . trim(JFilterOutput::cleanText($component->author)) . "
Development started " . JFactory::getDate($plugin->created)->format("jS F, Y") . "

"; + $plugin->xml_description = "

" . $plugin->official_name . " (v." . $plugin->plugin_version . ")

" . $plugin->description . "

Created by " . trim(JFilterOutput::cleanText($component->author)) . "
Development started " . JFactory::getDate($plugin->created)->format("jS F, Y") . "

"; // set xml discription $this->setLangContent($plugin->key, $plugin->lang_prefix . '_XML_DESCRIPTION', $plugin->xml_description); // update the readme if set @@ -6307,14 +6329,15 @@ class Get $plugin->fields = (isset($plugin->fields) && ComponentbuilderHelper::checkJson($plugin->fields)) ? json_decode($plugin->fields, true) : null; if (ComponentbuilderHelper::checkArray($plugin->fields)) { - $plugin->config_fields = array_map(function($field) use ($id){ + $key = $plugin->key; + $plugin->config_fields = array_map(function($field) use ($key){ // make sure the alias and title is 0 $field['alias'] = 0; $field['title'] = 0; // set the field details - $this->setFieldDetails($field, '_plugin_' . $id); + $this->setFieldDetails($field, $key); // set unique name counter - $this->setUniqueNameCounter($field['base_name'], '_plugins_' . $id); + $this->setUniqueNameCounter($field['base_name'], $key); // return field return $field; }, array_values($plugin->fields)); @@ -6323,7 +6346,7 @@ class Get foreach ($plugin->config_fields as $field) { // so first we lock the field name in - $this->getFieldName($field, '_plugins_' . $id); + $this->getFieldName($field, $plugin->key); } // unset original value unset($plugin->fields); @@ -6420,6 +6443,10 @@ class Get $plugin->{$server . '_protocol'} = 0; } } + // set the update server stuff (TODO) + // update_server_xml_path + // update_server_xml_file_name + // rest globals $this->target = $_backup_target; $this->lang = $_backup_lang; @@ -6447,10 +6474,11 @@ class Get $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'AUTHORWEBSITE' . $this->hhh . ''; $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'COPYRIGHT' . $this->hhh . ''; $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'LICENSE' . $this->hhh . ''; - $xml .= PHP_EOL . $this->_t(1) . '' . $plugin->version . ''; + $xml .= PHP_EOL . $this->_t(1) . '' . $plugin->plugin_version . ''; $xml .= PHP_EOL . $this->_t(1) . '' . $plugin->lang_prefix . '_XML_DESCRIPTION'; $xml .= $this->hhh . 'MAINXML' . $this->hhh; $xml .= PHP_EOL . ''; + $dates = array(); return $xml; } diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 4c9e155e8..c23fc8152 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -200,13 +200,6 @@ class Structure extends Get */ public $projectMonthTime = 0; - /** - * The Joomla Version - * - * @var string - */ - public $joomlaVersion; - /** * The template path * @@ -242,6 +235,13 @@ class Structure extends Get */ public $stdFolders = array('site', 'admin', 'media'); + /** + * The standard root files + * + * @var array + */ + public $stdRootFiles = array('access.xml', 'config.xml', 'controller.php', 'index.html', 'README.txt'); + /** * Dynamic File Content * @@ -341,6 +341,8 @@ class Structure extends Get // first we run the perent constructor if (parent::__construct($config)) { + // set the standard admin file + $this->stdRootFiles[] = $this->componentData->name_code . '.php'; // set incase no extra admin folder are loaded $this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FOLDERS' . $this->hhh] = ''; // set incase no extra site folder are loaded @@ -355,8 +357,6 @@ class Structure extends Get $this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FILES' . $this->hhh] = ''; // run global updater ComponentbuilderHelper::runGlobalUpdater(); - // set the Joomla version - $this->joomlaVersion = $config['version']; // set the template path $this->templatePath = $this->compilerPath . '/joomla_' . $config['version']; // set some default names @@ -430,7 +430,8 @@ class Structure extends Get $this->triggerEvent('jcb_ce_onBeforeSetPlugins', array(&$this->componentContext, &$this->componentData->joomla_plugins)); foreach ($this->componentData->joomla_plugins as $plugin) { - if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->folder_name) && ComponentbuilderHelper::checkString($plugin->folder_name)) + if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->folder_name) + && ComponentbuilderHelper::checkString($plugin->folder_name)) { // plugin path $plugin->folder_path = $this->compilerPath . '/' . $plugin->folder_name; @@ -447,13 +448,20 @@ class Structure extends Get $this->indexHTML($plugin->folder_name, $this->compilerPath); } // set main class file - $fileDetails = array('path' => $plugin->folder_path . '/' . $plugin->file_name . '.php', 'name' => $plugin->file_name . '.php', 'zip' => $plugin->file_name . '.php'); - $this->writeFile($fileDetails['path'], 'hhh . 'BOM' . $this->hhh . PHP_EOL . $this->hhh . 'MAINCLASS' . $this->hhh); + $fileDetails = array('path' => $plugin->folder_path . '/' . $plugin->file_name . '.php', + 'name' => $plugin->file_name . '.php', 'zip' => $plugin->file_name . '.php'); + $this->writeFile($fileDetails['path'], + 'hhh . 'BOM' . $this->hhh . PHP_EOL . + PHP_EOL . '// No direct access to this file' . PHP_EOL . + "defined('_JEXEC') or die('Restricted access');" . PHP_EOL . + $this->hhh . 'MAINCLASS' . $this->hhh); $this->newFiles[$plugin->key][] = $fileDetails; // count the file created $this->fileCount++; // set main xml file - $fileDetails = array('path' => $plugin->folder_path . '/' . $plugin->file_name . '.xml', 'name' => $plugin->file_name . '.xml', 'zip' => $plugin->file_name . '.xml'); + $fileDetails = array('path' => $plugin->folder_path . '/' . $plugin->file_name . '.xml', + 'name' => $plugin->file_name . '.xml', 'zip' => $plugin->file_name . '.xml'); $this->writeFile($fileDetails['path'], $this->getPluginXMLTemplate($plugin)); $this->newFiles[$plugin->key][] = $fileDetails; // count the file created @@ -461,8 +469,14 @@ class Structure extends Get // set install script if needed if ($plugin->add_install_script) { - $fileDetails = array('path' => $plugin->folder_path . '/script.php', 'name' => 'script.php', 'zip' => 'script.php'); - $this->writeFile($fileDetails['path'], 'hhh . 'BOM' . $this->hhh . PHP_EOL . $this->hhh . 'INSTALLCLASS' . $this->hhh); + $fileDetails = array('path' => $plugin->folder_path . '/script.php', + 'name' => 'script.php', 'zip' => 'script.php'); + $this->writeFile($fileDetails['path'], + 'hhh . 'BOM' . $this->hhh . PHP_EOL . + PHP_EOL . '// No direct access to this file' . PHP_EOL . + "defined('_JEXEC') or die('Restricted access');" . PHP_EOL . + $this->hhh . 'INSTALLCLASS' . $this->hhh); $this->newFiles[$plugin->key][] = $fileDetails; // count the file created $this->fileCount++; @@ -470,7 +484,8 @@ class Structure extends Get // set readme if found if ($plugin->addreadme) { - $fileDetails = array('path' => $plugin->folder_path . '/README.md', 'name' => 'README.md', 'zip' => 'README.md'); + $fileDetails = array('path' => $plugin->folder_path . '/README.md', + 'name' => 'README.md', 'zip' => 'README.md'); $this->writeFile($fileDetails['path'], $plugin->readme); $this->newFiles[$plugin->key][] = $fileDetails; // count the file created @@ -555,7 +570,8 @@ class Structure extends Get foreach ($plugin->urls as $n => &$url) { // should we add the local folder - if (isset($url['type']) && $url['type'] > 1 && isset($url['url']) && ComponentbuilderHelper::checkString($url['url'])) + if (isset($url['type']) && $url['type'] > 1 && isset($url['url']) + && ComponentbuilderHelper::checkString($url['url'])) { // set file name $fileName = basename($url['url']); @@ -1016,7 +1032,7 @@ class Structure extends Get { continue; } - // check if we have a target value set + // check if we have a target value if (isset($details->_target)) { // set destination path @@ -1094,14 +1110,15 @@ class Structure extends Get $this->folderCount++; } } - // only add if no target found + // only add if no target found since those belong to plugins and modules if (!isset($details->_target)) { // check if we should add the dynamic folder moving script to the installer script $checker = array_values((array) explode('/', $zipFullPath)); // TODO <-- this may not be the best way, will keep an eye on this. // We basicly only want to check if a folder is added that is not in the stdFolders array - if (isset($checker[0]) && ComponentbuilderHelper::checkString($checker[0]) && !in_array($checker[0], $this->stdFolders)) + if (isset($checker[0]) && ComponentbuilderHelper::checkString($checker[0]) + && !in_array($checker[0], $this->stdFolders)) { // check if we should add the dynamic folder moving script to the installer script if (!$this->setMoveFolders) @@ -1113,24 +1130,41 @@ class Structure extends Get $this->app->enqueueMessage(JText::sprintf('A method (setDynamicF0ld3rs) was added to the install script.php of this package to insure that the folder/s are copied into the correct place when this componet is installed!'), 'Notice'); } } - elseif (count($checker) == 2 && ComponentbuilderHelper::checkString($checker[0]) && in_array($checker[0], $this->stdFolders)) + elseif (count($checker) == 2 && ComponentbuilderHelper::checkString($checker[0])) { + $add_to_extra = false; // set the target $eNAME = 'FILES'; $ename = 'filename'; + // this should not happen and must have been caught by the above if statment if ($details->type === 'folder') { - $eNAME = 'FOLDERS'; - $ename = 'folder'; + // only folders outside the standard folder are added + if (!in_array($checker[0], $this->stdFolders)) + { + $eNAME = 'FOLDERS'; + $ename = 'folder'; + $add_to_extra = true; + } } - // set the tab - $eTab = $this->_t(2); - if ('admin' === $checker[0]) + // if this is a file, it can only be added to the admin/site/media folders + // all other folders are moved as a whole so their files do not need to be declared + elseif (in_array($checker[0], $this->stdFolders) && !in_array($checker[1], $this->stdRootFiles)) { - $eTab = $this->_t(3); + $add_to_extra = true; + } + // add if valid folder/file + if ($add_to_extra) + { + // set the tab + $eTab = $this->_t(2); + if ('admin' === $checker[0]) + { + $eTab = $this->_t(3); + } + // set the xml file + $this->fileContentStatic[$this->hhh . 'EXSTRA_' . ComponentbuilderHelper::safeString($checker[0], 'U') . '_' . $eNAME . $this->hhh] .= PHP_EOL . $eTab . "<" . $ename . ">" . $checker[1] . ""; } - // set the xml file - $this->fileContentStatic[$this->hhh . 'EXSTRA_' . ComponentbuilderHelper::safeString($checker[0], 'U') . '_' . $eNAME . $this->hhh] .= PHP_EOL . $eTab . "<" . $ename . ">" . $checker[1] . ""; } } } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b0d7de3ba..8fc70e878 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -5218,7 +5218,7 @@ class Interpretation extends Fields $script[] = $this->_t(2) . "\$folders = JFolder::folders(\$installPath);"; $script[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if we have folders we may want to copy"; $script[] = $this->_t(2) . "\$doNotCopy = array('media','admin','site'); // Joomla already deals with these"; - $script[] = $this->_t(2) . "if (count(\$folders) > 1)"; + $script[] = $this->_t(2) . "if (count((array) \$folders) > 1)"; $script[] = $this->_t(2) . "{"; $script[] = $this->_t(3) . "foreach (\$folders as \$folder)"; $script[] = $this->_t(3) . "{"; @@ -10807,7 +10807,7 @@ class Interpretation extends Fields $function[] = $this->_t(2) . "\$query->from(\$db->quoteName('" . $filter['custom']['table'] . "', 'a'));"; $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " get the targeted groups"; $function[] = $this->_t(2) . "\$groups= JComponentHelper::getParams('com_" . $component . "')->get('" . $filter['type'] . "');"; - $function[] = $this->_t(2) . "if (count(\$groups) > 0)"; + $function[] = $this->_t(2) . "if (!empty(\$groups) && count((array) \$groups) > 0)"; $function[] = $this->_t(2) . "{"; $function[] = $this->_t(3) . "\$query->join('LEFT', \$db->quoteName('#__user_usergroup_map', 'group') . ' ON (' . \$db->quoteName('group.user_id') . ' = ' . \$db->quoteName('a.id') . ')');"; $function[] = $this->_t(3) . "\$query->where('group.group_id IN (' . implode(',', \$groups) . ')');"; @@ -16321,28 +16321,31 @@ function vdm_dkim() { $xml = ''; // build the config fields $config_field = ''; - foreach ($plugin->config_fields as $field) + if (isset($plugin->config_fields) && ComponentbuilderHelper::checkArray($plugin->config_fields)) { - // check the field builder type - if ($this->fieldBuilderType == 1) + foreach ($plugin->config_fields as $field) { - // string manipulation - $xmlField = $this->setDynamicField($field, $view, $viewType, $plugin->lang_prefix, $plugin->key, $plugin->key, $this->globalPlaceholders, $dbkey, false); - } - else - { - // simpleXMLElement class - $newxmlField = $this->setDynamicField($field, $view, $viewType, $plugin->lang_prefix, $plugin->key, $plugin->key, $this->globalPlaceholders, $dbkey, false); - if (isset($newxmlField->fieldXML)) + // check the field builder type + if ($this->fieldBuilderType == 1) { - $xmlField = dom_import_simplexml($newxmlField->fieldXML); - $xmlField = PHP_EOL . $this->_t(2) . "' . PHP_EOL . $this->_t(1) . $this->xmlPrettyPrint($xmlField, 'field'); + // string manipulation + $xmlField = $this->setDynamicField($field, $view, $viewType, $plugin->lang_prefix, $plugin->key, $plugin->key, $this->globalPlaceholders, $dbkey, false); + } + else + { + // simpleXMLElement class + $newxmlField = $this->setDynamicField($field, $view, $viewType, $plugin->lang_prefix, $plugin->key, $plugin->key, $this->globalPlaceholders, $dbkey, false); + if (isset($newxmlField->fieldXML)) + { + $xmlField = dom_import_simplexml($newxmlField->fieldXML); + $xmlField = PHP_EOL . $this->_t(2) . "' . PHP_EOL . $this->_t(1) . $this->xmlPrettyPrint($xmlField, 'field'); + } + } + // make sure the xml is set and a string + if (isset($xmlField) && ComponentbuilderHelper::checkString($xmlField)) + { + $config_field .= $xmlField; } - } - // make sure the xml is set and a string - if (isset($xmlField) && ComponentbuilderHelper::checkString($xmlField)) - { - $config_field .= $xmlField; } } // switch to add the xml @@ -16474,27 +16477,167 @@ function vdm_dkim() { { // yes we are adding it $script = PHP_EOL . '/**'; - $script .= PHP_EOL . ' * ' . $plugin->name . ' script file.'; + $script .= PHP_EOL . ' * ' . $plugin->official_name . ' script file.'; $script .= PHP_EOL . ' *'; $script .= PHP_EOL . ' * @package ' . $plugin->class_name; $script .= PHP_EOL . ' */'; $script .= PHP_EOL . 'class ' . $plugin->installer_class_name; $script .= PHP_EOL . '{'; + // set constructor + if (isset($plugin->add_php_script_construct) + && $plugin->add_php_script_construct == 1 + && ComponentbuilderHelper::checkString($plugin->php_script_construct)) + { + $script .= $this->setInstallMethodScript('construct', $plugin->php_script_construct); + } // add PHP in plugin install $addScriptMethods = array('php_preflight', 'php_postflight', 'php_method'); - $addScriptTypes = array('install', 'update', 'uninstall'); + $addScriptTypes = array('install', 'update', 'uninstall', 'discover_install'); + // set some buckets for sorting + $function_install = array(); + $function_update = array(); + $function_uninstall = array(); + $has_php_preflight = false; + $function_php_preflight = array('install' => array(), 'uninstall' => array(), 'discover_install' => array(), 'update' => array()); + $has_php_postflight = false; + $function_php_postflight = array('install' => array(), 'uninstall' => array(), 'discover_install' => array(), 'update' => array()); + // the function sorter foreach ($addScriptMethods as $scriptMethod) { foreach ($addScriptTypes as $scriptType) { - if (isset($plugin->{'add_' . $scriptMethod . '_' . $scriptType}) && $plugin->{'add_' . $scriptMethod . '_' . $scriptType} == 1 && ComponentbuilderHelper::checkString($plugin->{$scriptMethod . '_' . $scriptType})) + if (isset($plugin->{'add_' . $scriptMethod . '_' . $scriptType}) + && $plugin->{'add_' . $scriptMethod . '_' . $scriptType} == 1 + && ComponentbuilderHelper::checkString($plugin->{$scriptMethod . '_' . $scriptType})) { - // (TODO) must still finish - $script .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' This part of the new plugin area is not ready yet, soon!'; + // add to the main methods + if ('php_method' === $scriptMethod) + { + ${'function_' . $scriptType}[] = $plugin->{$scriptMethod . '_' . $scriptType}; + } + else + { + ${'function_' . $scriptMethod}[$scriptType][] = $plugin->{$scriptMethod . '_' . $scriptType}; + ${'has_' . $scriptMethod} = true; + } } } } + // now add the install script. + if (ComponentbuilderHelper::checkArray($function_install)) + { + $script .= $this->setInstallMethodScript('install', $function_install); + } + // now add the update script. + if (ComponentbuilderHelper::checkArray($function_update)) + { + $script .= $this->setInstallMethodScript('update', $function_update); + } + // now add the uninstall script. + if (ComponentbuilderHelper::checkArray($function_uninstall)) + { + $script .= $this->setInstallMethodScript('uninstall', $function_uninstall); + } + // now add the preflight script. + if ($has_php_preflight) + { + $script .= $this->setInstallMethodScript('preflight', $function_php_preflight); + } + // now add the postflight script. + if ($has_php_postflight) + { + $script .= $this->setInstallMethodScript('postflight', $function_php_postflight); + } $script .= PHP_EOL . '}' . PHP_EOL; + + return $script; + } + + protected function setInstallMethodScript($function_name, &$scripts) + { + $script = ''; + // build function + switch($function_name) + { + case 'install': + case 'update': + case 'uninstall': + // the main function types + $script = PHP_EOL . PHP_EOL . $this->_t(1) .'/**'; + $script .= PHP_EOL . $this->_t(1) .' * Called on ' . $function_name; + $script .= PHP_EOL . $this->_t(1) .' *'; + $script .= PHP_EOL . $this->_t(1) .' * @param JAdapterInstance $adapter The object responsible for running this script'; + $script .= PHP_EOL . $this->_t(1) .' *'; + $script .= PHP_EOL . $this->_t(1) .' * @return boolean True on success'; + $script .= PHP_EOL . $this->_t(1) .' */'; + $script .= PHP_EOL . $this->_t(1) .'public function ' . $function_name . '(JAdapterInstance $adapter)'; + $script .= PHP_EOL . $this->_t(1) .'{'; + $script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $scripts); + // return true + if ('uninstall' !== $function_name) + { + $script .= PHP_EOL . $this->_t(2) . 'return true;'; + } + break; + case 'preflight': + case 'postflight': + // the pre/post function types + $script = PHP_EOL . PHP_EOL . $this->_t(1) .'/**'; + $script .= PHP_EOL . $this->_t(1) .' * Called before any type of action'; + $script .= PHP_EOL . $this->_t(1) .' *'; + $script .= PHP_EOL . $this->_t(1) .' * @param string $route Which action is happening (install|uninstall|discover_install|update)'; + $script .= PHP_EOL . $this->_t(1) .' * @param JAdapterInstance $adapter The object responsible for running this script'; + $script .= PHP_EOL . $this->_t(1) .' *'; + $script .= PHP_EOL . $this->_t(1) .' * @return boolean True on success'; + $script .= PHP_EOL . $this->_t(1) .' */'; + $script .= PHP_EOL . $this->_t(1) .'public function ' . $function_name . '($route, JAdapterInstance $adapter)'; + $script .= PHP_EOL . $this->_t(1) .'{'; + $script .= PHP_EOL . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' get application'; + $script .= PHP_EOL . $this->_t(2) . '$app = JFactory::getApplication();' . PHP_EOL; + // add the default version check (TODO) must make this dynamic + if ('preflight' === $function_name) + { + $script .= PHP_EOL . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' the default for both install and update'; + $script .= PHP_EOL . $this->_t(2) . '$jversion = new JVersion();'; + $script .= PHP_EOL . $this->_t(2) . "if (!\$jversion->isCompatible('3.8.0'))"; + $script .= PHP_EOL . $this->_t(2) . '{'; + $script .= PHP_EOL . $this->_t(3) . "\$app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');"; + $script .= PHP_EOL . $this->_t(3) . 'return false;'; + $script .= PHP_EOL . $this->_t(2) . '}' . PHP_EOL; + } + // now add the scripts + foreach ($scripts as $route => $_script) + { + if (ComponentbuilderHelper::checkArray($_script)) + { + // set the if and script + $script .= PHP_EOL . $this->_t(2) . "if ('" . $route . "' === \$route)"; + $script .= PHP_EOL . $this->_t(2) . '{'; + $script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $_script); + $script .= PHP_EOL . $this->_t(2) . '}' . PHP_EOL; + } + } + // return true + $script .= PHP_EOL . $this->_t(2) . 'return true;'; + break; + case 'construct': + // the __construct script + $script = PHP_EOL . PHP_EOL . $this->_t(1) .'/**'; + $script .= PHP_EOL . $this->_t(1) .' * Constructor'; + $script .= PHP_EOL . $this->_t(1) .' *'; + $script .= PHP_EOL . $this->_t(1) .' * @param JAdapterInstance $adapter The object responsible for running this script'; + $script .= PHP_EOL . $this->_t(1) .' */'; + $script .= PHP_EOL . $this->_t(1) .'public function __construct(JAdapterInstance $adapter)'; + $script .= PHP_EOL . $this->_t(1) .'{'; + $script .= PHP_EOL . $scripts; + break; + default: + // oops error + return ''; + } + // close the function + $script .= PHP_EOL . $this->_t(1) . '}'; + return $script; } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index e7f5aa4ca..32d568c9d 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1032,9 +1032,6 @@ class Infusion extends Interpretation $this->fileContentStatic[$this->hhh . 'README' . $this->hhh] = $this->componentData->readme; } - // Trigger Event: jcb_ce_onAfterBuildFilesContent - $this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));// Trigger Event: jcb_ce_onBeforeSetPlugins - // infuze plugin data if set if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins)) { @@ -1056,6 +1053,9 @@ class Infusion extends Interpretation } } + // Trigger Event: jcb_ce_onAfterBuildFilesContent + $this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); + return true; } return false; diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index a07f56a6d..557aa45a1 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -5944,6 +5944,46 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_UNPUBLISHED="%s Joomla Plugins unpub COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_UNPUBLISHED_1="%s Joomla Plugin unpublished." COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU="Joomla Plugins Submenu" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU_DESC="Allows the users in this group to submenu of joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES="Joomla Plugins Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS="Joomla Plugins Updates Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS_DESC="Allows the users in this group to access access joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_OPTIONS="Batch process the selected Joomla Plugins Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_TIP="All changes will be applied to all selected Joomla Plugins Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE="Joomla Plugins Updates Batch Use" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE="Joomla Plugins Updates Create" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE_DESC="Allows the users in this group to create create joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE="Joomla Plugins Updates Delete" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE_DESC="Allows the users in this group to delete delete joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT="Joomla Plugins Updates Edit" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY="Joomla Plugins Updates Edit Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE="Joomla Plugins Updates Edit Created Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_DESC="Allows the users in this group to edit the joomla plugin updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN="Joomla Plugins Updates Edit Own" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins updates created by them" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE="Joomla Plugins Updates Edit State" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION="Joomla Plugins Updates Edit Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_ARCHIVED="%s Joomla Plugins Updates archived." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_ARCHIVED_1="%s Joomla Plugin Updates archived." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_CHECKED_IN_0="No Joomla Plugin Updates successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_CHECKED_IN_1="%d Joomla Plugin Updates successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_CHECKED_IN_MORE="%d Joomla Plugins Updates successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_DELETED="%s Joomla Plugins Updates deleted." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_DELETED_1="%s Joomla Plugin Updates deleted." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_FEATURED="%s Joomla Plugins Updates featured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_FEATURED_1="%s Joomla Plugin Updates featured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_PUBLISHED="%s Joomla Plugins Updates published." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_PUBLISHED_1="%s Joomla Plugin Updates published." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_TRASHED="%s Joomla Plugins Updates trashed." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_TRASHED_1="%s Joomla Plugin Updates trashed." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNFEATURED="%s Joomla Plugins Updates unfeatured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNFEATURED_1="%s Joomla Plugin Updates unfeatured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNPUBLISHED="%s Joomla Plugins Updates unpublished." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Joomla Plugin Updates unpublished." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDREADME="Addreadme" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDREADME_LABEL="Add README" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD="Add Head" @@ -5961,6 +6001,8 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_PREFLIGHT_UNINSTALL="Add Php Prefligh COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_PREFLIGHT_UNINSTALL_LABEL="Add PHP Preflight (uninstall)" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_PREFLIGHT_UPDATE="Add Php Preflight Update" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_PREFLIGHT_UPDATE_LABEL="Add PHP Preflight (update)" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_SCRIPT_CONSTRUCT="Add Php Script Construct" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_SCRIPT_CONSTRUCT_LABEL="Add PHP Script Construct" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_SALES_SERVER="Add Sales Server" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_SALES_SERVER_LABEL="Add Sales Server" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_SQL="Add Sql" @@ -5980,6 +6022,10 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_DATE_LABEL="Created Date" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CUSTOM_VALUE_DESCRIPTION="Enter custom value if needed" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CUSTOM_VALUE_HINT="Custom Value Here" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CUSTOM_VALUE_LABEL="Custom Value" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION="Description" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION_HINT="Add Description Here" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DYNAMIC_INTEGRATION="Dynamic Integration" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT="Editing the Joomla Plugin" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ERROR_UNIQUE_ALIAS="Another Joomla Plugin has the same alias." @@ -6188,8 +6234,6 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_LABEL="Name" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NEW="A New Joomla Plugin" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NO="No" -COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_BETA_STAGE_DESCRIPTION="This area is still in beta, and is not ready for use. Things may work, but they are not wired up to the back-end/compiler. You are already seeing it since JCB is being developed in a reverse motion of front-end/GUI to back-end/Compiler approach. We first build the GUI... and then the Back-end, which is not normally how it is done, or so I was told.... But anyway that is how JCB is being build, we get the idea, look at all the relationships and build the tables, and columns, which then map to views and fields (GUI), we then build the functions in the compiler to act upon these new data-sets, and whammm the full functionality/idea becomes stable and ready. So in due time this area will become available for your use, and then this message will go away! (or the whole area will just disappear if it does not work out :)" -COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_BETA_STAGE_LABEL="Beta Stage" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_LINKED_TO_NOTICE_DESCRIPTION="
Searching the database.
" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_PLUGIN_DESCRIPTION="

So over here you are able to manually code your plugin methods which usually will be the event name you are targeting.

We have also added some methods via the boilerplate repo that can serve as a starting point, simple select them and it will be added to your code.

If you have added any fields in the Config/Params tab, these fields will be available to you in the $this->params object, and can be accessed via the field name $this->params->get('fieldname'); with the get method.

" @@ -6222,6 +6266,14 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_PREFLIGHT_UNINSTALL_LABEL="PHP Preflight COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_PREFLIGHT_UPDATE="Php Preflight Update" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_PREFLIGHT_UPDATE_DESCRIPTION="PHP script that should run preflight during update." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_PREFLIGHT_UPDATE_LABEL="PHP Preflight (update)" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_SCRIPT_CONSTRUCT="Php Script Construct" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_SCRIPT_CONSTRUCT_DESCRIPTION="PHP script that should run in __construct of script." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_SCRIPT_CONSTRUCT_LABEL="PHP Script Construct" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION="Plugin Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_DESCRIPTION="Add Version Number Here" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_HINT="1.0.0" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_LABEL="Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_MESSAGE="Error! Please add version here." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS="Joomla Plugin Properties Button Access" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the properties button." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY="Property" @@ -6254,6 +6306,42 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_DESCRIPTION="Used only in the sys COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_HINT="The System Name Here" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_LABEL="System Name" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_MESSAGE="Error! Please add some text here." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES="Joomla Plugin Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_CREATED_BY_DESC="The user that created this Joomla Plugin Updates." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_CREATED_DATE_DESC="The date this Joomla Plugin Updates was created." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_EDIT="Editing the Joomla Plugin Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_ERROR_UNIQUE_ALIAS="Another Joomla Plugin Updates has the same alias." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_ID="Id" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_JOOMLA_PLUGIN="Joomla Plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_JOOMLA_PLUGIN_LABEL="Joomla Plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MODIFIED_BY_DESC="The last user that modified this Joomla Plugin Updates." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MODIFIED_DATE_DESC="The date this Joomla Plugin Updates was modified." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_DESCRIPTION="Update Dump" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_HINT="// MySQL for update or blank for none" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_LABEL="MySQL" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_NEW="A New Joomla Plugin Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_PERMISSION="Permissions" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Plugin Updates to customise the alias." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_STATUS="Status" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_UPDATES="Updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_URL_DESCRIPTION="Enter Download Link" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_URL_HINT="http://www.example.com/file.zip" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_URL_LABEL="Version URL" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_URL_MESSAGE="Error! Please add url here." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_DESC="A count of the number of times this Joomla Plugin Updates has been revised." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_DESCRIPTION="1.0.0" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_HINT="1.0.0" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_MESSAGE="Error! Please add some text here." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE="Version Update" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE_LABEL="Version Updates" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATE_SERVER="Update Server" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATE_SERVER_DESCRIPTION="Select your update server for this component." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATE_SERVER_LABEL="Update Server" @@ -8190,6 +8278,7 @@ COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: %s" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s" COM_COMPONENTBUILDER_THE_PLUGIN_FILES_FOLDERS="The plugin files & folders" +COM_COMPONENTBUILDER_THE_PLUGIN_UPDATES="The plugin updates" COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for %s server!" COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for %s server!" COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading" diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index 4dcfe0b80..82b14321e 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -682,6 +682,26 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION="Joomla Plug COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins files folders urls" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU="Joomla Plugins Submenu" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU_DESC="Allows the users in this group to submenu of joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS="Joomla Plugins Updates Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS_DESC="Allows the users in this group to access access joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE="Joomla Plugins Updates Batch Use" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE="Joomla Plugins Updates Create" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE_DESC="Allows the users in this group to create create joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE="Joomla Plugins Updates Delete" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE_DESC="Allows the users in this group to delete delete joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT="Joomla Plugins Updates Edit" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY="Joomla Plugins Updates Edit Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE="Joomla Plugins Updates Edit Created Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_DESC="Allows the users in this group to edit the joomla plugin updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN="Joomla Plugins Updates Edit Own" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins updates created by them" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE="Joomla Plugins Updates Edit State" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin updates" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION="Joomla Plugins Updates Edit Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins updates" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS="Joomla Plugin Get Boilerplate Button Access" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the get boilerplate button." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS="Joomla Plugin Groups Access" diff --git a/admin/layouts/joomla_plugin/code_above.php b/admin/layouts/joomla_plugin/code_above.php index 0b9969524..09a20fa91 100644 --- a/admin/layouts/joomla_plugin/code_above.php +++ b/admin/layouts/joomla_plugin/code_above.php @@ -26,7 +26,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( - 'system_name' + 'system_name', + 'plugin_version' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/joomla_plugin/code_left.php b/admin/layouts/joomla_plugin/code_left.php index 0b949db63..288731f37 100644 --- a/admin/layouts/joomla_plugin/code_left.php +++ b/admin/layouts/joomla_plugin/code_left.php @@ -26,8 +26,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( - 'note_beta_stage', 'name', + 'description', 'class_extends', 'joomla_plugin_group', 'add_head', diff --git a/admin/layouts/joomla_plugin/script_file_fullwidth.php b/admin/layouts/joomla_plugin/script_file_fullwidth.php index 0b13cdc2b..caacca282 100644 --- a/admin/layouts/joomla_plugin/script_file_fullwidth.php +++ b/admin/layouts/joomla_plugin/script_file_fullwidth.php @@ -26,6 +26,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'add_php_script_construct', + 'php_script_construct', 'add_php_preflight_install', 'php_preflight_install', 'add_php_preflight_update', diff --git a/admin/layouts/joomla_plugin_updates/index.html b/admin/layouts/joomla_plugin_updates/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/joomla_plugin_updates/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/joomla_plugin_updates/publishing.php b/admin/layouts/joomla_plugin_updates/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/joomla_plugin_updates/publishing.php @@ -0,0 +1,45 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/joomla_plugin_updates/publlshing.php b/admin/layouts/joomla_plugin_updates/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/joomla_plugin_updates/publlshing.php @@ -0,0 +1,47 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/joomla_plugin_updates/updates_above.php b/admin/layouts/joomla_plugin_updates/updates_above.php new file mode 100644 index 000000000..a5b493763 --- /dev/null +++ b/admin/layouts/joomla_plugin_updates/updates_above.php @@ -0,0 +1,44 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'joomla_plugin' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/joomla_plugin_updates/updates_fullwidth.php b/admin/layouts/joomla_plugin_updates/updates_fullwidth.php new file mode 100644 index 000000000..37710d615 --- /dev/null +++ b/admin/layouts/joomla_plugin_updates/updates_fullwidth.php @@ -0,0 +1,44 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'version_update' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 350c71771..c8eae8d62 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -194,6 +194,9 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'class_extends.access' => 'class_extends.access', 'joomla_plugin_groups.access' => 'joomla_plugin_group.access', 'joomla_plugin_group.access' => 'joomla_plugin_group.access', + 'joomla_plugin_updates.create' => 'joomla_plugin_updates.create', + 'joomla_plugins_updates.access' => 'joomla_plugin_updates.access', + 'joomla_plugin_updates.access' => 'joomla_plugin_updates.access', 'joomla_plugin_files_folders_urls.create' => 'joomla_plugin_files_folders_urls.create', 'joomla_plugins_files_folders_urls.access' => 'joomla_plugin_files_folders_urls.access', 'joomla_plugin_files_folders_urls.access' => 'joomla_plugin_files_folders_urls.access'); diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index db9a4f8b1..d4670ad9d 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,123 +9,123 @@ */ // Some Global Values -jform_vvvvvyyvwh_required = false; -jform_vvvvvyzvwi_required = false; -jform_vvvvvzdvwj_required = false; -jform_vvvvvzdvwk_required = false; -jform_vvvvvzdvwl_required = false; -jform_vvvvvzdvwm_required = false; -jform_vvvvvzdvwn_required = false; -jform_vvvvvzdvwo_required = false; -jform_vvvvvzdvwp_required = false; +jform_vvvvvyzvwh_required = false; +jform_vvvvvzavwi_required = false; +jform_vvvvvzevwj_required = false; +jform_vvvvvzevwk_required = false; +jform_vvvvvzevwl_required = false; +jform_vvvvvzevwm_required = false; +jform_vvvvvzevwn_required = false; +jform_vvvvvzevwo_required = false; +jform_vvvvvzevwp_required = false; // Initial Script jQuery(document).ready(function() { - var add_css_view_vvvvvxy = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvvxy(add_css_view_vvvvvxy); + var add_css_view_vvvvvxz = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvvxz(add_css_view_vvvvvxz); - var add_css_views_vvvvvxz = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvvxz(add_css_views_vvvvvxz); + var add_css_views_vvvvvya = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvvya(add_css_views_vvvvvya); - var add_javascript_view_file_vvvvvya = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); - vvvvvya(add_javascript_view_file_vvvvvya); + var add_javascript_view_file_vvvvvyb = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); + vvvvvyb(add_javascript_view_file_vvvvvyb); - var add_javascript_views_file_vvvvvyb = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); - vvvvvyb(add_javascript_views_file_vvvvvyb); + var add_javascript_views_file_vvvvvyc = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); + vvvvvyc(add_javascript_views_file_vvvvvyc); - var add_javascript_view_footer_vvvvvyc = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvvyc(add_javascript_view_footer_vvvvvyc); + var add_javascript_view_footer_vvvvvyd = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvvyd(add_javascript_view_footer_vvvvvyd); - var add_javascript_views_footer_vvvvvyd = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvvyd(add_javascript_views_footer_vvvvvyd); + var add_javascript_views_footer_vvvvvye = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvvye(add_javascript_views_footer_vvvvvye); - var add_php_ajax_vvvvvye = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvye(add_php_ajax_vvvvvye); + var add_php_ajax_vvvvvyf = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvyf(add_php_ajax_vvvvvyf); - var add_php_getitem_vvvvvyf = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); - vvvvvyf(add_php_getitem_vvvvvyf); + var add_php_getitem_vvvvvyg = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); + vvvvvyg(add_php_getitem_vvvvvyg); - var add_php_getitems_vvvvvyg = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); - vvvvvyg(add_php_getitems_vvvvvyg); + var add_php_getitems_vvvvvyh = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); + vvvvvyh(add_php_getitems_vvvvvyh); - var add_php_getitems_after_all_vvvvvyh = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); - vvvvvyh(add_php_getitems_after_all_vvvvvyh); + var add_php_getitems_after_all_vvvvvyi = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); + vvvvvyi(add_php_getitems_after_all_vvvvvyi); - var add_php_getlistquery_vvvvvyi = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); - vvvvvyi(add_php_getlistquery_vvvvvyi); + var add_php_getlistquery_vvvvvyj = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + vvvvvyj(add_php_getlistquery_vvvvvyj); - var add_php_getform_vvvvvyj = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); - vvvvvyj(add_php_getform_vvvvvyj); + var add_php_getform_vvvvvyk = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); + vvvvvyk(add_php_getform_vvvvvyk); - var add_php_before_save_vvvvvyk = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); - vvvvvyk(add_php_before_save_vvvvvyk); + var add_php_before_save_vvvvvyl = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); + vvvvvyl(add_php_before_save_vvvvvyl); - var add_php_save_vvvvvyl = jQuery("#jform_add_php_save input[type='radio']:checked").val(); - vvvvvyl(add_php_save_vvvvvyl); + var add_php_save_vvvvvym = jQuery("#jform_add_php_save input[type='radio']:checked").val(); + vvvvvym(add_php_save_vvvvvym); - var add_php_postsavehook_vvvvvym = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); - vvvvvym(add_php_postsavehook_vvvvvym); + var add_php_postsavehook_vvvvvyn = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); + vvvvvyn(add_php_postsavehook_vvvvvyn); - var add_php_allowadd_vvvvvyn = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); - vvvvvyn(add_php_allowadd_vvvvvyn); + var add_php_allowadd_vvvvvyo = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); + vvvvvyo(add_php_allowadd_vvvvvyo); - var add_php_allowedit_vvvvvyo = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); - vvvvvyo(add_php_allowedit_vvvvvyo); + var add_php_allowedit_vvvvvyp = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); + vvvvvyp(add_php_allowedit_vvvvvyp); - var add_php_before_cancel_vvvvvyp = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); - vvvvvyp(add_php_before_cancel_vvvvvyp); + var add_php_before_cancel_vvvvvyq = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvyq(add_php_before_cancel_vvvvvyq); - var add_php_after_cancel_vvvvvyq = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); - vvvvvyq(add_php_after_cancel_vvvvvyq); + var add_php_after_cancel_vvvvvyr = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); + vvvvvyr(add_php_after_cancel_vvvvvyr); - var add_php_batchcopy_vvvvvyr = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvyr(add_php_batchcopy_vvvvvyr); + var add_php_batchcopy_vvvvvys = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvys(add_php_batchcopy_vvvvvys); - var add_php_batchmove_vvvvvys = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvys(add_php_batchmove_vvvvvys); + var add_php_batchmove_vvvvvyt = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvyt(add_php_batchmove_vvvvvyt); - var add_php_before_publish_vvvvvyt = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvyt(add_php_before_publish_vvvvvyt); + var add_php_before_publish_vvvvvyu = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvyu(add_php_before_publish_vvvvvyu); - var add_php_after_publish_vvvvvyu = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvyu(add_php_after_publish_vvvvvyu); + var add_php_after_publish_vvvvvyv = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvyv(add_php_after_publish_vvvvvyv); - var add_php_before_delete_vvvvvyv = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvyv(add_php_before_delete_vvvvvyv); + var add_php_before_delete_vvvvvyw = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvyw(add_php_before_delete_vvvvvyw); - var add_php_after_delete_vvvvvyw = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvyw(add_php_after_delete_vvvvvyw); + var add_php_after_delete_vvvvvyx = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvyx(add_php_after_delete_vvvvvyx); - var add_php_document_vvvvvyx = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvyx(add_php_document_vvvvvyx); + var add_php_document_vvvvvyy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyy(add_php_document_vvvvvyy); - var add_sql_vvvvvyy = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyy(add_sql_vvvvvyy); - - var source_vvvvvyz = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvyz = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyz(source_vvvvvyz,add_sql_vvvvvyz); + vvvvvyz(add_sql_vvvvvyz); - var source_vvvvvzb = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvzb = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvzb(source_vvvvvzb,add_sql_vvvvvzb); + var source_vvvvvza = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvza = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvza(source_vvvvvza,add_sql_vvvvvza); - var add_custom_import_vvvvvzd = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvzd(add_custom_import_vvvvvzd); + var source_vvvvvzc = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvzc = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvzc(source_vvvvvzc,add_sql_vvvvvzc); var add_custom_import_vvvvvze = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvvze(add_custom_import_vvvvvze); - var add_custom_button_vvvvvzf = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvzf(add_custom_button_vvvvvzf); + var add_custom_import_vvvvvzf = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvzf(add_custom_import_vvvvvzf); + + var add_custom_button_vvvvvzg = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvzg(add_custom_button_vvvvvzg); }); -// the vvvvvxy function -function vvvvvxy(add_css_view_vvvvvxy) +// the vvvvvxz function +function vvvvvxz(add_css_view_vvvvvxz) { // set the function logic - if (add_css_view_vvvvvxy == 1) + if (add_css_view_vvvvvxz == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -135,11 +135,11 @@ function vvvvvxy(add_css_view_vvvvvxy) } } -// the vvvvvxz function -function vvvvvxz(add_css_views_vvvvvxz) +// the vvvvvya function +function vvvvvya(add_css_views_vvvvvya) { // set the function logic - if (add_css_views_vvvvvxz == 1) + if (add_css_views_vvvvvya == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -149,11 +149,11 @@ function vvvvvxz(add_css_views_vvvvvxz) } } -// the vvvvvya function -function vvvvvya(add_javascript_view_file_vvvvvya) +// the vvvvvyb function +function vvvvvyb(add_javascript_view_file_vvvvvyb) { // set the function logic - if (add_javascript_view_file_vvvvvya == 1) + if (add_javascript_view_file_vvvvvyb == 1) { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show(); } @@ -163,11 +163,11 @@ function vvvvvya(add_javascript_view_file_vvvvvya) } } -// the vvvvvyb function -function vvvvvyb(add_javascript_views_file_vvvvvyb) +// the vvvvvyc function +function vvvvvyc(add_javascript_views_file_vvvvvyc) { // set the function logic - if (add_javascript_views_file_vvvvvyb == 1) + if (add_javascript_views_file_vvvvvyc == 1) { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show(); } @@ -177,11 +177,11 @@ function vvvvvyb(add_javascript_views_file_vvvvvyb) } } -// the vvvvvyc function -function vvvvvyc(add_javascript_view_footer_vvvvvyc) +// the vvvvvyd function +function vvvvvyd(add_javascript_view_footer_vvvvvyd) { // set the function logic - if (add_javascript_view_footer_vvvvvyc == 1) + if (add_javascript_view_footer_vvvvvyd == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -191,11 +191,11 @@ function vvvvvyc(add_javascript_view_footer_vvvvvyc) } } -// the vvvvvyd function -function vvvvvyd(add_javascript_views_footer_vvvvvyd) +// the vvvvvye function +function vvvvvye(add_javascript_views_footer_vvvvvye) { // set the function logic - if (add_javascript_views_footer_vvvvvyd == 1) + if (add_javascript_views_footer_vvvvvye == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } @@ -205,11 +205,11 @@ function vvvvvyd(add_javascript_views_footer_vvvvvyd) } } -// the vvvvvye function -function vvvvvye(add_php_ajax_vvvvvye) +// the vvvvvyf function +function vvvvvyf(add_php_ajax_vvvvvyf) { // set the function logic - if (add_php_ajax_vvvvvye == 1) + if (add_php_ajax_vvvvvyf == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); @@ -221,11 +221,11 @@ function vvvvvye(add_php_ajax_vvvvvye) } } -// the vvvvvyf function -function vvvvvyf(add_php_getitem_vvvvvyf) +// the vvvvvyg function +function vvvvvyg(add_php_getitem_vvvvvyg) { // set the function logic - if (add_php_getitem_vvvvvyf == 1) + if (add_php_getitem_vvvvvyg == 1) { jQuery('#jform_php_getitem-lbl').closest('.control-group').show(); } @@ -235,11 +235,11 @@ function vvvvvyf(add_php_getitem_vvvvvyf) } } -// the vvvvvyg function -function vvvvvyg(add_php_getitems_vvvvvyg) +// the vvvvvyh function +function vvvvvyh(add_php_getitems_vvvvvyh) { // set the function logic - if (add_php_getitems_vvvvvyg == 1) + if (add_php_getitems_vvvvvyh == 1) { jQuery('#jform_php_getitems-lbl').closest('.control-group').show(); } @@ -249,11 +249,11 @@ function vvvvvyg(add_php_getitems_vvvvvyg) } } -// the vvvvvyh function -function vvvvvyh(add_php_getitems_after_all_vvvvvyh) +// the vvvvvyi function +function vvvvvyi(add_php_getitems_after_all_vvvvvyi) { // set the function logic - if (add_php_getitems_after_all_vvvvvyh == 1) + if (add_php_getitems_after_all_vvvvvyi == 1) { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show(); } @@ -263,11 +263,11 @@ function vvvvvyh(add_php_getitems_after_all_vvvvvyh) } } -// the vvvvvyi function -function vvvvvyi(add_php_getlistquery_vvvvvyi) +// the vvvvvyj function +function vvvvvyj(add_php_getlistquery_vvvvvyj) { // set the function logic - if (add_php_getlistquery_vvvvvyi == 1) + if (add_php_getlistquery_vvvvvyj == 1) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } @@ -277,11 +277,11 @@ function vvvvvyi(add_php_getlistquery_vvvvvyi) } } -// the vvvvvyj function -function vvvvvyj(add_php_getform_vvvvvyj) +// the vvvvvyk function +function vvvvvyk(add_php_getform_vvvvvyk) { // set the function logic - if (add_php_getform_vvvvvyj == 1) + if (add_php_getform_vvvvvyk == 1) { jQuery('#jform_php_getform-lbl').closest('.control-group').show(); } @@ -291,11 +291,11 @@ function vvvvvyj(add_php_getform_vvvvvyj) } } -// the vvvvvyk function -function vvvvvyk(add_php_before_save_vvvvvyk) +// the vvvvvyl function +function vvvvvyl(add_php_before_save_vvvvvyl) { // set the function logic - if (add_php_before_save_vvvvvyk == 1) + if (add_php_before_save_vvvvvyl == 1) { jQuery('#jform_php_before_save-lbl').closest('.control-group').show(); } @@ -305,11 +305,11 @@ function vvvvvyk(add_php_before_save_vvvvvyk) } } -// the vvvvvyl function -function vvvvvyl(add_php_save_vvvvvyl) +// the vvvvvym function +function vvvvvym(add_php_save_vvvvvym) { // set the function logic - if (add_php_save_vvvvvyl == 1) + if (add_php_save_vvvvvym == 1) { jQuery('#jform_php_save-lbl').closest('.control-group').show(); } @@ -319,11 +319,11 @@ function vvvvvyl(add_php_save_vvvvvyl) } } -// the vvvvvym function -function vvvvvym(add_php_postsavehook_vvvvvym) +// the vvvvvyn function +function vvvvvyn(add_php_postsavehook_vvvvvyn) { // set the function logic - if (add_php_postsavehook_vvvvvym == 1) + if (add_php_postsavehook_vvvvvyn == 1) { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show(); } @@ -333,11 +333,11 @@ function vvvvvym(add_php_postsavehook_vvvvvym) } } -// the vvvvvyn function -function vvvvvyn(add_php_allowadd_vvvvvyn) +// the vvvvvyo function +function vvvvvyo(add_php_allowadd_vvvvvyo) { // set the function logic - if (add_php_allowadd_vvvvvyn == 1) + if (add_php_allowadd_vvvvvyo == 1) { jQuery('#jform_php_allowadd-lbl').closest('.control-group').show(); } @@ -347,11 +347,11 @@ function vvvvvyn(add_php_allowadd_vvvvvyn) } } -// the vvvvvyo function -function vvvvvyo(add_php_allowedit_vvvvvyo) +// the vvvvvyp function +function vvvvvyp(add_php_allowedit_vvvvvyp) { // set the function logic - if (add_php_allowedit_vvvvvyo == 1) + if (add_php_allowedit_vvvvvyp == 1) { jQuery('#jform_php_allowedit-lbl').closest('.control-group').show(); } @@ -361,11 +361,11 @@ function vvvvvyo(add_php_allowedit_vvvvvyo) } } -// the vvvvvyp function -function vvvvvyp(add_php_before_cancel_vvvvvyp) +// the vvvvvyq function +function vvvvvyq(add_php_before_cancel_vvvvvyq) { // set the function logic - if (add_php_before_cancel_vvvvvyp == 1) + if (add_php_before_cancel_vvvvvyq == 1) { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); } @@ -375,11 +375,11 @@ function vvvvvyp(add_php_before_cancel_vvvvvyp) } } -// the vvvvvyq function -function vvvvvyq(add_php_after_cancel_vvvvvyq) +// the vvvvvyr function +function vvvvvyr(add_php_after_cancel_vvvvvyr) { // set the function logic - if (add_php_after_cancel_vvvvvyq == 1) + if (add_php_after_cancel_vvvvvyr == 1) { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show(); } @@ -389,11 +389,11 @@ function vvvvvyq(add_php_after_cancel_vvvvvyq) } } -// the vvvvvyr function -function vvvvvyr(add_php_batchcopy_vvvvvyr) +// the vvvvvys function +function vvvvvys(add_php_batchcopy_vvvvvys) { // set the function logic - if (add_php_batchcopy_vvvvvyr == 1) + if (add_php_batchcopy_vvvvvys == 1) { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); } @@ -403,11 +403,11 @@ function vvvvvyr(add_php_batchcopy_vvvvvyr) } } -// the vvvvvys function -function vvvvvys(add_php_batchmove_vvvvvys) +// the vvvvvyt function +function vvvvvyt(add_php_batchmove_vvvvvyt) { // set the function logic - if (add_php_batchmove_vvvvvys == 1) + if (add_php_batchmove_vvvvvyt == 1) { jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); } @@ -417,11 +417,11 @@ function vvvvvys(add_php_batchmove_vvvvvys) } } -// the vvvvvyt function -function vvvvvyt(add_php_before_publish_vvvvvyt) +// the vvvvvyu function +function vvvvvyu(add_php_before_publish_vvvvvyu) { // set the function logic - if (add_php_before_publish_vvvvvyt == 1) + if (add_php_before_publish_vvvvvyu == 1) { jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); } @@ -431,11 +431,11 @@ function vvvvvyt(add_php_before_publish_vvvvvyt) } } -// the vvvvvyu function -function vvvvvyu(add_php_after_publish_vvvvvyu) +// the vvvvvyv function +function vvvvvyv(add_php_after_publish_vvvvvyv) { // set the function logic - if (add_php_after_publish_vvvvvyu == 1) + if (add_php_after_publish_vvvvvyv == 1) { jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); } @@ -445,11 +445,11 @@ function vvvvvyu(add_php_after_publish_vvvvvyu) } } -// the vvvvvyv function -function vvvvvyv(add_php_before_delete_vvvvvyv) +// the vvvvvyw function +function vvvvvyw(add_php_before_delete_vvvvvyw) { // set the function logic - if (add_php_before_delete_vvvvvyv == 1) + if (add_php_before_delete_vvvvvyw == 1) { jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); } @@ -459,11 +459,11 @@ function vvvvvyv(add_php_before_delete_vvvvvyv) } } -// the vvvvvyw function -function vvvvvyw(add_php_after_delete_vvvvvyw) +// the vvvvvyx function +function vvvvvyx(add_php_after_delete_vvvvvyx) { // set the function logic - if (add_php_after_delete_vvvvvyw == 1) + if (add_php_after_delete_vvvvvyx == 1) { jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); } @@ -473,11 +473,11 @@ function vvvvvyw(add_php_after_delete_vvvvvyw) } } -// the vvvvvyx function -function vvvvvyx(add_php_document_vvvvvyx) +// the vvvvvyy function +function vvvvvyy(add_php_document_vvvvvyy) { // set the function logic - if (add_php_document_vvvvvyx == 1) + if (add_php_document_vvvvvyy == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -487,75 +487,75 @@ function vvvvvyx(add_php_document_vvvvvyx) } } -// the vvvvvyy function -function vvvvvyy(add_sql_vvvvvyy) +// the vvvvvyz function +function vvvvvyz(add_sql_vvvvvyz) { // set the function logic - if (add_sql_vvvvvyy == 1) + if (add_sql_vvvvvyz == 1) { jQuery('#jform_source').closest('.control-group').show(); // add required attribute to source field - if (jform_vvvvvyyvwh_required) + if (jform_vvvvvyzvwh_required) { updateFieldRequired('source',0); jQuery('#jform_source').prop('required','required'); jQuery('#jform_source').attr('aria-required',true); jQuery('#jform_source').addClass('required'); - jform_vvvvvyyvwh_required = false; + jform_vvvvvyzvwh_required = false; } } else { jQuery('#jform_source').closest('.control-group').hide(); // remove required attribute from source field - if (!jform_vvvvvyyvwh_required) + if (!jform_vvvvvyzvwh_required) { updateFieldRequired('source',1); jQuery('#jform_source').removeAttr('required'); jQuery('#jform_source').removeAttr('aria-required'); jQuery('#jform_source').removeClass('required'); - jform_vvvvvyyvwh_required = true; + jform_vvvvvyzvwh_required = true; } } } -// the vvvvvyz function -function vvvvvyz(source_vvvvvyz,add_sql_vvvvvyz) +// the vvvvvza function +function vvvvvza(source_vvvvvza,add_sql_vvvvvza) { // set the function logic - if (source_vvvvvyz == 2 && add_sql_vvvvvyz == 1) + if (source_vvvvvza == 2 && add_sql_vvvvvza == 1) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field - if (jform_vvvvvyzvwi_required) + if (jform_vvvvvzavwi_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvyzvwi_required = false; + jform_vvvvvzavwi_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field - if (!jform_vvvvvyzvwi_required) + if (!jform_vvvvvzavwi_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvyzvwi_required = true; + jform_vvvvvzavwi_required = true; } } } -// the vvvvvzb function -function vvvvvzb(source_vvvvvzb,add_sql_vvvvvzb) +// the vvvvvzc function +function vvvvvzc(source_vvvvvzc,add_sql_vvvvvzc) { // set the function logic - if (source_vvvvvzb == 1 && add_sql_vvvvvzb == 1) + if (source_vvvvvzc == 1 && add_sql_vvvvvzc == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -565,165 +565,165 @@ function vvvvvzb(source_vvvvvzb,add_sql_vvvvvzb) } } -// the vvvvvzd function -function vvvvvzd(add_custom_import_vvvvvzd) +// the vvvvvze function +function vvvvvze(add_custom_import_vvvvvze) { // set the function logic - if (add_custom_import_vvvvvzd == 1) + if (add_custom_import_vvvvvze == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field - if (jform_vvvvvzdvwj_required) + if (jform_vvvvvzevwj_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_vvvvvzdvwj_required = false; + jform_vvvvvzevwj_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_vvvvvzdvwk_required) + if (jform_vvvvvzevwk_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_vvvvvzdvwk_required = false; + jform_vvvvvzevwk_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field - if (jform_vvvvvzdvwl_required) + if (jform_vvvvvzevwl_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_vvvvvzdvwl_required = false; + jform_vvvvvzevwl_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field - if (jform_vvvvvzdvwm_required) + if (jform_vvvvvzevwm_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_vvvvvzdvwm_required = false; + jform_vvvvvzevwm_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field - if (jform_vvvvvzdvwn_required) + if (jform_vvvvvzevwn_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_vvvvvzdvwn_required = false; + jform_vvvvvzevwn_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field - if (jform_vvvvvzdvwo_required) + if (jform_vvvvvzevwo_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_vvvvvzdvwo_required = false; + jform_vvvvvzevwo_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field - if (jform_vvvvvzdvwp_required) + if (jform_vvvvvzevwp_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_vvvvvzdvwp_required = false; + jform_vvvvvzevwp_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field - if (!jform_vvvvvzdvwj_required) + if (!jform_vvvvvzevwj_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_vvvvvzdvwj_required = true; + jform_vvvvvzevwj_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_vvvvvzdvwk_required) + if (!jform_vvvvvzevwk_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_vvvvvzdvwk_required = true; + jform_vvvvvzevwk_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field - if (!jform_vvvvvzdvwl_required) + if (!jform_vvvvvzevwl_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_vvvvvzdvwl_required = true; + jform_vvvvvzevwl_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field - if (!jform_vvvvvzdvwm_required) + if (!jform_vvvvvzevwm_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_vvvvvzdvwm_required = true; + jform_vvvvvzevwm_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field - if (!jform_vvvvvzdvwn_required) + if (!jform_vvvvvzevwn_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_vvvvvzdvwn_required = true; + jform_vvvvvzevwn_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field - if (!jform_vvvvvzdvwo_required) + if (!jform_vvvvvzevwo_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_vvvvvzdvwo_required = true; + jform_vvvvvzevwo_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field - if (!jform_vvvvvzdvwp_required) + if (!jform_vvvvvzevwp_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_vvvvvzdvwp_required = true; + jform_vvvvvzevwp_required = true; } } } -// the vvvvvze function -function vvvvvze(add_custom_import_vvvvvze) +// the vvvvvzf function +function vvvvvzf(add_custom_import_vvvvvzf) { // set the function logic - if (add_custom_import_vvvvvze == 0) + if (add_custom_import_vvvvvzf == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -733,11 +733,11 @@ function vvvvvze(add_custom_import_vvvvvze) } } -// the vvvvvzf function -function vvvvvzf(add_custom_button_vvvvvzf) +// the vvvvvzg function +function vvvvvzg(add_custom_button_vvvvvzg) { // set the function logic - if (add_custom_button_vvvvvzf == 1) + if (add_custom_button_vvvvvzg == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); diff --git a/admin/models/forms/class_method.js b/admin/models/forms/class_method.js index e59f29908..3cfc64fa8 100644 --- a/admin/models/forms/class_method.js +++ b/admin/models/forms/class_method.js @@ -9,29 +9,29 @@ */ // Some Global Values -jform_vvvvwbjvxi_required = false; +jform_vvvvwbkvxi_required = false; // Initial Script jQuery(document).ready(function() { - var extension_type_vvvvwbj = jQuery("#jform_extension_type").val(); - vvvvwbj(extension_type_vvvvwbj); + var extension_type_vvvvwbk = jQuery("#jform_extension_type").val(); + vvvvwbk(extension_type_vvvvwbk); }); -// the vvvvwbj function -function vvvvwbj(extension_type_vvvvwbj) +// the vvvvwbk function +function vvvvwbk(extension_type_vvvvwbk) { - if (isSet(extension_type_vvvvwbj) && extension_type_vvvvwbj.constructor !== Array) + if (isSet(extension_type_vvvvwbk) && extension_type_vvvvwbk.constructor !== Array) { - var temp_vvvvwbj = extension_type_vvvvwbj; - var extension_type_vvvvwbj = []; - extension_type_vvvvwbj.push(temp_vvvvwbj); + var temp_vvvvwbk = extension_type_vvvvwbk; + var extension_type_vvvvwbk = []; + extension_type_vvvvwbk.push(temp_vvvvwbk); } - else if (!isSet(extension_type_vvvvwbj)) + else if (!isSet(extension_type_vvvvwbk)) { - var extension_type_vvvvwbj = []; + var extension_type_vvvvwbk = []; } - var extension_type = extension_type_vvvvwbj.some(extension_type_vvvvwbj_SomeFunc); + var extension_type = extension_type_vvvvwbk.some(extension_type_vvvvwbk_SomeFunc); // set this function logic @@ -39,35 +39,35 @@ function vvvvwbj(extension_type_vvvvwbj) { jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); // add required attribute to joomla_plugin_group field - if (jform_vvvvwbjvxi_required) + if (jform_vvvvwbkvxi_required) { updateFieldRequired('joomla_plugin_group',0); jQuery('#jform_joomla_plugin_group').prop('required','required'); jQuery('#jform_joomla_plugin_group').attr('aria-required',true); jQuery('#jform_joomla_plugin_group').addClass('required'); - jform_vvvvwbjvxi_required = false; + jform_vvvvwbkvxi_required = false; } } else { jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); // remove required attribute from joomla_plugin_group field - if (!jform_vvvvwbjvxi_required) + if (!jform_vvvvwbkvxi_required) { updateFieldRequired('joomla_plugin_group',1); jQuery('#jform_joomla_plugin_group').removeAttr('required'); jQuery('#jform_joomla_plugin_group').removeAttr('aria-required'); jQuery('#jform_joomla_plugin_group').removeClass('required'); - jform_vvvvwbjvxi_required = true; + jform_vvvvwbkvxi_required = true; } } } -// the vvvvwbj Some function -function extension_type_vvvvwbj_SomeFunc(extension_type_vvvvwbj) +// the vvvvwbk Some function +function extension_type_vvvvwbk_SomeFunc(extension_type_vvvvwbk) { // set the function logic - if (extension_type_vvvvwbj == 'plugins' || extension_type_vvvvwbj == 'plugin') + if (extension_type_vvvvwbk == 'plugins' || extension_type_vvvvwbk == 'plugin') { return true; } diff --git a/admin/models/forms/class_property.js b/admin/models/forms/class_property.js index 8b64c5d1a..380cd414a 100644 --- a/admin/models/forms/class_property.js +++ b/admin/models/forms/class_property.js @@ -9,29 +9,29 @@ */ // Some Global Values -jform_vvvvwbivxh_required = false; +jform_vvvvwbjvxh_required = false; // Initial Script jQuery(document).ready(function() { - var extension_type_vvvvwbi = jQuery("#jform_extension_type").val(); - vvvvwbi(extension_type_vvvvwbi); + var extension_type_vvvvwbj = jQuery("#jform_extension_type").val(); + vvvvwbj(extension_type_vvvvwbj); }); -// the vvvvwbi function -function vvvvwbi(extension_type_vvvvwbi) +// the vvvvwbj function +function vvvvwbj(extension_type_vvvvwbj) { - if (isSet(extension_type_vvvvwbi) && extension_type_vvvvwbi.constructor !== Array) + if (isSet(extension_type_vvvvwbj) && extension_type_vvvvwbj.constructor !== Array) { - var temp_vvvvwbi = extension_type_vvvvwbi; - var extension_type_vvvvwbi = []; - extension_type_vvvvwbi.push(temp_vvvvwbi); + var temp_vvvvwbj = extension_type_vvvvwbj; + var extension_type_vvvvwbj = []; + extension_type_vvvvwbj.push(temp_vvvvwbj); } - else if (!isSet(extension_type_vvvvwbi)) + else if (!isSet(extension_type_vvvvwbj)) { - var extension_type_vvvvwbi = []; + var extension_type_vvvvwbj = []; } - var extension_type = extension_type_vvvvwbi.some(extension_type_vvvvwbi_SomeFunc); + var extension_type = extension_type_vvvvwbj.some(extension_type_vvvvwbj_SomeFunc); // set this function logic @@ -39,35 +39,35 @@ function vvvvwbi(extension_type_vvvvwbi) { jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); // add required attribute to joomla_plugin_group field - if (jform_vvvvwbivxh_required) + if (jform_vvvvwbjvxh_required) { updateFieldRequired('joomla_plugin_group',0); jQuery('#jform_joomla_plugin_group').prop('required','required'); jQuery('#jform_joomla_plugin_group').attr('aria-required',true); jQuery('#jform_joomla_plugin_group').addClass('required'); - jform_vvvvwbivxh_required = false; + jform_vvvvwbjvxh_required = false; } } else { jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); // remove required attribute from joomla_plugin_group field - if (!jform_vvvvwbivxh_required) + if (!jform_vvvvwbjvxh_required) { updateFieldRequired('joomla_plugin_group',1); jQuery('#jform_joomla_plugin_group').removeAttr('required'); jQuery('#jform_joomla_plugin_group').removeAttr('aria-required'); jQuery('#jform_joomla_plugin_group').removeClass('required'); - jform_vvvvwbivxh_required = true; + jform_vvvvwbjvxh_required = true; } } } -// the vvvvwbi Some function -function extension_type_vvvvwbi_SomeFunc(extension_type_vvvvwbi) +// the vvvvwbj Some function +function extension_type_vvvvwbj_SomeFunc(extension_type_vvvvwbj) { // set the function logic - if (extension_type_vvvvwbi == 'plugins' || extension_type_vvvvwbi == 'plugin') + if (extension_type_vvvvwbj == 'plugins' || extension_type_vvvvwbj == 'plugin') { return true; } diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index 263c097ae..ebc8517c7 100644 --- a/admin/models/forms/custom_admin_view.js +++ b/admin/models/forms/custom_admin_view.js @@ -11,42 +11,42 @@ // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvvzg = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvzg(add_php_view_vvvvvzg); + var add_php_view_vvvvvzh = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvzh(add_php_view_vvvvvzh); - var add_php_jview_display_vvvvvzh = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvzh(add_php_jview_display_vvvvvzh); + var add_php_jview_display_vvvvvzi = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvzi(add_php_jview_display_vvvvvzi); - var add_php_jview_vvvvvzi = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvzi(add_php_jview_vvvvvzi); + var add_php_jview_vvvvvzj = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvzj(add_php_jview_vvvvvzj); - var add_php_document_vvvvvzj = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvzj(add_php_document_vvvvvzj); + var add_php_document_vvvvvzk = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvzk(add_php_document_vvvvvzk); - var add_css_document_vvvvvzk = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvzk(add_css_document_vvvvvzk); + var add_css_document_vvvvvzl = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvzl(add_css_document_vvvvvzl); - var add_javascript_file_vvvvvzl = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); - vvvvvzl(add_javascript_file_vvvvvzl); + var add_javascript_file_vvvvvzm = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); + vvvvvzm(add_javascript_file_vvvvvzm); - var add_js_document_vvvvvzm = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvzm(add_js_document_vvvvvzm); + var add_js_document_vvvvvzn = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvzn(add_js_document_vvvvvzn); - var add_custom_button_vvvvvzn = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvzn(add_custom_button_vvvvvzn); + var add_custom_button_vvvvvzo = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvzo(add_custom_button_vvvvvzo); - var add_css_vvvvvzo = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvzo(add_css_vvvvvzo); + var add_css_vvvvvzp = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvzp(add_css_vvvvvzp); - var add_php_ajax_vvvvvzp = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvzp(add_php_ajax_vvvvvzp); + var add_php_ajax_vvvvvzq = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvzq(add_php_ajax_vvvvvzq); }); -// the vvvvvzg function -function vvvvvzg(add_php_view_vvvvvzg) +// the vvvvvzh function +function vvvvvzh(add_php_view_vvvvvzh) { // set the function logic - if (add_php_view_vvvvvzg == 1) + if (add_php_view_vvvvvzh == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } @@ -56,11 +56,11 @@ function vvvvvzg(add_php_view_vvvvvzg) } } -// the vvvvvzh function -function vvvvvzh(add_php_jview_display_vvvvvzh) +// the vvvvvzi function +function vvvvvzi(add_php_jview_display_vvvvvzi) { // set the function logic - if (add_php_jview_display_vvvvvzh == 1) + if (add_php_jview_display_vvvvvzi == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } @@ -70,11 +70,11 @@ function vvvvvzh(add_php_jview_display_vvvvvzh) } } -// the vvvvvzi function -function vvvvvzi(add_php_jview_vvvvvzi) +// the vvvvvzj function +function vvvvvzj(add_php_jview_vvvvvzj) { // set the function logic - if (add_php_jview_vvvvvzi == 1) + if (add_php_jview_vvvvvzj == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } @@ -84,11 +84,11 @@ function vvvvvzi(add_php_jview_vvvvvzi) } } -// the vvvvvzj function -function vvvvvzj(add_php_document_vvvvvzj) +// the vvvvvzk function +function vvvvvzk(add_php_document_vvvvvzk) { // set the function logic - if (add_php_document_vvvvvzj == 1) + if (add_php_document_vvvvvzk == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -98,11 +98,11 @@ function vvvvvzj(add_php_document_vvvvvzj) } } -// the vvvvvzk function -function vvvvvzk(add_css_document_vvvvvzk) +// the vvvvvzl function +function vvvvvzl(add_css_document_vvvvvzl) { // set the function logic - if (add_css_document_vvvvvzk == 1) + if (add_css_document_vvvvvzl == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } @@ -112,11 +112,11 @@ function vvvvvzk(add_css_document_vvvvvzk) } } -// the vvvvvzl function -function vvvvvzl(add_javascript_file_vvvvvzl) +// the vvvvvzm function +function vvvvvzm(add_javascript_file_vvvvvzm) { // set the function logic - if (add_javascript_file_vvvvvzl == 1) + if (add_javascript_file_vvvvvzm == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } @@ -126,11 +126,11 @@ function vvvvvzl(add_javascript_file_vvvvvzl) } } -// the vvvvvzm function -function vvvvvzm(add_js_document_vvvvvzm) +// the vvvvvzn function +function vvvvvzn(add_js_document_vvvvvzn) { // set the function logic - if (add_js_document_vvvvvzm == 1) + if (add_js_document_vvvvvzn == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } @@ -140,11 +140,11 @@ function vvvvvzm(add_js_document_vvvvvzm) } } -// the vvvvvzn function -function vvvvvzn(add_custom_button_vvvvvzn) +// the vvvvvzo function +function vvvvvzo(add_custom_button_vvvvvzo) { // set the function logic - if (add_custom_button_vvvvvzn == 1) + if (add_custom_button_vvvvvzo == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); @@ -158,11 +158,11 @@ function vvvvvzn(add_custom_button_vvvvvzn) } } -// the vvvvvzo function -function vvvvvzo(add_css_vvvvvzo) +// the vvvvvzp function +function vvvvvzp(add_css_vvvvvzp) { // set the function logic - if (add_css_vvvvvzo == 1) + if (add_css_vvvvvzp == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } @@ -172,11 +172,11 @@ function vvvvvzo(add_css_vvvvvzo) } } -// the vvvvvzp function -function vvvvvzp(add_php_ajax_vvvvvzp) +// the vvvvvzq function +function vvvvvzq(add_php_ajax_vvvvvzq) { // set the function logic - if (add_php_ajax_vvvvvzp == 1) + if (add_php_ajax_vvvvvzq == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js index eb40aac21..81d09a518 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -9,44 +9,44 @@ */ // Some Global Values -jform_vvvvwbevxd_required = false; -jform_vvvvwbfvxe_required = false; -jform_vvvvwbfvxf_required = false; -jform_vvvvwbfvxg_required = false; +jform_vvvvwbfvxd_required = false; +jform_vvvvwbgvxe_required = false; +jform_vvvvwbgvxf_required = false; +jform_vvvvwbgvxg_required = false; // Initial Script jQuery(document).ready(function() { - var target_vvvvwbe = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwbe(target_vvvvwbe); - var target_vvvvwbf = jQuery("#jform_target input[type='radio']:checked").val(); vvvvwbf(target_vvvvwbf); var target_vvvvwbg = jQuery("#jform_target input[type='radio']:checked").val(); - var type_vvvvwbg = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvwbg(target_vvvvwbg,type_vvvvwbg); + vvvvwbg(target_vvvvwbg); - var type_vvvvwbh = jQuery("#jform_type input[type='radio']:checked").val(); var target_vvvvwbh = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwbh(type_vvvvwbh,target_vvvvwbh); + var type_vvvvwbh = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwbh(target_vvvvwbh,type_vvvvwbh); + + var type_vvvvwbi = jQuery("#jform_type input[type='radio']:checked").val(); + var target_vvvvwbi = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwbi(type_vvvvwbi,target_vvvvwbi); }); -// the vvvvwbe function -function vvvvwbe(target_vvvvwbe) +// the vvvvwbf function +function vvvvwbf(target_vvvvwbf) { // set the function logic - if (target_vvvvwbe == 2) + if (target_vvvvwbf == 2) { jQuery('#jform_function_name').closest('.control-group').show(); // add required attribute to function_name field - if (jform_vvvvwbevxd_required) + if (jform_vvvvwbfvxd_required) { updateFieldRequired('function_name',0); jQuery('#jform_function_name').prop('required','required'); jQuery('#jform_function_name').attr('aria-required',true); jQuery('#jform_function_name').addClass('required'); - jform_vvvvwbevxd_required = false; + jform_vvvvwbfvxd_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); jQuery('#jform_system_name').closest('.control-group').show(); @@ -55,102 +55,102 @@ function vvvvwbe(target_vvvvwbe) { jQuery('#jform_function_name').closest('.control-group').hide(); // remove required attribute from function_name field - if (!jform_vvvvwbevxd_required) + if (!jform_vvvvwbfvxd_required) { updateFieldRequired('function_name',1); jQuery('#jform_function_name').removeAttr('required'); jQuery('#jform_function_name').removeAttr('aria-required'); jQuery('#jform_function_name').removeClass('required'); - jform_vvvvwbevxd_required = true; + jform_vvvvwbfvxd_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); } } -// the vvvvwbf function -function vvvvwbf(target_vvvvwbf) +// the vvvvwbg function +function vvvvwbg(target_vvvvwbg) { // set the function logic - if (target_vvvvwbf == 1) + if (target_vvvvwbg == 1) { jQuery('#jform_component').closest('.control-group').show(); // add required attribute to component field - if (jform_vvvvwbfvxe_required) + if (jform_vvvvwbgvxe_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); - jform_vvvvwbfvxe_required = false; + jform_vvvvwbgvxe_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field - if (jform_vvvvwbfvxf_required) + if (jform_vvvvwbgvxf_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvwbfvxf_required = false; + jform_vvvvwbgvxf_required = false; } jQuery('#jform_from_line').closest('.control-group').show(); jQuery('#jform_hashtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); jQuery('#jform_type').closest('.control-group').show(); // add required attribute to type field - if (jform_vvvvwbfvxg_required) + if (jform_vvvvwbgvxg_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); - jform_vvvvwbfvxg_required = false; + jform_vvvvwbgvxg_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); // remove required attribute from component field - if (!jform_vvvvwbfvxe_required) + if (!jform_vvvvwbgvxe_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); - jform_vvvvwbfvxe_required = true; + jform_vvvvwbgvxe_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field - if (!jform_vvvvwbfvxf_required) + if (!jform_vvvvwbgvxf_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvwbfvxf_required = true; + jform_vvvvwbgvxf_required = true; } jQuery('#jform_from_line').closest('.control-group').hide(); jQuery('#jform_hashtarget').closest('.control-group').hide(); jQuery('#jform_to_line').closest('.control-group').hide(); jQuery('#jform_type').closest('.control-group').hide(); // remove required attribute from type field - if (!jform_vvvvwbfvxg_required) + if (!jform_vvvvwbgvxg_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); - jform_vvvvwbfvxg_required = true; + jform_vvvvwbgvxg_required = true; } } } -// the vvvvwbg function -function vvvvwbg(target_vvvvwbg,type_vvvvwbg) +// the vvvvwbh function +function vvvvwbh(target_vvvvwbh,type_vvvvwbh) { // set the function logic - if (target_vvvvwbg == 1 && type_vvvvwbg == 1) + if (target_vvvvwbh == 1 && type_vvvvwbh == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); @@ -162,11 +162,11 @@ function vvvvwbg(target_vvvvwbg,type_vvvvwbg) } } -// the vvvvwbh function -function vvvvwbh(type_vvvvwbh,target_vvvvwbh) +// the vvvvwbi function +function vvvvwbi(type_vvvvwbi,target_vvvvwbi) { // set the function logic - if (type_vvvvwbh == 1 && target_vvvvwbh == 1) + if (type_vvvvwbi == 1 && target_vvvvwbi == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js index f71fc3e64..75a38bf23 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -9,28 +9,25 @@ */ // Some Global Values -jform_vvvvwadvwq_required = false; -jform_vvvvwafvwr_required = false; -jform_vvvvwagvws_required = false; -jform_vvvvwahvwt_required = false; -jform_vvvvwaivwu_required = false; -jform_vvvvwatvwv_required = false; -jform_vvvvwatvww_required = false; -jform_vvvvwayvwx_required = false; -jform_vvvvwayvwy_required = false; -jform_vvvvwayvwz_required = false; -jform_vvvvwazvxa_required = false; -jform_vvvvwbavxb_required = false; -jform_vvvvwbbvxc_required = false; +jform_vvvvwaevwq_required = false; +jform_vvvvwagvwr_required = false; +jform_vvvvwahvws_required = false; +jform_vvvvwaivwt_required = false; +jform_vvvvwajvwu_required = false; +jform_vvvvwauvwv_required = false; +jform_vvvvwauvww_required = false; +jform_vvvvwazvwx_required = false; +jform_vvvvwazvwy_required = false; +jform_vvvvwazvwz_required = false; +jform_vvvvwbavxa_required = false; +jform_vvvvwbbvxb_required = false; +jform_vvvvwbcvxc_required = false; // Initial Script jQuery(document).ready(function() { - var gettype_vvvvwad = jQuery("#jform_gettype").val(); - vvvvwad(gettype_vvvvwad); - - var main_source_vvvvwae = jQuery("#jform_main_source").val(); - vvvvwae(main_source_vvvvwae); + var gettype_vvvvwae = jQuery("#jform_gettype").val(); + vvvvwae(gettype_vvvvwae); var main_source_vvvvwaf = jQuery("#jform_main_source").val(); vvvvwaf(main_source_vvvvwaf); @@ -44,48 +41,48 @@ jQuery(document).ready(function() var main_source_vvvvwai = jQuery("#jform_main_source").val(); vvvvwai(main_source_vvvvwai); - var addcalculation_vvvvwaj = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - vvvvwaj(addcalculation_vvvvwaj); + var main_source_vvvvwaj = jQuery("#jform_main_source").val(); + vvvvwaj(main_source_vvvvwaj); var addcalculation_vvvvwak = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - var gettype_vvvvwak = jQuery("#jform_gettype").val(); - vvvvwak(addcalculation_vvvvwak,gettype_vvvvwak); + vvvvwak(addcalculation_vvvvwak); var addcalculation_vvvvwal = jQuery("#jform_addcalculation input[type='radio']:checked").val(); var gettype_vvvvwal = jQuery("#jform_gettype").val(); vvvvwal(addcalculation_vvvvwal,gettype_vvvvwal); - var main_source_vvvvwao = jQuery("#jform_main_source").val(); - vvvvwao(main_source_vvvvwao); + var addcalculation_vvvvwam = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + var gettype_vvvvwam = jQuery("#jform_gettype").val(); + vvvvwam(addcalculation_vvvvwam,gettype_vvvvwam); var main_source_vvvvwap = jQuery("#jform_main_source").val(); vvvvwap(main_source_vvvvwap); - var add_php_before_getitem_vvvvwaq = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); - var gettype_vvvvwaq = jQuery("#jform_gettype").val(); - vvvvwaq(add_php_before_getitem_vvvvwaq,gettype_vvvvwaq); + var main_source_vvvvwaq = jQuery("#jform_main_source").val(); + vvvvwaq(main_source_vvvvwaq); - var add_php_after_getitem_vvvvwar = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); + var add_php_before_getitem_vvvvwar = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); var gettype_vvvvwar = jQuery("#jform_gettype").val(); - vvvvwar(add_php_after_getitem_vvvvwar,gettype_vvvvwar); + vvvvwar(add_php_before_getitem_vvvvwar,gettype_vvvvwar); - var gettype_vvvvwat = jQuery("#jform_gettype").val(); - vvvvwat(gettype_vvvvwat); + var add_php_after_getitem_vvvvwas = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); + var gettype_vvvvwas = jQuery("#jform_gettype").val(); + vvvvwas(add_php_after_getitem_vvvvwas,gettype_vvvvwas); - var add_php_getlistquery_vvvvwau = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); var gettype_vvvvwau = jQuery("#jform_gettype").val(); - vvvvwau(add_php_getlistquery_vvvvwau,gettype_vvvvwau); + vvvvwau(gettype_vvvvwau); - var add_php_before_getitems_vvvvwav = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); + var add_php_getlistquery_vvvvwav = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); var gettype_vvvvwav = jQuery("#jform_gettype").val(); - vvvvwav(add_php_before_getitems_vvvvwav,gettype_vvvvwav); + vvvvwav(add_php_getlistquery_vvvvwav,gettype_vvvvwav); - var add_php_after_getitems_vvvvwaw = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); + var add_php_before_getitems_vvvvwaw = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); var gettype_vvvvwaw = jQuery("#jform_gettype").val(); - vvvvwaw(add_php_after_getitems_vvvvwaw,gettype_vvvvwaw); + vvvvwaw(add_php_before_getitems_vvvvwaw,gettype_vvvvwaw); - var gettype_vvvvway = jQuery("#jform_gettype").val(); - vvvvway(gettype_vvvvway); + var add_php_after_getitems_vvvvwax = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); + var gettype_vvvvwax = jQuery("#jform_gettype").val(); + vvvvwax(add_php_after_getitems_vvvvwax,gettype_vvvvwax); var gettype_vvvvwaz = jQuery("#jform_gettype").val(); vvvvwaz(gettype_vvvvwaz); @@ -94,27 +91,30 @@ jQuery(document).ready(function() vvvvwba(gettype_vvvvwba); var gettype_vvvvwbb = jQuery("#jform_gettype").val(); - var add_php_router_parse_vvvvwbb = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); - vvvvwbb(gettype_vvvvwbb,add_php_router_parse_vvvvwbb); + vvvvwbb(gettype_vvvvwbb); - var gettype_vvvvwbd = jQuery("#jform_gettype").val(); - vvvvwbd(gettype_vvvvwbd); + var gettype_vvvvwbc = jQuery("#jform_gettype").val(); + var add_php_router_parse_vvvvwbc = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); + vvvvwbc(gettype_vvvvwbc,add_php_router_parse_vvvvwbc); + + var gettype_vvvvwbe = jQuery("#jform_gettype").val(); + vvvvwbe(gettype_vvvvwbe); }); -// the vvvvwad function -function vvvvwad(gettype_vvvvwad) +// the vvvvwae function +function vvvvwae(gettype_vvvvwae) { - if (isSet(gettype_vvvvwad) && gettype_vvvvwad.constructor !== Array) + if (isSet(gettype_vvvvwae) && gettype_vvvvwae.constructor !== Array) { - var temp_vvvvwad = gettype_vvvvwad; - var gettype_vvvvwad = []; - gettype_vvvvwad.push(temp_vvvvwad); + var temp_vvvvwae = gettype_vvvvwae; + var gettype_vvvvwae = []; + gettype_vvvvwae.push(temp_vvvvwae); } - else if (!isSet(gettype_vvvvwad)) + else if (!isSet(gettype_vvvvwae)) { - var gettype_vvvvwad = []; + var gettype_vvvvwae = []; } - var gettype = gettype_vvvvwad.some(gettype_vvvvwad_SomeFunc); + var gettype = gettype_vvvvwae.some(gettype_vvvvwae_SomeFunc); // set this function logic @@ -122,73 +122,35 @@ function vvvvwad(gettype_vvvvwad) { jQuery('#jform_getcustom').closest('.control-group').show(); // add required attribute to getcustom field - if (jform_vvvvwadvwq_required) + if (jform_vvvvwaevwq_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); - jform_vvvvwadvwq_required = false; + jform_vvvvwaevwq_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); // remove required attribute from getcustom field - if (!jform_vvvvwadvwq_required) + if (!jform_vvvvwaevwq_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); - jform_vvvvwadvwq_required = true; + jform_vvvvwaevwq_required = true; } } } -// the vvvvwad Some function -function gettype_vvvvwad_SomeFunc(gettype_vvvvwad) -{ - // set the function logic - if (gettype_vvvvwad == 3 || gettype_vvvvwad == 4) - { - return true; - } - return false; -} - -// the vvvvwae function -function vvvvwae(main_source_vvvvwae) -{ - if (isSet(main_source_vvvvwae) && main_source_vvvvwae.constructor !== Array) - { - var temp_vvvvwae = main_source_vvvvwae; - var main_source_vvvvwae = []; - main_source_vvvvwae.push(temp_vvvvwae); - } - else if (!isSet(main_source_vvvvwae)) - { - var main_source_vvvvwae = []; - } - var main_source = main_source_vvvvwae.some(main_source_vvvvwae_SomeFunc); - - - // set this function logic - if (main_source) - { - jQuery('#jform_select_all').closest('.control-group').show(); - } - else - { - jQuery('#jform_select_all').closest('.control-group').hide(); - } -} - // the vvvvwae Some function -function main_source_vvvvwae_SomeFunc(main_source_vvvvwae) +function gettype_vvvvwae_SomeFunc(gettype_vvvvwae) { // set the function logic - if (main_source_vvvvwae == 1 || main_source_vvvvwae == 2) + if (gettype_vvvvwae == 3 || gettype_vvvvwae == 4) { return true; } @@ -214,29 +176,11 @@ function vvvvwaf(main_source_vvvvwaf) // set this function logic if (main_source) { - jQuery('#jform_view_table_main').closest('.control-group').show(); - // add required attribute to view_table_main field - if (jform_vvvvwafvwr_required) - { - updateFieldRequired('view_table_main',0); - jQuery('#jform_view_table_main').prop('required','required'); - jQuery('#jform_view_table_main').attr('aria-required',true); - jQuery('#jform_view_table_main').addClass('required'); - jform_vvvvwafvwr_required = false; - } + jQuery('#jform_select_all').closest('.control-group').show(); } else { - jQuery('#jform_view_table_main').closest('.control-group').hide(); - // remove required attribute from view_table_main field - if (!jform_vvvvwafvwr_required) - { - updateFieldRequired('view_table_main',1); - jQuery('#jform_view_table_main').removeAttr('required'); - jQuery('#jform_view_table_main').removeAttr('aria-required'); - jQuery('#jform_view_table_main').removeClass('required'); - jform_vvvvwafvwr_required = true; - } + jQuery('#jform_select_all').closest('.control-group').hide(); } } @@ -244,7 +188,7 @@ function vvvvwaf(main_source_vvvvwaf) function main_source_vvvvwaf_SomeFunc(main_source_vvvvwaf) { // set the function logic - if (main_source_vvvvwaf == 1) + if (main_source_vvvvwaf == 1 || main_source_vvvvwaf == 2) { return true; } @@ -270,28 +214,28 @@ function vvvvwag(main_source_vvvvwag) // set this function logic if (main_source) { - jQuery('#jform_view_selection').closest('.control-group').show(); - // add required attribute to view_selection field - if (jform_vvvvwagvws_required) + jQuery('#jform_view_table_main').closest('.control-group').show(); + // add required attribute to view_table_main field + if (jform_vvvvwagvwr_required) { - updateFieldRequired('view_selection',0); - jQuery('#jform_view_selection').prop('required','required'); - jQuery('#jform_view_selection').attr('aria-required',true); - jQuery('#jform_view_selection').addClass('required'); - jform_vvvvwagvws_required = false; + updateFieldRequired('view_table_main',0); + jQuery('#jform_view_table_main').prop('required','required'); + jQuery('#jform_view_table_main').attr('aria-required',true); + jQuery('#jform_view_table_main').addClass('required'); + jform_vvvvwagvwr_required = false; } } else { - jQuery('#jform_view_selection').closest('.control-group').hide(); - // remove required attribute from view_selection field - if (!jform_vvvvwagvws_required) + jQuery('#jform_view_table_main').closest('.control-group').hide(); + // remove required attribute from view_table_main field + if (!jform_vvvvwagvwr_required) { - updateFieldRequired('view_selection',1); - jQuery('#jform_view_selection').removeAttr('required'); - jQuery('#jform_view_selection').removeAttr('aria-required'); - jQuery('#jform_view_selection').removeClass('required'); - jform_vvvvwagvws_required = true; + updateFieldRequired('view_table_main',1); + jQuery('#jform_view_table_main').removeAttr('required'); + jQuery('#jform_view_table_main').removeAttr('aria-required'); + jQuery('#jform_view_table_main').removeClass('required'); + jform_vvvvwagvwr_required = true; } } } @@ -326,28 +270,28 @@ function vvvvwah(main_source_vvvvwah) // set this function logic if (main_source) { - jQuery('#jform_db_table_main').closest('.control-group').show(); - // add required attribute to db_table_main field - if (jform_vvvvwahvwt_required) + jQuery('#jform_view_selection').closest('.control-group').show(); + // add required attribute to view_selection field + if (jform_vvvvwahvws_required) { - updateFieldRequired('db_table_main',0); - jQuery('#jform_db_table_main').prop('required','required'); - jQuery('#jform_db_table_main').attr('aria-required',true); - jQuery('#jform_db_table_main').addClass('required'); - jform_vvvvwahvwt_required = false; + updateFieldRequired('view_selection',0); + jQuery('#jform_view_selection').prop('required','required'); + jQuery('#jform_view_selection').attr('aria-required',true); + jQuery('#jform_view_selection').addClass('required'); + jform_vvvvwahvws_required = false; } } else { - jQuery('#jform_db_table_main').closest('.control-group').hide(); - // remove required attribute from db_table_main field - if (!jform_vvvvwahvwt_required) + jQuery('#jform_view_selection').closest('.control-group').hide(); + // remove required attribute from view_selection field + if (!jform_vvvvwahvws_required) { - updateFieldRequired('db_table_main',1); - jQuery('#jform_db_table_main').removeAttr('required'); - jQuery('#jform_db_table_main').removeAttr('aria-required'); - jQuery('#jform_db_table_main').removeClass('required'); - jform_vvvvwahvwt_required = true; + updateFieldRequired('view_selection',1); + jQuery('#jform_view_selection').removeAttr('required'); + jQuery('#jform_view_selection').removeAttr('aria-required'); + jQuery('#jform_view_selection').removeClass('required'); + jform_vvvvwahvws_required = true; } } } @@ -356,7 +300,7 @@ function vvvvwah(main_source_vvvvwah) function main_source_vvvvwah_SomeFunc(main_source_vvvvwah) { // set the function logic - if (main_source_vvvvwah == 2) + if (main_source_vvvvwah == 1) { return true; } @@ -382,28 +326,28 @@ function vvvvwai(main_source_vvvvwai) // set this function logic if (main_source) { - jQuery('#jform_db_selection').closest('.control-group').show(); - // add required attribute to db_selection field - if (jform_vvvvwaivwu_required) + jQuery('#jform_db_table_main').closest('.control-group').show(); + // add required attribute to db_table_main field + if (jform_vvvvwaivwt_required) { - updateFieldRequired('db_selection',0); - jQuery('#jform_db_selection').prop('required','required'); - jQuery('#jform_db_selection').attr('aria-required',true); - jQuery('#jform_db_selection').addClass('required'); - jform_vvvvwaivwu_required = false; + updateFieldRequired('db_table_main',0); + jQuery('#jform_db_table_main').prop('required','required'); + jQuery('#jform_db_table_main').attr('aria-required',true); + jQuery('#jform_db_table_main').addClass('required'); + jform_vvvvwaivwt_required = false; } } else { - jQuery('#jform_db_selection').closest('.control-group').hide(); - // remove required attribute from db_selection field - if (!jform_vvvvwaivwu_required) + jQuery('#jform_db_table_main').closest('.control-group').hide(); + // remove required attribute from db_table_main field + if (!jform_vvvvwaivwt_required) { - updateFieldRequired('db_selection',1); - jQuery('#jform_db_selection').removeAttr('required'); - jQuery('#jform_db_selection').removeAttr('aria-required'); - jQuery('#jform_db_selection').removeClass('required'); - jform_vvvvwaivwu_required = true; + updateFieldRequired('db_table_main',1); + jQuery('#jform_db_table_main').removeAttr('required'); + jQuery('#jform_db_table_main').removeAttr('aria-required'); + jQuery('#jform_db_table_main').removeClass('required'); + jform_vvvvwaivwt_required = true; } } } @@ -420,10 +364,66 @@ function main_source_vvvvwai_SomeFunc(main_source_vvvvwai) } // the vvvvwaj function -function vvvvwaj(addcalculation_vvvvwaj) +function vvvvwaj(main_source_vvvvwaj) +{ + if (isSet(main_source_vvvvwaj) && main_source_vvvvwaj.constructor !== Array) + { + var temp_vvvvwaj = main_source_vvvvwaj; + var main_source_vvvvwaj = []; + main_source_vvvvwaj.push(temp_vvvvwaj); + } + else if (!isSet(main_source_vvvvwaj)) + { + var main_source_vvvvwaj = []; + } + var main_source = main_source_vvvvwaj.some(main_source_vvvvwaj_SomeFunc); + + + // set this function logic + if (main_source) + { + jQuery('#jform_db_selection').closest('.control-group').show(); + // add required attribute to db_selection field + if (jform_vvvvwajvwu_required) + { + updateFieldRequired('db_selection',0); + jQuery('#jform_db_selection').prop('required','required'); + jQuery('#jform_db_selection').attr('aria-required',true); + jQuery('#jform_db_selection').addClass('required'); + jform_vvvvwajvwu_required = false; + } + } + else + { + jQuery('#jform_db_selection').closest('.control-group').hide(); + // remove required attribute from db_selection field + if (!jform_vvvvwajvwu_required) + { + updateFieldRequired('db_selection',1); + jQuery('#jform_db_selection').removeAttr('required'); + jQuery('#jform_db_selection').removeAttr('aria-required'); + jQuery('#jform_db_selection').removeClass('required'); + jform_vvvvwajvwu_required = true; + } + } +} + +// the vvvvwaj Some function +function main_source_vvvvwaj_SomeFunc(main_source_vvvvwaj) { // set the function logic - if (addcalculation_vvvvwaj == 1) + if (main_source_vvvvwaj == 2) + { + return true; + } + return false; +} + +// the vvvvwak function +function vvvvwak(addcalculation_vvvvwak) +{ + // set the function logic + if (addcalculation_vvvvwak == 1) { jQuery('#jform_php_calculation-lbl').closest('.control-group').show(); } @@ -433,67 +433,6 @@ function vvvvwaj(addcalculation_vvvvwaj) } } -// the vvvvwak function -function vvvvwak(addcalculation_vvvvwak,gettype_vvvvwak) -{ - if (isSet(addcalculation_vvvvwak) && addcalculation_vvvvwak.constructor !== Array) - { - var temp_vvvvwak = addcalculation_vvvvwak; - var addcalculation_vvvvwak = []; - addcalculation_vvvvwak.push(temp_vvvvwak); - } - else if (!isSet(addcalculation_vvvvwak)) - { - var addcalculation_vvvvwak = []; - } - var addcalculation = addcalculation_vvvvwak.some(addcalculation_vvvvwak_SomeFunc); - - if (isSet(gettype_vvvvwak) && gettype_vvvvwak.constructor !== Array) - { - var temp_vvvvwak = gettype_vvvvwak; - var gettype_vvvvwak = []; - gettype_vvvvwak.push(temp_vvvvwak); - } - else if (!isSet(gettype_vvvvwak)) - { - var gettype_vvvvwak = []; - } - var gettype = gettype_vvvvwak.some(gettype_vvvvwak_SomeFunc); - - - // set this function logic - if (addcalculation && gettype) - { - jQuery('.note_calculation_item').closest('.control-group').show(); - } - else - { - jQuery('.note_calculation_item').closest('.control-group').hide(); - } -} - -// the vvvvwak Some function -function addcalculation_vvvvwak_SomeFunc(addcalculation_vvvvwak) -{ - // set the function logic - if (addcalculation_vvvvwak == 1) - { - return true; - } - return false; -} - -// the vvvvwak Some function -function gettype_vvvvwak_SomeFunc(gettype_vvvvwak) -{ - // set the function logic - if (gettype_vvvvwak == 1 || gettype_vvvvwak == 3) - { - return true; - } - return false; -} - // the vvvvwal function function vvvvwal(addcalculation_vvvvwal,gettype_vvvvwal) { @@ -525,11 +464,11 @@ function vvvvwal(addcalculation_vvvvwal,gettype_vvvvwal) // set this function logic if (addcalculation && gettype) { - jQuery('.note_calculation_items').closest('.control-group').show(); + jQuery('.note_calculation_item').closest('.control-group').show(); } else { - jQuery('.note_calculation_items').closest('.control-group').hide(); + jQuery('.note_calculation_item').closest('.control-group').hide(); } } @@ -548,45 +487,68 @@ function addcalculation_vvvvwal_SomeFunc(addcalculation_vvvvwal) function gettype_vvvvwal_SomeFunc(gettype_vvvvwal) { // set the function logic - if (gettype_vvvvwal == 2 || gettype_vvvvwal == 4) + if (gettype_vvvvwal == 1 || gettype_vvvvwal == 3) { return true; } return false; } -// the vvvvwao function -function vvvvwao(main_source_vvvvwao) +// the vvvvwam function +function vvvvwam(addcalculation_vvvvwam,gettype_vvvvwam) { - if (isSet(main_source_vvvvwao) && main_source_vvvvwao.constructor !== Array) + if (isSet(addcalculation_vvvvwam) && addcalculation_vvvvwam.constructor !== Array) { - var temp_vvvvwao = main_source_vvvvwao; - var main_source_vvvvwao = []; - main_source_vvvvwao.push(temp_vvvvwao); + var temp_vvvvwam = addcalculation_vvvvwam; + var addcalculation_vvvvwam = []; + addcalculation_vvvvwam.push(temp_vvvvwam); } - else if (!isSet(main_source_vvvvwao)) + else if (!isSet(addcalculation_vvvvwam)) { - var main_source_vvvvwao = []; + var addcalculation_vvvvwam = []; } - var main_source = main_source_vvvvwao.some(main_source_vvvvwao_SomeFunc); + var addcalculation = addcalculation_vvvvwam.some(addcalculation_vvvvwam_SomeFunc); + + if (isSet(gettype_vvvvwam) && gettype_vvvvwam.constructor !== Array) + { + var temp_vvvvwam = gettype_vvvvwam; + var gettype_vvvvwam = []; + gettype_vvvvwam.push(temp_vvvvwam); + } + else if (!isSet(gettype_vvvvwam)) + { + var gettype_vvvvwam = []; + } + var gettype = gettype_vvvvwam.some(gettype_vvvvwam_SomeFunc); // set this function logic - if (main_source) + if (addcalculation && gettype) { - jQuery('#jform_php_custom_get-lbl').closest('.control-group').show(); + jQuery('.note_calculation_items').closest('.control-group').show(); } else { - jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide(); + jQuery('.note_calculation_items').closest('.control-group').hide(); } } -// the vvvvwao Some function -function main_source_vvvvwao_SomeFunc(main_source_vvvvwao) +// the vvvvwam Some function +function addcalculation_vvvvwam_SomeFunc(addcalculation_vvvvwam) { // set the function logic - if (main_source_vvvvwao == 3) + if (addcalculation_vvvvwam == 1) + { + return true; + } + return false; +} + +// the vvvvwam Some function +function gettype_vvvvwam_SomeFunc(gettype_vvvvwam) +{ + // set the function logic + if (gettype_vvvvwam == 2 || gettype_vvvvwam == 4) { return true; } @@ -609,6 +571,44 @@ function vvvvwap(main_source_vvvvwap) var main_source = main_source_vvvvwap.some(main_source_vvvvwap_SomeFunc); + // set this function logic + if (main_source) + { + jQuery('#jform_php_custom_get-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide(); + } +} + +// the vvvvwap Some function +function main_source_vvvvwap_SomeFunc(main_source_vvvvwap) +{ + // set the function logic + if (main_source_vvvvwap == 3) + { + return true; + } + return false; +} + +// the vvvvwaq function +function vvvvwaq(main_source_vvvvwaq) +{ + if (isSet(main_source_vvvvwaq) && main_source_vvvvwaq.constructor !== Array) + { + var temp_vvvvwaq = main_source_vvvvwaq; + var main_source_vvvvwaq = []; + main_source_vvvvwaq.push(temp_vvvvwaq); + } + else if (!isSet(main_source_vvvvwaq)) + { + var main_source_vvvvwaq = []; + } + var main_source = main_source_vvvvwaq.some(main_source_vvvvwaq_SomeFunc); + + // set this function logic if (main_source) { @@ -632,72 +632,11 @@ function vvvvwap(main_source_vvvvwap) } } -// the vvvvwap Some function -function main_source_vvvvwap_SomeFunc(main_source_vvvvwap) -{ - // set the function logic - if (main_source_vvvvwap == 1 || main_source_vvvvwap == 2) - { - return true; - } - return false; -} - -// the vvvvwaq function -function vvvvwaq(add_php_before_getitem_vvvvwaq,gettype_vvvvwaq) -{ - if (isSet(add_php_before_getitem_vvvvwaq) && add_php_before_getitem_vvvvwaq.constructor !== Array) - { - var temp_vvvvwaq = add_php_before_getitem_vvvvwaq; - var add_php_before_getitem_vvvvwaq = []; - add_php_before_getitem_vvvvwaq.push(temp_vvvvwaq); - } - else if (!isSet(add_php_before_getitem_vvvvwaq)) - { - var add_php_before_getitem_vvvvwaq = []; - } - var add_php_before_getitem = add_php_before_getitem_vvvvwaq.some(add_php_before_getitem_vvvvwaq_SomeFunc); - - if (isSet(gettype_vvvvwaq) && gettype_vvvvwaq.constructor !== Array) - { - var temp_vvvvwaq = gettype_vvvvwaq; - var gettype_vvvvwaq = []; - gettype_vvvvwaq.push(temp_vvvvwaq); - } - else if (!isSet(gettype_vvvvwaq)) - { - var gettype_vvvvwaq = []; - } - var gettype = gettype_vvvvwaq.some(gettype_vvvvwaq_SomeFunc); - - - // set this function logic - if (add_php_before_getitem && gettype) - { - jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show(); - } - else - { - jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide(); - } -} - // the vvvvwaq Some function -function add_php_before_getitem_vvvvwaq_SomeFunc(add_php_before_getitem_vvvvwaq) +function main_source_vvvvwaq_SomeFunc(main_source_vvvvwaq) { // set the function logic - if (add_php_before_getitem_vvvvwaq == 1) - { - return true; - } - return false; -} - -// the vvvvwaq Some function -function gettype_vvvvwaq_SomeFunc(gettype_vvvvwaq) -{ - // set the function logic - if (gettype_vvvvwaq == 1 || gettype_vvvvwaq == 3) + if (main_source_vvvvwaq == 1 || main_source_vvvvwaq == 2) { return true; } @@ -705,19 +644,19 @@ function gettype_vvvvwaq_SomeFunc(gettype_vvvvwaq) } // the vvvvwar function -function vvvvwar(add_php_after_getitem_vvvvwar,gettype_vvvvwar) +function vvvvwar(add_php_before_getitem_vvvvwar,gettype_vvvvwar) { - if (isSet(add_php_after_getitem_vvvvwar) && add_php_after_getitem_vvvvwar.constructor !== Array) + if (isSet(add_php_before_getitem_vvvvwar) && add_php_before_getitem_vvvvwar.constructor !== Array) { - var temp_vvvvwar = add_php_after_getitem_vvvvwar; - var add_php_after_getitem_vvvvwar = []; - add_php_after_getitem_vvvvwar.push(temp_vvvvwar); + var temp_vvvvwar = add_php_before_getitem_vvvvwar; + var add_php_before_getitem_vvvvwar = []; + add_php_before_getitem_vvvvwar.push(temp_vvvvwar); } - else if (!isSet(add_php_after_getitem_vvvvwar)) + else if (!isSet(add_php_before_getitem_vvvvwar)) { - var add_php_after_getitem_vvvvwar = []; + var add_php_before_getitem_vvvvwar = []; } - var add_php_after_getitem = add_php_after_getitem_vvvvwar.some(add_php_after_getitem_vvvvwar_SomeFunc); + var add_php_before_getitem = add_php_before_getitem_vvvvwar.some(add_php_before_getitem_vvvvwar_SomeFunc); if (isSet(gettype_vvvvwar) && gettype_vvvvwar.constructor !== Array) { @@ -733,21 +672,21 @@ function vvvvwar(add_php_after_getitem_vvvvwar,gettype_vvvvwar) // set this function logic - if (add_php_after_getitem && gettype) + if (add_php_before_getitem && gettype) { - jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); + jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show(); } else { - jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); + jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide(); } } // the vvvvwar Some function -function add_php_after_getitem_vvvvwar_SomeFunc(add_php_after_getitem_vvvvwar) +function add_php_before_getitem_vvvvwar_SomeFunc(add_php_before_getitem_vvvvwar) { // set the function logic - if (add_php_after_getitem_vvvvwar == 1) + if (add_php_before_getitem_vvvvwar == 1) { return true; } @@ -765,76 +704,61 @@ function gettype_vvvvwar_SomeFunc(gettype_vvvvwar) return false; } -// the vvvvwat function -function vvvvwat(gettype_vvvvwat) +// the vvvvwas function +function vvvvwas(add_php_after_getitem_vvvvwas,gettype_vvvvwas) { - if (isSet(gettype_vvvvwat) && gettype_vvvvwat.constructor !== Array) + if (isSet(add_php_after_getitem_vvvvwas) && add_php_after_getitem_vvvvwas.constructor !== Array) { - var temp_vvvvwat = gettype_vvvvwat; - var gettype_vvvvwat = []; - gettype_vvvvwat.push(temp_vvvvwat); + var temp_vvvvwas = add_php_after_getitem_vvvvwas; + var add_php_after_getitem_vvvvwas = []; + add_php_after_getitem_vvvvwas.push(temp_vvvvwas); } - else if (!isSet(gettype_vvvvwat)) + else if (!isSet(add_php_after_getitem_vvvvwas)) { - var gettype_vvvvwat = []; + var add_php_after_getitem_vvvvwas = []; } - var gettype = gettype_vvvvwat.some(gettype_vvvvwat_SomeFunc); + var add_php_after_getitem = add_php_after_getitem_vvvvwas.some(add_php_after_getitem_vvvvwas_SomeFunc); + + if (isSet(gettype_vvvvwas) && gettype_vvvvwas.constructor !== Array) + { + var temp_vvvvwas = gettype_vvvvwas; + var gettype_vvvvwas = []; + gettype_vvvvwas.push(temp_vvvvwas); + } + else if (!isSet(gettype_vvvvwas)) + { + var gettype_vvvvwas = []; + } + var gettype = gettype_vvvvwas.some(gettype_vvvvwas_SomeFunc); // set this function logic - if (gettype) + if (add_php_after_getitem && gettype) { - jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); - // add required attribute to add_php_after_getitem field - if (jform_vvvvwatvwv_required) - { - updateFieldRequired('add_php_after_getitem',0); - jQuery('#jform_add_php_after_getitem').prop('required','required'); - jQuery('#jform_add_php_after_getitem').attr('aria-required',true); - jQuery('#jform_add_php_after_getitem').addClass('required'); - jform_vvvvwatvwv_required = false; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); - // add required attribute to add_php_before_getitem field - if (jform_vvvvwatvww_required) - { - updateFieldRequired('add_php_before_getitem',0); - jQuery('#jform_add_php_before_getitem').prop('required','required'); - jQuery('#jform_add_php_before_getitem').attr('aria-required',true); - jQuery('#jform_add_php_before_getitem').addClass('required'); - jform_vvvvwatvww_required = false; - } + jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); } else { - jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); - // remove required attribute from add_php_after_getitem field - if (!jform_vvvvwatvwv_required) - { - updateFieldRequired('add_php_after_getitem',1); - jQuery('#jform_add_php_after_getitem').removeAttr('required'); - jQuery('#jform_add_php_after_getitem').removeAttr('aria-required'); - jQuery('#jform_add_php_after_getitem').removeClass('required'); - jform_vvvvwatvwv_required = true; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); - // remove required attribute from add_php_before_getitem field - if (!jform_vvvvwatvww_required) - { - updateFieldRequired('add_php_before_getitem',1); - jQuery('#jform_add_php_before_getitem').removeAttr('required'); - jQuery('#jform_add_php_before_getitem').removeAttr('aria-required'); - jQuery('#jform_add_php_before_getitem').removeClass('required'); - jform_vvvvwatvww_required = true; - } + jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); } } -// the vvvvwat Some function -function gettype_vvvvwat_SomeFunc(gettype_vvvvwat) +// the vvvvwas Some function +function add_php_after_getitem_vvvvwas_SomeFunc(add_php_after_getitem_vvvvwas) { // set the function logic - if (gettype_vvvvwat == 1 || gettype_vvvvwat == 3) + if (add_php_after_getitem_vvvvwas == 1) + { + return true; + } + return false; +} + +// the vvvvwas Some function +function gettype_vvvvwas_SomeFunc(gettype_vvvvwas) +{ + // set the function logic + if (gettype_vvvvwas == 1 || gettype_vvvvwas == 3) { return true; } @@ -842,20 +766,8 @@ function gettype_vvvvwat_SomeFunc(gettype_vvvvwat) } // the vvvvwau function -function vvvvwau(add_php_getlistquery_vvvvwau,gettype_vvvvwau) +function vvvvwau(gettype_vvvvwau) { - if (isSet(add_php_getlistquery_vvvvwau) && add_php_getlistquery_vvvvwau.constructor !== Array) - { - var temp_vvvvwau = add_php_getlistquery_vvvvwau; - var add_php_getlistquery_vvvvwau = []; - add_php_getlistquery_vvvvwau.push(temp_vvvvwau); - } - else if (!isSet(add_php_getlistquery_vvvvwau)) - { - var add_php_getlistquery_vvvvwau = []; - } - var add_php_getlistquery = add_php_getlistquery_vvvvwau.some(add_php_getlistquery_vvvvwau_SomeFunc); - if (isSet(gettype_vvvvwau) && gettype_vvvvwau.constructor !== Array) { var temp_vvvvwau = gettype_vvvvwau; @@ -870,32 +782,59 @@ function vvvvwau(add_php_getlistquery_vvvvwau,gettype_vvvvwau) // set this function logic - if (add_php_getlistquery && gettype) + if (gettype) { - jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); + jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); + // add required attribute to add_php_after_getitem field + if (jform_vvvvwauvwv_required) + { + updateFieldRequired('add_php_after_getitem',0); + jQuery('#jform_add_php_after_getitem').prop('required','required'); + jQuery('#jform_add_php_after_getitem').attr('aria-required',true); + jQuery('#jform_add_php_after_getitem').addClass('required'); + jform_vvvvwauvwv_required = false; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); + // add required attribute to add_php_before_getitem field + if (jform_vvvvwauvww_required) + { + updateFieldRequired('add_php_before_getitem',0); + jQuery('#jform_add_php_before_getitem').prop('required','required'); + jQuery('#jform_add_php_before_getitem').attr('aria-required',true); + jQuery('#jform_add_php_before_getitem').addClass('required'); + jform_vvvvwauvww_required = false; + } } else { - jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); + jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); + // remove required attribute from add_php_after_getitem field + if (!jform_vvvvwauvwv_required) + { + updateFieldRequired('add_php_after_getitem',1); + jQuery('#jform_add_php_after_getitem').removeAttr('required'); + jQuery('#jform_add_php_after_getitem').removeAttr('aria-required'); + jQuery('#jform_add_php_after_getitem').removeClass('required'); + jform_vvvvwauvwv_required = true; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); + // remove required attribute from add_php_before_getitem field + if (!jform_vvvvwauvww_required) + { + updateFieldRequired('add_php_before_getitem',1); + jQuery('#jform_add_php_before_getitem').removeAttr('required'); + jQuery('#jform_add_php_before_getitem').removeAttr('aria-required'); + jQuery('#jform_add_php_before_getitem').removeClass('required'); + jform_vvvvwauvww_required = true; + } } } -// the vvvvwau Some function -function add_php_getlistquery_vvvvwau_SomeFunc(add_php_getlistquery_vvvvwau) -{ - // set the function logic - if (add_php_getlistquery_vvvvwau == 1) - { - return true; - } - return false; -} - // the vvvvwau Some function function gettype_vvvvwau_SomeFunc(gettype_vvvvwau) { // set the function logic - if (gettype_vvvvwau == 2 || gettype_vvvvwau == 4) + if (gettype_vvvvwau == 1 || gettype_vvvvwau == 3) { return true; } @@ -903,19 +842,19 @@ function gettype_vvvvwau_SomeFunc(gettype_vvvvwau) } // the vvvvwav function -function vvvvwav(add_php_before_getitems_vvvvwav,gettype_vvvvwav) +function vvvvwav(add_php_getlistquery_vvvvwav,gettype_vvvvwav) { - if (isSet(add_php_before_getitems_vvvvwav) && add_php_before_getitems_vvvvwav.constructor !== Array) + if (isSet(add_php_getlistquery_vvvvwav) && add_php_getlistquery_vvvvwav.constructor !== Array) { - var temp_vvvvwav = add_php_before_getitems_vvvvwav; - var add_php_before_getitems_vvvvwav = []; - add_php_before_getitems_vvvvwav.push(temp_vvvvwav); + var temp_vvvvwav = add_php_getlistquery_vvvvwav; + var add_php_getlistquery_vvvvwav = []; + add_php_getlistquery_vvvvwav.push(temp_vvvvwav); } - else if (!isSet(add_php_before_getitems_vvvvwav)) + else if (!isSet(add_php_getlistquery_vvvvwav)) { - var add_php_before_getitems_vvvvwav = []; + var add_php_getlistquery_vvvvwav = []; } - var add_php_before_getitems = add_php_before_getitems_vvvvwav.some(add_php_before_getitems_vvvvwav_SomeFunc); + var add_php_getlistquery = add_php_getlistquery_vvvvwav.some(add_php_getlistquery_vvvvwav_SomeFunc); if (isSet(gettype_vvvvwav) && gettype_vvvvwav.constructor !== Array) { @@ -931,21 +870,21 @@ function vvvvwav(add_php_before_getitems_vvvvwav,gettype_vvvvwav) // set this function logic - if (add_php_before_getitems && gettype) + if (add_php_getlistquery && gettype) { - jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show(); + jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } else { - jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); + jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); } } // the vvvvwav Some function -function add_php_before_getitems_vvvvwav_SomeFunc(add_php_before_getitems_vvvvwav) +function add_php_getlistquery_vvvvwav_SomeFunc(add_php_getlistquery_vvvvwav) { // set the function logic - if (add_php_before_getitems_vvvvwav == 1) + if (add_php_getlistquery_vvvvwav == 1) { return true; } @@ -964,19 +903,19 @@ function gettype_vvvvwav_SomeFunc(gettype_vvvvwav) } // the vvvvwaw function -function vvvvwaw(add_php_after_getitems_vvvvwaw,gettype_vvvvwaw) +function vvvvwaw(add_php_before_getitems_vvvvwaw,gettype_vvvvwaw) { - if (isSet(add_php_after_getitems_vvvvwaw) && add_php_after_getitems_vvvvwaw.constructor !== Array) + if (isSet(add_php_before_getitems_vvvvwaw) && add_php_before_getitems_vvvvwaw.constructor !== Array) { - var temp_vvvvwaw = add_php_after_getitems_vvvvwaw; - var add_php_after_getitems_vvvvwaw = []; - add_php_after_getitems_vvvvwaw.push(temp_vvvvwaw); + var temp_vvvvwaw = add_php_before_getitems_vvvvwaw; + var add_php_before_getitems_vvvvwaw = []; + add_php_before_getitems_vvvvwaw.push(temp_vvvvwaw); } - else if (!isSet(add_php_after_getitems_vvvvwaw)) + else if (!isSet(add_php_before_getitems_vvvvwaw)) { - var add_php_after_getitems_vvvvwaw = []; + var add_php_before_getitems_vvvvwaw = []; } - var add_php_after_getitems = add_php_after_getitems_vvvvwaw.some(add_php_after_getitems_vvvvwaw_SomeFunc); + var add_php_before_getitems = add_php_before_getitems_vvvvwaw.some(add_php_before_getitems_vvvvwaw_SomeFunc); if (isSet(gettype_vvvvwaw) && gettype_vvvvwaw.constructor !== Array) { @@ -992,21 +931,21 @@ function vvvvwaw(add_php_after_getitems_vvvvwaw,gettype_vvvvwaw) // set this function logic - if (add_php_after_getitems && gettype) + if (add_php_before_getitems && gettype) { - jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show(); + jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show(); } else { - jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); + jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); } } // the vvvvwaw Some function -function add_php_after_getitems_vvvvwaw_SomeFunc(add_php_after_getitems_vvvvwaw) +function add_php_before_getitems_vvvvwaw_SomeFunc(add_php_before_getitems_vvvvwaw) { // set the function logic - if (add_php_after_getitems_vvvvwaw == 1) + if (add_php_before_getitems_vvvvwaw == 1) { return true; } @@ -1024,96 +963,61 @@ function gettype_vvvvwaw_SomeFunc(gettype_vvvvwaw) return false; } -// the vvvvway function -function vvvvway(gettype_vvvvway) +// the vvvvwax function +function vvvvwax(add_php_after_getitems_vvvvwax,gettype_vvvvwax) { - if (isSet(gettype_vvvvway) && gettype_vvvvway.constructor !== Array) + if (isSet(add_php_after_getitems_vvvvwax) && add_php_after_getitems_vvvvwax.constructor !== Array) { - var temp_vvvvway = gettype_vvvvway; - var gettype_vvvvway = []; - gettype_vvvvway.push(temp_vvvvway); + var temp_vvvvwax = add_php_after_getitems_vvvvwax; + var add_php_after_getitems_vvvvwax = []; + add_php_after_getitems_vvvvwax.push(temp_vvvvwax); } - else if (!isSet(gettype_vvvvway)) + else if (!isSet(add_php_after_getitems_vvvvwax)) { - var gettype_vvvvway = []; + var add_php_after_getitems_vvvvwax = []; } - var gettype = gettype_vvvvway.some(gettype_vvvvway_SomeFunc); + var add_php_after_getitems = add_php_after_getitems_vvvvwax.some(add_php_after_getitems_vvvvwax_SomeFunc); + + if (isSet(gettype_vvvvwax) && gettype_vvvvwax.constructor !== Array) + { + var temp_vvvvwax = gettype_vvvvwax; + var gettype_vvvvwax = []; + gettype_vvvvwax.push(temp_vvvvwax); + } + else if (!isSet(gettype_vvvvwax)) + { + var gettype_vvvvwax = []; + } + var gettype = gettype_vvvvwax.some(gettype_vvvvwax_SomeFunc); // set this function logic - if (gettype) + if (add_php_after_getitems && gettype) { - jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); - // add required attribute to add_php_after_getitems field - if (jform_vvvvwayvwx_required) - { - updateFieldRequired('add_php_after_getitems',0); - jQuery('#jform_add_php_after_getitems').prop('required','required'); - jQuery('#jform_add_php_after_getitems').attr('aria-required',true); - jQuery('#jform_add_php_after_getitems').addClass('required'); - jform_vvvvwayvwx_required = false; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); - // add required attribute to add_php_before_getitems field - if (jform_vvvvwayvwy_required) - { - updateFieldRequired('add_php_before_getitems',0); - jQuery('#jform_add_php_before_getitems').prop('required','required'); - jQuery('#jform_add_php_before_getitems').attr('aria-required',true); - jQuery('#jform_add_php_before_getitems').addClass('required'); - jform_vvvvwayvwy_required = false; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); - // add required attribute to add_php_getlistquery field - if (jform_vvvvwayvwz_required) - { - updateFieldRequired('add_php_getlistquery',0); - jQuery('#jform_add_php_getlistquery').prop('required','required'); - jQuery('#jform_add_php_getlistquery').attr('aria-required',true); - jQuery('#jform_add_php_getlistquery').addClass('required'); - jform_vvvvwayvwz_required = false; - } + jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show(); } else { - jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); - // remove required attribute from add_php_after_getitems field - if (!jform_vvvvwayvwx_required) - { - updateFieldRequired('add_php_after_getitems',1); - jQuery('#jform_add_php_after_getitems').removeAttr('required'); - jQuery('#jform_add_php_after_getitems').removeAttr('aria-required'); - jQuery('#jform_add_php_after_getitems').removeClass('required'); - jform_vvvvwayvwx_required = true; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); - // remove required attribute from add_php_before_getitems field - if (!jform_vvvvwayvwy_required) - { - updateFieldRequired('add_php_before_getitems',1); - jQuery('#jform_add_php_before_getitems').removeAttr('required'); - jQuery('#jform_add_php_before_getitems').removeAttr('aria-required'); - jQuery('#jform_add_php_before_getitems').removeClass('required'); - jform_vvvvwayvwy_required = true; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); - // remove required attribute from add_php_getlistquery field - if (!jform_vvvvwayvwz_required) - { - updateFieldRequired('add_php_getlistquery',1); - jQuery('#jform_add_php_getlistquery').removeAttr('required'); - jQuery('#jform_add_php_getlistquery').removeAttr('aria-required'); - jQuery('#jform_add_php_getlistquery').removeClass('required'); - jform_vvvvwayvwz_required = true; - } + jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); } } -// the vvvvway Some function -function gettype_vvvvway_SomeFunc(gettype_vvvvway) +// the vvvvwax Some function +function add_php_after_getitems_vvvvwax_SomeFunc(add_php_after_getitems_vvvvwax) { // set the function logic - if (gettype_vvvvway == 2 || gettype_vvvvway == 4) + if (add_php_after_getitems_vvvvwax == 1) + { + return true; + } + return false; +} + +// the vvvvwax Some function +function gettype_vvvvwax_SomeFunc(gettype_vvvvwax) +{ + // set the function logic + if (gettype_vvvvwax == 2 || gettype_vvvvwax == 4) { return true; } @@ -1139,28 +1043,68 @@ function vvvvwaz(gettype_vvvvwaz) // set this function logic if (gettype) { - jQuery('#jform_pagination').closest('.control-group').show(); - // add required attribute to pagination field - if (jform_vvvvwazvxa_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); + // add required attribute to add_php_after_getitems field + if (jform_vvvvwazvwx_required) { - updateFieldRequired('pagination',0); - jQuery('#jform_pagination').prop('required','required'); - jQuery('#jform_pagination').attr('aria-required',true); - jQuery('#jform_pagination').addClass('required'); - jform_vvvvwazvxa_required = false; + updateFieldRequired('add_php_after_getitems',0); + jQuery('#jform_add_php_after_getitems').prop('required','required'); + jQuery('#jform_add_php_after_getitems').attr('aria-required',true); + jQuery('#jform_add_php_after_getitems').addClass('required'); + jform_vvvvwazvwx_required = false; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); + // add required attribute to add_php_before_getitems field + if (jform_vvvvwazvwy_required) + { + updateFieldRequired('add_php_before_getitems',0); + jQuery('#jform_add_php_before_getitems').prop('required','required'); + jQuery('#jform_add_php_before_getitems').attr('aria-required',true); + jQuery('#jform_add_php_before_getitems').addClass('required'); + jform_vvvvwazvwy_required = false; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); + // add required attribute to add_php_getlistquery field + if (jform_vvvvwazvwz_required) + { + updateFieldRequired('add_php_getlistquery',0); + jQuery('#jform_add_php_getlistquery').prop('required','required'); + jQuery('#jform_add_php_getlistquery').attr('aria-required',true); + jQuery('#jform_add_php_getlistquery').addClass('required'); + jform_vvvvwazvwz_required = false; } } else { - jQuery('#jform_pagination').closest('.control-group').hide(); - // remove required attribute from pagination field - if (!jform_vvvvwazvxa_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); + // remove required attribute from add_php_after_getitems field + if (!jform_vvvvwazvwx_required) { - updateFieldRequired('pagination',1); - jQuery('#jform_pagination').removeAttr('required'); - jQuery('#jform_pagination').removeAttr('aria-required'); - jQuery('#jform_pagination').removeClass('required'); - jform_vvvvwazvxa_required = true; + updateFieldRequired('add_php_after_getitems',1); + jQuery('#jform_add_php_after_getitems').removeAttr('required'); + jQuery('#jform_add_php_after_getitems').removeAttr('aria-required'); + jQuery('#jform_add_php_after_getitems').removeClass('required'); + jform_vvvvwazvwx_required = true; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); + // remove required attribute from add_php_before_getitems field + if (!jform_vvvvwazvwy_required) + { + updateFieldRequired('add_php_before_getitems',1); + jQuery('#jform_add_php_before_getitems').removeAttr('required'); + jQuery('#jform_add_php_before_getitems').removeAttr('aria-required'); + jQuery('#jform_add_php_before_getitems').removeClass('required'); + jform_vvvvwazvwy_required = true; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); + // remove required attribute from add_php_getlistquery field + if (!jform_vvvvwazvwz_required) + { + updateFieldRequired('add_php_getlistquery',1); + jQuery('#jform_add_php_getlistquery').removeAttr('required'); + jQuery('#jform_add_php_getlistquery').removeAttr('aria-required'); + jQuery('#jform_add_php_getlistquery').removeClass('required'); + jform_vvvvwazvwz_required = true; } } } @@ -1169,7 +1113,7 @@ function vvvvwaz(gettype_vvvvwaz) function gettype_vvvvwaz_SomeFunc(gettype_vvvvwaz) { // set the function logic - if (gettype_vvvvwaz == 2) + if (gettype_vvvvwaz == 2 || gettype_vvvvwaz == 4) { return true; } @@ -1195,28 +1139,28 @@ function vvvvwba(gettype_vvvvwba) // set this function logic if (gettype) { - jQuery('#jform_add_php_router_parse').closest('.control-group').show(); - // add required attribute to add_php_router_parse field - if (jform_vvvvwbavxb_required) + jQuery('#jform_pagination').closest('.control-group').show(); + // add required attribute to pagination field + if (jform_vvvvwbavxa_required) { - updateFieldRequired('add_php_router_parse',0); - jQuery('#jform_add_php_router_parse').prop('required','required'); - jQuery('#jform_add_php_router_parse').attr('aria-required',true); - jQuery('#jform_add_php_router_parse').addClass('required'); - jform_vvvvwbavxb_required = false; + updateFieldRequired('pagination',0); + jQuery('#jform_pagination').prop('required','required'); + jQuery('#jform_pagination').attr('aria-required',true); + jQuery('#jform_pagination').addClass('required'); + jform_vvvvwbavxa_required = false; } } else { - jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); - // remove required attribute from add_php_router_parse field - if (!jform_vvvvwbavxb_required) + jQuery('#jform_pagination').closest('.control-group').hide(); + // remove required attribute from pagination field + if (!jform_vvvvwbavxa_required) { - updateFieldRequired('add_php_router_parse',1); - jQuery('#jform_add_php_router_parse').removeAttr('required'); - jQuery('#jform_add_php_router_parse').removeAttr('aria-required'); - jQuery('#jform_add_php_router_parse').removeClass('required'); - jform_vvvvwbavxb_required = true; + updateFieldRequired('pagination',1); + jQuery('#jform_pagination').removeAttr('required'); + jQuery('#jform_pagination').removeAttr('aria-required'); + jQuery('#jform_pagination').removeClass('required'); + jform_vvvvwbavxa_required = true; } } } @@ -1225,7 +1169,7 @@ function vvvvwba(gettype_vvvvwba) function gettype_vvvvwba_SomeFunc(gettype_vvvvwba) { // set the function logic - if (gettype_vvvvwba == 1 || gettype_vvvvwba == 2) + if (gettype_vvvvwba == 2) { return true; } @@ -1233,7 +1177,7 @@ function gettype_vvvvwba_SomeFunc(gettype_vvvvwba) } // the vvvvwbb function -function vvvvwbb(gettype_vvvvwbb,add_php_router_parse_vvvvwbb) +function vvvvwbb(gettype_vvvvwbb) { if (isSet(gettype_vvvvwbb) && gettype_vvvvwbb.constructor !== Array) { @@ -1247,44 +1191,32 @@ function vvvvwbb(gettype_vvvvwbb,add_php_router_parse_vvvvwbb) } var gettype = gettype_vvvvwbb.some(gettype_vvvvwbb_SomeFunc); - if (isSet(add_php_router_parse_vvvvwbb) && add_php_router_parse_vvvvwbb.constructor !== Array) - { - var temp_vvvvwbb = add_php_router_parse_vvvvwbb; - var add_php_router_parse_vvvvwbb = []; - add_php_router_parse_vvvvwbb.push(temp_vvvvwbb); - } - else if (!isSet(add_php_router_parse_vvvvwbb)) - { - var add_php_router_parse_vvvvwbb = []; - } - var add_php_router_parse = add_php_router_parse_vvvvwbb.some(add_php_router_parse_vvvvwbb_SomeFunc); - // set this function logic - if (gettype && add_php_router_parse) + if (gettype) { - jQuery('#jform_php_router_parse').closest('.control-group').show(); - // add required attribute to php_router_parse field - if (jform_vvvvwbbvxc_required) + jQuery('#jform_add_php_router_parse').closest('.control-group').show(); + // add required attribute to add_php_router_parse field + if (jform_vvvvwbbvxb_required) { - updateFieldRequired('php_router_parse',0); - jQuery('#jform_php_router_parse').prop('required','required'); - jQuery('#jform_php_router_parse').attr('aria-required',true); - jQuery('#jform_php_router_parse').addClass('required'); - jform_vvvvwbbvxc_required = false; + updateFieldRequired('add_php_router_parse',0); + jQuery('#jform_add_php_router_parse').prop('required','required'); + jQuery('#jform_add_php_router_parse').attr('aria-required',true); + jQuery('#jform_add_php_router_parse').addClass('required'); + jform_vvvvwbbvxb_required = false; } } else { - jQuery('#jform_php_router_parse').closest('.control-group').hide(); - // remove required attribute from php_router_parse field - if (!jform_vvvvwbbvxc_required) + jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); + // remove required attribute from add_php_router_parse field + if (!jform_vvvvwbbvxb_required) { - updateFieldRequired('php_router_parse',1); - jQuery('#jform_php_router_parse').removeAttr('required'); - jQuery('#jform_php_router_parse').removeAttr('aria-required'); - jQuery('#jform_php_router_parse').removeClass('required'); - jform_vvvvwbbvxc_required = true; + updateFieldRequired('add_php_router_parse',1); + jQuery('#jform_add_php_router_parse').removeAttr('required'); + jQuery('#jform_add_php_router_parse').removeAttr('aria-required'); + jQuery('#jform_add_php_router_parse').removeClass('required'); + jform_vvvvwbbvxb_required = true; } } } @@ -1300,31 +1232,99 @@ function gettype_vvvvwbb_SomeFunc(gettype_vvvvwbb) return false; } -// the vvvvwbb Some function -function add_php_router_parse_vvvvwbb_SomeFunc(add_php_router_parse_vvvvwbb) +// the vvvvwbc function +function vvvvwbc(gettype_vvvvwbc,add_php_router_parse_vvvvwbc) +{ + if (isSet(gettype_vvvvwbc) && gettype_vvvvwbc.constructor !== Array) + { + var temp_vvvvwbc = gettype_vvvvwbc; + var gettype_vvvvwbc = []; + gettype_vvvvwbc.push(temp_vvvvwbc); + } + else if (!isSet(gettype_vvvvwbc)) + { + var gettype_vvvvwbc = []; + } + var gettype = gettype_vvvvwbc.some(gettype_vvvvwbc_SomeFunc); + + if (isSet(add_php_router_parse_vvvvwbc) && add_php_router_parse_vvvvwbc.constructor !== Array) + { + var temp_vvvvwbc = add_php_router_parse_vvvvwbc; + var add_php_router_parse_vvvvwbc = []; + add_php_router_parse_vvvvwbc.push(temp_vvvvwbc); + } + else if (!isSet(add_php_router_parse_vvvvwbc)) + { + var add_php_router_parse_vvvvwbc = []; + } + var add_php_router_parse = add_php_router_parse_vvvvwbc.some(add_php_router_parse_vvvvwbc_SomeFunc); + + + // set this function logic + if (gettype && add_php_router_parse) + { + jQuery('#jform_php_router_parse').closest('.control-group').show(); + // add required attribute to php_router_parse field + if (jform_vvvvwbcvxc_required) + { + updateFieldRequired('php_router_parse',0); + jQuery('#jform_php_router_parse').prop('required','required'); + jQuery('#jform_php_router_parse').attr('aria-required',true); + jQuery('#jform_php_router_parse').addClass('required'); + jform_vvvvwbcvxc_required = false; + } + } + else + { + jQuery('#jform_php_router_parse').closest('.control-group').hide(); + // remove required attribute from php_router_parse field + if (!jform_vvvvwbcvxc_required) + { + updateFieldRequired('php_router_parse',1); + jQuery('#jform_php_router_parse').removeAttr('required'); + jQuery('#jform_php_router_parse').removeAttr('aria-required'); + jQuery('#jform_php_router_parse').removeClass('required'); + jform_vvvvwbcvxc_required = true; + } + } +} + +// the vvvvwbc Some function +function gettype_vvvvwbc_SomeFunc(gettype_vvvvwbc) { // set the function logic - if (add_php_router_parse_vvvvwbb == 1) + if (gettype_vvvvwbc == 1 || gettype_vvvvwbc == 2) { return true; } return false; } -// the vvvvwbd function -function vvvvwbd(gettype_vvvvwbd) +// the vvvvwbc Some function +function add_php_router_parse_vvvvwbc_SomeFunc(add_php_router_parse_vvvvwbc) { - if (isSet(gettype_vvvvwbd) && gettype_vvvvwbd.constructor !== Array) + // set the function logic + if (add_php_router_parse_vvvvwbc == 1) { - var temp_vvvvwbd = gettype_vvvvwbd; - var gettype_vvvvwbd = []; - gettype_vvvvwbd.push(temp_vvvvwbd); + return true; } - else if (!isSet(gettype_vvvvwbd)) + return false; +} + +// the vvvvwbe function +function vvvvwbe(gettype_vvvvwbe) +{ + if (isSet(gettype_vvvvwbe) && gettype_vvvvwbe.constructor !== Array) { - var gettype_vvvvwbd = []; + var temp_vvvvwbe = gettype_vvvvwbe; + var gettype_vvvvwbe = []; + gettype_vvvvwbe.push(temp_vvvvwbe); } - var gettype = gettype_vvvvwbd.some(gettype_vvvvwbd_SomeFunc); + else if (!isSet(gettype_vvvvwbe)) + { + var gettype_vvvvwbe = []; + } + var gettype = gettype_vvvvwbe.some(gettype_vvvvwbe_SomeFunc); // set this function logic @@ -1338,11 +1338,11 @@ function vvvvwbd(gettype_vvvvwbd) } } -// the vvvvwbd Some function -function gettype_vvvvwbd_SomeFunc(gettype_vvvvwbd) +// the vvvvwbe Some function +function gettype_vvvvwbe_SomeFunc(gettype_vvvvwbe) { // set the function logic - if (gettype_vvvvwbd == 1) + if (gettype_vvvvwbe == 1) { return true; } diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 82bbab7a2..2da271b04 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -9,57 +9,57 @@ */ // Some Global Values -jform_vvvvwbsvxl_required = false; -jform_vvvvwbtvxm_required = false; -jform_vvvvwbuvxn_required = false; -jform_vvvvwbvvxo_required = false; +jform_vvvvwbtvxl_required = false; +jform_vvvvwbuvxm_required = false; +jform_vvvvwbvvxn_required = false; +jform_vvvvwbwvxo_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwbs = jQuery("#jform_datalenght").val(); - vvvvwbs(datalenght_vvvvwbs); + var datalenght_vvvvwbt = jQuery("#jform_datalenght").val(); + vvvvwbt(datalenght_vvvvwbt); - var datadefault_vvvvwbt = jQuery("#jform_datadefault").val(); - vvvvwbt(datadefault_vvvvwbt); - - var datatype_vvvvwbu = jQuery("#jform_datatype").val(); - vvvvwbu(datatype_vvvvwbu); + var datadefault_vvvvwbu = jQuery("#jform_datadefault").val(); + vvvvwbu(datadefault_vvvvwbu); var datatype_vvvvwbv = jQuery("#jform_datatype").val(); vvvvwbv(datatype_vvvvwbv); - var store_vvvvwbw = jQuery("#jform_store").val(); var datatype_vvvvwbw = jQuery("#jform_datatype").val(); - vvvvwbw(store_vvvvwbw,datatype_vvvvwbw); + vvvvwbw(datatype_vvvvwbw); - var add_css_view_vvvvwby = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwby(add_css_view_vvvvwby); + var store_vvvvwbx = jQuery("#jform_store").val(); + var datatype_vvvvwbx = jQuery("#jform_datatype").val(); + vvvvwbx(store_vvvvwbx,datatype_vvvvwbx); - var add_css_views_vvvvwbz = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwbz(add_css_views_vvvvwbz); + var add_css_view_vvvvwbz = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwbz(add_css_view_vvvvwbz); - var add_javascript_view_footer_vvvvwca = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwca(add_javascript_view_footer_vvvvwca); + var add_css_views_vvvvwca = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwca(add_css_views_vvvvwca); - var add_javascript_views_footer_vvvvwcb = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwcb(add_javascript_views_footer_vvvvwcb); + var add_javascript_view_footer_vvvvwcb = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwcb(add_javascript_view_footer_vvvvwcb); + + var add_javascript_views_footer_vvvvwcc = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwcc(add_javascript_views_footer_vvvvwcc); }); -// the vvvvwbs function -function vvvvwbs(datalenght_vvvvwbs) +// the vvvvwbt function +function vvvvwbt(datalenght_vvvvwbt) { - if (isSet(datalenght_vvvvwbs) && datalenght_vvvvwbs.constructor !== Array) + if (isSet(datalenght_vvvvwbt) && datalenght_vvvvwbt.constructor !== Array) { - var temp_vvvvwbs = datalenght_vvvvwbs; - var datalenght_vvvvwbs = []; - datalenght_vvvvwbs.push(temp_vvvvwbs); + var temp_vvvvwbt = datalenght_vvvvwbt; + var datalenght_vvvvwbt = []; + datalenght_vvvvwbt.push(temp_vvvvwbt); } - else if (!isSet(datalenght_vvvvwbs)) + else if (!isSet(datalenght_vvvvwbt)) { - var datalenght_vvvvwbs = []; + var datalenght_vvvvwbt = []; } - var datalenght = datalenght_vvvvwbs.some(datalenght_vvvvwbs_SomeFunc); + var datalenght = datalenght_vvvvwbt.some(datalenght_vvvvwbt_SomeFunc); // set this function logic @@ -67,91 +67,35 @@ function vvvvwbs(datalenght_vvvvwbs) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwbsvxl_required) + if (jform_vvvvwbtvxl_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvwbsvxl_required = false; + jform_vvvvwbtvxl_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwbsvxl_required) + if (!jform_vvvvwbtvxl_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvwbsvxl_required = true; - } - } -} - -// the vvvvwbs Some function -function datalenght_vvvvwbs_SomeFunc(datalenght_vvvvwbs) -{ - // set the function logic - if (datalenght_vvvvwbs == 'Other') - { - return true; - } - return false; -} - -// the vvvvwbt function -function vvvvwbt(datadefault_vvvvwbt) -{ - if (isSet(datadefault_vvvvwbt) && datadefault_vvvvwbt.constructor !== Array) - { - var temp_vvvvwbt = datadefault_vvvvwbt; - var datadefault_vvvvwbt = []; - datadefault_vvvvwbt.push(temp_vvvvwbt); - } - else if (!isSet(datadefault_vvvvwbt)) - { - var datadefault_vvvvwbt = []; - } - var datadefault = datadefault_vvvvwbt.some(datadefault_vvvvwbt_SomeFunc); - - - // set this function logic - if (datadefault) - { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwbtvxm_required) - { - updateFieldRequired('datadefault_other',0); - jQuery('#jform_datadefault_other').prop('required','required'); - jQuery('#jform_datadefault_other').attr('aria-required',true); - jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvwbtvxm_required = false; - } - } - else - { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwbtvxm_required) - { - updateFieldRequired('datadefault_other',1); - jQuery('#jform_datadefault_other').removeAttr('required'); - jQuery('#jform_datadefault_other').removeAttr('aria-required'); - jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvwbtvxm_required = true; + jform_vvvvwbtvxl_required = true; } } } // the vvvvwbt Some function -function datadefault_vvvvwbt_SomeFunc(datadefault_vvvvwbt) +function datalenght_vvvvwbt_SomeFunc(datalenght_vvvvwbt) { // set the function logic - if (datadefault_vvvvwbt == 'Other') + if (datalenght_vvvvwbt == 'Other') { return true; } @@ -159,59 +103,55 @@ function datadefault_vvvvwbt_SomeFunc(datadefault_vvvvwbt) } // the vvvvwbu function -function vvvvwbu(datatype_vvvvwbu) +function vvvvwbu(datadefault_vvvvwbu) { - if (isSet(datatype_vvvvwbu) && datatype_vvvvwbu.constructor !== Array) + if (isSet(datadefault_vvvvwbu) && datadefault_vvvvwbu.constructor !== Array) { - var temp_vvvvwbu = datatype_vvvvwbu; - var datatype_vvvvwbu = []; - datatype_vvvvwbu.push(temp_vvvvwbu); + var temp_vvvvwbu = datadefault_vvvvwbu; + var datadefault_vvvvwbu = []; + datadefault_vvvvwbu.push(temp_vvvvwbu); } - else if (!isSet(datatype_vvvvwbu)) + else if (!isSet(datadefault_vvvvwbu)) { - var datatype_vvvvwbu = []; + var datadefault_vvvvwbu = []; } - var datatype = datatype_vvvvwbu.some(datatype_vvvvwbu_SomeFunc); + var datadefault = datadefault_vvvvwbu.some(datadefault_vvvvwbu_SomeFunc); // set this function logic - if (datatype) + if (datadefault) { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwbuvxn_required) + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field + if (jform_vvvvwbuvxm_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbuvxn_required = false; + updateFieldRequired('datadefault_other',0); + jQuery('#jform_datadefault_other').prop('required','required'); + jQuery('#jform_datadefault_other').attr('aria-required',true); + jQuery('#jform_datadefault_other').addClass('required'); + jform_vvvvwbuvxm_required = false; } } else { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwbuvxn_required) + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field + if (!jform_vvvvwbuvxm_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbuvxn_required = true; + updateFieldRequired('datadefault_other',1); + jQuery('#jform_datadefault_other').removeAttr('required'); + jQuery('#jform_datadefault_other').removeAttr('aria-required'); + jQuery('#jform_datadefault_other').removeClass('required'); + jform_vvvvwbuvxm_required = true; } } } // the vvvvwbu Some function -function datatype_vvvvwbu_SomeFunc(datatype_vvvvwbu) +function datadefault_vvvvwbu_SomeFunc(datadefault_vvvvwbu) { // set the function logic - if (datatype_vvvvwbu == 'CHAR' || datatype_vvvvwbu == 'VARCHAR' || datatype_vvvvwbu == 'DATETIME' || datatype_vvvvwbu == 'DATE' || datatype_vvvvwbu == 'TIME' || datatype_vvvvwbu == 'INT' || datatype_vvvvwbu == 'TINYINT' || datatype_vvvvwbu == 'BIGINT' || datatype_vvvvwbu == 'FLOAT' || datatype_vvvvwbu == 'DECIMAL' || datatype_vvvvwbu == 'DOUBLE') + if (datadefault_vvvvwbu == 'Other') { return true; } @@ -237,28 +177,32 @@ function vvvvwbv(datatype_vvvvwbv) // set this function logic if (datatype) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwbvvxo_required) + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_datalenght').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwbvvxn_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwbvvxo_required = false; + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwbvvxn_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwbvvxo_required) + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_datalenght').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwbvvxn_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwbvvxo_required = true; + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwbvvxn_required = true; } } } @@ -267,7 +211,7 @@ function vvvvwbv(datatype_vvvvwbv) function datatype_vvvvwbv_SomeFunc(datatype_vvvvwbv) { // set the function logic - if (datatype_vvvvwbv == 'CHAR' || datatype_vvvvwbv == 'VARCHAR' || datatype_vvvvwbv == 'TEXT' || datatype_vvvvwbv == 'MEDIUMTEXT' || datatype_vvvvwbv == 'LONGTEXT' || datatype_vvvvwbv == 'BLOB' || datatype_vvvvwbv == 'TINYBLOB' || datatype_vvvvwbv == 'MEDIUMBLOB' || datatype_vvvvwbv == 'LONGBLOB') + if (datatype_vvvvwbv == 'CHAR' || datatype_vvvvwbv == 'VARCHAR' || datatype_vvvvwbv == 'DATETIME' || datatype_vvvvwbv == 'DATE' || datatype_vvvvwbv == 'TIME' || datatype_vvvvwbv == 'INT' || datatype_vvvvwbv == 'TINYINT' || datatype_vvvvwbv == 'BIGINT' || datatype_vvvvwbv == 'FLOAT' || datatype_vvvvwbv == 'DECIMAL' || datatype_vvvvwbv == 'DOUBLE') { return true; } @@ -275,20 +219,8 @@ function datatype_vvvvwbv_SomeFunc(datatype_vvvvwbv) } // the vvvvwbw function -function vvvvwbw(store_vvvvwbw,datatype_vvvvwbw) +function vvvvwbw(datatype_vvvvwbw) { - if (isSet(store_vvvvwbw) && store_vvvvwbw.constructor !== Array) - { - var temp_vvvvwbw = store_vvvvwbw; - var store_vvvvwbw = []; - store_vvvvwbw.push(temp_vvvvwbw); - } - else if (!isSet(store_vvvvwbw)) - { - var store_vvvvwbw = []; - } - var store = store_vvvvwbw.some(store_vvvvwbw_SomeFunc); - if (isSet(datatype_vvvvwbw) && datatype_vvvvwbw.constructor !== Array) { var temp_vvvvwbw = datatype_vvvvwbw; @@ -303,27 +235,34 @@ function vvvvwbw(store_vvvvwbw,datatype_vvvvwbw) // set this function logic - if (store && datatype) + if (datatype) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwbwvxo_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwbwvxo_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwbwvxo_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwbwvxo_required = true; + } } } -// the vvvvwbw Some function -function store_vvvvwbw_SomeFunc(store_vvvvwbw) -{ - // set the function logic - if (store_vvvvwbw == 4) - { - return true; - } - return false; -} - // the vvvvwbw Some function function datatype_vvvvwbw_SomeFunc(datatype_vvvvwbw) { @@ -335,11 +274,72 @@ function datatype_vvvvwbw_SomeFunc(datatype_vvvvwbw) return false; } -// the vvvvwby function -function vvvvwby(add_css_view_vvvvwby) +// the vvvvwbx function +function vvvvwbx(store_vvvvwbx,datatype_vvvvwbx) +{ + if (isSet(store_vvvvwbx) && store_vvvvwbx.constructor !== Array) + { + var temp_vvvvwbx = store_vvvvwbx; + var store_vvvvwbx = []; + store_vvvvwbx.push(temp_vvvvwbx); + } + else if (!isSet(store_vvvvwbx)) + { + var store_vvvvwbx = []; + } + var store = store_vvvvwbx.some(store_vvvvwbx_SomeFunc); + + if (isSet(datatype_vvvvwbx) && datatype_vvvvwbx.constructor !== Array) + { + var temp_vvvvwbx = datatype_vvvvwbx; + var datatype_vvvvwbx = []; + datatype_vvvvwbx.push(temp_vvvvwbx); + } + else if (!isSet(datatype_vvvvwbx)) + { + var datatype_vvvvwbx = []; + } + var datatype = datatype_vvvvwbx.some(datatype_vvvvwbx_SomeFunc); + + + // set this function logic + if (store && datatype) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbx Some function +function store_vvvvwbx_SomeFunc(store_vvvvwbx) { // set the function logic - if (add_css_view_vvvvwby == 1) + if (store_vvvvwbx == 4) + { + return true; + } + return false; +} + +// the vvvvwbx Some function +function datatype_vvvvwbx_SomeFunc(datatype_vvvvwbx) +{ + // set the function logic + if (datatype_vvvvwbx == 'CHAR' || datatype_vvvvwbx == 'VARCHAR' || datatype_vvvvwbx == 'TEXT' || datatype_vvvvwbx == 'MEDIUMTEXT' || datatype_vvvvwbx == 'LONGTEXT' || datatype_vvvvwbx == 'BLOB' || datatype_vvvvwbx == 'TINYBLOB' || datatype_vvvvwbx == 'MEDIUMBLOB' || datatype_vvvvwbx == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbz function +function vvvvwbz(add_css_view_vvvvwbz) +{ + // set the function logic + if (add_css_view_vvvvwbz == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -349,11 +349,11 @@ function vvvvwby(add_css_view_vvvvwby) } } -// the vvvvwbz function -function vvvvwbz(add_css_views_vvvvwbz) +// the vvvvwca function +function vvvvwca(add_css_views_vvvvwca) { // set the function logic - if (add_css_views_vvvvwbz == 1) + if (add_css_views_vvvvwca == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -363,11 +363,11 @@ function vvvvwbz(add_css_views_vvvvwbz) } } -// the vvvvwca function -function vvvvwca(add_javascript_view_footer_vvvvwca) +// the vvvvwcb function +function vvvvwcb(add_javascript_view_footer_vvvvwcb) { // set the function logic - if (add_javascript_view_footer_vvvvwca == 1) + if (add_javascript_view_footer_vvvvwcb == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -377,11 +377,11 @@ function vvvvwca(add_javascript_view_footer_vvvvwca) } } -// the vvvvwcb function -function vvvvwcb(add_javascript_views_footer_vvvvwcb) +// the vvvvwcc function +function vvvvwcc(add_javascript_views_footer_vvvvwcc) { // set the function logic - if (add_javascript_views_footer_vvvvwcb == 1) + if (add_javascript_views_footer_vvvvwcc == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index 8184eac22..3dcab48f6 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,82 +9,82 @@ */ // Some Global Values -jform_vvvvwccvxp_required = false; -jform_vvvvwcevxq_required = false; -jform_vvvvwcgvxr_required = false; -jform_vvvvwchvxs_required = false; -jform_vvvvwcivxt_required = false; -jform_vvvvwcnvxu_required = false; -jform_vvvvwcnvxv_required = false; +jform_vvvvwcdvxp_required = false; +jform_vvvvwcfvxq_required = false; +jform_vvvvwchvxr_required = false; +jform_vvvvwcivxs_required = false; +jform_vvvvwcjvxt_required = false; +jform_vvvvwcovxu_required = false; +jform_vvvvwcovxv_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwcc = jQuery("#jform_datalenght").val(); - var has_defaults_vvvvwcc = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwcc(datalenght_vvvvwcc,has_defaults_vvvvwcc); + var datalenght_vvvvwcd = jQuery("#jform_datalenght").val(); + var has_defaults_vvvvwcd = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwcd(datalenght_vvvvwcd,has_defaults_vvvvwcd); - var datadefault_vvvvwce = jQuery("#jform_datadefault").val(); - var has_defaults_vvvvwce = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwce(datadefault_vvvvwce,has_defaults_vvvvwce); + var datadefault_vvvvwcf = jQuery("#jform_datadefault").val(); + var has_defaults_vvvvwcf = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwcf(datadefault_vvvvwcf,has_defaults_vvvvwcf); - var datatype_vvvvwcg = jQuery("#jform_datatype").val(); - var has_defaults_vvvvwcg = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwcg(datatype_vvvvwcg,has_defaults_vvvvwcg); - - var has_defaults_vvvvwch = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var datatype_vvvvwch = jQuery("#jform_datatype").val(); - vvvvwch(has_defaults_vvvvwch,datatype_vvvvwch); + var has_defaults_vvvvwch = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwch(datatype_vvvvwch,has_defaults_vvvvwch); - var datatype_vvvvwci = jQuery("#jform_datatype").val(); var has_defaults_vvvvwci = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwci(datatype_vvvvwci,has_defaults_vvvvwci); + var datatype_vvvvwci = jQuery("#jform_datatype").val(); + vvvvwci(has_defaults_vvvvwci,datatype_vvvvwci); - var store_vvvvwck = jQuery("#jform_store").val(); - var datatype_vvvvwck = jQuery("#jform_datatype").val(); - var has_defaults_vvvvwck = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwck(store_vvvvwck,datatype_vvvvwck,has_defaults_vvvvwck); + var datatype_vvvvwcj = jQuery("#jform_datatype").val(); + var has_defaults_vvvvwcj = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwcj(datatype_vvvvwcj,has_defaults_vvvvwcj); - var datatype_vvvvwcl = jQuery("#jform_datatype").val(); var store_vvvvwcl = jQuery("#jform_store").val(); + var datatype_vvvvwcl = jQuery("#jform_datatype").val(); var has_defaults_vvvvwcl = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwcl(datatype_vvvvwcl,store_vvvvwcl,has_defaults_vvvvwcl); + vvvvwcl(store_vvvvwcl,datatype_vvvvwcl,has_defaults_vvvvwcl); - var has_defaults_vvvvwcm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var store_vvvvwcm = jQuery("#jform_store").val(); var datatype_vvvvwcm = jQuery("#jform_datatype").val(); - vvvvwcm(has_defaults_vvvvwcm,store_vvvvwcm,datatype_vvvvwcm); + var store_vvvvwcm = jQuery("#jform_store").val(); + var has_defaults_vvvvwcm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwcm(datatype_vvvvwcm,store_vvvvwcm,has_defaults_vvvvwcm); var has_defaults_vvvvwcn = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwcn(has_defaults_vvvvwcn); + var store_vvvvwcn = jQuery("#jform_store").val(); + var datatype_vvvvwcn = jQuery("#jform_datatype").val(); + vvvvwcn(has_defaults_vvvvwcn,store_vvvvwcn,datatype_vvvvwcn); + + var has_defaults_vvvvwco = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwco(has_defaults_vvvvwco); }); -// the vvvvwcc function -function vvvvwcc(datalenght_vvvvwcc,has_defaults_vvvvwcc) +// the vvvvwcd function +function vvvvwcd(datalenght_vvvvwcd,has_defaults_vvvvwcd) { - if (isSet(datalenght_vvvvwcc) && datalenght_vvvvwcc.constructor !== Array) + if (isSet(datalenght_vvvvwcd) && datalenght_vvvvwcd.constructor !== Array) { - var temp_vvvvwcc = datalenght_vvvvwcc; - var datalenght_vvvvwcc = []; - datalenght_vvvvwcc.push(temp_vvvvwcc); + var temp_vvvvwcd = datalenght_vvvvwcd; + var datalenght_vvvvwcd = []; + datalenght_vvvvwcd.push(temp_vvvvwcd); } - else if (!isSet(datalenght_vvvvwcc)) + else if (!isSet(datalenght_vvvvwcd)) { - var datalenght_vvvvwcc = []; + var datalenght_vvvvwcd = []; } - var datalenght = datalenght_vvvvwcc.some(datalenght_vvvvwcc_SomeFunc); + var datalenght = datalenght_vvvvwcd.some(datalenght_vvvvwcd_SomeFunc); - if (isSet(has_defaults_vvvvwcc) && has_defaults_vvvvwcc.constructor !== Array) + if (isSet(has_defaults_vvvvwcd) && has_defaults_vvvvwcd.constructor !== Array) { - var temp_vvvvwcc = has_defaults_vvvvwcc; - var has_defaults_vvvvwcc = []; - has_defaults_vvvvwcc.push(temp_vvvvwcc); + var temp_vvvvwcd = has_defaults_vvvvwcd; + var has_defaults_vvvvwcd = []; + has_defaults_vvvvwcd.push(temp_vvvvwcd); } - else if (!isSet(has_defaults_vvvvwcc)) + else if (!isSet(has_defaults_vvvvwcd)) { - var has_defaults_vvvvwcc = []; + var has_defaults_vvvvwcd = []; } - var has_defaults = has_defaults_vvvvwcc.some(has_defaults_vvvvwcc_SomeFunc); + var has_defaults = has_defaults_vvvvwcd.some(has_defaults_vvvvwcd_SomeFunc); // set this function logic @@ -92,78 +92,78 @@ function vvvvwcc(datalenght_vvvvwcc,has_defaults_vvvvwcc) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwccvxp_required) + if (jform_vvvvwcdvxp_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvwccvxp_required = false; + jform_vvvvwcdvxp_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwccvxp_required) + if (!jform_vvvvwcdvxp_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvwccvxp_required = true; + jform_vvvvwcdvxp_required = true; } } } -// the vvvvwcc Some function -function datalenght_vvvvwcc_SomeFunc(datalenght_vvvvwcc) +// the vvvvwcd Some function +function datalenght_vvvvwcd_SomeFunc(datalenght_vvvvwcd) { // set the function logic - if (datalenght_vvvvwcc == 'Other') + if (datalenght_vvvvwcd == 'Other') { return true; } return false; } -// the vvvvwcc Some function -function has_defaults_vvvvwcc_SomeFunc(has_defaults_vvvvwcc) +// the vvvvwcd Some function +function has_defaults_vvvvwcd_SomeFunc(has_defaults_vvvvwcd) { // set the function logic - if (has_defaults_vvvvwcc == 1) + if (has_defaults_vvvvwcd == 1) { return true; } return false; } -// the vvvvwce function -function vvvvwce(datadefault_vvvvwce,has_defaults_vvvvwce) +// the vvvvwcf function +function vvvvwcf(datadefault_vvvvwcf,has_defaults_vvvvwcf) { - if (isSet(datadefault_vvvvwce) && datadefault_vvvvwce.constructor !== Array) + if (isSet(datadefault_vvvvwcf) && datadefault_vvvvwcf.constructor !== Array) { - var temp_vvvvwce = datadefault_vvvvwce; - var datadefault_vvvvwce = []; - datadefault_vvvvwce.push(temp_vvvvwce); + var temp_vvvvwcf = datadefault_vvvvwcf; + var datadefault_vvvvwcf = []; + datadefault_vvvvwcf.push(temp_vvvvwcf); } - else if (!isSet(datadefault_vvvvwce)) + else if (!isSet(datadefault_vvvvwcf)) { - var datadefault_vvvvwce = []; + var datadefault_vvvvwcf = []; } - var datadefault = datadefault_vvvvwce.some(datadefault_vvvvwce_SomeFunc); + var datadefault = datadefault_vvvvwcf.some(datadefault_vvvvwcf_SomeFunc); - if (isSet(has_defaults_vvvvwce) && has_defaults_vvvvwce.constructor !== Array) + if (isSet(has_defaults_vvvvwcf) && has_defaults_vvvvwcf.constructor !== Array) { - var temp_vvvvwce = has_defaults_vvvvwce; - var has_defaults_vvvvwce = []; - has_defaults_vvvvwce.push(temp_vvvvwce); + var temp_vvvvwcf = has_defaults_vvvvwcf; + var has_defaults_vvvvwcf = []; + has_defaults_vvvvwcf.push(temp_vvvvwcf); } - else if (!isSet(has_defaults_vvvvwce)) + else if (!isSet(has_defaults_vvvvwcf)) { - var has_defaults_vvvvwce = []; + var has_defaults_vvvvwcf = []; } - var has_defaults = has_defaults_vvvvwce.some(has_defaults_vvvvwce_SomeFunc); + var has_defaults = has_defaults_vvvvwcf.some(has_defaults_vvvvwcf_SomeFunc); // set this function logic @@ -171,129 +171,46 @@ function vvvvwce(datadefault_vvvvwce,has_defaults_vvvvwce) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field - if (jform_vvvvwcevxq_required) + if (jform_vvvvwcfvxq_required) { updateFieldRequired('datadefault_other',0); jQuery('#jform_datadefault_other').prop('required','required'); jQuery('#jform_datadefault_other').attr('aria-required',true); jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvwcevxq_required = false; + jform_vvvvwcfvxq_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field - if (!jform_vvvvwcevxq_required) + if (!jform_vvvvwcfvxq_required) { updateFieldRequired('datadefault_other',1); jQuery('#jform_datadefault_other').removeAttr('required'); jQuery('#jform_datadefault_other').removeAttr('aria-required'); jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvwcevxq_required = true; + jform_vvvvwcfvxq_required = true; } } } -// the vvvvwce Some function -function datadefault_vvvvwce_SomeFunc(datadefault_vvvvwce) +// the vvvvwcf Some function +function datadefault_vvvvwcf_SomeFunc(datadefault_vvvvwcf) { // set the function logic - if (datadefault_vvvvwce == 'Other') + if (datadefault_vvvvwcf == 'Other') { return true; } return false; } -// the vvvvwce Some function -function has_defaults_vvvvwce_SomeFunc(has_defaults_vvvvwce) +// the vvvvwcf Some function +function has_defaults_vvvvwcf_SomeFunc(has_defaults_vvvvwcf) { // set the function logic - if (has_defaults_vvvvwce == 1) - { - return true; - } - return false; -} - -// the vvvvwcg function -function vvvvwcg(datatype_vvvvwcg,has_defaults_vvvvwcg) -{ - if (isSet(datatype_vvvvwcg) && datatype_vvvvwcg.constructor !== Array) - { - var temp_vvvvwcg = datatype_vvvvwcg; - var datatype_vvvvwcg = []; - datatype_vvvvwcg.push(temp_vvvvwcg); - } - else if (!isSet(datatype_vvvvwcg)) - { - var datatype_vvvvwcg = []; - } - var datatype = datatype_vvvvwcg.some(datatype_vvvvwcg_SomeFunc); - - if (isSet(has_defaults_vvvvwcg) && has_defaults_vvvvwcg.constructor !== Array) - { - var temp_vvvvwcg = has_defaults_vvvvwcg; - var has_defaults_vvvvwcg = []; - has_defaults_vvvvwcg.push(temp_vvvvwcg); - } - else if (!isSet(has_defaults_vvvvwcg)) - { - var has_defaults_vvvvwcg = []; - } - var has_defaults = has_defaults_vvvvwcg.some(has_defaults_vvvvwcg_SomeFunc); - - - // set this function logic - if (datatype && has_defaults) - { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwcgvxr_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwcgvxr_required = false; - } - } - else - { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwcgvxr_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwcgvxr_required = true; - } - } -} - -// the vvvvwcg Some function -function datatype_vvvvwcg_SomeFunc(datatype_vvvvwcg) -{ - // set the function logic - if (datatype_vvvvwcg == 'CHAR' || datatype_vvvvwcg == 'VARCHAR' || datatype_vvvvwcg == 'DATETIME' || datatype_vvvvwcg == 'DATE' || datatype_vvvvwcg == 'TIME' || datatype_vvvvwcg == 'INT' || datatype_vvvvwcg == 'TINYINT' || datatype_vvvvwcg == 'BIGINT' || datatype_vvvvwcg == 'FLOAT' || datatype_vvvvwcg == 'DECIMAL' || datatype_vvvvwcg == 'DOUBLE') - { - return true; - } - return false; -} - -// the vvvvwcg Some function -function has_defaults_vvvvwcg_SomeFunc(has_defaults_vvvvwcg) -{ - // set the function logic - if (has_defaults_vvvvwcg == 1) + if (has_defaults_vvvvwcf == 1) { return true; } @@ -301,20 +218,8 @@ function has_defaults_vvvvwcg_SomeFunc(has_defaults_vvvvwcg) } // the vvvvwch function -function vvvvwch(has_defaults_vvvvwch,datatype_vvvvwch) +function vvvvwch(datatype_vvvvwch,has_defaults_vvvvwch) { - if (isSet(has_defaults_vvvvwch) && has_defaults_vvvvwch.constructor !== Array) - { - var temp_vvvvwch = has_defaults_vvvvwch; - var has_defaults_vvvvwch = []; - has_defaults_vvvvwch.push(temp_vvvvwch); - } - else if (!isSet(has_defaults_vvvvwch)) - { - var has_defaults_vvvvwch = []; - } - var has_defaults = has_defaults_vvvvwch.some(has_defaults_vvvvwch_SomeFunc); - if (isSet(datatype_vvvvwch) && datatype_vvvvwch.constructor !== Array) { var temp_vvvvwch = datatype_vvvvwch; @@ -327,21 +232,33 @@ function vvvvwch(has_defaults_vvvvwch,datatype_vvvvwch) } var datatype = datatype_vvvvwch.some(datatype_vvvvwch_SomeFunc); + if (isSet(has_defaults_vvvvwch) && has_defaults_vvvvwch.constructor !== Array) + { + var temp_vvvvwch = has_defaults_vvvvwch; + var has_defaults_vvvvwch = []; + has_defaults_vvvvwch.push(temp_vvvvwch); + } + else if (!isSet(has_defaults_vvvvwch)) + { + var has_defaults_vvvvwch = []; + } + var has_defaults = has_defaults_vvvvwch.some(has_defaults_vvvvwch_SomeFunc); + // set this function logic - if (has_defaults && datatype) + if (datatype && has_defaults) { jQuery('#jform_datadefault').closest('.control-group').show(); jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field - if (jform_vvvvwchvxs_required) + if (jform_vvvvwchvxr_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvwchvxs_required = false; + jform_vvvvwchvxr_required = false; } } else @@ -350,28 +267,17 @@ function vvvvwch(has_defaults_vvvvwch,datatype_vvvvwch) jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field - if (!jform_vvvvwchvxs_required) + if (!jform_vvvvwchvxr_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwchvxs_required = true; + jform_vvvvwchvxr_required = true; } } } -// the vvvvwch Some function -function has_defaults_vvvvwch_SomeFunc(has_defaults_vvvvwch) -{ - // set the function logic - if (has_defaults_vvvvwch == 1) - { - return true; - } - return false; -} - // the vvvvwch Some function function datatype_vvvvwch_SomeFunc(datatype_vvvvwch) { @@ -383,21 +289,20 @@ function datatype_vvvvwch_SomeFunc(datatype_vvvvwch) return false; } -// the vvvvwci function -function vvvvwci(datatype_vvvvwci,has_defaults_vvvvwci) +// the vvvvwch Some function +function has_defaults_vvvvwch_SomeFunc(has_defaults_vvvvwch) { - if (isSet(datatype_vvvvwci) && datatype_vvvvwci.constructor !== Array) + // set the function logic + if (has_defaults_vvvvwch == 1) { - var temp_vvvvwci = datatype_vvvvwci; - var datatype_vvvvwci = []; - datatype_vvvvwci.push(temp_vvvvwci); + return true; } - else if (!isSet(datatype_vvvvwci)) - { - var datatype_vvvvwci = []; - } - var datatype = datatype_vvvvwci.some(datatype_vvvvwci_SomeFunc); + return false; +} +// the vvvvwci function +function vvvvwci(has_defaults_vvvvwci,datatype_vvvvwci) +{ if (isSet(has_defaults_vvvvwci) && has_defaults_vvvvwci.constructor !== Array) { var temp_vvvvwci = has_defaults_vvvvwci; @@ -410,47 +315,52 @@ function vvvvwci(datatype_vvvvwci,has_defaults_vvvvwci) } var has_defaults = has_defaults_vvvvwci.some(has_defaults_vvvvwci_SomeFunc); + if (isSet(datatype_vvvvwci) && datatype_vvvvwci.constructor !== Array) + { + var temp_vvvvwci = datatype_vvvvwci; + var datatype_vvvvwci = []; + datatype_vvvvwci.push(temp_vvvvwci); + } + else if (!isSet(datatype_vvvvwci)) + { + var datatype_vvvvwci = []; + } + var datatype = datatype_vvvvwci.some(datatype_vvvvwci_SomeFunc); + // set this function logic - if (datatype && has_defaults) + if (has_defaults && datatype) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwcivxt_required) + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_datalenght').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwcivxs_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwcivxt_required = false; + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwcivxs_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwcivxt_required) + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_datalenght').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwcivxs_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwcivxt_required = true; + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwcivxs_required = true; } } } -// the vvvvwci Some function -function datatype_vvvvwci_SomeFunc(datatype_vvvvwci) -{ - // set the function logic - if (datatype_vvvvwci == 'CHAR' || datatype_vvvvwci == 'VARCHAR' || datatype_vvvvwci == 'TEXT' || datatype_vvvvwci == 'MEDIUMTEXT' || datatype_vvvvwci == 'LONGTEXT' || datatype_vvvvwci == 'BLOB' || datatype_vvvvwci == 'TINYBLOB' || datatype_vvvvwci == 'MEDIUMBLOB' || datatype_vvvvwci == 'LONGBLOB') - { - return true; - } - return false; -} - // the vvvvwci Some function function has_defaults_vvvvwci_SomeFunc(has_defaults_vvvvwci) { @@ -462,84 +372,90 @@ function has_defaults_vvvvwci_SomeFunc(has_defaults_vvvvwci) return false; } -// the vvvvwck function -function vvvvwck(store_vvvvwck,datatype_vvvvwck,has_defaults_vvvvwck) +// the vvvvwci Some function +function datatype_vvvvwci_SomeFunc(datatype_vvvvwci) { - if (isSet(store_vvvvwck) && store_vvvvwck.constructor !== Array) + // set the function logic + if (datatype_vvvvwci == 'CHAR' || datatype_vvvvwci == 'VARCHAR' || datatype_vvvvwci == 'DATETIME' || datatype_vvvvwci == 'DATE' || datatype_vvvvwci == 'TIME' || datatype_vvvvwci == 'INT' || datatype_vvvvwci == 'TINYINT' || datatype_vvvvwci == 'BIGINT' || datatype_vvvvwci == 'FLOAT' || datatype_vvvvwci == 'DECIMAL' || datatype_vvvvwci == 'DOUBLE') { - var temp_vvvvwck = store_vvvvwck; - var store_vvvvwck = []; - store_vvvvwck.push(temp_vvvvwck); + return true; } - else if (!isSet(store_vvvvwck)) - { - var store_vvvvwck = []; - } - var store = store_vvvvwck.some(store_vvvvwck_SomeFunc); + return false; +} - if (isSet(datatype_vvvvwck) && datatype_vvvvwck.constructor !== Array) +// the vvvvwcj function +function vvvvwcj(datatype_vvvvwcj,has_defaults_vvvvwcj) +{ + if (isSet(datatype_vvvvwcj) && datatype_vvvvwcj.constructor !== Array) { - var temp_vvvvwck = datatype_vvvvwck; - var datatype_vvvvwck = []; - datatype_vvvvwck.push(temp_vvvvwck); + var temp_vvvvwcj = datatype_vvvvwcj; + var datatype_vvvvwcj = []; + datatype_vvvvwcj.push(temp_vvvvwcj); } - else if (!isSet(datatype_vvvvwck)) + else if (!isSet(datatype_vvvvwcj)) { - var datatype_vvvvwck = []; + var datatype_vvvvwcj = []; } - var datatype = datatype_vvvvwck.some(datatype_vvvvwck_SomeFunc); + var datatype = datatype_vvvvwcj.some(datatype_vvvvwcj_SomeFunc); - if (isSet(has_defaults_vvvvwck) && has_defaults_vvvvwck.constructor !== Array) + if (isSet(has_defaults_vvvvwcj) && has_defaults_vvvvwcj.constructor !== Array) { - var temp_vvvvwck = has_defaults_vvvvwck; - var has_defaults_vvvvwck = []; - has_defaults_vvvvwck.push(temp_vvvvwck); + var temp_vvvvwcj = has_defaults_vvvvwcj; + var has_defaults_vvvvwcj = []; + has_defaults_vvvvwcj.push(temp_vvvvwcj); } - else if (!isSet(has_defaults_vvvvwck)) + else if (!isSet(has_defaults_vvvvwcj)) { - var has_defaults_vvvvwck = []; + var has_defaults_vvvvwcj = []; } - var has_defaults = has_defaults_vvvvwck.some(has_defaults_vvvvwck_SomeFunc); + var has_defaults = has_defaults_vvvvwcj.some(has_defaults_vvvvwcj_SomeFunc); // set this function logic - if (store && datatype && has_defaults) + if (datatype && has_defaults) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwcjvxt_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwcjvxt_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwcjvxt_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwcjvxt_required = true; + } } } -// the vvvvwck Some function -function store_vvvvwck_SomeFunc(store_vvvvwck) +// the vvvvwcj Some function +function datatype_vvvvwcj_SomeFunc(datatype_vvvvwcj) { // set the function logic - if (store_vvvvwck == 4) + if (datatype_vvvvwcj == 'CHAR' || datatype_vvvvwcj == 'VARCHAR' || datatype_vvvvwcj == 'TEXT' || datatype_vvvvwcj == 'MEDIUMTEXT' || datatype_vvvvwcj == 'LONGTEXT' || datatype_vvvvwcj == 'BLOB' || datatype_vvvvwcj == 'TINYBLOB' || datatype_vvvvwcj == 'MEDIUMBLOB' || datatype_vvvvwcj == 'LONGBLOB') { return true; } return false; } -// the vvvvwck Some function -function datatype_vvvvwck_SomeFunc(datatype_vvvvwck) +// the vvvvwcj Some function +function has_defaults_vvvvwcj_SomeFunc(has_defaults_vvvvwcj) { // set the function logic - if (datatype_vvvvwck == 'CHAR' || datatype_vvvvwck == 'VARCHAR' || datatype_vvvvwck == 'TEXT' || datatype_vvvvwck == 'MEDIUMTEXT' || datatype_vvvvwck == 'LONGTEXT' || datatype_vvvvwck == 'BLOB' || datatype_vvvvwck == 'TINYBLOB' || datatype_vvvvwck == 'MEDIUMBLOB' || datatype_vvvvwck == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwck Some function -function has_defaults_vvvvwck_SomeFunc(has_defaults_vvvvwck) -{ - // set the function logic - if (has_defaults_vvvvwck == 1) + if (has_defaults_vvvvwcj == 1) { return true; } @@ -547,20 +463,8 @@ function has_defaults_vvvvwck_SomeFunc(has_defaults_vvvvwck) } // the vvvvwcl function -function vvvvwcl(datatype_vvvvwcl,store_vvvvwcl,has_defaults_vvvvwcl) +function vvvvwcl(store_vvvvwcl,datatype_vvvvwcl,has_defaults_vvvvwcl) { - if (isSet(datatype_vvvvwcl) && datatype_vvvvwcl.constructor !== Array) - { - var temp_vvvvwcl = datatype_vvvvwcl; - var datatype_vvvvwcl = []; - datatype_vvvvwcl.push(temp_vvvvwcl); - } - else if (!isSet(datatype_vvvvwcl)) - { - var datatype_vvvvwcl = []; - } - var datatype = datatype_vvvvwcl.some(datatype_vvvvwcl_SomeFunc); - if (isSet(store_vvvvwcl) && store_vvvvwcl.constructor !== Array) { var temp_vvvvwcl = store_vvvvwcl; @@ -573,6 +477,18 @@ function vvvvwcl(datatype_vvvvwcl,store_vvvvwcl,has_defaults_vvvvwcl) } var store = store_vvvvwcl.some(store_vvvvwcl_SomeFunc); + if (isSet(datatype_vvvvwcl) && datatype_vvvvwcl.constructor !== Array) + { + var temp_vvvvwcl = datatype_vvvvwcl; + var datatype_vvvvwcl = []; + datatype_vvvvwcl.push(temp_vvvvwcl); + } + else if (!isSet(datatype_vvvvwcl)) + { + var datatype_vvvvwcl = []; + } + var datatype = datatype_vvvvwcl.some(datatype_vvvvwcl_SomeFunc); + if (isSet(has_defaults_vvvvwcl) && has_defaults_vvvvwcl.constructor !== Array) { var temp_vvvvwcl = has_defaults_vvvvwcl; @@ -587,7 +503,7 @@ function vvvvwcl(datatype_vvvvwcl,store_vvvvwcl,has_defaults_vvvvwcl) // set this function logic - if (datatype && store && has_defaults) + if (store && datatype && has_defaults) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } @@ -598,10 +514,10 @@ function vvvvwcl(datatype_vvvvwcl,store_vvvvwcl,has_defaults_vvvvwcl) } // the vvvvwcl Some function -function datatype_vvvvwcl_SomeFunc(datatype_vvvvwcl) +function store_vvvvwcl_SomeFunc(store_vvvvwcl) { // set the function logic - if (datatype_vvvvwcl == 'CHAR' || datatype_vvvvwcl == 'VARCHAR' || datatype_vvvvwcl == 'TEXT' || datatype_vvvvwcl == 'MEDIUMTEXT' || datatype_vvvvwcl == 'LONGTEXT' || datatype_vvvvwcl == 'BLOB' || datatype_vvvvwcl == 'TINYBLOB' || datatype_vvvvwcl == 'MEDIUMBLOB' || datatype_vvvvwcl == 'LONGBLOB') + if (store_vvvvwcl == 4) { return true; } @@ -609,10 +525,10 @@ function datatype_vvvvwcl_SomeFunc(datatype_vvvvwcl) } // the vvvvwcl Some function -function store_vvvvwcl_SomeFunc(store_vvvvwcl) +function datatype_vvvvwcl_SomeFunc(datatype_vvvvwcl) { // set the function logic - if (store_vvvvwcl == 4) + if (datatype_vvvvwcl == 'CHAR' || datatype_vvvvwcl == 'VARCHAR' || datatype_vvvvwcl == 'TEXT' || datatype_vvvvwcl == 'MEDIUMTEXT' || datatype_vvvvwcl == 'LONGTEXT' || datatype_vvvvwcl == 'BLOB' || datatype_vvvvwcl == 'TINYBLOB' || datatype_vvvvwcl == 'MEDIUMBLOB' || datatype_vvvvwcl == 'LONGBLOB') { return true; } @@ -631,19 +547,19 @@ function has_defaults_vvvvwcl_SomeFunc(has_defaults_vvvvwcl) } // the vvvvwcm function -function vvvvwcm(has_defaults_vvvvwcm,store_vvvvwcm,datatype_vvvvwcm) +function vvvvwcm(datatype_vvvvwcm,store_vvvvwcm,has_defaults_vvvvwcm) { - if (isSet(has_defaults_vvvvwcm) && has_defaults_vvvvwcm.constructor !== Array) + if (isSet(datatype_vvvvwcm) && datatype_vvvvwcm.constructor !== Array) { - var temp_vvvvwcm = has_defaults_vvvvwcm; - var has_defaults_vvvvwcm = []; - has_defaults_vvvvwcm.push(temp_vvvvwcm); + var temp_vvvvwcm = datatype_vvvvwcm; + var datatype_vvvvwcm = []; + datatype_vvvvwcm.push(temp_vvvvwcm); } - else if (!isSet(has_defaults_vvvvwcm)) + else if (!isSet(datatype_vvvvwcm)) { - var has_defaults_vvvvwcm = []; + var datatype_vvvvwcm = []; } - var has_defaults = has_defaults_vvvvwcm.some(has_defaults_vvvvwcm_SomeFunc); + var datatype = datatype_vvvvwcm.some(datatype_vvvvwcm_SomeFunc); if (isSet(store_vvvvwcm) && store_vvvvwcm.constructor !== Array) { @@ -657,21 +573,21 @@ function vvvvwcm(has_defaults_vvvvwcm,store_vvvvwcm,datatype_vvvvwcm) } var store = store_vvvvwcm.some(store_vvvvwcm_SomeFunc); - if (isSet(datatype_vvvvwcm) && datatype_vvvvwcm.constructor !== Array) + if (isSet(has_defaults_vvvvwcm) && has_defaults_vvvvwcm.constructor !== Array) { - var temp_vvvvwcm = datatype_vvvvwcm; - var datatype_vvvvwcm = []; - datatype_vvvvwcm.push(temp_vvvvwcm); + var temp_vvvvwcm = has_defaults_vvvvwcm; + var has_defaults_vvvvwcm = []; + has_defaults_vvvvwcm.push(temp_vvvvwcm); } - else if (!isSet(datatype_vvvvwcm)) + else if (!isSet(has_defaults_vvvvwcm)) { - var datatype_vvvvwcm = []; + var has_defaults_vvvvwcm = []; } - var datatype = datatype_vvvvwcm.some(datatype_vvvvwcm_SomeFunc); + var has_defaults = has_defaults_vvvvwcm.some(has_defaults_vvvvwcm_SomeFunc); // set this function logic - if (has_defaults && store && datatype) + if (datatype && store && has_defaults) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } @@ -682,10 +598,10 @@ function vvvvwcm(has_defaults_vvvvwcm,store_vvvvwcm,datatype_vvvvwcm) } // the vvvvwcm Some function -function has_defaults_vvvvwcm_SomeFunc(has_defaults_vvvvwcm) +function datatype_vvvvwcm_SomeFunc(datatype_vvvvwcm) { // set the function logic - if (has_defaults_vvvvwcm == 1) + if (datatype_vvvvwcm == 'CHAR' || datatype_vvvvwcm == 'VARCHAR' || datatype_vvvvwcm == 'TEXT' || datatype_vvvvwcm == 'MEDIUMTEXT' || datatype_vvvvwcm == 'LONGTEXT' || datatype_vvvvwcm == 'BLOB' || datatype_vvvvwcm == 'TINYBLOB' || datatype_vvvvwcm == 'MEDIUMBLOB' || datatype_vvvvwcm == 'LONGBLOB') { return true; } @@ -704,10 +620,10 @@ function store_vvvvwcm_SomeFunc(store_vvvvwcm) } // the vvvvwcm Some function -function datatype_vvvvwcm_SomeFunc(datatype_vvvvwcm) +function has_defaults_vvvvwcm_SomeFunc(has_defaults_vvvvwcm) { // set the function logic - if (datatype_vvvvwcm == 'CHAR' || datatype_vvvvwcm == 'VARCHAR' || datatype_vvvvwcm == 'TEXT' || datatype_vvvvwcm == 'MEDIUMTEXT' || datatype_vvvvwcm == 'LONGTEXT' || datatype_vvvvwcm == 'BLOB' || datatype_vvvvwcm == 'TINYBLOB' || datatype_vvvvwcm == 'MEDIUMBLOB' || datatype_vvvvwcm == 'LONGBLOB') + if (has_defaults_vvvvwcm == 1) { return true; } @@ -715,53 +631,137 @@ function datatype_vvvvwcm_SomeFunc(datatype_vvvvwcm) } // the vvvvwcn function -function vvvvwcn(has_defaults_vvvvwcn) +function vvvvwcn(has_defaults_vvvvwcn,store_vvvvwcn,datatype_vvvvwcn) +{ + if (isSet(has_defaults_vvvvwcn) && has_defaults_vvvvwcn.constructor !== Array) + { + var temp_vvvvwcn = has_defaults_vvvvwcn; + var has_defaults_vvvvwcn = []; + has_defaults_vvvvwcn.push(temp_vvvvwcn); + } + else if (!isSet(has_defaults_vvvvwcn)) + { + var has_defaults_vvvvwcn = []; + } + var has_defaults = has_defaults_vvvvwcn.some(has_defaults_vvvvwcn_SomeFunc); + + if (isSet(store_vvvvwcn) && store_vvvvwcn.constructor !== Array) + { + var temp_vvvvwcn = store_vvvvwcn; + var store_vvvvwcn = []; + store_vvvvwcn.push(temp_vvvvwcn); + } + else if (!isSet(store_vvvvwcn)) + { + var store_vvvvwcn = []; + } + var store = store_vvvvwcn.some(store_vvvvwcn_SomeFunc); + + if (isSet(datatype_vvvvwcn) && datatype_vvvvwcn.constructor !== Array) + { + var temp_vvvvwcn = datatype_vvvvwcn; + var datatype_vvvvwcn = []; + datatype_vvvvwcn.push(temp_vvvvwcn); + } + else if (!isSet(datatype_vvvvwcn)) + { + var datatype_vvvvwcn = []; + } + var datatype = datatype_vvvvwcn.some(datatype_vvvvwcn_SomeFunc); + + + // set this function logic + if (has_defaults && store && datatype) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwcn Some function +function has_defaults_vvvvwcn_SomeFunc(has_defaults_vvvvwcn) { // set the function logic if (has_defaults_vvvvwcn == 1) + { + return true; + } + return false; +} + +// the vvvvwcn Some function +function store_vvvvwcn_SomeFunc(store_vvvvwcn) +{ + // set the function logic + if (store_vvvvwcn == 4) + { + return true; + } + return false; +} + +// the vvvvwcn Some function +function datatype_vvvvwcn_SomeFunc(datatype_vvvvwcn) +{ + // set the function logic + if (datatype_vvvvwcn == 'CHAR' || datatype_vvvvwcn == 'VARCHAR' || datatype_vvvvwcn == 'TEXT' || datatype_vvvvwcn == 'MEDIUMTEXT' || datatype_vvvvwcn == 'LONGTEXT' || datatype_vvvvwcn == 'BLOB' || datatype_vvvvwcn == 'TINYBLOB' || datatype_vvvvwcn == 'MEDIUMBLOB' || datatype_vvvvwcn == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwco function +function vvvvwco(has_defaults_vvvvwco) +{ + // set the function logic + if (has_defaults_vvvvwco == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwcnvxu_required) + if (jform_vvvvwcovxu_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwcnvxu_required = false; + jform_vvvvwcovxu_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwcnvxv_required) + if (jform_vvvvwcovxv_required) { updateFieldRequired('null_switch',0); jQuery('#jform_null_switch').prop('required','required'); jQuery('#jform_null_switch').attr('aria-required',true); jQuery('#jform_null_switch').addClass('required'); - jform_vvvvwcnvxv_required = false; + jform_vvvvwcovxv_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwcnvxu_required) + if (!jform_vvvvwcovxu_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwcnvxu_required = true; + jform_vvvvwcovxu_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwcnvxv_required) + if (!jform_vvvvwcovxv_required) { updateFieldRequired('null_switch',1); jQuery('#jform_null_switch').removeAttr('required'); jQuery('#jform_null_switch').removeAttr('aria-required'); jQuery('#jform_null_switch').removeClass('required'); - jform_vvvvwcnvxv_required = true; + jform_vvvvwcovxv_required = true; } } } diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 07882001f..399b56d1e 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,23 +9,20 @@ */ // Some Global Values -jform_vvvvwcyvyh_required = false; -jform_vvvvwczvyi_required = false; -jform_vvvvwdavyj_required = false; -jform_vvvvwdbvyk_required = false; -jform_vvvvwddvyl_required = false; +jform_vvvvwczvyh_required = false; +jform_vvvvwdavyi_required = false; +jform_vvvvwdbvyj_required = false; +jform_vvvvwdcvyk_required = false; +jform_vvvvwdevyl_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwcy = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwcy(location_vvvvwcy); - var location_vvvvwcz = jQuery("#jform_location input[type='radio']:checked").val(); vvvvwcz(location_vvvvwcz); - var type_vvvvwda = jQuery("#jform_type").val(); - vvvvwda(type_vvvvwda); + var location_vvvvwda = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwda(location_vvvvwda); var type_vvvvwdb = jQuery("#jform_type").val(); vvvvwdb(type_vvvvwdb); @@ -33,130 +30,77 @@ jQuery(document).ready(function() var type_vvvvwdc = jQuery("#jform_type").val(); vvvvwdc(type_vvvvwdc); - var target_vvvvwdd = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwdd(target_vvvvwdd); + var type_vvvvwdd = jQuery("#jform_type").val(); + vvvvwdd(type_vvvvwdd); + + var target_vvvvwde = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwde(target_vvvvwde); }); -// the vvvvwcy function -function vvvvwcy(location_vvvvwcy) +// the vvvvwcz function +function vvvvwcz(location_vvvvwcz) { // set the function logic - if (location_vvvvwcy == 1) + if (location_vvvvwcz == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwcyvyh_required) + if (jform_vvvvwczvyh_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwcyvyh_required = false; + jform_vvvvwczvyh_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwcyvyh_required) + if (!jform_vvvvwczvyh_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwcyvyh_required = true; + jform_vvvvwczvyh_required = true; } } } -// the vvvvwcz function -function vvvvwcz(location_vvvvwcz) +// the vvvvwda function +function vvvvwda(location_vvvvwda) { // set the function logic - if (location_vvvvwcz == 2) + if (location_vvvvwda == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwczvyi_required) + if (jform_vvvvwdavyi_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwczvyi_required = false; + jform_vvvvwdavyi_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwczvyi_required) + if (!jform_vvvvwdavyi_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); - jform_vvvvwczvyi_required = true; + jform_vvvvwdavyi_required = true; } } } -// the vvvvwda function -function vvvvwda(type_vvvvwda) -{ - if (isSet(type_vvvvwda) && type_vvvvwda.constructor !== Array) - { - var temp_vvvvwda = type_vvvvwda; - var type_vvvvwda = []; - type_vvvvwda.push(temp_vvvvwda); - } - else if (!isSet(type_vvvvwda)) - { - var type_vvvvwda = []; - } - var type = type_vvvvwda.some(type_vvvvwda_SomeFunc); - - - // set this function logic - if (type) - { - jQuery('#jform_url').closest('.control-group').show(); - // add required attribute to url field - if (jform_vvvvwdavyj_required) - { - updateFieldRequired('url',0); - jQuery('#jform_url').prop('required','required'); - jQuery('#jform_url').attr('aria-required',true); - jQuery('#jform_url').addClass('required'); - jform_vvvvwdavyj_required = false; - } - } - else - { - jQuery('#jform_url').closest('.control-group').hide(); - // remove required attribute from url field - if (!jform_vvvvwdavyj_required) - { - updateFieldRequired('url',1); - jQuery('#jform_url').removeAttr('required'); - jQuery('#jform_url').removeAttr('aria-required'); - jQuery('#jform_url').removeClass('required'); - jform_vvvvwdavyj_required = true; - } - } -} - -// the vvvvwda Some function -function type_vvvvwda_SomeFunc(type_vvvvwda) -{ - // set the function logic - if (type_vvvvwda == 3) - { - return true; - } - return false; -} - // the vvvvwdb function function vvvvwdb(type_vvvvwdb) { @@ -176,28 +120,28 @@ function vvvvwdb(type_vvvvwdb) // set this function logic if (type) { - jQuery('#jform_article').closest('.control-group').show(); - // add required attribute to article field - if (jform_vvvvwdbvyk_required) + jQuery('#jform_url').closest('.control-group').show(); + // add required attribute to url field + if (jform_vvvvwdbvyj_required) { - updateFieldRequired('article',0); - jQuery('#jform_article').prop('required','required'); - jQuery('#jform_article').attr('aria-required',true); - jQuery('#jform_article').addClass('required'); - jform_vvvvwdbvyk_required = false; + updateFieldRequired('url',0); + jQuery('#jform_url').prop('required','required'); + jQuery('#jform_url').attr('aria-required',true); + jQuery('#jform_url').addClass('required'); + jform_vvvvwdbvyj_required = false; } } else { - jQuery('#jform_article').closest('.control-group').hide(); - // remove required attribute from article field - if (!jform_vvvvwdbvyk_required) + jQuery('#jform_url').closest('.control-group').hide(); + // remove required attribute from url field + if (!jform_vvvvwdbvyj_required) { - updateFieldRequired('article',1); - jQuery('#jform_article').removeAttr('required'); - jQuery('#jform_article').removeAttr('aria-required'); - jQuery('#jform_article').removeClass('required'); - jform_vvvvwdbvyk_required = true; + updateFieldRequired('url',1); + jQuery('#jform_url').removeAttr('required'); + jQuery('#jform_url').removeAttr('aria-required'); + jQuery('#jform_url').removeClass('required'); + jform_vvvvwdbvyj_required = true; } } } @@ -206,7 +150,7 @@ function vvvvwdb(type_vvvvwdb) function type_vvvvwdb_SomeFunc(type_vvvvwdb) { // set the function logic - if (type_vvvvwdb == 1) + if (type_vvvvwdb == 3) { return true; } @@ -229,6 +173,62 @@ function vvvvwdc(type_vvvvwdc) var type = type_vvvvwdc.some(type_vvvvwdc_SomeFunc); + // set this function logic + if (type) + { + jQuery('#jform_article').closest('.control-group').show(); + // add required attribute to article field + if (jform_vvvvwdcvyk_required) + { + updateFieldRequired('article',0); + jQuery('#jform_article').prop('required','required'); + jQuery('#jform_article').attr('aria-required',true); + jQuery('#jform_article').addClass('required'); + jform_vvvvwdcvyk_required = false; + } + } + else + { + jQuery('#jform_article').closest('.control-group').hide(); + // remove required attribute from article field + if (!jform_vvvvwdcvyk_required) + { + updateFieldRequired('article',1); + jQuery('#jform_article').removeAttr('required'); + jQuery('#jform_article').removeAttr('aria-required'); + jQuery('#jform_article').removeClass('required'); + jform_vvvvwdcvyk_required = true; + } + } +} + +// the vvvvwdc Some function +function type_vvvvwdc_SomeFunc(type_vvvvwdc) +{ + // set the function logic + if (type_vvvvwdc == 1) + { + return true; + } + return false; +} + +// the vvvvwdd function +function vvvvwdd(type_vvvvwdd) +{ + if (isSet(type_vvvvwdd) && type_vvvvwdd.constructor !== Array) + { + var temp_vvvvwdd = type_vvvvwdd; + var type_vvvvwdd = []; + type_vvvvwdd.push(temp_vvvvwdd); + } + else if (!isSet(type_vvvvwdd)) + { + var type_vvvvwdd = []; + } + var type = type_vvvvwdd.some(type_vvvvwdd_SomeFunc); + + // set this function logic if (type) { @@ -240,45 +240,45 @@ function vvvvwdc(type_vvvvwdc) } } -// the vvvvwdc Some function -function type_vvvvwdc_SomeFunc(type_vvvvwdc) +// the vvvvwdd Some function +function type_vvvvwdd_SomeFunc(type_vvvvwdd) { // set the function logic - if (type_vvvvwdc == 2) + if (type_vvvvwdd == 2) { return true; } return false; } -// the vvvvwdd function -function vvvvwdd(target_vvvvwdd) +// the vvvvwde function +function vvvvwde(target_vvvvwde) { // set the function logic - if (target_vvvvwdd == 1) + if (target_vvvvwde == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwddvyl_required) + if (jform_vvvvwdevyl_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwddvyl_required = false; + jform_vvvvwdevyl_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwddvyl_required) + if (!jform_vvvvwdevyl_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwddvyl_required = true; + jform_vvvvwdevyl_required = true; } } } diff --git a/admin/models/forms/joomla_plugin.js b/admin/models/forms/joomla_plugin.js index 93e61d826..029daacab 100644 --- a/admin/models/forms/joomla_plugin.js +++ b/admin/models/forms/joomla_plugin.js @@ -10,9 +10,9 @@ // Some Global Values jform_vvvvvxevwd_required = false; -jform_vvvvvxsvwe_required = false; -jform_vvvvvxtvwf_required = false; -jform_vvvvvxuvwg_required = false; +jform_vvvvvxtvwe_required = false; +jform_vvvvvxuvwf_required = false; +jform_vvvvvxvvwg_required = false; // Initial Script jQuery(document).ready(function() @@ -32,57 +32,60 @@ jQuery(document).ready(function() var class_extends_vvvvvxe = jQuery("#jform_class_extends").val(); vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe); - var add_php_preflight_install_vvvvvxg = jQuery("#jform_add_php_preflight_install input[type='radio']:checked").val(); - vvvvvxg(add_php_preflight_install_vvvvvxg); + var add_php_script_construct_vvvvvxg = jQuery("#jform_add_php_script_construct input[type='radio']:checked").val(); + vvvvvxg(add_php_script_construct_vvvvvxg); - var add_php_preflight_update_vvvvvxh = jQuery("#jform_add_php_preflight_update input[type='radio']:checked").val(); - vvvvvxh(add_php_preflight_update_vvvvvxh); + var add_php_preflight_install_vvvvvxh = jQuery("#jform_add_php_preflight_install input[type='radio']:checked").val(); + vvvvvxh(add_php_preflight_install_vvvvvxh); - var add_php_preflight_uninstall_vvvvvxi = jQuery("#jform_add_php_preflight_uninstall input[type='radio']:checked").val(); - vvvvvxi(add_php_preflight_uninstall_vvvvvxi); + var add_php_preflight_update_vvvvvxi = jQuery("#jform_add_php_preflight_update input[type='radio']:checked").val(); + vvvvvxi(add_php_preflight_update_vvvvvxi); - var add_php_postflight_install_vvvvvxj = jQuery("#jform_add_php_postflight_install input[type='radio']:checked").val(); - vvvvvxj(add_php_postflight_install_vvvvvxj); + var add_php_preflight_uninstall_vvvvvxj = jQuery("#jform_add_php_preflight_uninstall input[type='radio']:checked").val(); + vvvvvxj(add_php_preflight_uninstall_vvvvvxj); - var add_php_postflight_update_vvvvvxk = jQuery("#jform_add_php_postflight_update input[type='radio']:checked").val(); - vvvvvxk(add_php_postflight_update_vvvvvxk); + var add_php_postflight_install_vvvvvxk = jQuery("#jform_add_php_postflight_install input[type='radio']:checked").val(); + vvvvvxk(add_php_postflight_install_vvvvvxk); - var add_php_method_uninstall_vvvvvxl = jQuery("#jform_add_php_method_uninstall input[type='radio']:checked").val(); - vvvvvxl(add_php_method_uninstall_vvvvvxl); + var add_php_postflight_update_vvvvvxl = jQuery("#jform_add_php_postflight_update input[type='radio']:checked").val(); + vvvvvxl(add_php_postflight_update_vvvvvxl); - var update_server_target_vvvvvxm = jQuery("#jform_update_server_target input[type='radio']:checked").val(); - var add_update_server_vvvvvxm = jQuery("#jform_add_update_server input[type='radio']:checked").val(); - vvvvvxm(update_server_target_vvvvvxm,add_update_server_vvvvvxm); + var add_php_method_uninstall_vvvvvxm = jQuery("#jform_add_php_method_uninstall input[type='radio']:checked").val(); + vvvvvxm(add_php_method_uninstall_vvvvvxm); - var add_update_server_vvvvvxn = jQuery("#jform_add_update_server input[type='radio']:checked").val(); var update_server_target_vvvvvxn = jQuery("#jform_update_server_target input[type='radio']:checked").val(); - vvvvvxn(add_update_server_vvvvvxn,update_server_target_vvvvvxn); + var add_update_server_vvvvvxn = jQuery("#jform_add_update_server input[type='radio']:checked").val(); + vvvvvxn(update_server_target_vvvvvxn,add_update_server_vvvvvxn); - var update_server_target_vvvvvxo = jQuery("#jform_update_server_target input[type='radio']:checked").val(); var add_update_server_vvvvvxo = jQuery("#jform_add_update_server input[type='radio']:checked").val(); - vvvvvxo(update_server_target_vvvvvxo,add_update_server_vvvvvxo); + var update_server_target_vvvvvxo = jQuery("#jform_update_server_target input[type='radio']:checked").val(); + vvvvvxo(add_update_server_vvvvvxo,update_server_target_vvvvvxo); - var update_server_target_vvvvvxq = jQuery("#jform_update_server_target input[type='radio']:checked").val(); - var add_update_server_vvvvvxq = jQuery("#jform_add_update_server input[type='radio']:checked").val(); - vvvvvxq(update_server_target_vvvvvxq,add_update_server_vvvvvxq); + var update_server_target_vvvvvxp = jQuery("#jform_update_server_target input[type='radio']:checked").val(); + var add_update_server_vvvvvxp = jQuery("#jform_add_update_server input[type='radio']:checked").val(); + vvvvvxp(update_server_target_vvvvvxp,add_update_server_vvvvvxp); - var add_update_server_vvvvvxs = jQuery("#jform_add_update_server input[type='radio']:checked").val(); - vvvvvxs(add_update_server_vvvvvxs); + var update_server_target_vvvvvxr = jQuery("#jform_update_server_target input[type='radio']:checked").val(); + var add_update_server_vvvvvxr = jQuery("#jform_add_update_server input[type='radio']:checked").val(); + vvvvvxr(update_server_target_vvvvvxr,add_update_server_vvvvvxr); - var add_sql_vvvvvxt = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxt(add_sql_vvvvvxt); + var add_update_server_vvvvvxt = jQuery("#jform_add_update_server input[type='radio']:checked").val(); + vvvvvxt(add_update_server_vvvvvxt); - var add_sql_uninstall_vvvvvxu = jQuery("#jform_add_sql_uninstall input[type='radio']:checked").val(); - vvvvvxu(add_sql_uninstall_vvvvvxu); + var add_sql_vvvvvxu = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvxu(add_sql_vvvvvxu); - var add_update_server_vvvvvxv = jQuery("#jform_add_update_server input[type='radio']:checked").val(); - vvvvvxv(add_update_server_vvvvvxv); + var add_sql_uninstall_vvvvvxv = jQuery("#jform_add_sql_uninstall input[type='radio']:checked").val(); + vvvvvxv(add_sql_uninstall_vvvvvxv); - var add_sales_server_vvvvvxw = jQuery("#jform_add_sales_server input[type='radio']:checked").val(); - vvvvvxw(add_sales_server_vvvvvxw); + var add_update_server_vvvvvxw = jQuery("#jform_add_update_server input[type='radio']:checked").val(); + vvvvvxw(add_update_server_vvvvvxw); - var addreadme_vvvvvxx = jQuery("#jform_addreadme input[type='radio']:checked").val(); - vvvvvxx(addreadme_vvvvvxx); + var add_sales_server_vvvvvxx = jQuery("#jform_add_sales_server input[type='radio']:checked").val(); + vvvvvxx(add_sales_server_vvvvvxx); + + var addreadme_vvvvvxy = jQuery("#jform_addreadme input[type='radio']:checked").val(); + vvvvvxy(addreadme_vvvvvxy); }); // the vvvvvxb function @@ -333,10 +336,24 @@ function class_extends_vvvvvxe_SomeFunc(class_extends_vvvvvxe) } // the vvvvvxg function -function vvvvvxg(add_php_preflight_install_vvvvvxg) +function vvvvvxg(add_php_script_construct_vvvvvxg) { // set the function logic - if (add_php_preflight_install_vvvvvxg == 1) + if (add_php_script_construct_vvvvvxg == 1) + { + jQuery('#jform_php_script_construct-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_php_script_construct-lbl').closest('.control-group').hide(); + } +} + +// the vvvvvxh function +function vvvvvxh(add_php_preflight_install_vvvvvxh) +{ + // set the function logic + if (add_php_preflight_install_vvvvvxh == 1) { jQuery('#jform_php_preflight_install-lbl').closest('.control-group').show(); } @@ -346,11 +363,11 @@ function vvvvvxg(add_php_preflight_install_vvvvvxg) } } -// the vvvvvxh function -function vvvvvxh(add_php_preflight_update_vvvvvxh) +// the vvvvvxi function +function vvvvvxi(add_php_preflight_update_vvvvvxi) { // set the function logic - if (add_php_preflight_update_vvvvvxh == 1) + if (add_php_preflight_update_vvvvvxi == 1) { jQuery('#jform_php_preflight_update-lbl').closest('.control-group').show(); } @@ -360,11 +377,11 @@ function vvvvvxh(add_php_preflight_update_vvvvvxh) } } -// the vvvvvxi function -function vvvvvxi(add_php_preflight_uninstall_vvvvvxi) +// the vvvvvxj function +function vvvvvxj(add_php_preflight_uninstall_vvvvvxj) { // set the function logic - if (add_php_preflight_uninstall_vvvvvxi == 1) + if (add_php_preflight_uninstall_vvvvvxj == 1) { jQuery('#jform_php_preflight_uninstall-lbl').closest('.control-group').show(); } @@ -374,11 +391,11 @@ function vvvvvxi(add_php_preflight_uninstall_vvvvvxi) } } -// the vvvvvxj function -function vvvvvxj(add_php_postflight_install_vvvvvxj) +// the vvvvvxk function +function vvvvvxk(add_php_postflight_install_vvvvvxk) { // set the function logic - if (add_php_postflight_install_vvvvvxj == 1) + if (add_php_postflight_install_vvvvvxk == 1) { jQuery('#jform_php_postflight_install-lbl').closest('.control-group').show(); } @@ -388,11 +405,11 @@ function vvvvvxj(add_php_postflight_install_vvvvvxj) } } -// the vvvvvxk function -function vvvvvxk(add_php_postflight_update_vvvvvxk) +// the vvvvvxl function +function vvvvvxl(add_php_postflight_update_vvvvvxl) { // set the function logic - if (add_php_postflight_update_vvvvvxk == 1) + if (add_php_postflight_update_vvvvvxl == 1) { jQuery('#jform_php_postflight_update-lbl').closest('.control-group').show(); } @@ -402,11 +419,11 @@ function vvvvvxk(add_php_postflight_update_vvvvvxk) } } -// the vvvvvxl function -function vvvvvxl(add_php_method_uninstall_vvvvvxl) +// the vvvvvxm function +function vvvvvxm(add_php_method_uninstall_vvvvvxm) { // set the function logic - if (add_php_method_uninstall_vvvvvxl == 1) + if (add_php_method_uninstall_vvvvvxm == 1) { jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').show(); } @@ -416,27 +433,11 @@ function vvvvvxl(add_php_method_uninstall_vvvvvxl) } } -// the vvvvvxm function -function vvvvvxm(update_server_target_vvvvvxm,add_update_server_vvvvvxm) -{ - // set the function logic - if (update_server_target_vvvvvxm == 1 && add_update_server_vvvvvxm == 1) - { - jQuery('#jform_update_server').closest('.control-group').show(); - jQuery('.note_update_server_note_ftp').closest('.control-group').show(); - } - else - { - jQuery('#jform_update_server').closest('.control-group').hide(); - jQuery('.note_update_server_note_ftp').closest('.control-group').hide(); - } -} - // the vvvvvxn function -function vvvvvxn(add_update_server_vvvvvxn,update_server_target_vvvvvxn) +function vvvvvxn(update_server_target_vvvvvxn,add_update_server_vvvvvxn) { // set the function logic - if (add_update_server_vvvvvxn == 1 && update_server_target_vvvvvxn == 1) + if (update_server_target_vvvvvxn == 1 && add_update_server_vvvvvxn == 1) { jQuery('#jform_update_server').closest('.control-group').show(); jQuery('.note_update_server_note_ftp').closest('.control-group').show(); @@ -449,10 +450,26 @@ function vvvvvxn(add_update_server_vvvvvxn,update_server_target_vvvvvxn) } // the vvvvvxo function -function vvvvvxo(update_server_target_vvvvvxo,add_update_server_vvvvvxo) +function vvvvvxo(add_update_server_vvvvvxo,update_server_target_vvvvvxo) { // set the function logic - if (update_server_target_vvvvvxo == 2 && add_update_server_vvvvvxo == 1) + if (add_update_server_vvvvvxo == 1 && update_server_target_vvvvvxo == 1) + { + jQuery('#jform_update_server').closest('.control-group').show(); + jQuery('.note_update_server_note_ftp').closest('.control-group').show(); + } + else + { + jQuery('#jform_update_server').closest('.control-group').hide(); + jQuery('.note_update_server_note_ftp').closest('.control-group').hide(); + } +} + +// the vvvvvxp function +function vvvvvxp(update_server_target_vvvvvxp,add_update_server_vvvvvxp) +{ + // set the function logic + if (update_server_target_vvvvvxp == 2 && add_update_server_vvvvvxp == 1) { jQuery('.note_update_server_note_zip').closest('.control-group').show(); } @@ -462,11 +479,11 @@ function vvvvvxo(update_server_target_vvvvvxo,add_update_server_vvvvvxo) } } -// the vvvvvxq function -function vvvvvxq(update_server_target_vvvvvxq,add_update_server_vvvvvxq) +// the vvvvvxr function +function vvvvvxr(update_server_target_vvvvvxr,add_update_server_vvvvvxr) { // set the function logic - if (update_server_target_vvvvvxq == 3 && add_update_server_vvvvvxq == 1) + if (update_server_target_vvvvvxr == 3 && add_update_server_vvvvvxr == 1) { jQuery('.note_update_server_note_other').closest('.control-group').show(); } @@ -476,107 +493,107 @@ function vvvvvxq(update_server_target_vvvvvxq,add_update_server_vvvvvxq) } } -// the vvvvvxs function -function vvvvvxs(add_update_server_vvvvvxs) +// the vvvvvxt function +function vvvvvxt(add_update_server_vvvvvxt) { // set the function logic - if (add_update_server_vvvvvxs == 1) + if (add_update_server_vvvvvxt == 1) { jQuery('#jform_update_server_target').closest('.control-group').show(); // add required attribute to update_server_target field - if (jform_vvvvvxsvwe_required) + if (jform_vvvvvxtvwe_required) { updateFieldRequired('update_server_target',0); jQuery('#jform_update_server_target').prop('required','required'); jQuery('#jform_update_server_target').attr('aria-required',true); jQuery('#jform_update_server_target').addClass('required'); - jform_vvvvvxsvwe_required = false; + jform_vvvvvxtvwe_required = false; } } else { jQuery('#jform_update_server_target').closest('.control-group').hide(); // remove required attribute from update_server_target field - if (!jform_vvvvvxsvwe_required) + if (!jform_vvvvvxtvwe_required) { updateFieldRequired('update_server_target',1); jQuery('#jform_update_server_target').removeAttr('required'); jQuery('#jform_update_server_target').removeAttr('aria-required'); jQuery('#jform_update_server_target').removeClass('required'); - jform_vvvvvxsvwe_required = true; + jform_vvvvvxtvwe_required = true; } } } -// the vvvvvxt function -function vvvvvxt(add_sql_vvvvvxt) +// the vvvvvxu function +function vvvvvxu(add_sql_vvvvvxu) { // set the function logic - if (add_sql_vvvvvxt == 1) + if (add_sql_vvvvvxu == 1) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field - if (jform_vvvvvxtvwf_required) + if (jform_vvvvvxuvwf_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvxtvwf_required = false; + jform_vvvvvxuvwf_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field - if (!jform_vvvvvxtvwf_required) + if (!jform_vvvvvxuvwf_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvxtvwf_required = true; + jform_vvvvvxuvwf_required = true; } } } -// the vvvvvxu function -function vvvvvxu(add_sql_uninstall_vvvvvxu) +// the vvvvvxv function +function vvvvvxv(add_sql_uninstall_vvvvvxv) { // set the function logic - if (add_sql_uninstall_vvvvvxu == 1) + if (add_sql_uninstall_vvvvvxv == 1) { jQuery('#jform_sql_uninstall').closest('.control-group').show(); // add required attribute to sql_uninstall field - if (jform_vvvvvxuvwg_required) + if (jform_vvvvvxvvwg_required) { updateFieldRequired('sql_uninstall',0); jQuery('#jform_sql_uninstall').prop('required','required'); jQuery('#jform_sql_uninstall').attr('aria-required',true); jQuery('#jform_sql_uninstall').addClass('required'); - jform_vvvvvxuvwg_required = false; + jform_vvvvvxvvwg_required = false; } } else { jQuery('#jform_sql_uninstall').closest('.control-group').hide(); // remove required attribute from sql_uninstall field - if (!jform_vvvvvxuvwg_required) + if (!jform_vvvvvxvvwg_required) { updateFieldRequired('sql_uninstall',1); jQuery('#jform_sql_uninstall').removeAttr('required'); jQuery('#jform_sql_uninstall').removeAttr('aria-required'); jQuery('#jform_sql_uninstall').removeClass('required'); - jform_vvvvvxuvwg_required = true; + jform_vvvvvxvvwg_required = true; } } } -// the vvvvvxv function -function vvvvvxv(add_update_server_vvvvvxv) +// the vvvvvxw function +function vvvvvxw(add_update_server_vvvvvxw) { // set the function logic - if (add_update_server_vvvvvxv == 1) + if (add_update_server_vvvvvxw == 1) { jQuery('#jform_update_server_url').closest('.control-group').show(); } @@ -586,11 +603,11 @@ function vvvvvxv(add_update_server_vvvvvxv) } } -// the vvvvvxw function -function vvvvvxw(add_sales_server_vvvvvxw) +// the vvvvvxx function +function vvvvvxx(add_sales_server_vvvvvxx) { // set the function logic - if (add_sales_server_vvvvvxw == 1) + if (add_sales_server_vvvvvxx == 1) { jQuery('#jform_sales_server').closest('.control-group').show(); } @@ -600,11 +617,11 @@ function vvvvvxw(add_sales_server_vvvvvxw) } } -// the vvvvvxx function -function vvvvvxx(addreadme_vvvvvxx) +// the vvvvvxy function +function vvvvvxy(addreadme_vvvvvxy) { // set the function logic - if (addreadme_vvvvvxx == 1) + if (addreadme_vvvvvxy == 1) { jQuery('#jform_readme-lbl').closest('.control-group').show(); } diff --git a/admin/models/forms/joomla_plugin.xml b/admin/models/forms/joomla_plugin.xml index 1e34ea6c7..0c5450730 100644 --- a/admin/models/forms/joomla_plugin.xml +++ b/admin/models/forms/joomla_plugin.xml @@ -121,19 +121,6 @@ required="true" button="true" /> - - - + - - - - - - + type="textarea" + name="description" + label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION_LABEL" + rows="11" + cols="10" + description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION_DESCRIPTION" + class="text_area span12" + filter="HTML" + hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DESCRIPTION_HINT" + /> + + + + + + COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NO + + - - - - - - - - + + - + @@ -379,11 +361,40 @@ name="not_required" default="[]" /> - + + + + + + + + + @@ -432,6 +443,34 @@ /> + + + + + + + + + + + + COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NO + + + + + + + + COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NO - + + default="0"> @@ -490,13 +558,14 @@ filter="raw" validate="code" /> - + + default="0" + required="true"> @@ -517,36 +586,6 @@ - - - - - - - - COM_COMPONENTBUILDER_JOOMLA_PLUGIN_OTHER + + + + COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NO - - + + - - - - - - - - - - + + diff --git a/admin/models/forms/joomla_plugin_updates.js b/admin/models/forms/joomla_plugin_updates.js new file mode 100644 index 000000000..406de38ba --- /dev/null +++ b/admin/models/forms/joomla_plugin_updates.js @@ -0,0 +1,11 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + + diff --git a/admin/models/forms/joomla_plugin_updates.xml b/admin/models/forms/joomla_plugin_updates.xml new file mode 100644 index 000000000..0d8e6f710 --- /dev/null +++ b/admin/models/forms/joomla_plugin_updates.xml @@ -0,0 +1,181 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index a059e88e3..0144a82b9 100644 --- a/admin/models/forms/layout.js +++ b/admin/models/forms/layout.js @@ -11,15 +11,15 @@ // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvwac = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvwac(add_php_view_vvvvwac); + var add_php_view_vvvvwad = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvwad(add_php_view_vvvvwad); }); -// the vvvvwac function -function vvvvwac(add_php_view_vvvvwac) +// the vvvvwad function +function vvvvwad(add_php_view_vvvvwad) { // set the function logic - if (add_php_view_vvvvwac == 1) + if (add_php_view_vvvvwad == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js index d9ecaa732..7208caba1 100644 --- a/admin/models/forms/library.js +++ b/admin/models/forms/library.js @@ -9,15 +9,12 @@ */ // Some Global Values -jform_vvvvwblvxj_required = false; -jform_vvvvwbrvxk_required = false; +jform_vvvvwbmvxj_required = false; +jform_vvvvwbsvxk_required = false; // Initial Script jQuery(document).ready(function() { - var how_vvvvwbk = jQuery("#jform_how").val(); - vvvvwbk(how_vvvvwbk); - var how_vvvvwbl = jQuery("#jform_how").val(); vvvvwbl(how_vvvvwbl); @@ -36,48 +33,13 @@ jQuery(document).ready(function() var how_vvvvwbq = jQuery("#jform_how").val(); vvvvwbq(how_vvvvwbq); - var type_vvvvwbr = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvwbr(type_vvvvwbr); + var how_vvvvwbr = jQuery("#jform_how").val(); + vvvvwbr(how_vvvvwbr); + + var type_vvvvwbs = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwbs(type_vvvvwbs); }); -// the vvvvwbk function -function vvvvwbk(how_vvvvwbk) -{ - if (isSet(how_vvvvwbk) && how_vvvvwbk.constructor !== Array) - { - var temp_vvvvwbk = how_vvvvwbk; - var how_vvvvwbk = []; - how_vvvvwbk.push(temp_vvvvwbk); - } - else if (!isSet(how_vvvvwbk)) - { - var how_vvvvwbk = []; - } - var how = how_vvvvwbk.some(how_vvvvwbk_SomeFunc); - - - // set this function logic - if (how) - { - jQuery('#jform_addconditions-lbl').closest('.control-group').show(); - } - else - { - jQuery('#jform_addconditions-lbl').closest('.control-group').hide(); - } -} - -// the vvvvwbk Some function -function how_vvvvwbk_SomeFunc(how_vvvvwbk) -{ - // set the function logic - if (how_vvvvwbk == 2) - { - return true; - } - return false; -} - // the vvvvwbl function function vvvvwbl(how_vvvvwbl) { @@ -97,29 +59,11 @@ function vvvvwbl(how_vvvvwbl) // set this function logic if (how) { - jQuery('#jform_php_setdocument').closest('.control-group').show(); - // add required attribute to php_setdocument field - if (jform_vvvvwblvxj_required) - { - updateFieldRequired('php_setdocument',0); - jQuery('#jform_php_setdocument').prop('required','required'); - jQuery('#jform_php_setdocument').attr('aria-required',true); - jQuery('#jform_php_setdocument').addClass('required'); - jform_vvvvwblvxj_required = false; - } + jQuery('#jform_addconditions-lbl').closest('.control-group').show(); } else { - jQuery('#jform_php_setdocument').closest('.control-group').hide(); - // remove required attribute from php_setdocument field - if (!jform_vvvvwblvxj_required) - { - updateFieldRequired('php_setdocument',1); - jQuery('#jform_php_setdocument').removeAttr('required'); - jQuery('#jform_php_setdocument').removeAttr('aria-required'); - jQuery('#jform_php_setdocument').removeClass('required'); - jform_vvvvwblvxj_required = true; - } + jQuery('#jform_addconditions-lbl').closest('.control-group').hide(); } } @@ -127,7 +71,7 @@ function vvvvwbl(how_vvvvwbl) function how_vvvvwbl_SomeFunc(how_vvvvwbl) { // set the function logic - if (how_vvvvwbl == 3) + if (how_vvvvwbl == 2) { return true; } @@ -153,11 +97,29 @@ function vvvvwbm(how_vvvvwbm) // set this function logic if (how) { - jQuery('.note_display_library_config').closest('.control-group').show(); + jQuery('#jform_php_setdocument').closest('.control-group').show(); + // add required attribute to php_setdocument field + if (jform_vvvvwbmvxj_required) + { + updateFieldRequired('php_setdocument',0); + jQuery('#jform_php_setdocument').prop('required','required'); + jQuery('#jform_php_setdocument').attr('aria-required',true); + jQuery('#jform_php_setdocument').addClass('required'); + jform_vvvvwbmvxj_required = false; + } } else { - jQuery('.note_display_library_config').closest('.control-group').hide(); + jQuery('#jform_php_setdocument').closest('.control-group').hide(); + // remove required attribute from php_setdocument field + if (!jform_vvvvwbmvxj_required) + { + updateFieldRequired('php_setdocument',1); + jQuery('#jform_php_setdocument').removeAttr('required'); + jQuery('#jform_php_setdocument').removeAttr('aria-required'); + jQuery('#jform_php_setdocument').removeClass('required'); + jform_vvvvwbmvxj_required = true; + } } } @@ -165,7 +127,7 @@ function vvvvwbm(how_vvvvwbm) function how_vvvvwbm_SomeFunc(how_vvvvwbm) { // set the function logic - if (how_vvvvwbm == 2 || how_vvvvwbm == 3) + if (how_vvvvwbm == 3) { return true; } @@ -191,11 +153,11 @@ function vvvvwbn(how_vvvvwbn) // set this function logic if (how) { - jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); + jQuery('.note_display_library_config').closest('.control-group').show(); } else { - jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); + jQuery('.note_display_library_config').closest('.control-group').hide(); } } @@ -203,7 +165,7 @@ function vvvvwbn(how_vvvvwbn) function how_vvvvwbn_SomeFunc(how_vvvvwbn) { // set the function logic - if (how_vvvvwbn == 1 || how_vvvvwbn == 2 || how_vvvvwbn == 3) + if (how_vvvvwbn == 2 || how_vvvvwbn == 3) { return true; } @@ -229,15 +191,11 @@ function vvvvwbo(how_vvvvwbo) // set this function logic if (how) { - jQuery('.note_no_behaviour_one').closest('.control-group').show(); - jQuery('.note_no_behaviour_three').closest('.control-group').show(); - jQuery('.note_no_behaviour_two').closest('.control-group').show(); + jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); } else { - jQuery('.note_no_behaviour_one').closest('.control-group').hide(); - jQuery('.note_no_behaviour_three').closest('.control-group').hide(); - jQuery('.note_no_behaviour_two').closest('.control-group').hide(); + jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); } } @@ -245,7 +203,7 @@ function vvvvwbo(how_vvvvwbo) function how_vvvvwbo_SomeFunc(how_vvvvwbo) { // set the function logic - if (how_vvvvwbo == 0) + if (how_vvvvwbo == 1 || how_vvvvwbo == 2 || how_vvvvwbo == 3) { return true; } @@ -271,13 +229,15 @@ function vvvvwbp(how_vvvvwbp) // set this function logic if (how) { - jQuery('.note_yes_behaviour_one').closest('.control-group').show(); - jQuery('.note_yes_behaviour_two').closest('.control-group').show(); + jQuery('.note_no_behaviour_one').closest('.control-group').show(); + jQuery('.note_no_behaviour_three').closest('.control-group').show(); + jQuery('.note_no_behaviour_two').closest('.control-group').show(); } else { - jQuery('.note_yes_behaviour_one').closest('.control-group').hide(); - jQuery('.note_yes_behaviour_two').closest('.control-group').hide(); + jQuery('.note_no_behaviour_one').closest('.control-group').hide(); + jQuery('.note_no_behaviour_three').closest('.control-group').hide(); + jQuery('.note_no_behaviour_two').closest('.control-group').hide(); } } @@ -285,7 +245,7 @@ function vvvvwbp(how_vvvvwbp) function how_vvvvwbp_SomeFunc(how_vvvvwbp) { // set the function logic - if (how_vvvvwbp == 1) + if (how_vvvvwbp == 0) { return true; } @@ -308,6 +268,46 @@ function vvvvwbq(how_vvvvwbq) var how = how_vvvvwbq.some(how_vvvvwbq_SomeFunc); + // set this function logic + if (how) + { + jQuery('.note_yes_behaviour_one').closest('.control-group').show(); + jQuery('.note_yes_behaviour_two').closest('.control-group').show(); + } + else + { + jQuery('.note_yes_behaviour_one').closest('.control-group').hide(); + jQuery('.note_yes_behaviour_two').closest('.control-group').hide(); + } +} + +// the vvvvwbq Some function +function how_vvvvwbq_SomeFunc(how_vvvvwbq) +{ + // set the function logic + if (how_vvvvwbq == 1) + { + return true; + } + return false; +} + +// the vvvvwbr function +function vvvvwbr(how_vvvvwbr) +{ + if (isSet(how_vvvvwbr) && how_vvvvwbr.constructor !== Array) + { + var temp_vvvvwbr = how_vvvvwbr; + var how_vvvvwbr = []; + how_vvvvwbr.push(temp_vvvvwbr); + } + else if (!isSet(how_vvvvwbr)) + { + var how_vvvvwbr = []; + } + var how = how_vvvvwbr.some(how_vvvvwbr_SomeFunc); + + // set this function logic if (how) { @@ -323,45 +323,45 @@ function vvvvwbq(how_vvvvwbq) } } -// the vvvvwbq Some function -function how_vvvvwbq_SomeFunc(how_vvvvwbq) +// the vvvvwbr Some function +function how_vvvvwbr_SomeFunc(how_vvvvwbr) { // set the function logic - if (how_vvvvwbq == 4) + if (how_vvvvwbr == 4) { return true; } return false; } -// the vvvvwbr function -function vvvvwbr(type_vvvvwbr) +// the vvvvwbs function +function vvvvwbs(type_vvvvwbs) { // set the function logic - if (type_vvvvwbr == 2) + if (type_vvvvwbs == 2) { jQuery('#jform_libraries').closest('.control-group').show(); // add required attribute to libraries field - if (jform_vvvvwbrvxk_required) + if (jform_vvvvwbsvxk_required) { updateFieldRequired('libraries',0); jQuery('#jform_libraries').prop('required','required'); jQuery('#jform_libraries').attr('aria-required',true); jQuery('#jform_libraries').addClass('required'); - jform_vvvvwbrvxk_required = false; + jform_vvvvwbsvxk_required = false; } } else { jQuery('#jform_libraries').closest('.control-group').hide(); // remove required attribute from libraries field - if (!jform_vvvvwbrvxk_required) + if (!jform_vvvvwbsvxk_required) { updateFieldRequired('libraries',1); jQuery('#jform_libraries').removeAttr('required'); jQuery('#jform_libraries').removeAttr('aria-required'); jQuery('#jform_libraries').removeClass('required'); - jform_vvvvwbrvxk_required = true; + jform_vvvvwbsvxk_required = true; } } } diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index e506f6916..8eb578083 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -9,180 +9,42 @@ */ // Some Global Values -jform_vvvvwcovxx_required = false; -jform_vvvvwcovxy_required = false; -jform_vvvvwcovxz_required = false; -jform_vvvvwcovya_required = false; -jform_vvvvwcovyb_required = false; -jform_vvvvwcpvyc_required = false; -jform_vvvvwcqvyd_required = false; -jform_vvvvwcsvye_required = false; -jform_vvvvwcuvyf_required = false; +jform_vvvvwcpvxx_required = false; +jform_vvvvwcpvxy_required = false; +jform_vvvvwcpvxz_required = false; +jform_vvvvwcpvya_required = false; +jform_vvvvwcpvyb_required = false; +jform_vvvvwcqvyc_required = false; +jform_vvvvwcrvyd_required = false; +jform_vvvvwctvye_required = false; +jform_vvvvwcvvyf_required = false; // Initial Script jQuery(document).ready(function() { - var protocol_vvvvwco = jQuery("#jform_protocol").val(); - vvvvwco(protocol_vvvvwco); - var protocol_vvvvwcp = jQuery("#jform_protocol").val(); vvvvwcp(protocol_vvvvwcp); var protocol_vvvvwcq = jQuery("#jform_protocol").val(); - var authentication_vvvvwcq = jQuery("#jform_authentication").val(); - vvvvwcq(protocol_vvvvwcq,authentication_vvvvwcq); + vvvvwcq(protocol_vvvvwcq); - var protocol_vvvvwcs = jQuery("#jform_protocol").val(); - var authentication_vvvvwcs = jQuery("#jform_authentication").val(); - vvvvwcs(protocol_vvvvwcs,authentication_vvvvwcs); + var protocol_vvvvwcr = jQuery("#jform_protocol").val(); + var authentication_vvvvwcr = jQuery("#jform_authentication").val(); + vvvvwcr(protocol_vvvvwcr,authentication_vvvvwcr); - var protocol_vvvvwcu = jQuery("#jform_protocol").val(); - var authentication_vvvvwcu = jQuery("#jform_authentication").val(); - vvvvwcu(protocol_vvvvwcu,authentication_vvvvwcu); + var protocol_vvvvwct = jQuery("#jform_protocol").val(); + var authentication_vvvvwct = jQuery("#jform_authentication").val(); + vvvvwct(protocol_vvvvwct,authentication_vvvvwct); - var protocol_vvvvwcw = jQuery("#jform_protocol").val(); - var authentication_vvvvwcw = jQuery("#jform_authentication").val(); - vvvvwcw(protocol_vvvvwcw,authentication_vvvvwcw); + var protocol_vvvvwcv = jQuery("#jform_protocol").val(); + var authentication_vvvvwcv = jQuery("#jform_authentication").val(); + vvvvwcv(protocol_vvvvwcv,authentication_vvvvwcv); + + var protocol_vvvvwcx = jQuery("#jform_protocol").val(); + var authentication_vvvvwcx = jQuery("#jform_authentication").val(); + vvvvwcx(protocol_vvvvwcx,authentication_vvvvwcx); }); -// the vvvvwco function -function vvvvwco(protocol_vvvvwco) -{ - if (isSet(protocol_vvvvwco) && protocol_vvvvwco.constructor !== Array) - { - var temp_vvvvwco = protocol_vvvvwco; - var protocol_vvvvwco = []; - protocol_vvvvwco.push(temp_vvvvwco); - } - else if (!isSet(protocol_vvvvwco)) - { - var protocol_vvvvwco = []; - } - var protocol = protocol_vvvvwco.some(protocol_vvvvwco_SomeFunc); - - - // set this function logic - if (protocol) - { - jQuery('#jform_authentication').closest('.control-group').show(); - // add required attribute to authentication field - if (jform_vvvvwcovxx_required) - { - updateFieldRequired('authentication',0); - jQuery('#jform_authentication').prop('required','required'); - jQuery('#jform_authentication').attr('aria-required',true); - jQuery('#jform_authentication').addClass('required'); - jform_vvvvwcovxx_required = false; - } - jQuery('#jform_host').closest('.control-group').show(); - // add required attribute to host field - if (jform_vvvvwcovxy_required) - { - updateFieldRequired('host',0); - jQuery('#jform_host').prop('required','required'); - jQuery('#jform_host').attr('aria-required',true); - jQuery('#jform_host').addClass('required'); - jform_vvvvwcovxy_required = false; - } - jQuery('#jform_port').closest('.control-group').show(); - // add required attribute to port field - if (jform_vvvvwcovxz_required) - { - updateFieldRequired('port',0); - jQuery('#jform_port').prop('required','required'); - jQuery('#jform_port').attr('aria-required',true); - jQuery('#jform_port').addClass('required'); - jform_vvvvwcovxz_required = false; - } - jQuery('#jform_path').closest('.control-group').show(); - // add required attribute to path field - if (jform_vvvvwcovya_required) - { - updateFieldRequired('path',0); - jQuery('#jform_path').prop('required','required'); - jQuery('#jform_path').attr('aria-required',true); - jQuery('#jform_path').addClass('required'); - jform_vvvvwcovya_required = false; - } - jQuery('.note_ssh_security').closest('.control-group').show(); - jQuery('#jform_username').closest('.control-group').show(); - // add required attribute to username field - if (jform_vvvvwcovyb_required) - { - updateFieldRequired('username',0); - jQuery('#jform_username').prop('required','required'); - jQuery('#jform_username').attr('aria-required',true); - jQuery('#jform_username').addClass('required'); - jform_vvvvwcovyb_required = false; - } - } - else - { - jQuery('#jform_authentication').closest('.control-group').hide(); - // remove required attribute from authentication field - if (!jform_vvvvwcovxx_required) - { - updateFieldRequired('authentication',1); - jQuery('#jform_authentication').removeAttr('required'); - jQuery('#jform_authentication').removeAttr('aria-required'); - jQuery('#jform_authentication').removeClass('required'); - jform_vvvvwcovxx_required = true; - } - jQuery('#jform_host').closest('.control-group').hide(); - // remove required attribute from host field - if (!jform_vvvvwcovxy_required) - { - updateFieldRequired('host',1); - jQuery('#jform_host').removeAttr('required'); - jQuery('#jform_host').removeAttr('aria-required'); - jQuery('#jform_host').removeClass('required'); - jform_vvvvwcovxy_required = true; - } - jQuery('#jform_port').closest('.control-group').hide(); - // remove required attribute from port field - if (!jform_vvvvwcovxz_required) - { - updateFieldRequired('port',1); - jQuery('#jform_port').removeAttr('required'); - jQuery('#jform_port').removeAttr('aria-required'); - jQuery('#jform_port').removeClass('required'); - jform_vvvvwcovxz_required = true; - } - jQuery('#jform_path').closest('.control-group').hide(); - // remove required attribute from path field - if (!jform_vvvvwcovya_required) - { - updateFieldRequired('path',1); - jQuery('#jform_path').removeAttr('required'); - jQuery('#jform_path').removeAttr('aria-required'); - jQuery('#jform_path').removeClass('required'); - jform_vvvvwcovya_required = true; - } - jQuery('.note_ssh_security').closest('.control-group').hide(); - jQuery('#jform_username').closest('.control-group').hide(); - // remove required attribute from username field - if (!jform_vvvvwcovyb_required) - { - updateFieldRequired('username',1); - jQuery('#jform_username').removeAttr('required'); - jQuery('#jform_username').removeAttr('aria-required'); - jQuery('#jform_username').removeClass('required'); - jform_vvvvwcovyb_required = true; - } - } -} - -// the vvvvwco Some function -function protocol_vvvvwco_SomeFunc(protocol_vvvvwco) -{ - // set the function logic - if (protocol_vvvvwco == 2) - { - return true; - } - return false; -} - // the vvvvwcp function function vvvvwcp(protocol_vvvvwcp) { @@ -202,30 +64,110 @@ function vvvvwcp(protocol_vvvvwcp) // set this function logic if (protocol) { - jQuery('.note_ftp_signature').closest('.control-group').show(); - jQuery('#jform_signature').closest('.control-group').show(); - // add required attribute to signature field - if (jform_vvvvwcpvyc_required) + jQuery('#jform_authentication').closest('.control-group').show(); + // add required attribute to authentication field + if (jform_vvvvwcpvxx_required) { - updateFieldRequired('signature',0); - jQuery('#jform_signature').prop('required','required'); - jQuery('#jform_signature').attr('aria-required',true); - jQuery('#jform_signature').addClass('required'); - jform_vvvvwcpvyc_required = false; + updateFieldRequired('authentication',0); + jQuery('#jform_authentication').prop('required','required'); + jQuery('#jform_authentication').attr('aria-required',true); + jQuery('#jform_authentication').addClass('required'); + jform_vvvvwcpvxx_required = false; + } + jQuery('#jform_host').closest('.control-group').show(); + // add required attribute to host field + if (jform_vvvvwcpvxy_required) + { + updateFieldRequired('host',0); + jQuery('#jform_host').prop('required','required'); + jQuery('#jform_host').attr('aria-required',true); + jQuery('#jform_host').addClass('required'); + jform_vvvvwcpvxy_required = false; + } + jQuery('#jform_port').closest('.control-group').show(); + // add required attribute to port field + if (jform_vvvvwcpvxz_required) + { + updateFieldRequired('port',0); + jQuery('#jform_port').prop('required','required'); + jQuery('#jform_port').attr('aria-required',true); + jQuery('#jform_port').addClass('required'); + jform_vvvvwcpvxz_required = false; + } + jQuery('#jform_path').closest('.control-group').show(); + // add required attribute to path field + if (jform_vvvvwcpvya_required) + { + updateFieldRequired('path',0); + jQuery('#jform_path').prop('required','required'); + jQuery('#jform_path').attr('aria-required',true); + jQuery('#jform_path').addClass('required'); + jform_vvvvwcpvya_required = false; + } + jQuery('.note_ssh_security').closest('.control-group').show(); + jQuery('#jform_username').closest('.control-group').show(); + // add required attribute to username field + if (jform_vvvvwcpvyb_required) + { + updateFieldRequired('username',0); + jQuery('#jform_username').prop('required','required'); + jQuery('#jform_username').attr('aria-required',true); + jQuery('#jform_username').addClass('required'); + jform_vvvvwcpvyb_required = false; } } else { - jQuery('.note_ftp_signature').closest('.control-group').hide(); - jQuery('#jform_signature').closest('.control-group').hide(); - // remove required attribute from signature field - if (!jform_vvvvwcpvyc_required) + jQuery('#jform_authentication').closest('.control-group').hide(); + // remove required attribute from authentication field + if (!jform_vvvvwcpvxx_required) { - updateFieldRequired('signature',1); - jQuery('#jform_signature').removeAttr('required'); - jQuery('#jform_signature').removeAttr('aria-required'); - jQuery('#jform_signature').removeClass('required'); - jform_vvvvwcpvyc_required = true; + updateFieldRequired('authentication',1); + jQuery('#jform_authentication').removeAttr('required'); + jQuery('#jform_authentication').removeAttr('aria-required'); + jQuery('#jform_authentication').removeClass('required'); + jform_vvvvwcpvxx_required = true; + } + jQuery('#jform_host').closest('.control-group').hide(); + // remove required attribute from host field + if (!jform_vvvvwcpvxy_required) + { + updateFieldRequired('host',1); + jQuery('#jform_host').removeAttr('required'); + jQuery('#jform_host').removeAttr('aria-required'); + jQuery('#jform_host').removeClass('required'); + jform_vvvvwcpvxy_required = true; + } + jQuery('#jform_port').closest('.control-group').hide(); + // remove required attribute from port field + if (!jform_vvvvwcpvxz_required) + { + updateFieldRequired('port',1); + jQuery('#jform_port').removeAttr('required'); + jQuery('#jform_port').removeAttr('aria-required'); + jQuery('#jform_port').removeClass('required'); + jform_vvvvwcpvxz_required = true; + } + jQuery('#jform_path').closest('.control-group').hide(); + // remove required attribute from path field + if (!jform_vvvvwcpvya_required) + { + updateFieldRequired('path',1); + jQuery('#jform_path').removeAttr('required'); + jQuery('#jform_path').removeAttr('aria-required'); + jQuery('#jform_path').removeClass('required'); + jform_vvvvwcpvya_required = true; + } + jQuery('.note_ssh_security').closest('.control-group').hide(); + jQuery('#jform_username').closest('.control-group').hide(); + // remove required attribute from username field + if (!jform_vvvvwcpvyb_required) + { + updateFieldRequired('username',1); + jQuery('#jform_username').removeAttr('required'); + jQuery('#jform_username').removeAttr('aria-required'); + jQuery('#jform_username').removeClass('required'); + jform_vvvvwcpvyb_required = true; } } } @@ -234,7 +176,7 @@ function vvvvwcp(protocol_vvvvwcp) function protocol_vvvvwcp_SomeFunc(protocol_vvvvwcp) { // set the function logic - if (protocol_vvvvwcp == 1) + if (protocol_vvvvwcp == 2) { return true; } @@ -242,7 +184,7 @@ function protocol_vvvvwcp_SomeFunc(protocol_vvvvwcp) } // the vvvvwcq function -function vvvvwcq(protocol_vvvvwcq,authentication_vvvvwcq) +function vvvvwcq(protocol_vvvvwcq) { if (isSet(protocol_vvvvwcq) && protocol_vvvvwcq.constructor !== Array) { @@ -256,44 +198,34 @@ function vvvvwcq(protocol_vvvvwcq,authentication_vvvvwcq) } var protocol = protocol_vvvvwcq.some(protocol_vvvvwcq_SomeFunc); - if (isSet(authentication_vvvvwcq) && authentication_vvvvwcq.constructor !== Array) - { - var temp_vvvvwcq = authentication_vvvvwcq; - var authentication_vvvvwcq = []; - authentication_vvvvwcq.push(temp_vvvvwcq); - } - else if (!isSet(authentication_vvvvwcq)) - { - var authentication_vvvvwcq = []; - } - var authentication = authentication_vvvvwcq.some(authentication_vvvvwcq_SomeFunc); - // set this function logic - if (protocol && authentication) + if (protocol) { - jQuery('#jform_password').closest('.control-group').show(); - // add required attribute to password field - if (jform_vvvvwcqvyd_required) + jQuery('.note_ftp_signature').closest('.control-group').show(); + jQuery('#jform_signature').closest('.control-group').show(); + // add required attribute to signature field + if (jform_vvvvwcqvyc_required) { - updateFieldRequired('password',0); - jQuery('#jform_password').prop('required','required'); - jQuery('#jform_password').attr('aria-required',true); - jQuery('#jform_password').addClass('required'); - jform_vvvvwcqvyd_required = false; + updateFieldRequired('signature',0); + jQuery('#jform_signature').prop('required','required'); + jQuery('#jform_signature').attr('aria-required',true); + jQuery('#jform_signature').addClass('required'); + jform_vvvvwcqvyc_required = false; } } else { - jQuery('#jform_password').closest('.control-group').hide(); - // remove required attribute from password field - if (!jform_vvvvwcqvyd_required) + jQuery('.note_ftp_signature').closest('.control-group').hide(); + jQuery('#jform_signature').closest('.control-group').hide(); + // remove required attribute from signature field + if (!jform_vvvvwcqvyc_required) { - updateFieldRequired('password',1); - jQuery('#jform_password').removeAttr('required'); - jQuery('#jform_password').removeAttr('aria-required'); - jQuery('#jform_password').removeClass('required'); - jform_vvvvwcqvyd_required = true; + updateFieldRequired('signature',1); + jQuery('#jform_signature').removeAttr('required'); + jQuery('#jform_signature').removeAttr('aria-required'); + jQuery('#jform_signature').removeClass('required'); + jform_vvvvwcqvyc_required = true; } } } @@ -302,50 +234,118 @@ function vvvvwcq(protocol_vvvvwcq,authentication_vvvvwcq) function protocol_vvvvwcq_SomeFunc(protocol_vvvvwcq) { // set the function logic - if (protocol_vvvvwcq == 2) + if (protocol_vvvvwcq == 1) { return true; } return false; } -// the vvvvwcq Some function -function authentication_vvvvwcq_SomeFunc(authentication_vvvvwcq) +// the vvvvwcr function +function vvvvwcr(protocol_vvvvwcr,authentication_vvvvwcr) +{ + if (isSet(protocol_vvvvwcr) && protocol_vvvvwcr.constructor !== Array) + { + var temp_vvvvwcr = protocol_vvvvwcr; + var protocol_vvvvwcr = []; + protocol_vvvvwcr.push(temp_vvvvwcr); + } + else if (!isSet(protocol_vvvvwcr)) + { + var protocol_vvvvwcr = []; + } + var protocol = protocol_vvvvwcr.some(protocol_vvvvwcr_SomeFunc); + + if (isSet(authentication_vvvvwcr) && authentication_vvvvwcr.constructor !== Array) + { + var temp_vvvvwcr = authentication_vvvvwcr; + var authentication_vvvvwcr = []; + authentication_vvvvwcr.push(temp_vvvvwcr); + } + else if (!isSet(authentication_vvvvwcr)) + { + var authentication_vvvvwcr = []; + } + var authentication = authentication_vvvvwcr.some(authentication_vvvvwcr_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_password').closest('.control-group').show(); + // add required attribute to password field + if (jform_vvvvwcrvyd_required) + { + updateFieldRequired('password',0); + jQuery('#jform_password').prop('required','required'); + jQuery('#jform_password').attr('aria-required',true); + jQuery('#jform_password').addClass('required'); + jform_vvvvwcrvyd_required = false; + } + } + else + { + jQuery('#jform_password').closest('.control-group').hide(); + // remove required attribute from password field + if (!jform_vvvvwcrvyd_required) + { + updateFieldRequired('password',1); + jQuery('#jform_password').removeAttr('required'); + jQuery('#jform_password').removeAttr('aria-required'); + jQuery('#jform_password').removeClass('required'); + jform_vvvvwcrvyd_required = true; + } + } +} + +// the vvvvwcr Some function +function protocol_vvvvwcr_SomeFunc(protocol_vvvvwcr) { // set the function logic - if (authentication_vvvvwcq == 1 || authentication_vvvvwcq == 3 || authentication_vvvvwcq == 5) + if (protocol_vvvvwcr == 2) { return true; } return false; } -// the vvvvwcs function -function vvvvwcs(protocol_vvvvwcs,authentication_vvvvwcs) +// the vvvvwcr Some function +function authentication_vvvvwcr_SomeFunc(authentication_vvvvwcr) { - if (isSet(protocol_vvvvwcs) && protocol_vvvvwcs.constructor !== Array) + // set the function logic + if (authentication_vvvvwcr == 1 || authentication_vvvvwcr == 3 || authentication_vvvvwcr == 5) { - var temp_vvvvwcs = protocol_vvvvwcs; - var protocol_vvvvwcs = []; - protocol_vvvvwcs.push(temp_vvvvwcs); + return true; } - else if (!isSet(protocol_vvvvwcs)) - { - var protocol_vvvvwcs = []; - } - var protocol = protocol_vvvvwcs.some(protocol_vvvvwcs_SomeFunc); + return false; +} - if (isSet(authentication_vvvvwcs) && authentication_vvvvwcs.constructor !== Array) +// the vvvvwct function +function vvvvwct(protocol_vvvvwct,authentication_vvvvwct) +{ + if (isSet(protocol_vvvvwct) && protocol_vvvvwct.constructor !== Array) { - var temp_vvvvwcs = authentication_vvvvwcs; - var authentication_vvvvwcs = []; - authentication_vvvvwcs.push(temp_vvvvwcs); + var temp_vvvvwct = protocol_vvvvwct; + var protocol_vvvvwct = []; + protocol_vvvvwct.push(temp_vvvvwct); } - else if (!isSet(authentication_vvvvwcs)) + else if (!isSet(protocol_vvvvwct)) { - var authentication_vvvvwcs = []; + var protocol_vvvvwct = []; } - var authentication = authentication_vvvvwcs.some(authentication_vvvvwcs_SomeFunc); + var protocol = protocol_vvvvwct.some(protocol_vvvvwct_SomeFunc); + + if (isSet(authentication_vvvvwct) && authentication_vvvvwct.constructor !== Array) + { + var temp_vvvvwct = authentication_vvvvwct; + var authentication_vvvvwct = []; + authentication_vvvvwct.push(temp_vvvvwct); + } + else if (!isSet(authentication_vvvvwct)) + { + var authentication_vvvvwct = []; + } + var authentication = authentication_vvvvwct.some(authentication_vvvvwct_SomeFunc); // set this function logic @@ -353,78 +353,78 @@ function vvvvwcs(protocol_vvvvwcs,authentication_vvvvwcs) { jQuery('#jform_private').closest('.control-group').show(); // add required attribute to private field - if (jform_vvvvwcsvye_required) + if (jform_vvvvwctvye_required) { updateFieldRequired('private',0); jQuery('#jform_private').prop('required','required'); jQuery('#jform_private').attr('aria-required',true); jQuery('#jform_private').addClass('required'); - jform_vvvvwcsvye_required = false; + jform_vvvvwctvye_required = false; } } else { jQuery('#jform_private').closest('.control-group').hide(); // remove required attribute from private field - if (!jform_vvvvwcsvye_required) + if (!jform_vvvvwctvye_required) { updateFieldRequired('private',1); jQuery('#jform_private').removeAttr('required'); jQuery('#jform_private').removeAttr('aria-required'); jQuery('#jform_private').removeClass('required'); - jform_vvvvwcsvye_required = true; + jform_vvvvwctvye_required = true; } } } -// the vvvvwcs Some function -function protocol_vvvvwcs_SomeFunc(protocol_vvvvwcs) +// the vvvvwct Some function +function protocol_vvvvwct_SomeFunc(protocol_vvvvwct) { // set the function logic - if (protocol_vvvvwcs == 2) + if (protocol_vvvvwct == 2) { return true; } return false; } -// the vvvvwcs Some function -function authentication_vvvvwcs_SomeFunc(authentication_vvvvwcs) +// the vvvvwct Some function +function authentication_vvvvwct_SomeFunc(authentication_vvvvwct) { // set the function logic - if (authentication_vvvvwcs == 2 || authentication_vvvvwcs == 3) + if (authentication_vvvvwct == 2 || authentication_vvvvwct == 3) { return true; } return false; } -// the vvvvwcu function -function vvvvwcu(protocol_vvvvwcu,authentication_vvvvwcu) +// the vvvvwcv function +function vvvvwcv(protocol_vvvvwcv,authentication_vvvvwcv) { - if (isSet(protocol_vvvvwcu) && protocol_vvvvwcu.constructor !== Array) + if (isSet(protocol_vvvvwcv) && protocol_vvvvwcv.constructor !== Array) { - var temp_vvvvwcu = protocol_vvvvwcu; - var protocol_vvvvwcu = []; - protocol_vvvvwcu.push(temp_vvvvwcu); + var temp_vvvvwcv = protocol_vvvvwcv; + var protocol_vvvvwcv = []; + protocol_vvvvwcv.push(temp_vvvvwcv); } - else if (!isSet(protocol_vvvvwcu)) + else if (!isSet(protocol_vvvvwcv)) { - var protocol_vvvvwcu = []; + var protocol_vvvvwcv = []; } - var protocol = protocol_vvvvwcu.some(protocol_vvvvwcu_SomeFunc); + var protocol = protocol_vvvvwcv.some(protocol_vvvvwcv_SomeFunc); - if (isSet(authentication_vvvvwcu) && authentication_vvvvwcu.constructor !== Array) + if (isSet(authentication_vvvvwcv) && authentication_vvvvwcv.constructor !== Array) { - var temp_vvvvwcu = authentication_vvvvwcu; - var authentication_vvvvwcu = []; - authentication_vvvvwcu.push(temp_vvvvwcu); + var temp_vvvvwcv = authentication_vvvvwcv; + var authentication_vvvvwcv = []; + authentication_vvvvwcv.push(temp_vvvvwcv); } - else if (!isSet(authentication_vvvvwcu)) + else if (!isSet(authentication_vvvvwcv)) { - var authentication_vvvvwcu = []; + var authentication_vvvvwcv = []; } - var authentication = authentication_vvvvwcu.some(authentication_vvvvwcu_SomeFunc); + var authentication = authentication_vvvvwcv.some(authentication_vvvvwcv_SomeFunc); // set this function logic @@ -432,78 +432,78 @@ function vvvvwcu(protocol_vvvvwcu,authentication_vvvvwcu) { jQuery('#jform_private_key').closest('.control-group').show(); // add required attribute to private_key field - if (jform_vvvvwcuvyf_required) + if (jform_vvvvwcvvyf_required) { updateFieldRequired('private_key',0); jQuery('#jform_private_key').prop('required','required'); jQuery('#jform_private_key').attr('aria-required',true); jQuery('#jform_private_key').addClass('required'); - jform_vvvvwcuvyf_required = false; + jform_vvvvwcvvyf_required = false; } } else { jQuery('#jform_private_key').closest('.control-group').hide(); // remove required attribute from private_key field - if (!jform_vvvvwcuvyf_required) + if (!jform_vvvvwcvvyf_required) { updateFieldRequired('private_key',1); jQuery('#jform_private_key').removeAttr('required'); jQuery('#jform_private_key').removeAttr('aria-required'); jQuery('#jform_private_key').removeClass('required'); - jform_vvvvwcuvyf_required = true; + jform_vvvvwcvvyf_required = true; } } } -// the vvvvwcu Some function -function protocol_vvvvwcu_SomeFunc(protocol_vvvvwcu) +// the vvvvwcv Some function +function protocol_vvvvwcv_SomeFunc(protocol_vvvvwcv) { // set the function logic - if (protocol_vvvvwcu == 2) + if (protocol_vvvvwcv == 2) { return true; } return false; } -// the vvvvwcu Some function -function authentication_vvvvwcu_SomeFunc(authentication_vvvvwcu) +// the vvvvwcv Some function +function authentication_vvvvwcv_SomeFunc(authentication_vvvvwcv) { // set the function logic - if (authentication_vvvvwcu == 4 || authentication_vvvvwcu == 5) + if (authentication_vvvvwcv == 4 || authentication_vvvvwcv == 5) { return true; } return false; } -// the vvvvwcw function -function vvvvwcw(protocol_vvvvwcw,authentication_vvvvwcw) +// the vvvvwcx function +function vvvvwcx(protocol_vvvvwcx,authentication_vvvvwcx) { - if (isSet(protocol_vvvvwcw) && protocol_vvvvwcw.constructor !== Array) + if (isSet(protocol_vvvvwcx) && protocol_vvvvwcx.constructor !== Array) { - var temp_vvvvwcw = protocol_vvvvwcw; - var protocol_vvvvwcw = []; - protocol_vvvvwcw.push(temp_vvvvwcw); + var temp_vvvvwcx = protocol_vvvvwcx; + var protocol_vvvvwcx = []; + protocol_vvvvwcx.push(temp_vvvvwcx); } - else if (!isSet(protocol_vvvvwcw)) + else if (!isSet(protocol_vvvvwcx)) { - var protocol_vvvvwcw = []; + var protocol_vvvvwcx = []; } - var protocol = protocol_vvvvwcw.some(protocol_vvvvwcw_SomeFunc); + var protocol = protocol_vvvvwcx.some(protocol_vvvvwcx_SomeFunc); - if (isSet(authentication_vvvvwcw) && authentication_vvvvwcw.constructor !== Array) + if (isSet(authentication_vvvvwcx) && authentication_vvvvwcx.constructor !== Array) { - var temp_vvvvwcw = authentication_vvvvwcw; - var authentication_vvvvwcw = []; - authentication_vvvvwcw.push(temp_vvvvwcw); + var temp_vvvvwcx = authentication_vvvvwcx; + var authentication_vvvvwcx = []; + authentication_vvvvwcx.push(temp_vvvvwcx); } - else if (!isSet(authentication_vvvvwcw)) + else if (!isSet(authentication_vvvvwcx)) { - var authentication_vvvvwcw = []; + var authentication_vvvvwcx = []; } - var authentication = authentication_vvvvwcw.some(authentication_vvvvwcw_SomeFunc); + var authentication = authentication_vvvvwcx.some(authentication_vvvvwcx_SomeFunc); // set this function logic @@ -517,22 +517,22 @@ function vvvvwcw(protocol_vvvvwcw,authentication_vvvvwcw) } } -// the vvvvwcw Some function -function protocol_vvvvwcw_SomeFunc(protocol_vvvvwcw) +// the vvvvwcx Some function +function protocol_vvvvwcx_SomeFunc(protocol_vvvvwcx) { // set the function logic - if (protocol_vvvvwcw == 2) + if (protocol_vvvvwcx == 2) { return true; } return false; } -// the vvvvwcw Some function -function authentication_vvvvwcw_SomeFunc(authentication_vvvvwcw) +// the vvvvwcx Some function +function authentication_vvvvwcx_SomeFunc(authentication_vvvvwcx) { // set the function logic - if (authentication_vvvvwcw == 2 || authentication_vvvvwcw == 3 || authentication_vvvvwcw == 4 || authentication_vvvvwcw == 5) + if (authentication_vvvvwcx == 2 || authentication_vvvvwcx == 3 || authentication_vvvvwcx == 4 || authentication_vvvvwcx == 5) { return true; } diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index c69d537d5..a21c99b01 100644 --- a/admin/models/forms/site_view.js +++ b/admin/models/forms/site_view.js @@ -11,45 +11,45 @@ // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvvzq = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvzq(add_php_view_vvvvvzq); + var add_php_view_vvvvvzr = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvzr(add_php_view_vvvvvzr); - var add_php_jview_display_vvvvvzr = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvzr(add_php_jview_display_vvvvvzr); + var add_php_jview_display_vvvvvzs = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvzs(add_php_jview_display_vvvvvzs); - var add_php_jview_vvvvvzs = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvzs(add_php_jview_vvvvvzs); + var add_php_jview_vvvvvzt = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvzt(add_php_jview_vvvvvzt); - var add_php_document_vvvvvzt = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvzt(add_php_document_vvvvvzt); + var add_php_document_vvvvvzu = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvzu(add_php_document_vvvvvzu); - var add_css_document_vvvvvzu = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvzu(add_css_document_vvvvvzu); + var add_css_document_vvvvvzv = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvzv(add_css_document_vvvvvzv); - var add_javascript_file_vvvvvzv = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); - vvvvvzv(add_javascript_file_vvvvvzv); + var add_javascript_file_vvvvvzw = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); + vvvvvzw(add_javascript_file_vvvvvzw); - var add_js_document_vvvvvzw = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvzw(add_js_document_vvvvvzw); + var add_js_document_vvvvvzx = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvzx(add_js_document_vvvvvzx); - var add_css_vvvvvzx = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvzx(add_css_vvvvvzx); + var add_css_vvvvvzy = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvzy(add_css_vvvvvzy); - var add_php_ajax_vvvvvzy = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvzy(add_php_ajax_vvvvvzy); + var add_php_ajax_vvvvvzz = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvzz(add_php_ajax_vvvvvzz); - var add_custom_button_vvvvvzz = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvzz(add_custom_button_vvvvvzz); + var add_custom_button_vvvvwaa = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvwaa(add_custom_button_vvvvwaa); - var button_position_vvvvwaa = jQuery("#jform_button_position").val(); - vvvvwaa(button_position_vvvvwaa); + var button_position_vvvvwab = jQuery("#jform_button_position").val(); + vvvvwab(button_position_vvvvwab); }); -// the vvvvvzq function -function vvvvvzq(add_php_view_vvvvvzq) +// the vvvvvzr function +function vvvvvzr(add_php_view_vvvvvzr) { // set the function logic - if (add_php_view_vvvvvzq == 1) + if (add_php_view_vvvvvzr == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } @@ -59,11 +59,11 @@ function vvvvvzq(add_php_view_vvvvvzq) } } -// the vvvvvzr function -function vvvvvzr(add_php_jview_display_vvvvvzr) +// the vvvvvzs function +function vvvvvzs(add_php_jview_display_vvvvvzs) { // set the function logic - if (add_php_jview_display_vvvvvzr == 1) + if (add_php_jview_display_vvvvvzs == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } @@ -73,11 +73,11 @@ function vvvvvzr(add_php_jview_display_vvvvvzr) } } -// the vvvvvzs function -function vvvvvzs(add_php_jview_vvvvvzs) +// the vvvvvzt function +function vvvvvzt(add_php_jview_vvvvvzt) { // set the function logic - if (add_php_jview_vvvvvzs == 1) + if (add_php_jview_vvvvvzt == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } @@ -87,11 +87,11 @@ function vvvvvzs(add_php_jview_vvvvvzs) } } -// the vvvvvzt function -function vvvvvzt(add_php_document_vvvvvzt) +// the vvvvvzu function +function vvvvvzu(add_php_document_vvvvvzu) { // set the function logic - if (add_php_document_vvvvvzt == 1) + if (add_php_document_vvvvvzu == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -101,11 +101,11 @@ function vvvvvzt(add_php_document_vvvvvzt) } } -// the vvvvvzu function -function vvvvvzu(add_css_document_vvvvvzu) +// the vvvvvzv function +function vvvvvzv(add_css_document_vvvvvzv) { // set the function logic - if (add_css_document_vvvvvzu == 1) + if (add_css_document_vvvvvzv == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } @@ -115,11 +115,11 @@ function vvvvvzu(add_css_document_vvvvvzu) } } -// the vvvvvzv function -function vvvvvzv(add_javascript_file_vvvvvzv) +// the vvvvvzw function +function vvvvvzw(add_javascript_file_vvvvvzw) { // set the function logic - if (add_javascript_file_vvvvvzv == 1) + if (add_javascript_file_vvvvvzw == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } @@ -129,11 +129,11 @@ function vvvvvzv(add_javascript_file_vvvvvzv) } } -// the vvvvvzw function -function vvvvvzw(add_js_document_vvvvvzw) +// the vvvvvzx function +function vvvvvzx(add_js_document_vvvvvzx) { // set the function logic - if (add_js_document_vvvvvzw == 1) + if (add_js_document_vvvvvzx == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } @@ -143,11 +143,11 @@ function vvvvvzw(add_js_document_vvvvvzw) } } -// the vvvvvzx function -function vvvvvzx(add_css_vvvvvzx) +// the vvvvvzy function +function vvvvvzy(add_css_vvvvvzy) { // set the function logic - if (add_css_vvvvvzx == 1) + if (add_css_vvvvvzy == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } @@ -157,11 +157,11 @@ function vvvvvzx(add_css_vvvvvzx) } } -// the vvvvvzy function -function vvvvvzy(add_php_ajax_vvvvvzy) +// the vvvvvzz function +function vvvvvzz(add_php_ajax_vvvvvzz) { // set the function logic - if (add_php_ajax_vvvvvzy == 1) + if (add_php_ajax_vvvvvzz == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); @@ -173,11 +173,11 @@ function vvvvvzy(add_php_ajax_vvvvvzy) } } -// the vvvvvzz function -function vvvvvzz(add_custom_button_vvvvvzz) +// the vvvvwaa function +function vvvvwaa(add_custom_button_vvvvwaa) { // set the function logic - if (add_custom_button_vvvvvzz == 1) + if (add_custom_button_vvvvwaa == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); @@ -191,20 +191,20 @@ function vvvvvzz(add_custom_button_vvvvvzz) } } -// the vvvvwaa function -function vvvvwaa(button_position_vvvvwaa) +// the vvvvwab function +function vvvvwab(button_position_vvvvwab) { - if (isSet(button_position_vvvvwaa) && button_position_vvvvwaa.constructor !== Array) + if (isSet(button_position_vvvvwab) && button_position_vvvvwab.constructor !== Array) { - var temp_vvvvwaa = button_position_vvvvwaa; - var button_position_vvvvwaa = []; - button_position_vvvvwaa.push(temp_vvvvwaa); + var temp_vvvvwab = button_position_vvvvwab; + var button_position_vvvvwab = []; + button_position_vvvvwab.push(temp_vvvvwab); } - else if (!isSet(button_position_vvvvwaa)) + else if (!isSet(button_position_vvvvwab)) { - var button_position_vvvvwaa = []; + var button_position_vvvvwab = []; } - var button_position = button_position_vvvvwaa.some(button_position_vvvvwaa_SomeFunc); + var button_position = button_position_vvvvwab.some(button_position_vvvvwab_SomeFunc); // set this function logic @@ -218,11 +218,11 @@ function vvvvwaa(button_position_vvvvwaa) } } -// the vvvvwaa Some function -function button_position_vvvvwaa_SomeFunc(button_position_vvvvwaa) +// the vvvvwab Some function +function button_position_vvvvwab_SomeFunc(button_position_vvvvwab) { // set the function logic - if (button_position_vvvvwaa == 5) + if (button_position_vvvvwab == 5) { return true; } diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index ee7897528..d0cad88e2 100644 --- a/admin/models/forms/template.js +++ b/admin/models/forms/template.js @@ -11,15 +11,15 @@ // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvwab = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvwab(add_php_view_vvvvwab); + var add_php_view_vvvvwac = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvwac(add_php_view_vvvvwac); }); -// the vvvvwab function -function vvvvwab(add_php_view_vvvvwab) +// the vvvvwac function +function vvvvwac(add_php_view_vvvvwac) { // set the function logic - if (add_php_view_vvvvwab == 1) + if (add_php_view_vvvvwac == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 69a45fd90..0514b95bb 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -27,8 +27,8 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin protected $tabLayoutFields = array( 'code' => array( 'left' => array( - 'note_beta_stage', 'name', + 'description', 'class_extends', 'joomla_plugin_group', 'add_head', @@ -45,7 +45,8 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin 'not_required' ), 'above' => array( - 'system_name' + 'system_name', + 'plugin_version' ) ), 'mysql' => array( @@ -58,6 +59,8 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin ), 'script_file' => array( 'fullwidth' => array( + 'add_php_script_construct', + 'php_script_construct', 'add_php_preflight_install', 'php_preflight_install', 'add_php_preflight_update', @@ -172,12 +175,6 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->sql_uninstall)) - { - // base64 Decode sql_uninstall. - $item->sql_uninstall = base64_decode($item->sql_uninstall); - } - if (!empty($item->sql)) { // base64 Decode sql. @@ -202,24 +199,36 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin $item->php_postflight_install = base64_decode($item->php_postflight_install); } - if (!empty($item->readme)) - { - // base64 Decode readme. - $item->readme = base64_decode($item->readme); - } - if (!empty($item->head)) { // base64 Decode head. $item->head = base64_decode($item->head); } + if (!empty($item->sql_uninstall)) + { + // base64 Decode sql_uninstall. + $item->sql_uninstall = base64_decode($item->sql_uninstall); + } + + if (!empty($item->readme)) + { + // base64 Decode readme. + $item->readme = base64_decode($item->readme); + } + if (!empty($item->main_class_code)) { // base64 Decode main_class_code. $item->main_class_code = base64_decode($item->main_class_code); } + if (!empty($item->php_script_construct)) + { + // base64 Decode php_script_construct. + $item->php_script_construct = base64_decode($item->php_script_construct); + } + if (!empty($item->php_preflight_install)) { // base64 Decode php_preflight_install. @@ -630,7 +639,29 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin if (!parent::delete($pks)) { return false; + } + + // we must also delete the linked tables found + if (ComponentbuilderHelper::checkArray($pks)) + { + // linked tables to update + $_tablesArray = array( + 'joomla_plugin_updates' => 'joomla_plugin', + 'joomla_plugin_files_folders_urls' => 'joomla_plugin' + ); + foreach($_tablesArray as $_updateTable => $_key) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, $_key, 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->delete($_pks); + } + } } + return true; } @@ -650,7 +681,29 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin if (!parent::publish($pks, $value)) { return false; + } + + // we must also update all linked tables + if (ComponentbuilderHelper::checkArray($pks)) + { + // linked tables to update + $_tablesArray = array( + 'joomla_plugin_updates' => 'joomla_plugin', + 'joomla_plugin_files_folders_urls' => 'joomla_plugin' + ); + foreach($_tablesArray as $_updateTable => $_key) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, $_key, 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->publish($_pks, $value); + } + } } + return true; } @@ -1072,12 +1125,6 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin $data['fields'] = ''; } - // Set the sql_uninstall string to base64 string. - if (isset($data['sql_uninstall'])) - { - $data['sql_uninstall'] = base64_encode($data['sql_uninstall']); - } - // Set the sql string to base64 string. if (isset($data['sql'])) { @@ -1102,24 +1149,36 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin $data['php_postflight_install'] = base64_encode($data['php_postflight_install']); } - // Set the readme string to base64 string. - if (isset($data['readme'])) - { - $data['readme'] = base64_encode($data['readme']); - } - // Set the head string to base64 string. if (isset($data['head'])) { $data['head'] = base64_encode($data['head']); } + // Set the sql_uninstall string to base64 string. + if (isset($data['sql_uninstall'])) + { + $data['sql_uninstall'] = base64_encode($data['sql_uninstall']); + } + + // Set the readme string to base64 string. + if (isset($data['readme'])) + { + $data['readme'] = base64_encode($data['readme']); + } + // Set the main_class_code string to base64 string. if (isset($data['main_class_code'])) { $data['main_class_code'] = base64_encode($data['main_class_code']); } + // Set the php_script_construct string to base64 string. + if (isset($data['php_script_construct'])) + { + $data['php_script_construct'] = base64_encode($data['php_script_construct']); + } + // Set the php_preflight_install string to base64 string. if (isset($data['php_preflight_install'])) { diff --git a/admin/models/joomla_plugin_updates.php b/admin/models/joomla_plugin_updates.php new file mode 100644 index 000000000..8a5507600 --- /dev/null +++ b/admin/models/joomla_plugin_updates.php @@ -0,0 +1,880 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +/** + * Componentbuilder Joomla_plugin_updates Model + */ +class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'updates' => array( + 'fullwidth' => array( + 'version_update' + ), + 'above' => array( + 'joomla_plugin' + ) + ) + ); + + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_componentbuilder.joomla_plugin_updates'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'joomla_plugin_updates', $prefix = 'ComponentbuilderTable', $config = array()) + { + // add table path for when model gets used from other component + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/tables'); + // get instance of the table + return JTable::getInstance($type, $prefix, $config); + } + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params) && !is_array($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->version_update)) + { + // Convert the version_update field to an array. + $version_update = new Registry; + $version_update->loadString($item->version_update); + $item->version_update = $version_update->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.joomla_plugin_updates'); + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * @param array $options Optional array of options for the form creation. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + { + // set load data option + $options['load_data'] = $loadData; + // Get the form. + $form = $this->loadForm('com_componentbuilder.joomla_plugin_updates', 'joomla_plugin_updates', $options); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('joomla_plugin_updates.edit.state', 'com_componentbuilder.joomla_plugin_updates.' . (int) $id)) + || ($id == 0 && !$user->authorise('joomla_plugin_updates.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('joomla_plugin_updates.edit.created_by', 'com_componentbuilder.joomla_plugin_updates.' . (int) $id)) + || ($id == 0 && !$user->authorise('joomla_plugin_updates.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('joomla_plugin_updates.edit.created', 'com_componentbuilder.joomla_plugin_updates.' . (int) $id)) + || ($id == 0 && !$user->authorise('joomla_plugin_updates.edit.created', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected view name + $redirectedView = $jinput->get('ref', null, 'STRING'); + // Set field name (or fall back to view name) + $redirectedField = $jinput->get('field', $redirectedView, 'STRING'); + // Set redirected view id + $redirectedId = $jinput->get('refid', 0, 'INT'); + // Set field id (or fall back to redirected view id) + $redirectedValue = $jinput->get('field_id', $redirectedId, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'administrator/components/com_componentbuilder/models/forms/joomla_plugin_updates.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('joomla_plugin_updates.delete', 'com_componentbuilder.joomla_plugin_updates.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('joomla_plugin_updates.edit.state', 'com_componentbuilder.joomla_plugin_updates.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('joomla_plugin_updates.edit.state', 'com_componentbuilder'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('joomla_plugin_updates.edit', 'com_componentbuilder.joomla_plugin_updates.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('joomla_plugin_updates.edit', 'com_componentbuilder'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__componentbuilder_joomla_plugin_updates')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.joomla_plugin_updates.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqeFields() + { + return false; + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + return true; + } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } + + /** + * Method to perform batch operations on an item or a set of items. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + JArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates'); + } + + if (!$this->canDo->get('joomla_plugin_updates.create') && !$this->canDo->get('joomla_plugin_updates.batch')) + { + return false; + } + + // get list of uniqe fields + $uniqeFields = $this->getUniqeFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('joomla_plugin_updates.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + if (!$this->user->authorise('joomla_plugin_updates.edit', $contexts[$pk])) + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // Only for strings + if (ComponentbuilderHelper::checkString($this->table->joomla_plugin) && !is_numeric($this->table->joomla_plugin)) + { + $this->table->joomla_plugin = $this->generateUniqe('joomla_plugin',$this->table->joomla_plugin); + } + + // insert all set values + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates'); + } + + if (!$this->canDo->get('joomla_plugin_updates.edit') && !$this->canDo->get('joomla_plugin_updates.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('joomla_plugin_updates.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('joomla_plugin_updates.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' === $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // Set the version_update items to data. + if (isset($data['version_update']) && is_array($data['version_update'])) + { + $version_update = new JRegistry; + $version_update->loadArray($data['version_update']); + $data['version_update'] = (string) $version_update; + } + elseif (!isset($data['version_update'])) + { + // Set the empty version_update to data + $data['version_update'] = ''; + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the uniqe field for save as copy + if ($input->get('task') === 'save2copy') + { + // Automatic handling of other uniqe fields + $uniqeFields = $this->getUniqeFields(); + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUniqe($field,$value) + { + + // set field value uniqe + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = JString::increment($value); + } + + return $value; + } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = JString::increment($title); + } + + return $title; + } +} diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index 791e31ed4..ebf02fcdc 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -363,7 +363,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.system_name LIKE '.$search.' OR a.class_extends LIKE '.$search.' OR g.name LIKE '.$search.' OR a.joomla_plugin_group LIKE '.$search.' OR h.name LIKE '.$search.' OR a.name LIKE '.$search.')'); + $query->where('(a.system_name LIKE '.$search.' OR a.class_extends LIKE '.$search.' OR g.name LIKE '.$search.' OR a.joomla_plugin_group LIKE '.$search.' OR h.name LIKE '.$search.' OR a.description LIKE '.$search.' OR a.name LIKE '.$search.')'); } } diff --git a/admin/models/joomla_plugins_updates.php b/admin/models/joomla_plugins_updates.php new file mode 100644 index 000000000..2e595bd74 --- /dev/null +++ b/admin/models/joomla_plugins_updates.php @@ -0,0 +1,237 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Joomla_plugins_updates Model + */ +class ComponentbuilderModelJoomla_plugins_updates extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + $access = (JFactory::getUser()->authorise('joomla_plugin_updates.access', 'com_componentbuilder.joomla_plugin_updates.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_plugin_updates.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // return items + return $items; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the componentbuilder_item table + $query->from($db->quoteName('#__componentbuilder_joomla_plugin_updates', 'a')); + + // From the componentbuilder_joomla_plugin table. + $query->select($db->quoteName('g.system_name','joomla_plugin_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin', 'g') . ' ON (' . $db->quoteName('a.joomla_plugin') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_joomla_plugin_updates')); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Get Yesterdays date + $date = JFactory::getDate()->modify($time)->toSql(); + // reset query + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table + $query->update($db->quoteName('#__componentbuilder_joomla_plugin_updates'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index e142cbe14..62c520eb1 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -151,12 +151,14 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( `add_php_preflight_install` TINYINT(1) NOT NULL DEFAULT 0, `add_php_preflight_uninstall` TINYINT(1) NOT NULL DEFAULT 0, `add_php_preflight_update` TINYINT(1) NOT NULL DEFAULT 0, + `add_php_script_construct` TINYINT(1) NOT NULL DEFAULT 0, `add_sales_server` TINYINT(1) NOT NULL DEFAULT 0, `add_sql` TINYINT(1) NOT NULL DEFAULT 0, `add_sql_uninstall` TINYINT(1) NOT NULL DEFAULT 0, `add_update_server` TINYINT(1) NOT NULL DEFAULT 0, `addreadme` TINYINT(1) NOT NULL DEFAULT 0, `class_extends` INT(11) NOT NULL DEFAULT 0, + `description` TEXT NOT NULL, `fields` TEXT NOT NULL, `head` TEXT NOT NULL, `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, @@ -169,6 +171,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( `php_preflight_install` MEDIUMTEXT NOT NULL, `php_preflight_uninstall` MEDIUMTEXT NOT NULL, `php_preflight_update` MEDIUMTEXT NOT NULL, + `php_script_construct` MEDIUMTEXT NOT NULL, + `plugin_version` CHAR(64) NOT NULL DEFAULT '', `property_selection` TEXT NOT NULL, `readme` TEXT NOT NULL, `sales_server` INT(11) NOT NULL DEFAULT 0, @@ -200,18 +204,19 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( KEY `idx_class_extends` (`class_extends`), KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), KEY `idx_add_sales_server` (`add_sales_server`), - KEY `idx_name` (`name`), + KEY `idx_add_php_postflight_install` (`add_php_postflight_install`), KEY `idx_add_php_postflight_update` (`add_php_postflight_update`), KEY `idx_add_php_method_uninstall` (`add_php_method_uninstall`), + KEY `idx_add_php_script_construct` (`add_php_script_construct`), KEY `idx_add_sql` (`add_sql`), - KEY `idx_add_php_preflight_install` (`add_php_preflight_install`), KEY `idx_add_sql_uninstall` (`add_sql_uninstall`), + KEY `idx_add_php_preflight_install` (`add_php_preflight_install`), KEY `idx_addreadme` (`addreadme`), - KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_add_update_server` (`add_update_server`), + KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_update_server_target` (`update_server_target`), KEY `idx_add_php_preflight_uninstall` (`add_php_preflight_uninstall`), - KEY `idx_add_php_postflight_install` (`add_php_postflight_install`) + KEY `idx_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( @@ -1651,6 +1656,32 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_group` ( KEY `idx_class_extends` (`class_extends`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_updates` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `joomla_plugin` INT(11) NOT NULL DEFAULT 0, + `version_update` TEXT NOT NULL, + `params` text NOT NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_plugin` (`joomla_plugin`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index e04709716..7dc739594 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -39,5 +39,6 @@ DROP TABLE IF EXISTS `#__componentbuilder_library_config`; DROP TABLE IF EXISTS `#__componentbuilder_library_files_folders_urls`; DROP TABLE IF EXISTS `#__componentbuilder_class_extends`; DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_group`; +DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_updates`; DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls`; DROP TABLE IF EXISTS `#__componentbuilder_external_code`; diff --git a/admin/sql/updates/mysql/2.9.35.sql b/admin/sql/updates/mysql/2.9.35.sql new file mode 100644 index 000000000..f8732ed31 --- /dev/null +++ b/admin/sql/updates/mysql/2.9.35.sql @@ -0,0 +1,33 @@ +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `add_php_script_construct` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_php_preflight_update`; + +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `description` TEXT NOT NULL AFTER `class_extends`; + +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `php_script_construct` MEDIUMTEXT NOT NULL AFTER `php_preflight_update`; + +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `plugin_version` CHAR(64) NOT NULL DEFAULT '' AFTER `php_script_construct`; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_updates` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `joomla_plugin` INT(11) NOT NULL DEFAULT 0, + `version_update` TEXT NOT NULL, + `params` text NOT NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_plugin` (`joomla_plugin`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; diff --git a/admin/tables/joomla_plugin_updates.php b/admin/tables/joomla_plugin_updates.php new file mode 100644 index 000000000..5cda704b0 --- /dev/null +++ b/admin/tables/joomla_plugin_updates.php @@ -0,0 +1,321 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +/** + * Joomla_plugins_updates Table class + */ +class ComponentbuilderTableJoomla_plugin_updates extends JTable +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__componentbuilder_joomla_plugin_updates', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.joomla_plugin_updates')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the Joomla_plugin_updates table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New joomla_plugin_updates. A joomla_plugin_updates created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('joomla_plugin_updates', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('joomla_plugin_updates', 'componentbuilderTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = JString::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_componentbuilder.joomla_plugin_updates.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count( (array) $_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_componentbuilder.joomla_plugin_updates.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_componentbuilder'); + + return $asset->id; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; + } + +} diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 6d47e7562..9a7d39db0 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -208,491 +208,476 @@ $componentParams = $this->params; // will be removed just use $this->params inst + diff --git a/admin/views/joomla_plugin_updates/tmpl/index.html b/admin/views/joomla_plugin_updates/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugin_updates/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugin_updates/view.html.php b/admin/views/joomla_plugin_updates/view.html.php new file mode 100644 index 000000000..4fd25bb53 --- /dev/null +++ b/admin/views/joomla_plugin_updates/view.html.php @@ -0,0 +1,195 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Joomla_plugin_updates View class + */ +class ComponentbuilderViewJoomla_plugin_updates extends JViewLegacy +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // set params + $this->params = JComponentHelper::getParams('com_componentbuilder'); + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates', $this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $return = $jinput->get('return', null, 'base64'); + // set the referral string + $this->referral = ''; + if ($this->refid && $this->ref) + { + // return to the item that referred to this item + $this->referral = '&ref=' . (string)$this->ref . '&refid=' . (int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that referred to this item + $this->referral = '&ref=' . (string)$this->ref; + } + // check return value + if (!is_null($return)) + { + // add the return value + $this->referral .= '&return=' . (string)$return; + } + + // Set the toolbar + $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('joomla_plugin_updates.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('joomla_plugin_updates.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('joomla_plugin_updates.edit')) + { + // We can save the record. + JToolBarHelper::save('joomla_plugin_updates.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('joomla_plugin_updates.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('joomla_plugin_updates.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('joomla_plugin_updates.create')) + { + JToolBarHelper::apply('joomla_plugin_updates.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin_updates.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('joomla_plugin_updates.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('joomla_plugin_updates.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('joomla_plugin_updates.edit')) + { + // We can save the new record + JToolBarHelper::apply('joomla_plugin_updates.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin_updates.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('joomla_plugin_updates.create')) + { + JToolBarHelper::custom('joomla_plugin_updates.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('joomla_plugin_updates.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('joomla_plugin_updates.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.joomla_plugin_updates', $this->item->id); + } + if ($this->canDo->get('joomla_plugin_updates.create')) + { + JToolBarHelper::custom('joomla_plugin_updates.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('joomla_plugin_updates.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugin_updates'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugin_updates.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_plugin_updates/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/joomla_plugins/tmpl/default_body.php b/admin/views/joomla_plugins/tmpl/default_body.php index 81086652e..e25d157b6 100644 --- a/admin/views/joomla_plugins/tmpl/default_body.php +++ b/admin/views/joomla_plugins/tmpl/default_body.php @@ -69,7 +69,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p escape($item->system_name); ?> - + - + escape($item->plugin_version); ?> 'joomla_plugin_updates', + 'views' => 'joomla_plugins_updates', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_PLUGIN_UPDATES'), + 'icon' => 'database'), array( 'view' => 'joomla_plugin_files_folders_urls', 'views' => 'joomla_plugins_files_folders_urls', diff --git a/admin/views/joomla_plugins_updates/index.html b/admin/views/joomla_plugins_updates/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugins_updates/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default.php b/admin/views/joomla_plugins_updates/tmpl/default.php new file mode 100644 index 000000000..50c657339 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default.php @@ -0,0 +1,85 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// load tooltip behavior +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', 'select'); + +if ($this->saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=joomla_plugins_updates.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'joomla_plugin_updatesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_batch_body.php b/admin/views/joomla_plugins_updates/tmpl/default_batch_body.php new file mode 100644 index 000000000..5c54e9b4e --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default_batch_body.php @@ -0,0 +1,18 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + +

+batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_batch_footer.php b/admin/views/joomla_plugins_updates/tmpl/default_batch_footer.php new file mode 100644 index 000000000..f48dd8742 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default_batch_footer.php @@ -0,0 +1,23 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_body.php b/admin/views/joomla_plugins_updates/tmpl/default_body.php new file mode 100644 index 000000000..875bd1a81 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default_body.php @@ -0,0 +1,94 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$edit = "index.php?option=com_componentbuilder&view=joomla_plugins_updates&task=joomla_plugin_updates.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates',$item,'joomla_plugins_updates'); + ?> + + + get('joomla_plugin_updates.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('joomla_plugin_updates.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('joomla_plugin_updates.edit')): ?> + escape($item->joomla_plugin_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'joomla_plugins_updates.', $canCheckin); ?> + + + escape($item->joomla_plugin_system_name); ?> + +
+ + + get('joomla_plugin_updates.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'joomla_plugins_updates.', true, 'cb'); ?> + + published, $i, 'joomla_plugins_updates.', false, 'cb'); ?> + + + published, $i, 'joomla_plugins_updates.', true, 'cb'); ?> + + + published, $i, 'joomla_plugins_updates.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_foot.php b/admin/views/joomla_plugins_updates/tmpl/default_foot.php new file mode 100644 index 000000000..d020003b6 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default_foot.php @@ -0,0 +1,18 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + pagination->getListFooter(); ?> + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_head.php b/admin/views/joomla_plugins_updates/tmpl/default_head.php new file mode 100644 index 000000000..f406c2240 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default_head.php @@ -0,0 +1,47 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/default_toolbar.php b/admin/views/joomla_plugins_updates/tmpl/default_toolbar.php new file mode 100644 index 000000000..7fdc8d775 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/default_toolbar.php @@ -0,0 +1,45 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +
+ +
+ + +
+
+ + pagination->getLimitBox(); ?> +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/tmpl/index.html b/admin/views/joomla_plugins_updates/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugins_updates/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/view.html.php b/admin/views/joomla_plugins_updates/view.html.php new file mode 100644 index 000000000..e388fa109 --- /dev/null +++ b/admin/views/joomla_plugins_updates/view.html.php @@ -0,0 +1,226 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder View class for the Joomla_plugins_updates + */ +class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy +{ + /** + * Joomla_plugins_updates view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('joomla_plugins_updates'); + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // set the return here value + $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates'); + $this->canEdit = $this->canDo->get('joomla_plugin_updates.edit'); + $this->canState = $this->canDo->get('joomla_plugin_updates.edit.state'); + $this->canCreate = $this->canDo->get('joomla_plugin_updates.create'); + $this->canDelete = $this->canDo->get('joomla_plugin_updates.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=joomla_plugins_updates'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('joomla_plugin_updates.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('joomla_plugin_updates.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('joomla_plugins_updates.publish'); + JToolBarHelper::unpublishList('joomla_plugins_updates.unpublish'); + JToolBarHelper::archiveList('joomla_plugins_updates.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('joomla_plugins_updates.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'joomla_plugins_updates.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('joomla_plugins_updates.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugins_updates'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugins_updates.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/layout/tmpl/edit.php b/admin/views/layout/tmpl/edit.php index 0c7989276..dce570114 100644 --- a/admin/views/layout/tmpl/edit.php +++ b/admin/views/layout/tmpl/edit.php @@ -129,18 +129,18 @@ $componentParams = $this->params; // will be removed just use $this->params inst