From 2af4b8cf50234c20a8d5fd4fc0a7572dca342b17 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 8 Jul 2019 18:05:54 +0200 Subject: [PATCH 01/13] Removed required from all code/editor field to improve the behavior of the codemirror editor. Improved the token validation via Ajax. --- README.md | 4 +- admin/README.txt | 4 +- admin/assets/images/icons/servers.png | Bin 12108 -> 13981 bytes admin/assets/js/get_snippets.js | 16 +- .../joomla_3/JControllerLegacyAjax.php | 2 +- .../joomla_3/JControllerLegacyAjaxSite.php | 2 +- admin/controllers/ajax.json.php | 2 +- admin/helpers/componentbuilder.php | 59 ++ admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../server/linked_components_fullwidth.php | 2 +- admin/models/custom_admin_view.php | 36 - admin/models/fieldtype.php | 12 +- admin/models/forms/admin_fields_conditions.js | 5 +- admin/models/forms/admin_fields_relations.js | 8 +- admin/models/forms/admin_view.js | 688 ++---------------- admin/models/forms/admin_view.xml | 30 - admin/models/forms/component_dashboard.js | 4 +- admin/models/forms/custom_admin_view.js | 264 +------ admin/models/forms/custom_admin_view.xml | 12 - admin/models/forms/custom_code.js | 44 +- admin/models/forms/custom_code.xml | 1 - admin/models/forms/dynamic_get.js | 283 ++----- admin/models/forms/dynamic_get.xml | 7 - admin/models/forms/field.js | 138 +--- admin/models/forms/field.xml | 4 - admin/models/forms/fieldtype.js | 74 +- admin/models/forms/help_document.js | 69 +- admin/models/forms/help_document.xml | 1 - admin/models/forms/joomla_component.js | 362 ++------- admin/models/forms/joomla_component.xml | 14 - admin/models/forms/language_translation.js | 2 +- admin/models/forms/layout.js | 66 +- admin/models/forms/layout.xml | 2 - admin/models/forms/library.js | 40 +- admin/models/forms/placeholder.js | 1 - admin/models/forms/server.js | 90 +-- admin/models/forms/site_view.js | 264 +------ admin/models/forms/site_view.xml | 12 - admin/models/forms/template.js | 70 +- admin/models/forms/template.xml | 2 - admin/models/forms/validation_rule.js | 12 +- admin/models/layout.php | 36 - admin/models/server.php | 18 +- admin/models/site_view.php | 36 - admin/models/template.php | 36 - .../admin_fields_conditions/tmpl/edit.php | 19 +- .../admin_fields_relations/tmpl/edit.php | 25 +- admin/views/compiler/tmpl/default.php | 29 +- admin/views/compiler/view.html.php | 4 +- admin/views/component_dashboard/tmpl/edit.php | 25 +- admin/views/custom_admin_view/tmpl/edit.php | 19 +- admin/views/custom_code/tmpl/edit.php | 19 +- admin/views/dynamic_get/tmpl/edit.php | 21 +- admin/views/fieldtype/tmpl/edit.php | 19 + admin/views/fieldtype/view.html.php | 2 +- admin/views/get_snippets/tmpl/default.php | 19 +- admin/views/languages/tmpl/default.php | 2 +- admin/views/layout/tmpl/edit.php | 81 ++- admin/views/library/tmpl/edit.php | 2 +- admin/views/placeholder/tmpl/edit.php | 19 +- admin/views/server/view.html.php | 2 +- admin/views/site_view/tmpl/edit.php | 19 +- admin/views/template/tmpl/edit.php | 19 +- admin/views/validation_rule/tmpl/edit.php | 21 +- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 59 ++ 66 files changed, 870 insertions(+), 2393 deletions(-) diff --git a/README.md b/README.md index d62f0765e..b2a86bc53 100644 --- a/README.md +++ b/README.md @@ -146,11 +146,11 @@ 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*: 6th July, 2019 ++ *Last Build*: 8th July, 2019 + *Version*: 2.9.21 + *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*: **211603** ++ *Line count*: **210080** + *Field count*: **1143** + *File count*: **1346** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index d62f0765e..b2a86bc53 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -146,11 +146,11 @@ 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*: 6th July, 2019 ++ *Last Build*: 8th July, 2019 + *Version*: 2.9.21 + *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*: **211603** ++ *Line count*: **210080** + *Field count*: **1143** + *File count*: **1346** + *Folder count*: **209** diff --git a/admin/assets/images/icons/servers.png b/admin/assets/images/icons/servers.png index db130da40d8acd9696cf3b0db77a2f7ee3562998..6baf509e0ed6df31d3ead9812d41ed6a7dd69452 100644 GIT binary patch literal 13981 zcmbVzV|XQ9v*?cPWMbR4?TIn5c5K_WIk7XbZF^$dnK%>U=Kaq1oqK+q=l;0+>D_y+ z-lbKmYOSj3?g+*2k_fOkumAu6L0U>o`RmvJpD#2d007d+t)%KxLqziHE}&kPiR=GqF(Bbk>xY<1x0gVKDp$hQZy&{tFub;1hJW zH#D{aIujWI%`9yBNv=A2NQf*<_(?R_<(cH|MSUg#-3Kj+$JP~0z`c7 zJYNKCfX;?Q?l#u8PCV}XB>$qz^VR<6G9wAmzd)R=_(}dtC{1}qB2ha>AQ3wQE4?uj zGcyqf2Lm%3I|m0d9T5u?GYccr*TF&0%*Mmc!NbBy^zRSJ7dJ-}Qyyh8iGTC@>hY79 zJ3HI+FfzKixiPr0GT1qqF*0*=bN@qwg@yhLg5Jr)*4faV-qwlqKNQ4(PR5QF_Rbb| zwnYC>G&HhvapoualJviZU}G;Y|KEgdo&K$;FO@O68`?86GcYmQ*!(lDe?dDrD+B+p z82>A@ld6Y3kWm@vWar{&{52n@r2j$w(%t`?(LaD+((ouaT6|54p|zNuv5O7R)>&GN zpXBQw1``Vt9#KwaW+riV33et<4lxO4W-f6KW?@k=W=?J~CJq)hw*S!h-*APQMY%*p zg*kJM_Wj zEdCen+{{eE60B@uEbN>T{~EQZgcuhWGY18~#`4zg-7t`{gf=Uyi{FP^$+3SZ1WfgjLfj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xdxyB0000 0 && path.length > 0 && status.length > 0) { - var request = 'token='+token+'&path='+path+'&status='+status; + var request = token+'=1&path='+path+'&status='+status; } return jQuery.ajax({ type: 'POST', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } @@ -423,16 +423,16 @@ function setSnippetGithub(key, status) { function setSnippetGithub_server(path, status) { // set the ajax scope ajaxcall = null; - var getUrl = "index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json&raw=true"); if (token.length > 0 && path.length > 0 && status.length > 0) { - var request = 'token='+token+'&path='+path+'&status='+status; + var request = token+'=1&path='+path+'&status='+status; } return jQuery.ajax({ type: 'POST', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } diff --git a/admin/compiler/joomla_3/JControllerLegacyAjax.php b/admin/compiler/joomla_3/JControllerLegacyAjax.php index d865c8162..ba88f128e 100644 --- a/admin/compiler/joomla_3/JControllerLegacyAjax.php +++ b/admin/compiler/joomla_3/JControllerLegacyAjax.php @@ -39,7 +39,7 @@ class ###Component###ControllerAjax extends JControllerLegacy // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); - if($token == $call_token) + if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { $task = $this->getTask(); switch($task) diff --git a/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php b/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php index 0c483a598..fb10fd0fe 100644 --- a/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php +++ b/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php @@ -39,7 +39,7 @@ class ###Component###ControllerAjax extends JControllerLegacy // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); - if($token == $call_token) + if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { $task = $this->getTask(); switch($task) diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 8bcc6b72d..53ff59742 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -67,7 +67,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); - if($token == $call_token) + if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { $task = $this->getTask(); switch($task) diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 67182ca26..d3dfb9d3e 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -124,6 +124,65 @@ abstract class ComponentbuilderHelper 'JPATH_THEMES' => JPATH_THEMES ); + /** + * get the method code + * + * @input int The method ID + * + * @returns string on success + **/ + public static function getMethodCode($id) + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.params','a.code'))); + $query->from($db->quoteName('#__componentbuilder_method','a')); + $query->where($db->quoteName('a.id') . ' = ' . (int) $id); + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_method'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // get the method + $method = $db->loadObject; + // combine method values + $combinded = array(); + // add comment if set + if (self::checkString($method->comment)) + { + $combinded[] = $method->comment; + } + // set the method sginature + $combinded[] = "\t" . $method->visibility . ' function ' . $method->name . '(' . $method->params . ')'; + // set the method code + $combinded[] = "\t" . "{"; + // add comment if set + if (self::checkString($method->code)) + { + $combinded[] = $method->code; + } + else + { + $combinded[] = "\t\t// add your code here"; + } + $combinded[] = "\t" . "}"; + // return the method + return implode(PHP_EOL, $combinded); + } + return false; + } + /** * Making class or function name safe * diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 87f383cbc..4968f6ab3 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->warfields; +$items = $displayData->vxqfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 859a76e18..70894c881 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wbblinked_components; +$items = $displayData->vyalinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index f7cbca17b..f73f7132c 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -604,42 +604,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin return $data; } - /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ - public function validate($form, $data, $group = null) - { - // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) - { - $requiredFields = (array) explode(',',(string) $data['not_required']); - $requiredFields = array_unique($requiredFields); - // now change the required field attributes value - foreach ($requiredFields as $requiredField) - { - // make sure there is a string value - if (ComponentbuilderHelper::checkString($requiredField)) - { - // change to false - $form->setFieldAttribute($requiredField, 'required', 'false'); - // also clear the data set - $data[$requiredField] = ''; - } - } - } - return parent::validate($form, $data, $group); - } - /** * Method to get the unique fields of this table. * diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 8e12d7c13..1c4f8c295 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -203,7 +203,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWarfields() + public function getVxqfields() { // Get the user object. $user = JFactory::getUser(); @@ -285,13 +285,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationWarfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVxqfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationWarfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVxqfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationWarfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVxqfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationWarfields($item->store, 'store'); + $item->store = $this->selectionTranslationVxqfields($item->store, 'store'); } } @@ -305,7 +305,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationWarfields($value,$name) + public function selectionTranslationVxqfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_fields_conditions.js b/admin/models/forms/admin_fields_conditions.js index 4c71df68c..a14c15d39 100644 --- a/admin/models/forms/admin_fields_conditions.js +++ b/admin/models/forms/admin_fields_conditions.js @@ -12,9 +12,9 @@ function getFieldSelectOptions_server(fieldId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"); if(token.length > 0 && fieldId > 0){ - var request = 'token='+token+'&id='+fieldId; + var request = token+'=1&id='+fieldId; } return jQuery.ajax({ type: 'GET', @@ -24,7 +24,6 @@ function getFieldSelectOptions_server(fieldId){ jsonp: 'callback' }); } - function getFieldSelectOptions(fieldKey){ // first check if the field is set if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length) { diff --git a/admin/models/forms/admin_fields_relations.js b/admin/models/forms/admin_fields_relations.js index dd027678a..2876e864a 100644 --- a/admin/models/forms/admin_fields_relations.js +++ b/admin/models/forms/admin_fields_relations.js @@ -47,13 +47,13 @@ function getCodeGlueOptions(field) { } function getCodeGlueOptions_server(listfield, joinfields, type, area){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getCodeGlueOptions&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getCodeGlueOptions&format=json"); // make sure the joinfields are set if (!_isSet(joinfields)) { joinfields = 'none'; } if(token.length > 0 && listfield > 0 && type > 0 && area > 0) { - var request = 'token='+token+'&listfield='+listfield+'&type='+type+'&area='+area+'&joinfields='+joinfields; + var request = token+'=1&listfield='+listfield+'&type='+type+'&area='+area+'&joinfields='+joinfields; } return jQuery.ajax({ type: 'GET', @@ -74,9 +74,9 @@ function _isSet(val) } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index a6c59cb6e..d4c61abbc 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,45 +9,15 @@ */ // Some Global Values -jform_vvvvvxbvwr_required = false; -jform_vvvvvxcvws_required = false; -jform_vvvvvxdvwt_required = false; -jform_vvvvvxevwu_required = false; -jform_vvvvvxfvwv_required = false; -jform_vvvvvxgvww_required = false; -jform_vvvvvxhvwx_required = false; -jform_vvvvvxivwy_required = false; -jform_vvvvvxjvwz_required = false; -jform_vvvvvxkvxa_required = false; -jform_vvvvvxlvxb_required = false; -jform_vvvvvxmvxc_required = false; -jform_vvvvvxnvxd_required = false; -jform_vvvvvxovxe_required = false; -jform_vvvvvxpvxf_required = false; -jform_vvvvvxqvxg_required = false; -jform_vvvvvxrvxh_required = false; -jform_vvvvvxsvxi_required = false; -jform_vvvvvxtvxj_required = false; -jform_vvvvvxuvxk_required = false; -jform_vvvvvxvvxl_required = false; -jform_vvvvvxwvxm_required = false; -jform_vvvvvxxvxn_required = false; -jform_vvvvvxyvxo_required = false; -jform_vvvvvxzvxp_required = false; -jform_vvvvvyavxq_required = false; -jform_vvvvvybvxr_required = false; -jform_vvvvvycvxs_required = false; -jform_vvvvvygvxt_required = false; -jform_vvvvvygvxu_required = false; -jform_vvvvvygvxv_required = false; -jform_vvvvvygvxw_required = false; -jform_vvvvvygvxx_required = false; -jform_vvvvvygvxy_required = false; -jform_vvvvvygvxz_required = false; -jform_vvvvvyivya_required = false; -jform_vvvvvyivyb_required = false; -jform_vvvvvyivyc_required = false; -jform_vvvvvyivyd_required = false; +jform_vvvvvybvwd_required = false; +jform_vvvvvycvwe_required = false; +jform_vvvvvygvwf_required = false; +jform_vvvvvygvwg_required = false; +jform_vvvvvygvwh_required = false; +jform_vvvvvygvwi_required = false; +jform_vvvvvygvwj_required = false; +jform_vvvvvygvwk_required = false; +jform_vvvvvygvwl_required = false; // Initial Script jQuery(document).ready(function() @@ -158,28 +128,10 @@ function vvvvvxb(add_css_view_vvvvvxb) if (add_css_view_vvvvvxb == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); - // add required attribute to css_view field - if (jform_vvvvvxbvwr_required) - { - updateFieldRequired('css_view',0); - jQuery('#jform_css_view').prop('required','required'); - jQuery('#jform_css_view').attr('aria-required',true); - jQuery('#jform_css_view').addClass('required'); - jform_vvvvvxbvwr_required = false; - } } else { jQuery('#jform_css_view-lbl').closest('.control-group').hide(); - // remove required attribute from css_view field - if (!jform_vvvvvxbvwr_required) - { - updateFieldRequired('css_view',1); - jQuery('#jform_css_view').removeAttr('required'); - jQuery('#jform_css_view').removeAttr('aria-required'); - jQuery('#jform_css_view').removeClass('required'); - jform_vvvvvxbvwr_required = true; - } } } @@ -190,28 +142,10 @@ function vvvvvxc(add_css_views_vvvvvxc) if (add_css_views_vvvvvxc == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); - // add required attribute to css_views field - if (jform_vvvvvxcvws_required) - { - updateFieldRequired('css_views',0); - jQuery('#jform_css_views').prop('required','required'); - jQuery('#jform_css_views').attr('aria-required',true); - jQuery('#jform_css_views').addClass('required'); - jform_vvvvvxcvws_required = false; - } } else { jQuery('#jform_css_views-lbl').closest('.control-group').hide(); - // remove required attribute from css_views field - if (!jform_vvvvvxcvws_required) - { - updateFieldRequired('css_views',1); - jQuery('#jform_css_views').removeAttr('required'); - jQuery('#jform_css_views').removeAttr('aria-required'); - jQuery('#jform_css_views').removeClass('required'); - jform_vvvvvxcvws_required = true; - } } } @@ -222,28 +156,10 @@ function vvvvvxd(add_javascript_view_file_vvvvvxd) if (add_javascript_view_file_vvvvvxd == 1) { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show(); - // add required attribute to javascript_view_file field - if (jform_vvvvvxdvwt_required) - { - updateFieldRequired('javascript_view_file',0); - jQuery('#jform_javascript_view_file').prop('required','required'); - jQuery('#jform_javascript_view_file').attr('aria-required',true); - jQuery('#jform_javascript_view_file').addClass('required'); - jform_vvvvvxdvwt_required = false; - } } else { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_view_file field - if (!jform_vvvvvxdvwt_required) - { - updateFieldRequired('javascript_view_file',1); - jQuery('#jform_javascript_view_file').removeAttr('required'); - jQuery('#jform_javascript_view_file').removeAttr('aria-required'); - jQuery('#jform_javascript_view_file').removeClass('required'); - jform_vvvvvxdvwt_required = true; - } } } @@ -254,28 +170,10 @@ function vvvvvxe(add_javascript_views_file_vvvvvxe) if (add_javascript_views_file_vvvvvxe == 1) { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show(); - // add required attribute to javascript_views_file field - if (jform_vvvvvxevwu_required) - { - updateFieldRequired('javascript_views_file',0); - jQuery('#jform_javascript_views_file').prop('required','required'); - jQuery('#jform_javascript_views_file').attr('aria-required',true); - jQuery('#jform_javascript_views_file').addClass('required'); - jform_vvvvvxevwu_required = false; - } } else { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_views_file field - if (!jform_vvvvvxevwu_required) - { - updateFieldRequired('javascript_views_file',1); - jQuery('#jform_javascript_views_file').removeAttr('required'); - jQuery('#jform_javascript_views_file').removeAttr('aria-required'); - jQuery('#jform_javascript_views_file').removeClass('required'); - jform_vvvvvxevwu_required = true; - } } } @@ -286,28 +184,10 @@ function vvvvvxf(add_javascript_view_footer_vvvvvxf) if (add_javascript_view_footer_vvvvvxf == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); - // add required attribute to javascript_view_footer field - if (jform_vvvvvxfvwv_required) - { - updateFieldRequired('javascript_view_footer',0); - jQuery('#jform_javascript_view_footer').prop('required','required'); - jQuery('#jform_javascript_view_footer').attr('aria-required',true); - jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvvxfvwv_required = false; - } } else { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_view_footer field - if (!jform_vvvvvxfvwv_required) - { - updateFieldRequired('javascript_view_footer',1); - jQuery('#jform_javascript_view_footer').removeAttr('required'); - jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_view_footer').removeClass('required'); - jform_vvvvvxfvwv_required = true; - } } } @@ -318,28 +198,10 @@ function vvvvvxg(add_javascript_views_footer_vvvvvxg) if (add_javascript_views_footer_vvvvvxg == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); - // add required attribute to javascript_views_footer field - if (jform_vvvvvxgvww_required) - { - updateFieldRequired('javascript_views_footer',0); - jQuery('#jform_javascript_views_footer').prop('required','required'); - jQuery('#jform_javascript_views_footer').attr('aria-required',true); - jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvvxgvww_required = false; - } } else { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_views_footer field - if (!jform_vvvvvxgvww_required) - { - updateFieldRequired('javascript_views_footer',1); - jQuery('#jform_javascript_views_footer').removeAttr('required'); - jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvvxgvww_required = true; - } } } @@ -351,29 +213,11 @@ function vvvvvxh(add_php_ajax_vvvvvxh) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); - // add required attribute to php_ajaxmethod field - if (jform_vvvvvxhvwx_required) - { - updateFieldRequired('php_ajaxmethod',0); - jQuery('#jform_php_ajaxmethod').prop('required','required'); - jQuery('#jform_php_ajaxmethod').attr('aria-required',true); - jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvxhvwx_required = false; - } } else { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide(); - // remove required attribute from php_ajaxmethod field - if (!jform_vvvvvxhvwx_required) - { - updateFieldRequired('php_ajaxmethod',1); - jQuery('#jform_php_ajaxmethod').removeAttr('required'); - jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); - jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvxhvwx_required = true; - } } } @@ -384,28 +228,10 @@ function vvvvvxi(add_php_getitem_vvvvvxi) if (add_php_getitem_vvvvvxi == 1) { jQuery('#jform_php_getitem-lbl').closest('.control-group').show(); - // add required attribute to php_getitem field - if (jform_vvvvvxivwy_required) - { - updateFieldRequired('php_getitem',0); - jQuery('#jform_php_getitem').prop('required','required'); - jQuery('#jform_php_getitem').attr('aria-required',true); - jQuery('#jform_php_getitem').addClass('required'); - jform_vvvvvxivwy_required = false; - } } else { jQuery('#jform_php_getitem-lbl').closest('.control-group').hide(); - // remove required attribute from php_getitem field - if (!jform_vvvvvxivwy_required) - { - updateFieldRequired('php_getitem',1); - jQuery('#jform_php_getitem').removeAttr('required'); - jQuery('#jform_php_getitem').removeAttr('aria-required'); - jQuery('#jform_php_getitem').removeClass('required'); - jform_vvvvvxivwy_required = true; - } } } @@ -416,28 +242,10 @@ function vvvvvxj(add_php_getitems_vvvvvxj) if (add_php_getitems_vvvvvxj == 1) { jQuery('#jform_php_getitems-lbl').closest('.control-group').show(); - // add required attribute to php_getitems field - if (jform_vvvvvxjvwz_required) - { - updateFieldRequired('php_getitems',0); - jQuery('#jform_php_getitems').prop('required','required'); - jQuery('#jform_php_getitems').attr('aria-required',true); - jQuery('#jform_php_getitems').addClass('required'); - jform_vvvvvxjvwz_required = false; - } } else { jQuery('#jform_php_getitems-lbl').closest('.control-group').hide(); - // remove required attribute from php_getitems field - if (!jform_vvvvvxjvwz_required) - { - updateFieldRequired('php_getitems',1); - jQuery('#jform_php_getitems').removeAttr('required'); - jQuery('#jform_php_getitems').removeAttr('aria-required'); - jQuery('#jform_php_getitems').removeClass('required'); - jform_vvvvvxjvwz_required = true; - } } } @@ -448,28 +256,10 @@ function vvvvvxk(add_php_getitems_after_all_vvvvvxk) if (add_php_getitems_after_all_vvvvvxk == 1) { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show(); - // add required attribute to php_getitems_after_all field - if (jform_vvvvvxkvxa_required) - { - updateFieldRequired('php_getitems_after_all',0); - jQuery('#jform_php_getitems_after_all').prop('required','required'); - jQuery('#jform_php_getitems_after_all').attr('aria-required',true); - jQuery('#jform_php_getitems_after_all').addClass('required'); - jform_vvvvvxkvxa_required = false; - } } else { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').hide(); - // remove required attribute from php_getitems_after_all field - if (!jform_vvvvvxkvxa_required) - { - updateFieldRequired('php_getitems_after_all',1); - jQuery('#jform_php_getitems_after_all').removeAttr('required'); - jQuery('#jform_php_getitems_after_all').removeAttr('aria-required'); - jQuery('#jform_php_getitems_after_all').removeClass('required'); - jform_vvvvvxkvxa_required = true; - } } } @@ -480,28 +270,10 @@ function vvvvvxl(add_php_getlistquery_vvvvvxl) if (add_php_getlistquery_vvvvvxl == 1) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); - // add required attribute to php_getlistquery field - if (jform_vvvvvxlvxb_required) - { - updateFieldRequired('php_getlistquery',0); - jQuery('#jform_php_getlistquery').prop('required','required'); - jQuery('#jform_php_getlistquery').attr('aria-required',true); - jQuery('#jform_php_getlistquery').addClass('required'); - jform_vvvvvxlvxb_required = false; - } } else { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); - // remove required attribute from php_getlistquery field - if (!jform_vvvvvxlvxb_required) - { - updateFieldRequired('php_getlistquery',1); - jQuery('#jform_php_getlistquery').removeAttr('required'); - jQuery('#jform_php_getlistquery').removeAttr('aria-required'); - jQuery('#jform_php_getlistquery').removeClass('required'); - jform_vvvvvxlvxb_required = true; - } } } @@ -512,28 +284,10 @@ function vvvvvxm(add_php_getform_vvvvvxm) if (add_php_getform_vvvvvxm == 1) { jQuery('#jform_php_getform-lbl').closest('.control-group').show(); - // add required attribute to php_getform field - if (jform_vvvvvxmvxc_required) - { - updateFieldRequired('php_getform',0); - jQuery('#jform_php_getform').prop('required','required'); - jQuery('#jform_php_getform').attr('aria-required',true); - jQuery('#jform_php_getform').addClass('required'); - jform_vvvvvxmvxc_required = false; - } } else { jQuery('#jform_php_getform-lbl').closest('.control-group').hide(); - // remove required attribute from php_getform field - if (!jform_vvvvvxmvxc_required) - { - updateFieldRequired('php_getform',1); - jQuery('#jform_php_getform').removeAttr('required'); - jQuery('#jform_php_getform').removeAttr('aria-required'); - jQuery('#jform_php_getform').removeClass('required'); - jform_vvvvvxmvxc_required = true; - } } } @@ -544,28 +298,10 @@ function vvvvvxn(add_php_before_save_vvvvvxn) if (add_php_before_save_vvvvvxn == 1) { jQuery('#jform_php_before_save-lbl').closest('.control-group').show(); - // add required attribute to php_before_save field - if (jform_vvvvvxnvxd_required) - { - updateFieldRequired('php_before_save',0); - jQuery('#jform_php_before_save').prop('required','required'); - jQuery('#jform_php_before_save').attr('aria-required',true); - jQuery('#jform_php_before_save').addClass('required'); - jform_vvvvvxnvxd_required = false; - } } else { jQuery('#jform_php_before_save-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_save field - if (!jform_vvvvvxnvxd_required) - { - updateFieldRequired('php_before_save',1); - jQuery('#jform_php_before_save').removeAttr('required'); - jQuery('#jform_php_before_save').removeAttr('aria-required'); - jQuery('#jform_php_before_save').removeClass('required'); - jform_vvvvvxnvxd_required = true; - } } } @@ -576,28 +312,10 @@ function vvvvvxo(add_php_save_vvvvvxo) if (add_php_save_vvvvvxo == 1) { jQuery('#jform_php_save-lbl').closest('.control-group').show(); - // add required attribute to php_save field - if (jform_vvvvvxovxe_required) - { - updateFieldRequired('php_save',0); - jQuery('#jform_php_save').prop('required','required'); - jQuery('#jform_php_save').attr('aria-required',true); - jQuery('#jform_php_save').addClass('required'); - jform_vvvvvxovxe_required = false; - } } else { jQuery('#jform_php_save-lbl').closest('.control-group').hide(); - // remove required attribute from php_save field - if (!jform_vvvvvxovxe_required) - { - updateFieldRequired('php_save',1); - jQuery('#jform_php_save').removeAttr('required'); - jQuery('#jform_php_save').removeAttr('aria-required'); - jQuery('#jform_php_save').removeClass('required'); - jform_vvvvvxovxe_required = true; - } } } @@ -608,28 +326,10 @@ function vvvvvxp(add_php_postsavehook_vvvvvxp) if (add_php_postsavehook_vvvvvxp == 1) { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show(); - // add required attribute to php_postsavehook field - if (jform_vvvvvxpvxf_required) - { - updateFieldRequired('php_postsavehook',0); - jQuery('#jform_php_postsavehook').prop('required','required'); - jQuery('#jform_php_postsavehook').attr('aria-required',true); - jQuery('#jform_php_postsavehook').addClass('required'); - jform_vvvvvxpvxf_required = false; - } } else { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').hide(); - // remove required attribute from php_postsavehook field - if (!jform_vvvvvxpvxf_required) - { - updateFieldRequired('php_postsavehook',1); - jQuery('#jform_php_postsavehook').removeAttr('required'); - jQuery('#jform_php_postsavehook').removeAttr('aria-required'); - jQuery('#jform_php_postsavehook').removeClass('required'); - jform_vvvvvxpvxf_required = true; - } } } @@ -640,28 +340,10 @@ function vvvvvxq(add_php_allowadd_vvvvvxq) if (add_php_allowadd_vvvvvxq == 1) { jQuery('#jform_php_allowadd-lbl').closest('.control-group').show(); - // add required attribute to php_allowadd field - if (jform_vvvvvxqvxg_required) - { - updateFieldRequired('php_allowadd',0); - jQuery('#jform_php_allowadd').prop('required','required'); - jQuery('#jform_php_allowadd').attr('aria-required',true); - jQuery('#jform_php_allowadd').addClass('required'); - jform_vvvvvxqvxg_required = false; - } } else { jQuery('#jform_php_allowadd-lbl').closest('.control-group').hide(); - // remove required attribute from php_allowadd field - if (!jform_vvvvvxqvxg_required) - { - updateFieldRequired('php_allowadd',1); - jQuery('#jform_php_allowadd').removeAttr('required'); - jQuery('#jform_php_allowadd').removeAttr('aria-required'); - jQuery('#jform_php_allowadd').removeClass('required'); - jform_vvvvvxqvxg_required = true; - } } } @@ -672,28 +354,10 @@ function vvvvvxr(add_php_allowedit_vvvvvxr) if (add_php_allowedit_vvvvvxr == 1) { jQuery('#jform_php_allowedit-lbl').closest('.control-group').show(); - // add required attribute to php_allowedit field - if (jform_vvvvvxrvxh_required) - { - updateFieldRequired('php_allowedit',0); - jQuery('#jform_php_allowedit').prop('required','required'); - jQuery('#jform_php_allowedit').attr('aria-required',true); - jQuery('#jform_php_allowedit').addClass('required'); - jform_vvvvvxrvxh_required = false; - } } else { jQuery('#jform_php_allowedit-lbl').closest('.control-group').hide(); - // remove required attribute from php_allowedit field - if (!jform_vvvvvxrvxh_required) - { - updateFieldRequired('php_allowedit',1); - jQuery('#jform_php_allowedit').removeAttr('required'); - jQuery('#jform_php_allowedit').removeAttr('aria-required'); - jQuery('#jform_php_allowedit').removeClass('required'); - jform_vvvvvxrvxh_required = true; - } } } @@ -704,28 +368,10 @@ function vvvvvxs(add_php_before_cancel_vvvvvxs) if (add_php_before_cancel_vvvvvxs == 1) { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); - // add required attribute to php_before_cancel field - if (jform_vvvvvxsvxi_required) - { - updateFieldRequired('php_before_cancel',0); - jQuery('#jform_php_before_cancel').prop('required','required'); - jQuery('#jform_php_before_cancel').attr('aria-required',true); - jQuery('#jform_php_before_cancel').addClass('required'); - jform_vvvvvxsvxi_required = false; - } } else { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_cancel field - if (!jform_vvvvvxsvxi_required) - { - updateFieldRequired('php_before_cancel',1); - jQuery('#jform_php_before_cancel').removeAttr('required'); - jQuery('#jform_php_before_cancel').removeAttr('aria-required'); - jQuery('#jform_php_before_cancel').removeClass('required'); - jform_vvvvvxsvxi_required = true; - } } } @@ -736,28 +382,10 @@ function vvvvvxt(add_php_after_cancel_vvvvvxt) if (add_php_after_cancel_vvvvvxt == 1) { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show(); - // add required attribute to php_after_cancel field - if (jform_vvvvvxtvxj_required) - { - updateFieldRequired('php_after_cancel',0); - jQuery('#jform_php_after_cancel').prop('required','required'); - jQuery('#jform_php_after_cancel').attr('aria-required',true); - jQuery('#jform_php_after_cancel').addClass('required'); - jform_vvvvvxtvxj_required = false; - } } else { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_cancel field - if (!jform_vvvvvxtvxj_required) - { - updateFieldRequired('php_after_cancel',1); - jQuery('#jform_php_after_cancel').removeAttr('required'); - jQuery('#jform_php_after_cancel').removeAttr('aria-required'); - jQuery('#jform_php_after_cancel').removeClass('required'); - jform_vvvvvxtvxj_required = true; - } } } @@ -768,28 +396,10 @@ function vvvvvxu(add_php_batchcopy_vvvvvxu) if (add_php_batchcopy_vvvvvxu == 1) { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); - // add required attribute to php_batchcopy field - if (jform_vvvvvxuvxk_required) - { - updateFieldRequired('php_batchcopy',0); - jQuery('#jform_php_batchcopy').prop('required','required'); - jQuery('#jform_php_batchcopy').attr('aria-required',true); - jQuery('#jform_php_batchcopy').addClass('required'); - jform_vvvvvxuvxk_required = false; - } } else { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide(); - // remove required attribute from php_batchcopy field - if (!jform_vvvvvxuvxk_required) - { - updateFieldRequired('php_batchcopy',1); - jQuery('#jform_php_batchcopy').removeAttr('required'); - jQuery('#jform_php_batchcopy').removeAttr('aria-required'); - jQuery('#jform_php_batchcopy').removeClass('required'); - jform_vvvvvxuvxk_required = true; - } } } @@ -800,28 +410,10 @@ function vvvvvxv(add_php_batchmove_vvvvvxv) if (add_php_batchmove_vvvvvxv == 1) { jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); - // add required attribute to php_batchmove field - if (jform_vvvvvxvvxl_required) - { - updateFieldRequired('php_batchmove',0); - jQuery('#jform_php_batchmove').prop('required','required'); - jQuery('#jform_php_batchmove').attr('aria-required',true); - jQuery('#jform_php_batchmove').addClass('required'); - jform_vvvvvxvvxl_required = false; - } } else { jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide(); - // remove required attribute from php_batchmove field - if (!jform_vvvvvxvvxl_required) - { - updateFieldRequired('php_batchmove',1); - jQuery('#jform_php_batchmove').removeAttr('required'); - jQuery('#jform_php_batchmove').removeAttr('aria-required'); - jQuery('#jform_php_batchmove').removeClass('required'); - jform_vvvvvxvvxl_required = true; - } } } @@ -832,28 +424,10 @@ function vvvvvxw(add_php_before_publish_vvvvvxw) if (add_php_before_publish_vvvvvxw == 1) { jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); - // add required attribute to php_before_publish field - if (jform_vvvvvxwvxm_required) - { - updateFieldRequired('php_before_publish',0); - jQuery('#jform_php_before_publish').prop('required','required'); - jQuery('#jform_php_before_publish').attr('aria-required',true); - jQuery('#jform_php_before_publish').addClass('required'); - jform_vvvvvxwvxm_required = false; - } } else { jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_publish field - if (!jform_vvvvvxwvxm_required) - { - updateFieldRequired('php_before_publish',1); - jQuery('#jform_php_before_publish').removeAttr('required'); - jQuery('#jform_php_before_publish').removeAttr('aria-required'); - jQuery('#jform_php_before_publish').removeClass('required'); - jform_vvvvvxwvxm_required = true; - } } } @@ -864,28 +438,10 @@ function vvvvvxx(add_php_after_publish_vvvvvxx) if (add_php_after_publish_vvvvvxx == 1) { jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); - // add required attribute to php_after_publish field - if (jform_vvvvvxxvxn_required) - { - updateFieldRequired('php_after_publish',0); - jQuery('#jform_php_after_publish').prop('required','required'); - jQuery('#jform_php_after_publish').attr('aria-required',true); - jQuery('#jform_php_after_publish').addClass('required'); - jform_vvvvvxxvxn_required = false; - } } else { jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_publish field - if (!jform_vvvvvxxvxn_required) - { - updateFieldRequired('php_after_publish',1); - jQuery('#jform_php_after_publish').removeAttr('required'); - jQuery('#jform_php_after_publish').removeAttr('aria-required'); - jQuery('#jform_php_after_publish').removeClass('required'); - jform_vvvvvxxvxn_required = true; - } } } @@ -896,28 +452,10 @@ function vvvvvxy(add_php_before_delete_vvvvvxy) if (add_php_before_delete_vvvvvxy == 1) { jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); - // add required attribute to php_before_delete field - if (jform_vvvvvxyvxo_required) - { - updateFieldRequired('php_before_delete',0); - jQuery('#jform_php_before_delete').prop('required','required'); - jQuery('#jform_php_before_delete').attr('aria-required',true); - jQuery('#jform_php_before_delete').addClass('required'); - jform_vvvvvxyvxo_required = false; - } } else { jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_delete field - if (!jform_vvvvvxyvxo_required) - { - updateFieldRequired('php_before_delete',1); - jQuery('#jform_php_before_delete').removeAttr('required'); - jQuery('#jform_php_before_delete').removeAttr('aria-required'); - jQuery('#jform_php_before_delete').removeClass('required'); - jform_vvvvvxyvxo_required = true; - } } } @@ -928,28 +466,10 @@ function vvvvvxz(add_php_after_delete_vvvvvxz) if (add_php_after_delete_vvvvvxz == 1) { jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); - // add required attribute to php_after_delete field - if (jform_vvvvvxzvxp_required) - { - updateFieldRequired('php_after_delete',0); - jQuery('#jform_php_after_delete').prop('required','required'); - jQuery('#jform_php_after_delete').attr('aria-required',true); - jQuery('#jform_php_after_delete').addClass('required'); - jform_vvvvvxzvxp_required = false; - } } else { jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_delete field - if (!jform_vvvvvxzvxp_required) - { - updateFieldRequired('php_after_delete',1); - jQuery('#jform_php_after_delete').removeAttr('required'); - jQuery('#jform_php_after_delete').removeAttr('aria-required'); - jQuery('#jform_php_after_delete').removeClass('required'); - jform_vvvvvxzvxp_required = true; - } } } @@ -960,28 +480,10 @@ function vvvvvya(add_php_document_vvvvvya) if (add_php_document_vvvvvya == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); - // add required attribute to php_document field - if (jform_vvvvvyavxq_required) - { - updateFieldRequired('php_document',0); - jQuery('#jform_php_document').prop('required','required'); - jQuery('#jform_php_document').attr('aria-required',true); - jQuery('#jform_php_document').addClass('required'); - jform_vvvvvyavxq_required = false; - } } else { jQuery('#jform_php_document-lbl').closest('.control-group').hide(); - // remove required attribute from php_document field - if (!jform_vvvvvyavxq_required) - { - updateFieldRequired('php_document',1); - jQuery('#jform_php_document').removeAttr('required'); - jQuery('#jform_php_document').removeAttr('aria-required'); - jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvyavxq_required = true; - } } } @@ -993,26 +495,26 @@ function vvvvvyb(add_sql_vvvvvyb) { jQuery('#jform_source').closest('.control-group').show(); // add required attribute to source field - if (jform_vvvvvybvxr_required) + if (jform_vvvvvybvwd_required) { updateFieldRequired('source',0); jQuery('#jform_source').prop('required','required'); jQuery('#jform_source').attr('aria-required',true); jQuery('#jform_source').addClass('required'); - jform_vvvvvybvxr_required = false; + jform_vvvvvybvwd_required = false; } } else { jQuery('#jform_source').closest('.control-group').hide(); // remove required attribute from source field - if (!jform_vvvvvybvxr_required) + if (!jform_vvvvvybvwd_required) { updateFieldRequired('source',1); jQuery('#jform_source').removeAttr('required'); jQuery('#jform_source').removeAttr('aria-required'); jQuery('#jform_source').removeClass('required'); - jform_vvvvvybvxr_required = true; + jform_vvvvvybvwd_required = true; } } } @@ -1025,26 +527,26 @@ function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field - if (jform_vvvvvycvxs_required) + if (jform_vvvvvycvwe_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvycvxs_required = false; + jform_vvvvvycvwe_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field - if (!jform_vvvvvycvxs_required) + if (!jform_vvvvvycvwe_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvycvxs_required = true; + jform_vvvvvycvwe_required = true; } } } @@ -1071,148 +573,148 @@ function vvvvvyg(add_custom_import_vvvvvyg) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field - if (jform_vvvvvygvxt_required) + if (jform_vvvvvygvwf_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_vvvvvygvxt_required = false; + jform_vvvvvygvwf_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_vvvvvygvxu_required) + if (jform_vvvvvygvwg_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_vvvvvygvxu_required = false; + jform_vvvvvygvwg_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field - if (jform_vvvvvygvxv_required) + if (jform_vvvvvygvwh_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_vvvvvygvxv_required = false; + jform_vvvvvygvwh_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field - if (jform_vvvvvygvxw_required) + if (jform_vvvvvygvwi_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_vvvvvygvxw_required = false; + jform_vvvvvygvwi_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field - if (jform_vvvvvygvxx_required) + if (jform_vvvvvygvwj_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_vvvvvygvxx_required = false; + jform_vvvvvygvwj_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field - if (jform_vvvvvygvxy_required) + if (jform_vvvvvygvwk_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_vvvvvygvxy_required = false; + jform_vvvvvygvwk_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field - if (jform_vvvvvygvxz_required) + if (jform_vvvvvygvwl_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_vvvvvygvxz_required = false; + jform_vvvvvygvwl_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field - if (!jform_vvvvvygvxt_required) + if (!jform_vvvvvygvwf_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_vvvvvygvxt_required = true; + jform_vvvvvygvwf_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_vvvvvygvxu_required) + if (!jform_vvvvvygvwg_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_vvvvvygvxu_required = true; + jform_vvvvvygvwg_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field - if (!jform_vvvvvygvxv_required) + if (!jform_vvvvvygvwh_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_vvvvvygvxv_required = true; + jform_vvvvvygvwh_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field - if (!jform_vvvvvygvxw_required) + if (!jform_vvvvvygvwi_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_vvvvvygvxw_required = true; + jform_vvvvvygvwi_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field - if (!jform_vvvvvygvxx_required) + if (!jform_vvvvvygvwj_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_vvvvvygvxx_required = true; + jform_vvvvvygvwj_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field - if (!jform_vvvvvygvxy_required) + if (!jform_vvvvvygvwk_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_vvvvvygvxy_required = true; + jform_vvvvvygvwk_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field - if (!jform_vvvvvygvxz_required) + if (!jform_vvvvvygvwl_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_vvvvvygvxz_required = true; + jform_vvvvvygvwl_required = true; } } } @@ -1239,89 +741,17 @@ function vvvvvyi(add_custom_button_vvvvvyi) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); - // add required attribute to php_controller field - if (jform_vvvvvyivya_required) - { - updateFieldRequired('php_controller',0); - jQuery('#jform_php_controller').prop('required','required'); - jQuery('#jform_php_controller').attr('aria-required',true); - jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvyivya_required = false; - } jQuery('#jform_php_controller_list-lbl').closest('.control-group').show(); - // add required attribute to php_controller_list field - if (jform_vvvvvyivyb_required) - { - updateFieldRequired('php_controller_list',0); - jQuery('#jform_php_controller_list').prop('required','required'); - jQuery('#jform_php_controller_list').attr('aria-required',true); - jQuery('#jform_php_controller_list').addClass('required'); - jform_vvvvvyivyb_required = false; - } jQuery('#jform_php_model-lbl').closest('.control-group').show(); - // add required attribute to php_model field - if (jform_vvvvvyivyc_required) - { - updateFieldRequired('php_model',0); - jQuery('#jform_php_model').prop('required','required'); - jQuery('#jform_php_model').attr('aria-required',true); - jQuery('#jform_php_model').addClass('required'); - jform_vvvvvyivyc_required = false; - } jQuery('#jform_php_model_list-lbl').closest('.control-group').show(); - // add required attribute to php_model_list field - if (jform_vvvvvyivyd_required) - { - updateFieldRequired('php_model_list',0); - jQuery('#jform_php_model_list').prop('required','required'); - jQuery('#jform_php_model_list').attr('aria-required',true); - jQuery('#jform_php_model_list').addClass('required'); - jform_vvvvvyivyd_required = false; - } } else { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); - // remove required attribute from php_controller field - if (!jform_vvvvvyivya_required) - { - updateFieldRequired('php_controller',1); - jQuery('#jform_php_controller').removeAttr('required'); - jQuery('#jform_php_controller').removeAttr('aria-required'); - jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvyivya_required = true; - } jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide(); - // remove required attribute from php_controller_list field - if (!jform_vvvvvyivyb_required) - { - updateFieldRequired('php_controller_list',1); - jQuery('#jform_php_controller_list').removeAttr('required'); - jQuery('#jform_php_controller_list').removeAttr('aria-required'); - jQuery('#jform_php_controller_list').removeClass('required'); - jform_vvvvvyivyb_required = true; - } jQuery('#jform_php_model-lbl').closest('.control-group').hide(); - // remove required attribute from php_model field - if (!jform_vvvvvyivyc_required) - { - updateFieldRequired('php_model',1); - jQuery('#jform_php_model').removeAttr('required'); - jQuery('#jform_php_model').removeAttr('aria-required'); - jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvyivyc_required = true; - } jQuery('#jform_php_model_list-lbl').closest('.control-group').hide(); - // remove required attribute from php_model_list field - if (!jform_vvvvvyivyd_required) - { - updateFieldRequired('php_model_list',1); - jQuery('#jform_php_model_list').removeAttr('required'); - jQuery('#jform_php_model_list').removeAttr('aria-required'); - jQuery('#jform_php_model_list').removeClass('required'); - jform_vvvvvyivyd_required = true; - } } } @@ -1404,9 +834,9 @@ function checkAliasField() { } function checkAliasField_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type=' + type; + var request = token+'=1&type=' + type; } return jQuery.ajax({ type: 'GET', @@ -1428,9 +858,9 @@ function getAjaxDisplay(type){ } function getAjaxDisplay_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type=' + type; + var request = token+'=1&type=' + type; } return jQuery.ajax({ type: 'GET', @@ -1446,9 +876,9 @@ function addData(result,where){ } function getTableColumns_server(tableName){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && tableName.length > 0){ - var request = 'token='+token+'&table='+tableName; + var request = token+'=1&table='+tableName; } return jQuery.ajax({ type: 'GET', @@ -1477,9 +907,9 @@ function getTableColumns(fieldKey, table_, nr_){ } function getDynamicScripts_server(typpe){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && typpe.length > 0){ - var request = 'token='+token+'&type='+typpe; + var request = token+'=1&type='+typpe; } return jQuery.ajax({ type: 'GET', @@ -1560,9 +990,9 @@ function getDynamicScripts(id){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', @@ -1601,7 +1031,7 @@ function isObject(obj) { function addButtonID_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0 && size > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -1626,7 +1056,7 @@ function addButtonID(type, where, size){ function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -1651,9 +1081,9 @@ function addButton(type, where, size){ } function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type='+type; + var request = token+'=1&type='+type; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index b2c2bdd88..4b9621508 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -1277,7 +1277,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1308,7 +1307,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1325,7 +1323,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1342,7 +1339,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1373,7 +1369,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1390,7 +1385,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1407,7 +1401,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1438,7 +1431,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1455,7 +1447,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1472,7 +1463,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1503,7 +1493,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1520,7 +1509,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1537,7 +1525,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1568,7 +1555,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1585,7 +1571,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1602,7 +1587,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1633,7 +1617,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1650,7 +1633,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1667,7 +1649,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1698,7 +1679,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -2223,7 +2203,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -2240,7 +2219,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> @@ -2257,7 +2235,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -2274,7 +2251,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> @@ -2291,7 +2267,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -2308,7 +2283,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> @@ -2420,7 +2394,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> @@ -2487,7 +2460,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -2686,7 +2658,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -2743,7 +2714,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/component_dashboard.js b/admin/models/forms/component_dashboard.js index 70dd5c103..e6c741404 100644 --- a/admin/models/forms/component_dashboard.js +++ b/admin/models/forms/component_dashboard.js @@ -18,9 +18,9 @@ jQuery(document).ready(function() }); function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index 892068a37..f14df1c29 100644 --- a/admin/models/forms/custom_admin_view.js +++ b/admin/models/forms/custom_admin_view.js @@ -8,19 +8,6 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -// Some Global Values -jform_vvvvvyjvye_required = false; -jform_vvvvvykvyf_required = false; -jform_vvvvvylvyg_required = false; -jform_vvvvvymvyh_required = false; -jform_vvvvvynvyi_required = false; -jform_vvvvvyovyj_required = false; -jform_vvvvvypvyk_required = false; -jform_vvvvvyqvyl_required = false; -jform_vvvvvyqvym_required = false; -jform_vvvvvyrvyn_required = false; -jform_vvvvvysvyo_required = false; - // Initial Script jQuery(document).ready(function() { @@ -62,28 +49,10 @@ function vvvvvyj(add_php_view_vvvvvyj) if (add_php_view_vvvvvyj == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); - // add required attribute to php_view field - if (jform_vvvvvyjvye_required) - { - updateFieldRequired('php_view',0); - jQuery('#jform_php_view').prop('required','required'); - jQuery('#jform_php_view').attr('aria-required',true); - jQuery('#jform_php_view').addClass('required'); - jform_vvvvvyjvye_required = false; - } } else { jQuery('#jform_php_view-lbl').closest('.control-group').hide(); - // remove required attribute from php_view field - if (!jform_vvvvvyjvye_required) - { - updateFieldRequired('php_view',1); - jQuery('#jform_php_view').removeAttr('required'); - jQuery('#jform_php_view').removeAttr('aria-required'); - jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvyjvye_required = true; - } } } @@ -94,28 +63,10 @@ function vvvvvyk(add_php_jview_display_vvvvvyk) if (add_php_jview_display_vvvvvyk == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); - // add required attribute to php_jview_display field - if (jform_vvvvvykvyf_required) - { - updateFieldRequired('php_jview_display',0); - jQuery('#jform_php_jview_display').prop('required','required'); - jQuery('#jform_php_jview_display').attr('aria-required',true); - jQuery('#jform_php_jview_display').addClass('required'); - jform_vvvvvykvyf_required = false; - } } else { jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide(); - // remove required attribute from php_jview_display field - if (!jform_vvvvvykvyf_required) - { - updateFieldRequired('php_jview_display',1); - jQuery('#jform_php_jview_display').removeAttr('required'); - jQuery('#jform_php_jview_display').removeAttr('aria-required'); - jQuery('#jform_php_jview_display').removeClass('required'); - jform_vvvvvykvyf_required = true; - } } } @@ -126,28 +77,10 @@ function vvvvvyl(add_php_jview_vvvvvyl) if (add_php_jview_vvvvvyl == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); - // add required attribute to php_jview field - if (jform_vvvvvylvyg_required) - { - updateFieldRequired('php_jview',0); - jQuery('#jform_php_jview').prop('required','required'); - jQuery('#jform_php_jview').attr('aria-required',true); - jQuery('#jform_php_jview').addClass('required'); - jform_vvvvvylvyg_required = false; - } } else { jQuery('#jform_php_jview-lbl').closest('.control-group').hide(); - // remove required attribute from php_jview field - if (!jform_vvvvvylvyg_required) - { - updateFieldRequired('php_jview',1); - jQuery('#jform_php_jview').removeAttr('required'); - jQuery('#jform_php_jview').removeAttr('aria-required'); - jQuery('#jform_php_jview').removeClass('required'); - jform_vvvvvylvyg_required = true; - } } } @@ -158,28 +91,10 @@ function vvvvvym(add_php_document_vvvvvym) if (add_php_document_vvvvvym == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); - // add required attribute to php_document field - if (jform_vvvvvymvyh_required) - { - updateFieldRequired('php_document',0); - jQuery('#jform_php_document').prop('required','required'); - jQuery('#jform_php_document').attr('aria-required',true); - jQuery('#jform_php_document').addClass('required'); - jform_vvvvvymvyh_required = false; - } } else { jQuery('#jform_php_document-lbl').closest('.control-group').hide(); - // remove required attribute from php_document field - if (!jform_vvvvvymvyh_required) - { - updateFieldRequired('php_document',1); - jQuery('#jform_php_document').removeAttr('required'); - jQuery('#jform_php_document').removeAttr('aria-required'); - jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvymvyh_required = true; - } } } @@ -190,28 +105,10 @@ function vvvvvyn(add_css_document_vvvvvyn) if (add_css_document_vvvvvyn == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); - // add required attribute to css_document field - if (jform_vvvvvynvyi_required) - { - updateFieldRequired('css_document',0); - jQuery('#jform_css_document').prop('required','required'); - jQuery('#jform_css_document').attr('aria-required',true); - jQuery('#jform_css_document').addClass('required'); - jform_vvvvvynvyi_required = false; - } } else { jQuery('#jform_css_document-lbl').closest('.control-group').hide(); - // remove required attribute from css_document field - if (!jform_vvvvvynvyi_required) - { - updateFieldRequired('css_document',1); - jQuery('#jform_css_document').removeAttr('required'); - jQuery('#jform_css_document').removeAttr('aria-required'); - jQuery('#jform_css_document').removeClass('required'); - jform_vvvvvynvyi_required = true; - } } } @@ -222,28 +119,10 @@ function vvvvvyo(add_javascript_file_vvvvvyo) if (add_javascript_file_vvvvvyo == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); - // add required attribute to javascript_file field - if (jform_vvvvvyovyj_required) - { - updateFieldRequired('javascript_file',0); - jQuery('#jform_javascript_file').prop('required','required'); - jQuery('#jform_javascript_file').attr('aria-required',true); - jQuery('#jform_javascript_file').addClass('required'); - jform_vvvvvyovyj_required = false; - } } else { jQuery('#jform_javascript_file-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_file field - if (!jform_vvvvvyovyj_required) - { - updateFieldRequired('javascript_file',1); - jQuery('#jform_javascript_file').removeAttr('required'); - jQuery('#jform_javascript_file').removeAttr('aria-required'); - jQuery('#jform_javascript_file').removeClass('required'); - jform_vvvvvyovyj_required = true; - } } } @@ -254,28 +133,10 @@ function vvvvvyp(add_js_document_vvvvvyp) if (add_js_document_vvvvvyp == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); - // add required attribute to js_document field - if (jform_vvvvvypvyk_required) - { - updateFieldRequired('js_document',0); - jQuery('#jform_js_document').prop('required','required'); - jQuery('#jform_js_document').attr('aria-required',true); - jQuery('#jform_js_document').addClass('required'); - jform_vvvvvypvyk_required = false; - } } else { jQuery('#jform_js_document-lbl').closest('.control-group').hide(); - // remove required attribute from js_document field - if (!jform_vvvvvypvyk_required) - { - updateFieldRequired('js_document',1); - jQuery('#jform_js_document').removeAttr('required'); - jQuery('#jform_js_document').removeAttr('aria-required'); - jQuery('#jform_js_document').removeClass('required'); - jform_vvvvvypvyk_required = true; - } } } @@ -287,49 +148,13 @@ function vvvvvyq(add_custom_button_vvvvvyq) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); - // add required attribute to php_controller field - if (jform_vvvvvyqvyl_required) - { - updateFieldRequired('php_controller',0); - jQuery('#jform_php_controller').prop('required','required'); - jQuery('#jform_php_controller').attr('aria-required',true); - jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvyqvyl_required = false; - } jQuery('#jform_php_model-lbl').closest('.control-group').show(); - // add required attribute to php_model field - if (jform_vvvvvyqvym_required) - { - updateFieldRequired('php_model',0); - jQuery('#jform_php_model').prop('required','required'); - jQuery('#jform_php_model').attr('aria-required',true); - jQuery('#jform_php_model').addClass('required'); - jform_vvvvvyqvym_required = false; - } } else { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); - // remove required attribute from php_controller field - if (!jform_vvvvvyqvyl_required) - { - updateFieldRequired('php_controller',1); - jQuery('#jform_php_controller').removeAttr('required'); - jQuery('#jform_php_controller').removeAttr('aria-required'); - jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvyqvyl_required = true; - } jQuery('#jform_php_model-lbl').closest('.control-group').hide(); - // remove required attribute from php_model field - if (!jform_vvvvvyqvym_required) - { - updateFieldRequired('php_model',1); - jQuery('#jform_php_model').removeAttr('required'); - jQuery('#jform_php_model').removeAttr('aria-required'); - jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvyqvym_required = true; - } } } @@ -340,28 +165,10 @@ function vvvvvyr(add_css_vvvvvyr) if (add_css_vvvvvyr == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); - // add required attribute to css field - if (jform_vvvvvyrvyn_required) - { - updateFieldRequired('css',0); - jQuery('#jform_css').prop('required','required'); - jQuery('#jform_css').attr('aria-required',true); - jQuery('#jform_css').addClass('required'); - jform_vvvvvyrvyn_required = false; - } } else { jQuery('#jform_css-lbl').closest('.control-group').hide(); - // remove required attribute from css field - if (!jform_vvvvvyrvyn_required) - { - updateFieldRequired('css',1); - jQuery('#jform_css').removeAttr('required'); - jQuery('#jform_css').removeAttr('aria-required'); - jQuery('#jform_css').removeClass('required'); - jform_vvvvvyrvyn_required = true; - } } } @@ -373,59 +180,14 @@ function vvvvvys(add_php_ajax_vvvvvys) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); - // add required attribute to php_ajaxmethod field - if (jform_vvvvvysvyo_required) - { - updateFieldRequired('php_ajaxmethod',0); - jQuery('#jform_php_ajaxmethod').prop('required','required'); - jQuery('#jform_php_ajaxmethod').attr('aria-required',true); - jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvysvyo_required = false; - } } else { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide(); - // remove required attribute from php_ajaxmethod field - if (!jform_vvvvvysvyo_required) - { - updateFieldRequired('php_ajaxmethod',1); - jQuery('#jform_php_ajaxmethod').removeAttr('required'); - jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); - jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvysvyo_required = true; - } } } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); - - if(status == 1) - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required+','+name; - } - else - { - not_required = ','+name; - } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - - jQuery('#jform_not_required').val(not_required); -} - // the isSet function function isSet(val) { @@ -445,9 +207,9 @@ jQuery(document).ready(function() }); function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type='+type; + var request = token+'=1&type='+type; } return jQuery.ajax({ type: 'GET', @@ -467,9 +229,9 @@ function getLinked(){ } function getSnippetDetails_server(snippetId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"); if(token.length > 0 && snippetId > 0){ - var request = 'token='+token+'&id='+snippetId; + var request = token+'=1&id='+snippetId; } return jQuery.ajax({ type: 'GET', @@ -516,9 +278,9 @@ function getSnippetDetails(id){ } function getDynamicValues_server(dynamicId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"); if(token.length > 0 && dynamicId > 0){ - var request = 'token='+token+'&view=custom_admin_view&id='+dynamicId; + var request = token+'=1&view=custom_admin_view&id='+dynamicId; } return jQuery.ajax({ type: 'GET', @@ -543,9 +305,9 @@ function getDynamicValues(id){ } function getLayoutDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -569,9 +331,9 @@ function getLayoutDetails(id){ } function getTemplateDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -614,7 +376,7 @@ jQuery(document).ready(function($) function getSnippets_server(libraries){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json"; if(token.length > 0 && libraries.length > 0){ - var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + var request = token+'=1&libraries='+JSON.stringify(libraries); } return jQuery.ajax({ type: 'GET', @@ -667,9 +429,9 @@ function setSnippets(array){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml index a358eef46..8a7ab1274 100644 --- a/admin/models/forms/custom_admin_view.xml +++ b/admin/models/forms/custom_admin_view.xml @@ -156,7 +156,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -175,7 +174,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -266,7 +264,6 @@ syntax="html" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -304,7 +301,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -350,7 +346,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -381,7 +376,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -538,7 +532,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -555,7 +548,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -572,7 +564,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -601,7 +592,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1208,7 +1198,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> @@ -1227,7 +1216,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js index cafa094a3..061338a81 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -9,10 +9,10 @@ */ // Some Global Values -jform_vvvvwahvzw_required = false; -jform_vvvvwaivzx_required = false; -jform_vvvvwaivzy_required = false; -jform_vvvvwaivzz_required = false; +jform_vvvvwahvwz_required = false; +jform_vvvvwaivxa_required = false; +jform_vvvvwaivxb_required = false; +jform_vvvvwaivxc_required = false; // Initial Script jQuery(document).ready(function() @@ -40,13 +40,13 @@ function vvvvwah(target_vvvvwah) { jQuery('#jform_function_name').closest('.control-group').show(); // add required attribute to function_name field - if (jform_vvvvwahvzw_required) + if (jform_vvvvwahvwz_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_vvvvwahvzw_required = false; + jform_vvvvwahvwz_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); jQuery('#jform_system_name').closest('.control-group').show(); @@ -55,13 +55,13 @@ function vvvvwah(target_vvvvwah) { jQuery('#jform_function_name').closest('.control-group').hide(); // remove required attribute from function_name field - if (!jform_vvvvwahvzw_required) + if (!jform_vvvvwahvwz_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_vvvvwahvzw_required = true; + jform_vvvvwahvwz_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); @@ -76,72 +76,72 @@ function vvvvwai(target_vvvvwai) { jQuery('#jform_component').closest('.control-group').show(); // add required attribute to component field - if (jform_vvvvwaivzx_required) + if (jform_vvvvwaivxa_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); - jform_vvvvwaivzx_required = false; + jform_vvvvwaivxa_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field - if (jform_vvvvwaivzy_required) + if (jform_vvvvwaivxb_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvwaivzy_required = false; + jform_vvvvwaivxb_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_vvvvwaivzz_required) + if (jform_vvvvwaivxc_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); - jform_vvvvwaivzz_required = false; + jform_vvvvwaivxc_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); // remove required attribute from component field - if (!jform_vvvvwaivzx_required) + if (!jform_vvvvwaivxa_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); - jform_vvvvwaivzx_required = true; + jform_vvvvwaivxa_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field - if (!jform_vvvvwaivzy_required) + if (!jform_vvvvwaivxb_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvwaivzy_required = true; + jform_vvvvwaivxb_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_vvvvwaivzz_required) + if (!jform_vvvvwaivxc_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); - jform_vvvvwaivzz_required = true; + jform_vvvvwaivxc_required = true; } } } @@ -358,9 +358,9 @@ function usedin_server(functioName, ide, target){ function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/custom_code.xml b/admin/models/forms/custom_code.xml index a3b09b2da..9f5c1f643 100644 --- a/admin/models/forms/custom_code.xml +++ b/admin/models/forms/custom_code.xml @@ -200,7 +200,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js index a4e776f6d..b527188fa 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -9,26 +9,19 @@ */ // Some Global Values -jform_vvvvvzgvzc_required = false; -jform_vvvvvzivzd_required = false; -jform_vvvvvzjvze_required = false; -jform_vvvvvzkvzf_required = false; -jform_vvvvvzlvzg_required = false; -jform_vvvvvzmvzh_required = false; -jform_vvvvvzrvzi_required = false; -jform_vvvvvztvzj_required = false; -jform_vvvvvzuvzk_required = false; -jform_vvvvvzwvzl_required = false; -jform_vvvvvzwvzm_required = false; -jform_vvvvvzxvzn_required = false; -jform_vvvvvzyvzo_required = false; -jform_vvvvvzzvzp_required = false; -jform_vvvvwabvzq_required = false; -jform_vvvvwabvzr_required = false; -jform_vvvvwabvzs_required = false; -jform_vvvvwacvzt_required = false; -jform_vvvvwadvzu_required = false; -jform_vvvvwaevzv_required = false; +jform_vvvvvzgvwm_required = false; +jform_vvvvvzivwn_required = false; +jform_vvvvvzjvwo_required = false; +jform_vvvvvzkvwp_required = false; +jform_vvvvvzlvwq_required = false; +jform_vvvvvzwvwr_required = false; +jform_vvvvvzwvws_required = false; +jform_vvvvwabvwt_required = false; +jform_vvvvwabvwu_required = false; +jform_vvvvwabvwv_required = false; +jform_vvvvwacvww_required = false; +jform_vvvvwadvwx_required = false; +jform_vvvvwaevwy_required = false; // Initial Script jQuery(document).ready(function() @@ -129,26 +122,26 @@ function vvvvvzg(gettype_vvvvvzg) { jQuery('#jform_getcustom').closest('.control-group').show(); // add required attribute to getcustom field - if (jform_vvvvvzgvzc_required) + if (jform_vvvvvzgvwm_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); - jform_vvvvvzgvzc_required = false; + jform_vvvvvzgvwm_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); // remove required attribute from getcustom field - if (!jform_vvvvvzgvzc_required) + if (!jform_vvvvvzgvwm_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); - jform_vvvvvzgvzc_required = true; + jform_vvvvvzgvwm_required = true; } } } @@ -223,26 +216,26 @@ function vvvvvzi(main_source_vvvvvzi) { jQuery('#jform_view_table_main').closest('.control-group').show(); // add required attribute to view_table_main field - if (jform_vvvvvzivzd_required) + if (jform_vvvvvzivwn_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_vvvvvzivzd_required = false; + jform_vvvvvzivwn_required = false; } } else { jQuery('#jform_view_table_main').closest('.control-group').hide(); // remove required attribute from view_table_main field - if (!jform_vvvvvzivzd_required) + if (!jform_vvvvvzivwn_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_vvvvvzivzd_required = true; + jform_vvvvvzivwn_required = true; } } } @@ -279,26 +272,26 @@ function vvvvvzj(main_source_vvvvvzj) { jQuery('#jform_view_selection').closest('.control-group').show(); // add required attribute to view_selection field - if (jform_vvvvvzjvze_required) + if (jform_vvvvvzjvwo_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_vvvvvzjvze_required = false; + jform_vvvvvzjvwo_required = false; } } else { jQuery('#jform_view_selection').closest('.control-group').hide(); // remove required attribute from view_selection field - if (!jform_vvvvvzjvze_required) + if (!jform_vvvvvzjvwo_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_vvvvvzjvze_required = true; + jform_vvvvvzjvwo_required = true; } } } @@ -335,26 +328,26 @@ function vvvvvzk(main_source_vvvvvzk) { jQuery('#jform_db_table_main').closest('.control-group').show(); // add required attribute to db_table_main field - if (jform_vvvvvzkvzf_required) + if (jform_vvvvvzkvwp_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_vvvvvzkvzf_required = false; + jform_vvvvvzkvwp_required = false; } } else { jQuery('#jform_db_table_main').closest('.control-group').hide(); // remove required attribute from db_table_main field - if (!jform_vvvvvzkvzf_required) + if (!jform_vvvvvzkvwp_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_vvvvvzkvzf_required = true; + jform_vvvvvzkvwp_required = true; } } } @@ -391,26 +384,26 @@ function vvvvvzl(main_source_vvvvvzl) { jQuery('#jform_db_selection').closest('.control-group').show(); // add required attribute to db_selection field - if (jform_vvvvvzlvzg_required) + if (jform_vvvvvzlvwq_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_vvvvvzlvzg_required = false; + jform_vvvvvzlvwq_required = false; } } else { jQuery('#jform_db_selection').closest('.control-group').hide(); // remove required attribute from db_selection field - if (!jform_vvvvvzlvzg_required) + if (!jform_vvvvvzlvwq_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_vvvvvzlvzg_required = true; + jform_vvvvvzlvwq_required = true; } } } @@ -433,28 +426,10 @@ function vvvvvzm(addcalculation_vvvvvzm) if (addcalculation_vvvvvzm == 1) { jQuery('#jform_php_calculation-lbl').closest('.control-group').show(); - // add required attribute to php_calculation field - if (jform_vvvvvzmvzh_required) - { - updateFieldRequired('php_calculation',0); - jQuery('#jform_php_calculation').prop('required','required'); - jQuery('#jform_php_calculation').attr('aria-required',true); - jQuery('#jform_php_calculation').addClass('required'); - jform_vvvvvzmvzh_required = false; - } } else { jQuery('#jform_php_calculation-lbl').closest('.control-group').hide(); - // remove required attribute from php_calculation field - if (!jform_vvvvvzmvzh_required) - { - updateFieldRequired('php_calculation',1); - jQuery('#jform_php_calculation').removeAttr('required'); - jQuery('#jform_php_calculation').removeAttr('aria-required'); - jQuery('#jform_php_calculation').removeClass('required'); - jform_vvvvvzmvzh_required = true; - } } } @@ -600,28 +575,10 @@ function vvvvvzr(main_source_vvvvvzr) if (main_source) { jQuery('#jform_php_custom_get-lbl').closest('.control-group').show(); - // add required attribute to php_custom_get field - if (jform_vvvvvzrvzi_required) - { - updateFieldRequired('php_custom_get',0); - jQuery('#jform_php_custom_get').prop('required','required'); - jQuery('#jform_php_custom_get').attr('aria-required',true); - jQuery('#jform_php_custom_get').addClass('required'); - jform_vvvvvzrvzi_required = false; - } } else { jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide(); - // remove required attribute from php_custom_get field - if (!jform_vvvvvzrvzi_required) - { - updateFieldRequired('php_custom_get',1); - jQuery('#jform_php_custom_get').removeAttr('required'); - jQuery('#jform_php_custom_get').removeAttr('aria-required'); - jQuery('#jform_php_custom_get').removeClass('required'); - jform_vvvvvzrvzi_required = true; - } } } @@ -718,28 +675,10 @@ function vvvvvzt(add_php_before_getitem_vvvvvzt,gettype_vvvvvzt) if (add_php_before_getitem && gettype) { jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show(); - // add required attribute to php_before_getitem field - if (jform_vvvvvztvzj_required) - { - updateFieldRequired('php_before_getitem',0); - jQuery('#jform_php_before_getitem').prop('required','required'); - jQuery('#jform_php_before_getitem').attr('aria-required',true); - jQuery('#jform_php_before_getitem').addClass('required'); - jform_vvvvvztvzj_required = false; - } } else { jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_getitem field - if (!jform_vvvvvztvzj_required) - { - updateFieldRequired('php_before_getitem',1); - jQuery('#jform_php_before_getitem').removeAttr('required'); - jQuery('#jform_php_before_getitem').removeAttr('aria-required'); - jQuery('#jform_php_before_getitem').removeClass('required'); - jform_vvvvvztvzj_required = true; - } } } @@ -797,28 +736,10 @@ function vvvvvzu(add_php_after_getitem_vvvvvzu,gettype_vvvvvzu) if (add_php_after_getitem && gettype) { jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); - // add required attribute to php_after_getitem field - if (jform_vvvvvzuvzk_required) - { - updateFieldRequired('php_after_getitem',0); - jQuery('#jform_php_after_getitem').prop('required','required'); - jQuery('#jform_php_after_getitem').attr('aria-required',true); - jQuery('#jform_php_after_getitem').addClass('required'); - jform_vvvvvzuvzk_required = false; - } } else { jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_getitem field - if (!jform_vvvvvzuvzk_required) - { - updateFieldRequired('php_after_getitem',1); - jQuery('#jform_php_after_getitem').removeAttr('required'); - jQuery('#jform_php_after_getitem').removeAttr('aria-required'); - jQuery('#jform_php_after_getitem').removeClass('required'); - jform_vvvvvzuvzk_required = true; - } } } @@ -865,46 +786,46 @@ function vvvvvzw(gettype_vvvvvzw) { jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); // add required attribute to add_php_after_getitem field - if (jform_vvvvvzwvzl_required) + if (jform_vvvvvzwvwr_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_vvvvvzwvzl_required = false; + jform_vvvvvzwvwr_required = false; } jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); // add required attribute to add_php_before_getitem field - if (jform_vvvvvzwvzm_required) + if (jform_vvvvvzwvws_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_vvvvvzwvzm_required = false; + jform_vvvvvzwvws_required = false; } } else { jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); // remove required attribute from add_php_after_getitem field - if (!jform_vvvvvzwvzl_required) + if (!jform_vvvvvzwvwr_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_vvvvvzwvzl_required = true; + jform_vvvvvzwvwr_required = true; } jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); // remove required attribute from add_php_before_getitem field - if (!jform_vvvvvzwvzm_required) + if (!jform_vvvvvzwvws_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_vvvvvzwvzm_required = true; + jform_vvvvvzwvws_required = true; } } } @@ -952,28 +873,10 @@ function vvvvvzx(add_php_getlistquery_vvvvvzx,gettype_vvvvvzx) if (add_php_getlistquery && gettype) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); - // add required attribute to php_getlistquery field - if (jform_vvvvvzxvzn_required) - { - updateFieldRequired('php_getlistquery',0); - jQuery('#jform_php_getlistquery').prop('required','required'); - jQuery('#jform_php_getlistquery').attr('aria-required',true); - jQuery('#jform_php_getlistquery').addClass('required'); - jform_vvvvvzxvzn_required = false; - } } else { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); - // remove required attribute from php_getlistquery field - if (!jform_vvvvvzxvzn_required) - { - updateFieldRequired('php_getlistquery',1); - jQuery('#jform_php_getlistquery').removeAttr('required'); - jQuery('#jform_php_getlistquery').removeAttr('aria-required'); - jQuery('#jform_php_getlistquery').removeClass('required'); - jform_vvvvvzxvzn_required = true; - } } } @@ -1031,28 +934,10 @@ function vvvvvzy(add_php_before_getitems_vvvvvzy,gettype_vvvvvzy) if (add_php_before_getitems && gettype) { jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show(); - // add required attribute to php_before_getitems field - if (jform_vvvvvzyvzo_required) - { - updateFieldRequired('php_before_getitems',0); - jQuery('#jform_php_before_getitems').prop('required','required'); - jQuery('#jform_php_before_getitems').attr('aria-required',true); - jQuery('#jform_php_before_getitems').addClass('required'); - jform_vvvvvzyvzo_required = false; - } } else { jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_getitems field - if (!jform_vvvvvzyvzo_required) - { - updateFieldRequired('php_before_getitems',1); - jQuery('#jform_php_before_getitems').removeAttr('required'); - jQuery('#jform_php_before_getitems').removeAttr('aria-required'); - jQuery('#jform_php_before_getitems').removeClass('required'); - jform_vvvvvzyvzo_required = true; - } } } @@ -1110,28 +995,10 @@ function vvvvvzz(add_php_after_getitems_vvvvvzz,gettype_vvvvvzz) if (add_php_after_getitems && gettype) { jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show(); - // add required attribute to php_after_getitems field - if (jform_vvvvvzzvzp_required) - { - updateFieldRequired('php_after_getitems',0); - jQuery('#jform_php_after_getitems').prop('required','required'); - jQuery('#jform_php_after_getitems').attr('aria-required',true); - jQuery('#jform_php_after_getitems').addClass('required'); - jform_vvvvvzzvzp_required = false; - } } else { jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_getitems field - if (!jform_vvvvvzzvzp_required) - { - updateFieldRequired('php_after_getitems',1); - jQuery('#jform_php_after_getitems').removeAttr('required'); - jQuery('#jform_php_after_getitems').removeAttr('aria-required'); - jQuery('#jform_php_after_getitems').removeClass('required'); - jform_vvvvvzzvzp_required = true; - } } } @@ -1178,66 +1045,66 @@ function vvvvwab(gettype_vvvvwab) { jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); // add required attribute to add_php_after_getitems field - if (jform_vvvvwabvzq_required) + if (jform_vvvvwabvwt_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_vvvvwabvzq_required = false; + jform_vvvvwabvwt_required = false; } jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); // add required attribute to add_php_before_getitems field - if (jform_vvvvwabvzr_required) + if (jform_vvvvwabvwu_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_vvvvwabvzr_required = false; + jform_vvvvwabvwu_required = false; } jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); // add required attribute to add_php_getlistquery field - if (jform_vvvvwabvzs_required) + if (jform_vvvvwabvwv_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_vvvvwabvzs_required = false; + jform_vvvvwabvwv_required = false; } } else { jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); // remove required attribute from add_php_after_getitems field - if (!jform_vvvvwabvzq_required) + if (!jform_vvvvwabvwt_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_vvvvwabvzq_required = true; + jform_vvvvwabvwt_required = true; } jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); // remove required attribute from add_php_before_getitems field - if (!jform_vvvvwabvzr_required) + if (!jform_vvvvwabvwu_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_vvvvwabvzr_required = true; + jform_vvvvwabvwu_required = true; } jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); // remove required attribute from add_php_getlistquery field - if (!jform_vvvvwabvzs_required) + if (!jform_vvvvwabvwv_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_vvvvwabvzs_required = true; + jform_vvvvwabvwv_required = true; } } } @@ -1274,26 +1141,26 @@ function vvvvwac(gettype_vvvvwac) { jQuery('#jform_pagination').closest('.control-group').show(); // add required attribute to pagination field - if (jform_vvvvwacvzt_required) + if (jform_vvvvwacvww_required) { updateFieldRequired('pagination',0); jQuery('#jform_pagination').prop('required','required'); jQuery('#jform_pagination').attr('aria-required',true); jQuery('#jform_pagination').addClass('required'); - jform_vvvvwacvzt_required = false; + jform_vvvvwacvww_required = false; } } else { jQuery('#jform_pagination').closest('.control-group').hide(); // remove required attribute from pagination field - if (!jform_vvvvwacvzt_required) + if (!jform_vvvvwacvww_required) { updateFieldRequired('pagination',1); jQuery('#jform_pagination').removeAttr('required'); jQuery('#jform_pagination').removeAttr('aria-required'); jQuery('#jform_pagination').removeClass('required'); - jform_vvvvwacvzt_required = true; + jform_vvvvwacvww_required = true; } } } @@ -1330,26 +1197,26 @@ function vvvvwad(gettype_vvvvwad) { jQuery('#jform_add_php_router_parse').closest('.control-group').show(); // add required attribute to add_php_router_parse field - if (jform_vvvvwadvzu_required) + if (jform_vvvvwadvwx_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_vvvvwadvzu_required = false; + jform_vvvvwadvwx_required = false; } } else { jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); // remove required attribute from add_php_router_parse field - if (!jform_vvvvwadvzu_required) + if (!jform_vvvvwadvwx_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_vvvvwadvzu_required = true; + jform_vvvvwadvwx_required = true; } } } @@ -1398,26 +1265,26 @@ function vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae) { jQuery('#jform_php_router_parse').closest('.control-group').show(); // add required attribute to php_router_parse field - if (jform_vvvvwaevzv_required) + if (jform_vvvvwaevwy_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_vvvvwaevzv_required = false; + jform_vvvvwaevwy_required = false; } } else { jQuery('#jform_php_router_parse').closest('.control-group').hide(); // remove required attribute from php_router_parse field - if (!jform_vvvvwaevzv_required) + if (!jform_vvvvwaevwy_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_vvvvwaevzv_required = true; + jform_vvvvwaevwy_required = true; } } } @@ -1560,10 +1427,10 @@ function setSelectAll(select_all){ } function getViewTableColumns_server(viewId,asKey,rowType){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true"); if (token.length > 0 && viewId > 0 && asKey.length > 0) { - var request = 'token='+token+'&as='+asKey+'&type='+rowType+'&id='+viewId; + var request = token+'=1&as='+asKey+'&type='+rowType+'&id='+viewId; } return jQuery.ajax({ type: 'GET', @@ -1598,10 +1465,10 @@ function getViewTableColumns(id, asKey, key, rowType, main, table_, nr_){ function getDbTableColumns_server(name,asKey,rowType) { - var getUrl = "index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true"); if (token.length > 0 && name.length > 0 && asKey.length > 0) { - var request = 'token='+token+'&as='+asKey+'&type='+rowType+'&name='+name; + var request = token+'=1&as='+asKey+'&type='+rowType+'&name='+name; } return jQuery.ajax({ type: 'GET', @@ -1696,9 +1563,9 @@ function updateSubItems(fieldName, fieldNr, table_, nr_) { } function getDynamicScripts_server(typpe){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && typpe.length > 0){ - var request = 'token='+token+'&type='+typpe; + var request = token+'=1&type='+typpe; } return jQuery.ajax({ type: 'GET', @@ -1725,9 +1592,9 @@ function getDynamicScripts(id){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', @@ -1764,9 +1631,9 @@ function isObject(obj) { } function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type='+type; + var request = token+'=1&type='+type; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index 3edb290cd..bcaeadfd3 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -281,7 +281,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -867,7 +866,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -900,7 +898,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -932,7 +929,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -955,7 +951,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1086,7 +1081,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1271,7 +1265,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 8791d8d4f..9593549a9 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -9,14 +9,10 @@ */ // Some Global Values -jform_vvvvwatwac_required = false; -jform_vvvvwauwad_required = false; -jform_vvvvwavwae_required = false; -jform_vvvvwawwaf_required = false; -jform_vvvvwazwag_required = false; -jform_vvvvwbawah_required = false; -jform_vvvvwbbwai_required = false; -jform_vvvvwbcwaj_required = false; +jform_vvvvwatvxf_required = false; +jform_vvvvwauvxg_required = false; +jform_vvvvwavvxh_required = false; +jform_vvvvwawvxi_required = false; // Initial Script jQuery(document).ready(function() @@ -71,26 +67,26 @@ function vvvvwat(datalenght_vvvvwat) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwatwac_required) + if (jform_vvvvwatvxf_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_vvvvwatwac_required = false; + jform_vvvvwatvxf_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwatwac_required) + if (!jform_vvvvwatvxf_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_vvvvwatwac_required = true; + jform_vvvvwatvxf_required = true; } } } @@ -127,26 +123,26 @@ function vvvvwau(datadefault_vvvvwau) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field - if (jform_vvvvwauwad_required) + if (jform_vvvvwauvxg_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_vvvvwauwad_required = false; + jform_vvvvwauvxg_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field - if (!jform_vvvvwauwad_required) + if (!jform_vvvvwauvxg_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_vvvvwauwad_required = true; + jform_vvvvwauvxg_required = true; } } } @@ -185,13 +181,13 @@ function vvvvwav(datatype_vvvvwav) jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field - if (jform_vvvvwavwae_required) + if (jform_vvvvwavvxh_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvwavwae_required = false; + jform_vvvvwavvxh_required = false; } } else @@ -200,13 +196,13 @@ function vvvvwav(datatype_vvvvwav) jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field - if (!jform_vvvvwavwae_required) + if (!jform_vvvvwavvxh_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwavwae_required = true; + jform_vvvvwavvxh_required = true; } } } @@ -243,26 +239,26 @@ function vvvvwaw(datatype_vvvvwaw) { jQuery('#jform_store').closest('.control-group').show(); // add required attribute to store field - if (jform_vvvvwawwaf_required) + if (jform_vvvvwawvxi_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); - jform_vvvvwawwaf_required = false; + jform_vvvvwawvxi_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); // remove required attribute from store field - if (!jform_vvvvwawwaf_required) + if (!jform_vvvvwawvxi_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); - jform_vvvvwawwaf_required = true; + jform_vvvvwawvxi_required = true; } } } @@ -346,28 +342,10 @@ function vvvvwaz(add_css_view_vvvvwaz) if (add_css_view_vvvvwaz == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); - // add required attribute to css_view field - if (jform_vvvvwazwag_required) - { - updateFieldRequired('css_view',0); - jQuery('#jform_css_view').prop('required','required'); - jQuery('#jform_css_view').attr('aria-required',true); - jQuery('#jform_css_view').addClass('required'); - jform_vvvvwazwag_required = false; - } } else { jQuery('#jform_css_view-lbl').closest('.control-group').hide(); - // remove required attribute from css_view field - if (!jform_vvvvwazwag_required) - { - updateFieldRequired('css_view',1); - jQuery('#jform_css_view').removeAttr('required'); - jQuery('#jform_css_view').removeAttr('aria-required'); - jQuery('#jform_css_view').removeClass('required'); - jform_vvvvwazwag_required = true; - } } } @@ -378,28 +356,10 @@ function vvvvwba(add_css_views_vvvvwba) if (add_css_views_vvvvwba == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); - // add required attribute to css_views field - if (jform_vvvvwbawah_required) - { - updateFieldRequired('css_views',0); - jQuery('#jform_css_views').prop('required','required'); - jQuery('#jform_css_views').attr('aria-required',true); - jQuery('#jform_css_views').addClass('required'); - jform_vvvvwbawah_required = false; - } } else { jQuery('#jform_css_views-lbl').closest('.control-group').hide(); - // remove required attribute from css_views field - if (!jform_vvvvwbawah_required) - { - updateFieldRequired('css_views',1); - jQuery('#jform_css_views').removeAttr('required'); - jQuery('#jform_css_views').removeAttr('aria-required'); - jQuery('#jform_css_views').removeClass('required'); - jform_vvvvwbawah_required = true; - } } } @@ -410,28 +370,10 @@ function vvvvwbb(add_javascript_view_footer_vvvvwbb) if (add_javascript_view_footer_vvvvwbb == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); - // add required attribute to javascript_view_footer field - if (jform_vvvvwbbwai_required) - { - updateFieldRequired('javascript_view_footer',0); - jQuery('#jform_javascript_view_footer').prop('required','required'); - jQuery('#jform_javascript_view_footer').attr('aria-required',true); - jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvwbbwai_required = false; - } } else { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_view_footer field - if (!jform_vvvvwbbwai_required) - { - updateFieldRequired('javascript_view_footer',1); - jQuery('#jform_javascript_view_footer').removeAttr('required'); - jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_view_footer').removeClass('required'); - jform_vvvvwbbwai_required = true; - } } } @@ -442,28 +384,10 @@ function vvvvwbc(add_javascript_views_footer_vvvvwbc) if (add_javascript_views_footer_vvvvwbc == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); - // add required attribute to javascript_views_footer field - if (jform_vvvvwbcwaj_required) - { - updateFieldRequired('javascript_views_footer',0); - jQuery('#jform_javascript_views_footer').prop('required','required'); - jQuery('#jform_javascript_views_footer').attr('aria-required',true); - jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvwbcwaj_required = false; - } } else { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_views_footer field - if (!jform_vvvvwbcwaj_required) - { - updateFieldRequired('javascript_views_footer',1); - jQuery('#jform_javascript_views_footer').removeAttr('required'); - jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvwbcwaj_required = true; - } } } @@ -527,9 +451,9 @@ jQuery(document).ready(function() var rowIdKey = 'properties'; function getFieldOptions_server(fieldtype){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && fieldtype > 0){ - var request = 'token='+token+'&id='+fieldtype; + var request = token+'=1&id='+fieldtype; } return jQuery.ajax({ type: 'GET', @@ -721,9 +645,9 @@ function propertyIsSet(prop, id, targetForm) { } function getFieldPropertyDesc_server(fieldtype, property){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && (fieldtype > 0 || fieldtype.length > 0)&& property.length > 0){ - var request = 'token='+token+'&fieldtype='+fieldtype+'&property='+property; + var request = token+'=1&fieldtype='+fieldtype+'&property='+property; } return jQuery.ajax({ type: 'GET', @@ -736,9 +660,9 @@ function getFieldPropertyDesc_server(fieldtype, property){ function getValidationRulesTable_server(){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0){ - var request = 'token='+token+'&id=1'; + var request = token+'=1&id=1'; } return jQuery.ajax({ type: 'GET', @@ -805,9 +729,9 @@ function dbChecker(type){ } function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type='+type; + var request = token+'=1&type='+type; } return jQuery.ajax({ type: 'GET', @@ -829,7 +753,7 @@ function getLinked(){ function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -854,9 +778,9 @@ function addButton(type, where, size){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml index 24b41e53b..05f4c885c 100644 --- a/admin/models/forms/field.xml +++ b/admin/models/forms/field.xml @@ -244,7 +244,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -275,7 +274,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -432,7 +430,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -451,7 +448,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index 1c20f92c3..6769d90f8 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,13 +9,13 @@ */ // Some Global Values -jform_vvvvwbdwak_required = false; -jform_vvvvwbfwal_required = false; -jform_vvvvwbhwam_required = false; -jform_vvvvwbiwan_required = false; -jform_vvvvwbjwao_required = false; -jform_vvvvwbowap_required = false; -jform_vvvvwbowaq_required = false; +jform_vvvvwbdvxj_required = false; +jform_vvvvwbfvxk_required = false; +jform_vvvvwbhvxl_required = false; +jform_vvvvwbivxm_required = false; +jform_vvvvwbjvxn_required = false; +jform_vvvvwbovxo_required = false; +jform_vvvvwbovxp_required = false; // Initial Script jQuery(document).ready(function() @@ -92,26 +92,26 @@ function vvvvwbd(datalenght_vvvvwbd,has_defaults_vvvvwbd) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwbdwak_required) + if (jform_vvvvwbdvxj_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_vvvvwbdwak_required = false; + jform_vvvvwbdvxj_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwbdwak_required) + if (!jform_vvvvwbdvxj_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_vvvvwbdwak_required = true; + jform_vvvvwbdvxj_required = true; } } } @@ -171,26 +171,26 @@ function vvvvwbf(datadefault_vvvvwbf,has_defaults_vvvvwbf) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field - if (jform_vvvvwbfwal_required) + if (jform_vvvvwbfvxk_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_vvvvwbfwal_required = false; + jform_vvvvwbfvxk_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field - if (!jform_vvvvwbfwal_required) + if (!jform_vvvvwbfvxk_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_vvvvwbfwal_required = true; + jform_vvvvwbfvxk_required = true; } } } @@ -252,13 +252,13 @@ function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field - if (jform_vvvvwbhwam_required) + if (jform_vvvvwbhvxl_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbhwam_required = false; + jform_vvvvwbhvxl_required = false; } } else @@ -267,13 +267,13 @@ function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field - if (!jform_vvvvwbhwam_required) + if (!jform_vvvvwbhvxl_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbhwam_required = true; + jform_vvvvwbhvxl_required = true; } } } @@ -335,13 +335,13 @@ function vvvvwbi(has_defaults_vvvvwbi,datatype_vvvvwbi) jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field - if (jform_vvvvwbiwan_required) + if (jform_vvvvwbivxm_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbiwan_required = false; + jform_vvvvwbivxm_required = false; } } else @@ -350,13 +350,13 @@ function vvvvwbi(has_defaults_vvvvwbi,datatype_vvvvwbi) jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field - if (!jform_vvvvwbiwan_required) + if (!jform_vvvvwbivxm_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbiwan_required = true; + jform_vvvvwbivxm_required = true; } } } @@ -416,26 +416,26 @@ function vvvvwbj(datatype_vvvvwbj,has_defaults_vvvvwbj) { jQuery('#jform_store').closest('.control-group').show(); // add required attribute to store field - if (jform_vvvvwbjwao_required) + if (jform_vvvvwbjvxn_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); - jform_vvvvwbjwao_required = false; + jform_vvvvwbjvxn_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); // remove required attribute from store field - if (!jform_vvvvwbjwao_required) + if (!jform_vvvvwbjvxn_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); - jform_vvvvwbjwao_required = true; + jform_vvvvwbjvxn_required = true; } } } @@ -722,46 +722,46 @@ function vvvvwbo(has_defaults_vvvvwbo) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwbowap_required) + if (jform_vvvvwbovxo_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwbowap_required = false; + jform_vvvvwbovxo_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwbowaq_required) + if (jform_vvvvwbovxp_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_vvvvwbowaq_required = false; + jform_vvvvwbovxp_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwbowap_required) + if (!jform_vvvvwbovxo_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwbowap_required = true; + jform_vvvvwbovxo_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwbowaq_required) + if (!jform_vvvvwbovxp_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_vvvvwbowaq_required = true; + jform_vvvvwbovxp_required = true; } } } @@ -810,9 +810,9 @@ jQuery(document).ready(function($) }); function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 71a6b21b1..6937a7a24 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,12 +9,11 @@ */ // Some Global Values -jform_vvvvwbzwbc_required = false; -jform_vvvvwcawbd_required = false; -jform_vvvvwcbwbe_required = false; -jform_vvvvwccwbf_required = false; -jform_vvvvwcdwbg_required = false; -jform_vvvvwcewbh_required = false; +jform_vvvvwbzvyb_required = false; +jform_vvvvwcavyc_required = false; +jform_vvvvwcbvyd_required = false; +jform_vvvvwccvye_required = false; +jform_vvvvwcevyf_required = false; // Initial Script jQuery(document).ready(function() @@ -46,26 +45,26 @@ function vvvvwbz(location_vvvvwbz) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwbzwbc_required) + if (jform_vvvvwbzvyb_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_vvvvwbzwbc_required = false; + jform_vvvvwbzvyb_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwbzwbc_required) + if (!jform_vvvvwbzvyb_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_vvvvwbzwbc_required = true; + jform_vvvvwbzvyb_required = true; } } } @@ -78,26 +77,26 @@ function vvvvwca(location_vvvvwca) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwcawbd_required) + if (jform_vvvvwcavyc_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_vvvvwcawbd_required = false; + jform_vvvvwcavyc_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwcawbd_required) + if (!jform_vvvvwcavyc_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_vvvvwcawbd_required = true; + jform_vvvvwcavyc_required = true; } } } @@ -123,26 +122,26 @@ function vvvvwcb(type_vvvvwcb) { jQuery('#jform_url').closest('.control-group').show(); // add required attribute to url field - if (jform_vvvvwcbwbe_required) + if (jform_vvvvwcbvyd_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwcbwbe_required = false; + jform_vvvvwcbvyd_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); // remove required attribute from url field - if (!jform_vvvvwcbwbe_required) + if (!jform_vvvvwcbvyd_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwcbwbe_required = true; + jform_vvvvwcbvyd_required = true; } } } @@ -179,26 +178,26 @@ function vvvvwcc(type_vvvvwcc) { jQuery('#jform_article').closest('.control-group').show(); // add required attribute to article field - if (jform_vvvvwccwbf_required) + if (jform_vvvvwccvye_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwccwbf_required = false; + jform_vvvvwccvye_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); // remove required attribute from article field - if (!jform_vvvvwccwbf_required) + if (!jform_vvvvwccvye_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwccwbf_required = true; + jform_vvvvwccvye_required = true; } } } @@ -234,28 +233,10 @@ function vvvvwcd(type_vvvvwcd) if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - // add required attribute to content field - if (jform_vvvvwcdwbg_required) - { - updateFieldRequired('content',0); - jQuery('#jform_content').prop('required','required'); - jQuery('#jform_content').attr('aria-required',true); - jQuery('#jform_content').addClass('required'); - jform_vvvvwcdwbg_required = false; - } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - // remove required attribute from content field - if (!jform_vvvvwcdwbg_required) - { - updateFieldRequired('content',1); - jQuery('#jform_content').removeAttr('required'); - jQuery('#jform_content').removeAttr('aria-required'); - jQuery('#jform_content').removeClass('required'); - jform_vvvvwcdwbg_required = true; - } } } @@ -278,26 +259,26 @@ function vvvvwce(target_vvvvwce) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwcewbh_required) + if (jform_vvvvwcevyf_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwcewbh_required = false; + jform_vvvvwcevyf_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwcewbh_required) + if (!jform_vvvvwcevyf_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwcewbh_required = true; + jform_vvvvwcevyf_required = true; } } } diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml index 1aafa6873..f6a9bf71e 100644 --- a/admin/models/forms/help_document.xml +++ b/admin/models/forms/help_document.xml @@ -176,7 +176,6 @@ height="300 px" buttons="false" filter="safehtml" - required="true" /> 0 && identifier.length > 0 && key.length > 0){ - var request = 'token='+token+'&identifier='+identifier+'&key='+key; + var request = token+'=1&identifier='+identifier+'&key='+key; } return jQuery.ajax({ type: 'GET', @@ -1132,9 +866,9 @@ function getAjaxDisplay(type){ } function getAjaxDisplay_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type=' + type; + var request = token+'=1&type=' + type; } return jQuery.ajax({ type: 'GET', @@ -1165,9 +899,9 @@ function dasboardSwitch(value){ function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', @@ -1206,7 +940,7 @@ function isObject(obj) { function addButtonID_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0 && size > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -1231,7 +965,7 @@ function addButtonID(type, where, size){ function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index 2eeedcb3a..8cabf38ab 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -176,7 +176,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -229,7 +228,6 @@ buttons="false" editor="none" filter="raw" - required="true" /> @@ -318,7 +315,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -335,7 +331,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -366,7 +361,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -461,7 +455,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -509,7 +502,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -541,7 +533,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -579,7 +570,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -598,7 +588,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -645,7 +634,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -677,7 +665,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -708,7 +695,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/language_translation.js b/admin/models/forms/language_translation.js index 393b31333..26c4bcace 100644 --- a/admin/models/forms/language_translation.js +++ b/admin/models/forms/language_translation.js @@ -23,7 +23,7 @@ function addData(result,where){ function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index 182ca629e..1996b5f44 100644 --- a/admin/models/forms/layout.js +++ b/admin/models/forms/layout.js @@ -8,9 +8,6 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -// Some Global Values -jform_vvvvvzfvzb_required = false; - // Initial Script jQuery(document).ready(function() { @@ -25,58 +22,13 @@ function vvvvvzf(add_php_view_vvvvvzf) if (add_php_view_vvvvvzf == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); - // add required attribute to php_view field - if (jform_vvvvvzfvzb_required) - { - updateFieldRequired('php_view',0); - jQuery('#jform_php_view').prop('required','required'); - jQuery('#jform_php_view').attr('aria-required',true); - jQuery('#jform_php_view').addClass('required'); - jform_vvvvvzfvzb_required = false; - } } else { jQuery('#jform_php_view-lbl').closest('.control-group').hide(); - // remove required attribute from php_view field - if (!jform_vvvvvzfvzb_required) - { - updateFieldRequired('php_view',1); - jQuery('#jform_php_view').removeAttr('required'); - jQuery('#jform_php_view').removeAttr('aria-required'); - jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvzfvzb_required = true; - } } } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); - - if(status == 1) - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required+','+name; - } - else - { - not_required = ','+name; - } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - - jQuery('#jform_not_required').val(not_required); -} - // the isSet function function isSet(val) { @@ -94,9 +46,9 @@ jQuery(document).ready(function($) }); function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', @@ -133,9 +85,9 @@ function isObject(obj) { } function getSnippetDetails_server(snippetId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"); if(token.length > 0 && snippetId > 0){ - var request = 'token='+token+'&id='+snippetId; + var request = token+'=1&id='+snippetId; } return jQuery.ajax({ type: 'GET', @@ -182,9 +134,9 @@ function getSnippetDetails(id){ } function getDynamicValues_server(dynamicId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"); if(token.length > 0 && dynamicId > 0){ - var request = 'token='+token+'&view=layout&id='+dynamicId; + var request = token+'=1&view=layout&id='+dynamicId; } return jQuery.ajax({ type: 'GET', @@ -209,9 +161,9 @@ function getDynamicValues(id){ } function getLayoutDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -254,7 +206,7 @@ jQuery(document).ready(function($) function getSnippets_server(libraries){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json"; if(token.length > 0 && libraries.length > 0){ - var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + var request = token+'=1&libraries='+JSON.stringify(libraries); } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/layout.xml b/admin/models/forms/layout.xml index 501f0fa0e..fc260118f 100644 --- a/admin/models/forms/layout.xml +++ b/admin/models/forms/layout.xml @@ -153,7 +153,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -192,7 +191,6 @@ syntax="html" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js index 6c3d5b0da..7007280d1 100644 --- a/admin/models/forms/library.js +++ b/admin/models/forms/library.js @@ -9,8 +9,8 @@ */ // Some Global Values -jform_vvvvwamwaa_required = false; -jform_vvvvwaswab_required = false; +jform_vvvvwamvxd_required = false; +jform_vvvvwasvxe_required = false; // Initial Script jQuery(document).ready(function() @@ -99,26 +99,26 @@ function vvvvwam(how_vvvvwam) { jQuery('#jform_php_setdocument').closest('.control-group').show(); // add required attribute to php_setdocument field - if (jform_vvvvwamwaa_required) + if (jform_vvvvwamvxd_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_vvvvwamwaa_required = false; + jform_vvvvwamvxd_required = false; } } else { jQuery('#jform_php_setdocument').closest('.control-group').hide(); // remove required attribute from php_setdocument field - if (!jform_vvvvwamwaa_required) + if (!jform_vvvvwamvxd_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_vvvvwamwaa_required = true; + jform_vvvvwamvxd_required = true; } } } @@ -342,26 +342,26 @@ function vvvvwas(type_vvvvwas) { jQuery('#jform_libraries').closest('.control-group').show(); // add required attribute to libraries field - if (jform_vvvvwaswab_required) + if (jform_vvvvwasvxe_required) { updateFieldRequired('libraries',0); jQuery('#jform_libraries').prop('required','required'); jQuery('#jform_libraries').attr('aria-required',true); jQuery('#jform_libraries').addClass('required'); - jform_vvvvwaswab_required = false; + jform_vvvvwasvxe_required = false; } } else { jQuery('#jform_libraries').closest('.control-group').hide(); // remove required attribute from libraries field - if (!jform_vvvvwaswab_required) + if (!jform_vvvvwasvxe_required) { updateFieldRequired('libraries',1); jQuery('#jform_libraries').removeAttr('required'); jQuery('#jform_libraries').removeAttr('aria-required'); jQuery('#jform_libraries').removeClass('required'); - jform_vvvvwaswab_required = true; + jform_vvvvwasvxe_required = true; } } } @@ -430,9 +430,9 @@ function getAjaxDisplay(type){ } function getAjaxDisplay_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod); if (token.length > 0 && type.length > 0) { - var request = 'token='+token+'&type=' + type; + var request = token+'=1&type=' + type; } return jQuery.ajax({ type: 'GET', @@ -444,9 +444,9 @@ function getAjaxDisplay_server(type){ } function getFieldSelectOptions_server(fieldId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json&raw=true"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json&raw=true"); if (token.length > 0 && fieldId > 0) { - var request = 'token='+token+'&id='+fieldId; + var request = token+'=1&id='+fieldId; } return jQuery.ajax({ type: 'GET', @@ -472,9 +472,9 @@ function getFieldSelectOptions(fieldKey){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', @@ -513,7 +513,7 @@ function isObject(obj) { function addButtonID_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0 && size > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -538,7 +538,7 @@ function addButtonID(type, where, size){ function addButton_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type='+type+'&size='+size; + var request = token+'=1&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -563,9 +563,9 @@ function addButton(type, where, size){ } function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type='+type; + var request = token+'=1&type='+type; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/placeholder.js b/admin/models/forms/placeholder.js index 871f1b71d..0968bf924 100644 --- a/admin/models/forms/placeholder.js +++ b/admin/models/forms/placeholder.js @@ -18,7 +18,6 @@ jQuery(document).ready(function() // check if this function name is taken checkPlaceholderName(placeholderName); }); - function setPlaceholderName(){ // noting for now (we may add more functionality later) } diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index 0a0f955ac..6483e214f 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -9,15 +9,15 @@ */ // Some Global Values -jform_vvvvwbpwas_required = false; -jform_vvvvwbpwat_required = false; -jform_vvvvwbpwau_required = false; -jform_vvvvwbpwav_required = false; -jform_vvvvwbpwaw_required = false; -jform_vvvvwbqwax_required = false; -jform_vvvvwbrway_required = false; -jform_vvvvwbtwaz_required = false; -jform_vvvvwbvwba_required = false; +jform_vvvvwbpvxr_required = false; +jform_vvvvwbpvxs_required = false; +jform_vvvvwbpvxt_required = false; +jform_vvvvwbpvxu_required = false; +jform_vvvvwbpvxv_required = false; +jform_vvvvwbqvxw_required = false; +jform_vvvvwbrvxx_required = false; +jform_vvvvwbtvxy_required = false; +jform_vvvvwbvvxz_required = false; // Initial Script jQuery(document).ready(function() @@ -66,108 +66,108 @@ function vvvvwbp(protocol_vvvvwbp) { jQuery('#jform_authentication').closest('.control-group').show(); // add required attribute to authentication field - if (jform_vvvvwbpwas_required) + if (jform_vvvvwbpvxr_required) { updateFieldRequired('authentication',0); jQuery('#jform_authentication').prop('required','required'); jQuery('#jform_authentication').attr('aria-required',true); jQuery('#jform_authentication').addClass('required'); - jform_vvvvwbpwas_required = false; + jform_vvvvwbpvxr_required = false; } jQuery('#jform_host').closest('.control-group').show(); // add required attribute to host field - if (jform_vvvvwbpwat_required) + if (jform_vvvvwbpvxs_required) { updateFieldRequired('host',0); jQuery('#jform_host').prop('required','required'); jQuery('#jform_host').attr('aria-required',true); jQuery('#jform_host').addClass('required'); - jform_vvvvwbpwat_required = false; + jform_vvvvwbpvxs_required = false; } jQuery('#jform_port').closest('.control-group').show(); // add required attribute to port field - if (jform_vvvvwbpwau_required) + if (jform_vvvvwbpvxt_required) { updateFieldRequired('port',0); jQuery('#jform_port').prop('required','required'); jQuery('#jform_port').attr('aria-required',true); jQuery('#jform_port').addClass('required'); - jform_vvvvwbpwau_required = false; + jform_vvvvwbpvxt_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field - if (jform_vvvvwbpwav_required) + if (jform_vvvvwbpvxu_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvwbpwav_required = false; + jform_vvvvwbpvxu_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_vvvvwbpwaw_required) + if (jform_vvvvwbpvxv_required) { updateFieldRequired('username',0); jQuery('#jform_username').prop('required','required'); jQuery('#jform_username').attr('aria-required',true); jQuery('#jform_username').addClass('required'); - jform_vvvvwbpwaw_required = false; + jform_vvvvwbpvxv_required = false; } } else { jQuery('#jform_authentication').closest('.control-group').hide(); // remove required attribute from authentication field - if (!jform_vvvvwbpwas_required) + if (!jform_vvvvwbpvxr_required) { updateFieldRequired('authentication',1); jQuery('#jform_authentication').removeAttr('required'); jQuery('#jform_authentication').removeAttr('aria-required'); jQuery('#jform_authentication').removeClass('required'); - jform_vvvvwbpwas_required = true; + jform_vvvvwbpvxr_required = true; } jQuery('#jform_host').closest('.control-group').hide(); // remove required attribute from host field - if (!jform_vvvvwbpwat_required) + if (!jform_vvvvwbpvxs_required) { updateFieldRequired('host',1); jQuery('#jform_host').removeAttr('required'); jQuery('#jform_host').removeAttr('aria-required'); jQuery('#jform_host').removeClass('required'); - jform_vvvvwbpwat_required = true; + jform_vvvvwbpvxs_required = true; } jQuery('#jform_port').closest('.control-group').hide(); // remove required attribute from port field - if (!jform_vvvvwbpwau_required) + if (!jform_vvvvwbpvxt_required) { updateFieldRequired('port',1); jQuery('#jform_port').removeAttr('required'); jQuery('#jform_port').removeAttr('aria-required'); jQuery('#jform_port').removeClass('required'); - jform_vvvvwbpwau_required = true; + jform_vvvvwbpvxt_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field - if (!jform_vvvvwbpwav_required) + if (!jform_vvvvwbpvxu_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvwbpwav_required = true; + jform_vvvvwbpvxu_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_vvvvwbpwaw_required) + if (!jform_vvvvwbpvxv_required) { updateFieldRequired('username',1); jQuery('#jform_username').removeAttr('required'); jQuery('#jform_username').removeAttr('aria-required'); jQuery('#jform_username').removeClass('required'); - jform_vvvvwbpwaw_required = true; + jform_vvvvwbpvxv_required = true; } } } @@ -205,13 +205,13 @@ function vvvvwbq(protocol_vvvvwbq) jQuery('.note_ftp_signature').closest('.control-group').show(); jQuery('#jform_signature').closest('.control-group').show(); // add required attribute to signature field - if (jform_vvvvwbqwax_required) + if (jform_vvvvwbqvxw_required) { updateFieldRequired('signature',0); jQuery('#jform_signature').prop('required','required'); jQuery('#jform_signature').attr('aria-required',true); jQuery('#jform_signature').addClass('required'); - jform_vvvvwbqwax_required = false; + jform_vvvvwbqvxw_required = false; } } else @@ -219,13 +219,13 @@ function vvvvwbq(protocol_vvvvwbq) jQuery('.note_ftp_signature').closest('.control-group').hide(); jQuery('#jform_signature').closest('.control-group').hide(); // remove required attribute from signature field - if (!jform_vvvvwbqwax_required) + if (!jform_vvvvwbqvxw_required) { updateFieldRequired('signature',1); jQuery('#jform_signature').removeAttr('required'); jQuery('#jform_signature').removeAttr('aria-required'); jQuery('#jform_signature').removeClass('required'); - jform_vvvvwbqwax_required = true; + jform_vvvvwbqvxw_required = true; } } } @@ -274,26 +274,26 @@ function vvvvwbr(protocol_vvvvwbr,authentication_vvvvwbr) { jQuery('#jform_password').closest('.control-group').show(); // add required attribute to password field - if (jform_vvvvwbrway_required) + if (jform_vvvvwbrvxx_required) { updateFieldRequired('password',0); jQuery('#jform_password').prop('required','required'); jQuery('#jform_password').attr('aria-required',true); jQuery('#jform_password').addClass('required'); - jform_vvvvwbrway_required = false; + jform_vvvvwbrvxx_required = false; } } else { jQuery('#jform_password').closest('.control-group').hide(); // remove required attribute from password field - if (!jform_vvvvwbrway_required) + if (!jform_vvvvwbrvxx_required) { updateFieldRequired('password',1); jQuery('#jform_password').removeAttr('required'); jQuery('#jform_password').removeAttr('aria-required'); jQuery('#jform_password').removeClass('required'); - jform_vvvvwbrway_required = true; + jform_vvvvwbrvxx_required = true; } } } @@ -353,26 +353,26 @@ function vvvvwbt(protocol_vvvvwbt,authentication_vvvvwbt) { jQuery('#jform_private').closest('.control-group').show(); // add required attribute to private field - if (jform_vvvvwbtwaz_required) + if (jform_vvvvwbtvxy_required) { updateFieldRequired('private',0); jQuery('#jform_private').prop('required','required'); jQuery('#jform_private').attr('aria-required',true); jQuery('#jform_private').addClass('required'); - jform_vvvvwbtwaz_required = false; + jform_vvvvwbtvxy_required = false; } } else { jQuery('#jform_private').closest('.control-group').hide(); // remove required attribute from private field - if (!jform_vvvvwbtwaz_required) + if (!jform_vvvvwbtvxy_required) { updateFieldRequired('private',1); jQuery('#jform_private').removeAttr('required'); jQuery('#jform_private').removeAttr('aria-required'); jQuery('#jform_private').removeClass('required'); - jform_vvvvwbtwaz_required = true; + jform_vvvvwbtvxy_required = true; } } } @@ -432,26 +432,26 @@ function vvvvwbv(protocol_vvvvwbv,authentication_vvvvwbv) { jQuery('#jform_private_key').closest('.control-group').show(); // add required attribute to private_key field - if (jform_vvvvwbvwba_required) + if (jform_vvvvwbvvxz_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_vvvvwbvwba_required = false; + jform_vvvvwbvvxz_required = false; } } else { jQuery('#jform_private_key').closest('.control-group').hide(); // remove required attribute from private_key field - if (!jform_vvvvwbvwba_required) + if (!jform_vvvvwbvvxz_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_vvvvwbvwba_required = true; + jform_vvvvwbvvxz_required = true; } } } diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index 815d76d84..4cacc0c55 100644 --- a/admin/models/forms/site_view.js +++ b/admin/models/forms/site_view.js @@ -8,19 +8,6 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -// Some Global Values -jform_vvvvvytvyp_required = false; -jform_vvvvvyuvyq_required = false; -jform_vvvvvyvvyr_required = false; -jform_vvvvvywvys_required = false; -jform_vvvvvyxvyt_required = false; -jform_vvvvvyyvyu_required = false; -jform_vvvvvyzvyv_required = false; -jform_vvvvvzavyw_required = false; -jform_vvvvvzbvyx_required = false; -jform_vvvvvzcvyy_required = false; -jform_vvvvvzcvyz_required = false; - // Initial Script jQuery(document).ready(function() { @@ -65,28 +52,10 @@ function vvvvvyt(add_php_view_vvvvvyt) if (add_php_view_vvvvvyt == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); - // add required attribute to php_view field - if (jform_vvvvvytvyp_required) - { - updateFieldRequired('php_view',0); - jQuery('#jform_php_view').prop('required','required'); - jQuery('#jform_php_view').attr('aria-required',true); - jQuery('#jform_php_view').addClass('required'); - jform_vvvvvytvyp_required = false; - } } else { jQuery('#jform_php_view-lbl').closest('.control-group').hide(); - // remove required attribute from php_view field - if (!jform_vvvvvytvyp_required) - { - updateFieldRequired('php_view',1); - jQuery('#jform_php_view').removeAttr('required'); - jQuery('#jform_php_view').removeAttr('aria-required'); - jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvytvyp_required = true; - } } } @@ -97,28 +66,10 @@ function vvvvvyu(add_php_jview_display_vvvvvyu) if (add_php_jview_display_vvvvvyu == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); - // add required attribute to php_jview_display field - if (jform_vvvvvyuvyq_required) - { - updateFieldRequired('php_jview_display',0); - jQuery('#jform_php_jview_display').prop('required','required'); - jQuery('#jform_php_jview_display').attr('aria-required',true); - jQuery('#jform_php_jview_display').addClass('required'); - jform_vvvvvyuvyq_required = false; - } } else { jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide(); - // remove required attribute from php_jview_display field - if (!jform_vvvvvyuvyq_required) - { - updateFieldRequired('php_jview_display',1); - jQuery('#jform_php_jview_display').removeAttr('required'); - jQuery('#jform_php_jview_display').removeAttr('aria-required'); - jQuery('#jform_php_jview_display').removeClass('required'); - jform_vvvvvyuvyq_required = true; - } } } @@ -129,28 +80,10 @@ function vvvvvyv(add_php_jview_vvvvvyv) if (add_php_jview_vvvvvyv == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); - // add required attribute to php_jview field - if (jform_vvvvvyvvyr_required) - { - updateFieldRequired('php_jview',0); - jQuery('#jform_php_jview').prop('required','required'); - jQuery('#jform_php_jview').attr('aria-required',true); - jQuery('#jform_php_jview').addClass('required'); - jform_vvvvvyvvyr_required = false; - } } else { jQuery('#jform_php_jview-lbl').closest('.control-group').hide(); - // remove required attribute from php_jview field - if (!jform_vvvvvyvvyr_required) - { - updateFieldRequired('php_jview',1); - jQuery('#jform_php_jview').removeAttr('required'); - jQuery('#jform_php_jview').removeAttr('aria-required'); - jQuery('#jform_php_jview').removeClass('required'); - jform_vvvvvyvvyr_required = true; - } } } @@ -161,28 +94,10 @@ function vvvvvyw(add_php_document_vvvvvyw) if (add_php_document_vvvvvyw == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); - // add required attribute to php_document field - if (jform_vvvvvywvys_required) - { - updateFieldRequired('php_document',0); - jQuery('#jform_php_document').prop('required','required'); - jQuery('#jform_php_document').attr('aria-required',true); - jQuery('#jform_php_document').addClass('required'); - jform_vvvvvywvys_required = false; - } } else { jQuery('#jform_php_document-lbl').closest('.control-group').hide(); - // remove required attribute from php_document field - if (!jform_vvvvvywvys_required) - { - updateFieldRequired('php_document',1); - jQuery('#jform_php_document').removeAttr('required'); - jQuery('#jform_php_document').removeAttr('aria-required'); - jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvywvys_required = true; - } } } @@ -193,28 +108,10 @@ function vvvvvyx(add_css_document_vvvvvyx) if (add_css_document_vvvvvyx == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); - // add required attribute to css_document field - if (jform_vvvvvyxvyt_required) - { - updateFieldRequired('css_document',0); - jQuery('#jform_css_document').prop('required','required'); - jQuery('#jform_css_document').attr('aria-required',true); - jQuery('#jform_css_document').addClass('required'); - jform_vvvvvyxvyt_required = false; - } } else { jQuery('#jform_css_document-lbl').closest('.control-group').hide(); - // remove required attribute from css_document field - if (!jform_vvvvvyxvyt_required) - { - updateFieldRequired('css_document',1); - jQuery('#jform_css_document').removeAttr('required'); - jQuery('#jform_css_document').removeAttr('aria-required'); - jQuery('#jform_css_document').removeClass('required'); - jform_vvvvvyxvyt_required = true; - } } } @@ -225,28 +122,10 @@ function vvvvvyy(add_javascript_file_vvvvvyy) if (add_javascript_file_vvvvvyy == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); - // add required attribute to javascript_file field - if (jform_vvvvvyyvyu_required) - { - updateFieldRequired('javascript_file',0); - jQuery('#jform_javascript_file').prop('required','required'); - jQuery('#jform_javascript_file').attr('aria-required',true); - jQuery('#jform_javascript_file').addClass('required'); - jform_vvvvvyyvyu_required = false; - } } else { jQuery('#jform_javascript_file-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_file field - if (!jform_vvvvvyyvyu_required) - { - updateFieldRequired('javascript_file',1); - jQuery('#jform_javascript_file').removeAttr('required'); - jQuery('#jform_javascript_file').removeAttr('aria-required'); - jQuery('#jform_javascript_file').removeClass('required'); - jform_vvvvvyyvyu_required = true; - } } } @@ -257,28 +136,10 @@ function vvvvvyz(add_js_document_vvvvvyz) if (add_js_document_vvvvvyz == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); - // add required attribute to js_document field - if (jform_vvvvvyzvyv_required) - { - updateFieldRequired('js_document',0); - jQuery('#jform_js_document').prop('required','required'); - jQuery('#jform_js_document').attr('aria-required',true); - jQuery('#jform_js_document').addClass('required'); - jform_vvvvvyzvyv_required = false; - } } else { jQuery('#jform_js_document-lbl').closest('.control-group').hide(); - // remove required attribute from js_document field - if (!jform_vvvvvyzvyv_required) - { - updateFieldRequired('js_document',1); - jQuery('#jform_js_document').removeAttr('required'); - jQuery('#jform_js_document').removeAttr('aria-required'); - jQuery('#jform_js_document').removeClass('required'); - jform_vvvvvyzvyv_required = true; - } } } @@ -289,28 +150,10 @@ function vvvvvza(add_css_vvvvvza) if (add_css_vvvvvza == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); - // add required attribute to css field - if (jform_vvvvvzavyw_required) - { - updateFieldRequired('css',0); - jQuery('#jform_css').prop('required','required'); - jQuery('#jform_css').attr('aria-required',true); - jQuery('#jform_css').addClass('required'); - jform_vvvvvzavyw_required = false; - } } else { jQuery('#jform_css-lbl').closest('.control-group').hide(); - // remove required attribute from css field - if (!jform_vvvvvzavyw_required) - { - updateFieldRequired('css',1); - jQuery('#jform_css').removeAttr('required'); - jQuery('#jform_css').removeAttr('aria-required'); - jQuery('#jform_css').removeClass('required'); - jform_vvvvvzavyw_required = true; - } } } @@ -322,29 +165,11 @@ function vvvvvzb(add_php_ajax_vvvvvzb) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); - // add required attribute to php_ajaxmethod field - if (jform_vvvvvzbvyx_required) - { - updateFieldRequired('php_ajaxmethod',0); - jQuery('#jform_php_ajaxmethod').prop('required','required'); - jQuery('#jform_php_ajaxmethod').attr('aria-required',true); - jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvzbvyx_required = false; - } } else { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide(); - // remove required attribute from php_ajaxmethod field - if (!jform_vvvvvzbvyx_required) - { - updateFieldRequired('php_ajaxmethod',1); - jQuery('#jform_php_ajaxmethod').removeAttr('required'); - jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); - jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvzbvyx_required = true; - } } } @@ -356,49 +181,13 @@ function vvvvvzc(add_custom_button_vvvvvzc) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); - // add required attribute to php_controller field - if (jform_vvvvvzcvyy_required) - { - updateFieldRequired('php_controller',0); - jQuery('#jform_php_controller').prop('required','required'); - jQuery('#jform_php_controller').attr('aria-required',true); - jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvzcvyy_required = false; - } jQuery('#jform_php_model-lbl').closest('.control-group').show(); - // add required attribute to php_model field - if (jform_vvvvvzcvyz_required) - { - updateFieldRequired('php_model',0); - jQuery('#jform_php_model').prop('required','required'); - jQuery('#jform_php_model').attr('aria-required',true); - jQuery('#jform_php_model').addClass('required'); - jform_vvvvvzcvyz_required = false; - } } else { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); - // remove required attribute from php_controller field - if (!jform_vvvvvzcvyy_required) - { - updateFieldRequired('php_controller',1); - jQuery('#jform_php_controller').removeAttr('required'); - jQuery('#jform_php_controller').removeAttr('aria-required'); - jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvzcvyy_required = true; - } jQuery('#jform_php_model-lbl').closest('.control-group').hide(); - // remove required attribute from php_model field - if (!jform_vvvvvzcvyz_required) - { - updateFieldRequired('php_model',1); - jQuery('#jform_php_model').removeAttr('required'); - jQuery('#jform_php_model').removeAttr('aria-required'); - jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvzcvyz_required = true; - } } } @@ -440,33 +229,6 @@ function button_position_vvvvvzd_SomeFunc(button_position_vvvvvzd) return false; } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); - - if(status == 1) - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required+','+name; - } - else - { - not_required = ','+name; - } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - - jQuery('#jform_not_required').val(not_required); -} - // the isSet function function isSet(val) { @@ -486,9 +248,9 @@ jQuery(document).ready(function() }); function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type > 0){ - var request = 'token='+token+'&type='+type; + var request = token+'=1&type='+type; } return jQuery.ajax({ type: 'GET', @@ -508,9 +270,9 @@ function getLinked(){ } function getSnippetDetails_server(snippetId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"); if(token.length > 0 && snippetId > 0){ - var request = 'token='+token+'&id='+snippetId; + var request = token+'=1&id='+snippetId; } return jQuery.ajax({ type: 'GET', @@ -557,9 +319,9 @@ function getSnippetDetails(id){ } function getDynamicValues_server(dynamicId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"); if(token.length > 0 && dynamicId > 0){ - var request = 'token='+token+'&view=site_view&id='+dynamicId; + var request = token+'=1&view=site_view&id='+dynamicId; } return jQuery.ajax({ type: 'GET', @@ -584,9 +346,9 @@ function getDynamicValues(id){ } function getLayoutDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -610,9 +372,9 @@ function getLayoutDetails(id){ } function getTemplateDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -655,7 +417,7 @@ jQuery(document).ready(function($) function getSnippets_server(libraries){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json"; if(token.length > 0 && libraries.length > 0){ - var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + var request = token+'=1&libraries='+JSON.stringify(libraries); } return jQuery.ajax({ type: 'GET', @@ -708,9 +470,9 @@ function setSnippets(array){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/site_view.xml b/admin/models/forms/site_view.xml index b9c3f5a57..eff581b52 100644 --- a/admin/models/forms/site_view.xml +++ b/admin/models/forms/site_view.xml @@ -156,7 +156,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -173,7 +172,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -262,7 +260,6 @@ syntax="html" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -296,7 +293,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -319,7 +315,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -345,7 +340,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> @@ -376,7 +370,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -407,7 +400,6 @@ syntax="javascript" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -564,7 +556,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -593,7 +584,6 @@ syntax="css" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -620,7 +610,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -1246,7 +1235,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="false" validate="code" /> diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index efbc1d633..34290a7bb 100644 --- a/admin/models/forms/template.js +++ b/admin/models/forms/template.js @@ -8,9 +8,6 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -// Some Global Values -jform_vvvvvzevza_required = false; - // Initial Script jQuery(document).ready(function() { @@ -25,58 +22,13 @@ function vvvvvze(add_php_view_vvvvvze) if (add_php_view_vvvvvze == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); - // add required attribute to php_view field - if (jform_vvvvvzevza_required) - { - updateFieldRequired('php_view',0); - jQuery('#jform_php_view').prop('required','required'); - jQuery('#jform_php_view').attr('aria-required',true); - jQuery('#jform_php_view').addClass('required'); - jform_vvvvvzevza_required = false; - } } else { jQuery('#jform_php_view-lbl').closest('.control-group').hide(); - // remove required attribute from php_view field - if (!jform_vvvvvzevza_required) - { - updateFieldRequired('php_view',1); - jQuery('#jform_php_view').removeAttr('required'); - jQuery('#jform_php_view').removeAttr('aria-required'); - jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvzevza_required = true; - } } } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); - - if(status == 1) - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required+','+name; - } - else - { - not_required = ','+name; - } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - - jQuery('#jform_not_required').val(not_required); -} - // the isSet function function isSet(val) { @@ -94,9 +46,9 @@ jQuery(document).ready(function($) }); function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', @@ -133,9 +85,9 @@ function isObject(obj) { } function getSnippetDetails_server(snippetId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json"); if(token.length > 0 && snippetId > 0){ - var request = 'token='+token+'&id='+snippetId; + var request = token+'=1&id='+snippetId; } return jQuery.ajax({ type: 'GET', @@ -182,9 +134,9 @@ function getSnippetDetails(id){ } function getDynamicValues_server(dynamicId){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json"); if(token.length > 0 && dynamicId > 0){ - var request = 'token='+token+'&view=template&id='+dynamicId; + var request = token+'=1&view=template&id='+dynamicId; } return jQuery.ajax({ type: 'GET', @@ -209,9 +161,9 @@ function getDynamicValues(id){ } function getLayoutDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -235,9 +187,9 @@ function getLayoutDetails(id){ } function getTemplateDetails_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -280,7 +232,7 @@ jQuery(document).ready(function($) function getSnippets_server(libraries){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json"; if(token.length > 0 && libraries.length > 0){ - var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + var request = token+'=1&libraries='+JSON.stringify(libraries); } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/forms/template.xml b/admin/models/forms/template.xml index 81d006e0f..bd1133ec5 100644 --- a/admin/models/forms/template.xml +++ b/admin/models/forms/template.xml @@ -142,7 +142,6 @@ syntax="php" editor="codemirror|none" filter="raw" - required="true" validate="code" /> @@ -181,7 +180,6 @@ syntax="html" editor="codemirror|none" filter="raw" - required="true" validate="code" /> diff --git a/admin/models/forms/validation_rule.js b/admin/models/forms/validation_rule.js index 992c3fdc9..56bf6de28 100644 --- a/admin/models/forms/validation_rule.js +++ b/admin/models/forms/validation_rule.js @@ -32,9 +32,9 @@ jQuery(document).ready(function() }); function getExistingValidationRuleCode_server(rulefilename){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json"); if(token.length > 0 && rulefilename.length > 0){ - var request = 'token='+token+'&name='+rulefilename; + var request = token+'=1&name='+rulefilename; } return jQuery.ajax({ type: 'GET', @@ -84,9 +84,9 @@ function checkRuleName(ruleName) { } // check Function Name function checkRuleName_server(ruleName, ide){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json"; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json"); if(token.length > 0){ - var request = 'token='+token+'&name='+ruleName+'&id='+ide; + var request = token+'=1&name='+ruleName+'&id='+ide; } return jQuery.ajax({ type: 'POST', @@ -98,9 +98,9 @@ function checkRuleName_server(ruleName, ide){ } function getEditCustomCodeButtons_server(id){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id+'&return_here='+return_here; + var request = token+'=1&id='+id+'&return_here='+return_here; } return jQuery.ajax({ type: 'GET', diff --git a/admin/models/layout.php b/admin/models/layout.php index 76abad48b..135bc4d5a 100644 --- a/admin/models/layout.php +++ b/admin/models/layout.php @@ -456,42 +456,6 @@ class ComponentbuilderModelLayout extends JModelAdmin return $data; } - /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ - public function validate($form, $data, $group = null) - { - // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) - { - $requiredFields = (array) explode(',',(string) $data['not_required']); - $requiredFields = array_unique($requiredFields); - // now change the required field attributes value - foreach ($requiredFields as $requiredField) - { - // make sure there is a string value - if (ComponentbuilderHelper::checkString($requiredField)) - { - // change to false - $form->setFieldAttribute($requiredField, 'required', 'false'); - // also clear the data set - $data[$requiredField] = ''; - } - } - } - return parent::validate($form, $data, $group); - } - /** * Method to get the unique fields of this table. * diff --git a/admin/models/server.php b/admin/models/server.php index ce83d23e8..c526099f1 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -179,7 +179,7 @@ class ComponentbuilderModelServer extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.server'); } } - $this->sales_serverupdate_servervvvw = $item->id; + $this->sales_serverorupdate_servervvvw = $item->id; return $item; } @@ -189,7 +189,7 @@ class ComponentbuilderModelServer extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWbblinked_components() + public function getVyalinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -203,19 +203,19 @@ class ComponentbuilderModelServer extends JModelAdmin // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - // Filter by sales_serverupdate_servervvvw global. - $sales_serverupdate_servervvvw = $this->sales_serverupdate_servervvvw; - if (is_numeric($sales_serverupdate_servervvvw )) + // Filter by sales_serverorupdate_servervvvw global. + $sales_serverorupdate_servervvvw = $this->sales_serverorupdate_servervvvw; + if (is_numeric($sales_serverorupdate_servervvvw )) { - $query->where('a.sales_server = ' . (int) $sales_serverupdate_servervvvw . ' OR a.update_server = ' . (int) $sales_serverupdate_servervvvw, ' OR'); + $query->where('a.sales_serverORupdate_server = ' . (int) $sales_serverorupdate_servervvvw ); } - elseif (is_string($sales_serverupdate_servervvvw)) + elseif (is_string($sales_serverorupdate_servervvvw)) { - $query->where('a.sales_server = ' . $db->quote($sales_serverupdate_servervvvw) . ' OR a.update_server = ' . $db->quote($sales_serverupdate_servervvvw), ' OR'); + $query->where('a.sales_serverORupdate_server = ' . $db->quote($sales_serverorupdate_servervvvw)); } else { - $query->where('a.update_server = -5'); + $query->where('a.sales_serverORupdate_server = -5'); } // Join over the asset groups. diff --git a/admin/models/site_view.php b/admin/models/site_view.php index 8192eefa8..38cf0d417 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -625,42 +625,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin return $data; } - /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ - public function validate($form, $data, $group = null) - { - // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) - { - $requiredFields = (array) explode(',',(string) $data['not_required']); - $requiredFields = array_unique($requiredFields); - // now change the required field attributes value - foreach ($requiredFields as $requiredField) - { - // make sure there is a string value - if (ComponentbuilderHelper::checkString($requiredField)) - { - // change to false - $form->setFieldAttribute($requiredField, 'required', 'false'); - // also clear the data set - $data[$requiredField] = ''; - } - } - } - return parent::validate($form, $data, $group); - } - /** * Method to get the unique fields of this table. * diff --git a/admin/models/template.php b/admin/models/template.php index 91d6ceabb..82ab2241d 100644 --- a/admin/models/template.php +++ b/admin/models/template.php @@ -456,42 +456,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin return $data; } - /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ - public function validate($form, $data, $group = null) - { - // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) - { - $requiredFields = (array) explode(',',(string) $data['not_required']); - $requiredFields = array_unique($requiredFields); - // now change the required field attributes value - foreach ($requiredFields as $requiredField) - { - // make sure there is a string value - if (ComponentbuilderHelper::checkString($requiredField)) - { - // change to false - $form->setFieldAttribute($requiredField, 'required', 'false'); - // also clear the data set - $data[$requiredField] = ''; - } - } - } - return parent::validate($form, $data, $group); - } - /** * Method to get the unique fields of this table. * diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index 35293dbf6..4fa567151 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -130,5 +130,22 @@ jQuery(document).ready(function(){ }); } }); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/admin_fields_relations/tmpl/edit.php b/admin/views/admin_fields_relations/tmpl/edit.php index 732d6d559..833e790e8 100644 --- a/admin/views/admin_fields_relations/tmpl/edit.php +++ b/admin/views/admin_fields_relations/tmpl/edit.php @@ -103,4 +103,27 @@ $componentParams = $this->params; // will be removed just use $this->params inst - + + + diff --git a/admin/views/compiler/tmpl/default.php b/admin/views/compiler/tmpl/default.php index 4d1a32449..2da0f0f65 100644 --- a/admin/views/compiler/tmpl/default.php +++ b/admin/views/compiler/tmpl/default.php @@ -67,20 +67,21 @@ Joomla.submitbutton = function(task) } // Add spindle-wheel for importations: jQuery(document).ready(function($) { - var outerDiv = $('body'); - - $('
') - .css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat") - .css("top", outerDiv.position().top - $(window).scrollTop()) - .css("left", outerDiv.position().left - $(window).scrollLeft()) - .css("width", outerDiv.width()) - .css("height", outerDiv.height()) - .css("position", "fixed") - .css("opacity", "0.80") - .css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)") - .css("filter", "alpha(opacity = 80)") - .css("display", "none") - .appendTo(outerDiv); + +// waiting spinner +var outerDiv = jQuery('body'); +jQuery('
') + .css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat") + .css("top", outerDiv.position().top - jQuery(window).scrollTop()) + .css("left", outerDiv.position().left - jQuery(window).scrollLeft()) + .css("width", outerDiv.width()) + .css("height", outerDiv.height()) + .css("position", "fixed") + .css("opacity", "0.80") + .css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)") + .css("filter", "alpha(opacity = 80)") + .css("display", "none") + .appendTo(outerDiv); }); sidebar)): ?> diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index a814874f9..f18cfc7ee 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -233,7 +233,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy function getComponentDetails_server(id){ var getUrl = JRouter(\"index.php?option=com_componentbuilder&task=ajax.getComponentDetails&format=json\"); if(token.length > 0 && id > 0){ - var request = 'token='+token+'&id='+id; + var request = token+'=1&id='+id; } return jQuery.ajax({ type: 'GET', @@ -278,7 +278,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy var getUrl = JRouter(\"index.php?option=com_componentbuilder&task=ajax.isRead&format=json\"); } if(token.length > 0 && notice.length){ - var request = \"token=\"+token+\"¬ice=\"+notice; + var request = token+\"=1¬ice=\"+notice; } return jQuery.ajax({ type: \"POST\", diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index 6fbb3b9eb..be38a716d 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -103,4 +103,27 @@ $componentParams = $this->params; // will be removed just use $this->params inst - + + + diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index bfb648fda..7c857a543 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -396,7 +396,24 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} jQuery(document).ready(function(){ jQuery(document).on('subform-row-add', function(event, row){ getIconImage(jQuery(row).find('.icomoon342')); diff --git a/admin/views/custom_code/tmpl/edit.php b/admin/views/custom_code/tmpl/edit.php index 1a9d78088..3dfe0c6c8 100644 --- a/admin/views/custom_code/tmpl/edit.php +++ b/admin/views/custom_code/tmpl/edit.php @@ -266,5 +266,22 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/dynamic_get/tmpl/edit.php b/admin/views/dynamic_get/tmpl/edit.php index 8a35153e3..a109f91a6 100644 --- a/admin/views/dynamic_get/tmpl/edit.php +++ b/admin/views/dynamic_get/tmpl/edit.php @@ -663,20 +663,17 @@ jQuery(document).ready(function(){ }); }); - $funcName): ?>jQuery('#adminForm').on('change', '#jform__table_main',function (e) { // get options var value_ = jQuery("#jform__table_main option:selected").val(); getTableColumns(value_, 'a', '', 3, true, '', ''); }); - // #jform_add_php_router_parse listeners jQuery('#jform_add_php_router_parse').on('change',function() { var valueSwitch = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); getDynamicScripts(valueSwitch); }); - jQuery('#adminForm').on('change', '#jform_select_all',function (e) { e.preventDefault(); @@ -685,7 +682,23 @@ jQuery('#adminForm').on('change', '#jform_select_all',function (e) setSelectAll(select_all); }); - + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} // nice little dot trick :) jQuery(document).ready( function($) { diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 7a6fa1bef..349d9d967 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -492,4 +492,23 @@ jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) }); + + + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/fieldtype/view.html.php b/admin/views/fieldtype/view.html.php index c5392c3f2..b06162dc0 100644 --- a/admin/views/fieldtype/view.html.php +++ b/admin/views/fieldtype/view.html.php @@ -57,7 +57,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy } // Get Linked view data - $this->warfields = $this->get('Warfields'); + $this->vxqfields = $this->get('Vxqfields'); // Set the toolbar $this->addToolBar(); diff --git a/admin/views/get_snippets/tmpl/default.php b/admin/views/get_snippets/tmpl/default.php index 9a032bcdf..7940efa28 100644 --- a/admin/views/get_snippets/tmpl/default.php +++ b/admin/views/get_snippets/tmpl/default.php @@ -226,7 +226,24 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +}

diff --git a/admin/views/languages/tmpl/default.php b/admin/views/languages/tmpl/default.php index 8dea911ad..8203eaf96 100644 --- a/admin/views/languages/tmpl/default.php +++ b/admin/views/languages/tmpl/default.php @@ -85,6 +85,7 @@ if ($this->saveOrder) diff --git a/admin/views/library/tmpl/edit.php b/admin/views/library/tmpl/edit.php index 65d34ea39..1f5bbd2ad 100644 --- a/admin/views/library/tmpl/edit.php +++ b/admin/views/library/tmpl/edit.php @@ -319,5 +319,5 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); diff --git a/admin/views/placeholder/tmpl/edit.php b/admin/views/placeholder/tmpl/edit.php index 86a95b352..a4dfa13be 100644 --- a/admin/views/placeholder/tmpl/edit.php +++ b/admin/views/placeholder/tmpl/edit.php @@ -134,5 +134,22 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/server/view.html.php b/admin/views/server/view.html.php index 0f720c642..a6e4ef3a8 100644 --- a/admin/views/server/view.html.php +++ b/admin/views/server/view.html.php @@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy } // Get Linked view data - $this->wbblinked_components = $this->get('Wbblinked_components'); + $this->vyalinked_components = $this->get('Vyalinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/admin/views/site_view/tmpl/edit.php b/admin/views/site_view/tmpl/edit.php index 87242ca70..df756a40c 100644 --- a/admin/views/site_view/tmpl/edit.php +++ b/admin/views/site_view/tmpl/edit.php @@ -414,7 +414,24 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} jQuery(document).ready(function(){ jQuery(document).on('subform-row-add', function(event, row){ getIconImage(jQuery(row).find('.icomoon342')); diff --git a/admin/views/template/tmpl/edit.php b/admin/views/template/tmpl/edit.php index 84da6a428..5200a4574 100644 --- a/admin/views/template/tmpl/edit.php +++ b/admin/views/template/tmpl/edit.php @@ -213,5 +213,22 @@ jQuery(document).ready(function() { }); // some lang strings var select_a_snippet = ''; -var create_a_snippet = ''; +var create_a_snippet = ''; + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/validation_rule/tmpl/edit.php b/admin/views/validation_rule/tmpl/edit.php index d12d3b46a..a5bcd9d69 100644 --- a/admin/views/validation_rule/tmpl/edit.php +++ b/admin/views/validation_rule/tmpl/edit.php @@ -121,14 +121,12 @@ jQuery('#componentbuilder_loader').on('change', '#jform_inherit',function (e) { var rulefilename = jQuery("#jform_inherit option:selected").val(); getExistingValidationRuleCode(rulefilename); }); - jQuery('#componentbuilder_loader').on('change', '#jform_name',function (e) { var ruleName = jQuery('#jform_name').val(); // check if this rule name is taken checkRuleName(ruleName); }); - // nice little dot trick :) jQuery(document).ready( function($) { @@ -141,5 +139,22 @@ jQuery(document).ready( function($) { } $(".loading-dots").text(dots); } , 500); -}); +}); + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/componentbuilder.xml b/componentbuilder.xml index 91d56596e..38c5fd33e 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 6th July, 2019 + 8th July, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 2b4801c52..ee36b9328 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -124,6 +124,65 @@ abstract class ComponentbuilderHelper 'JPATH_THEMES' => JPATH_THEMES ); + /** + * get the method code + * + * @input int The method ID + * + * @returns string on success + **/ + public static function getMethodCode($id) + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.params','a.code'))); + $query->from($db->quoteName('#__componentbuilder_method','a')); + $query->where($db->quoteName('a.id') . ' = ' . (int) $id); + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_method'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // get the method + $method = $db->loadObject; + // combine method values + $combinded = array(); + // add comment if set + if (self::checkString($method->comment)) + { + $combinded[] = $method->comment; + } + // set the method sginature + $combinded[] = "\t" . $method->visibility . ' function ' . $method->name . '(' . $method->params . ')'; + // set the method code + $combinded[] = "\t" . "{"; + // add comment if set + if (self::checkString($method->code)) + { + $combinded[] = $method->code; + } + else + { + $combinded[] = "\t\t// add your code here"; + } + $combinded[] = "\t" . "}"; + // return the method + return implode(PHP_EOL, $combinded); + } + return false; + } + /** * Making class or function name safe * -- 2.40.1 From e476bcb7b5b6c90f6065e33148d782512a4e0638 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 15 Jul 2019 22:00:46 +0200 Subject: [PATCH 02/13] Added the main GUI for the plugin area, gh-436 --- README.md | 14 +- admin/README.txt | 14 +- admin/access.xml | 102 +- admin/assets/css/class_extendings.css | 13 + admin/assets/css/class_extends.css | 13 + admin/assets/css/class_method.css | 13 + admin/assets/css/class_methods.css | 13 + admin/assets/css/class_properties.css | 13 + admin/assets/css/class_property.css | 13 + admin/assets/css/joomla_plugin.css | 13 + admin/assets/css/joomla_plugin_group.css | 13 + admin/assets/css/joomla_plugin_groups.css | 13 + admin/assets/css/joomla_plugins.css | 13 + .../images/icons/joomla_component_add.png | Bin 13685 -> 0 bytes admin/assets/images/icons/joomla_plugins.png | Bin 0 -> 28509 bytes admin/controller.php | 7 +- admin/controllers/ajax.json.php | 80 + admin/controllers/class_extendings.php | 43 + admin/controllers/class_extends.php | 321 ++++ admin/controllers/class_method.php | 321 ++++ admin/controllers/class_methods.php | 106 ++ admin/controllers/class_properties.php | 106 ++ admin/controllers/class_property.php | 321 ++++ admin/controllers/joomla_plugin.php | 321 ++++ admin/controllers/joomla_plugin_group.php | 314 ++++ admin/controllers/joomla_plugin_groups.php | 43 + admin/controllers/joomla_plugins.php | 182 +++ admin/controllers/validation_rules.php | 41 + admin/helpers/componentbuilder.php | 537 ++++++- .../en-GB/en-GB.com_componentbuilder.ini | 476 +++++- .../en-GB/en-GB.com_componentbuilder.sys.ini | 113 +- .../class_extends/details_fullwidth.php | 44 + admin/layouts/class_extends/details_left.php | 43 + admin/layouts/class_extends/details_right.php | 42 + admin/layouts/class_extends/index.html | 1 + admin/layouts/class_extends/publishing.php | 45 + admin/layouts/class_extends/publlshing.php | 47 + .../class_method/details_fullwidth.php | 44 + admin/layouts/class_method/details_left.php | 46 + admin/layouts/class_method/details_right.php | 42 + admin/layouts/class_method/index.html | 1 + admin/layouts/class_method/publishing.php | 45 + admin/layouts/class_method/publlshing.php | 47 + admin/layouts/class_property/details_left.php | 46 + .../layouts/class_property/details_right.php | 42 + admin/layouts/class_property/index.html | 1 + admin/layouts/class_property/publishing.php | 45 + admin/layouts/class_property/publlshing.php | 47 + .../dashboard_fullwidth.php | 1 + admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../joomla_plugin/configparams_fullwidth.php | 44 + admin/layouts/joomla_plugin/details_above.php | 46 + .../joomla_plugin/details_fullwidth.php | 44 + admin/layouts/joomla_plugin/details_left.php | 43 + admin/layouts/joomla_plugin/details_right.php | 43 + admin/layouts/joomla_plugin/index.html | 1 + admin/layouts/joomla_plugin/publishing.php | 45 + admin/layouts/joomla_plugin/publlshing.php | 47 + .../joomla_plugin_group/details_left.php | 42 + .../joomla_plugin_group/details_right.php | 42 + admin/layouts/joomla_plugin_group/index.html | 1 + .../joomla_plugin_group/publishing.php | 45 + .../joomla_plugin_group/publlshing.php | 47 + .../server/linked_components_fullwidth.php | 2 +- admin/models/ajax.php | 25 +- admin/models/class_extendings.php | 297 ++++ admin/models/class_extends.php | 907 +++++++++++ admin/models/class_method.php | 958 ++++++++++++ admin/models/class_methods.php | 431 ++++++ admin/models/class_properties.php | 429 +++++ admin/models/class_property.php | 943 +++++++++++ admin/models/component_dashboard.php | 1 + admin/models/componentbuilder.php | 21 +- admin/models/fields/classextends.php | 174 +++ admin/models/fields/joomlaplugingroups.php | 174 +++ admin/models/fields/pluginsclassmethods.php | 81 + .../models/fields/pluginsclassproperties.php | 81 + admin/models/fieldtype.php | 12 +- admin/models/forms/admin_view.js | 456 +++--- admin/models/forms/class_extends.js | 11 + admin/models/forms/class_extends.xml | 176 +++ admin/models/forms/class_method.js | 111 ++ admin/models/forms/class_method.xml | 217 +++ admin/models/forms/class_property.js | 111 ++ admin/models/forms/class_property.xml | 201 +++ admin/models/forms/component_dashboard.xml | 28 +- admin/models/forms/custom_admin_view.js | 100 +- admin/models/forms/custom_code.js | 84 +- admin/models/forms/dynamic_get.js | 1378 ++++++++--------- admin/models/forms/field.js | 242 +-- admin/models/forms/fieldtype.js | 928 +++++------ admin/models/forms/help_document.js | 164 +- admin/models/forms/joomla_plugin.js | 491 ++++++ admin/models/forms/joomla_plugin.xml | 260 ++++ admin/models/forms/joomla_plugin_group.js | 11 + admin/models/forms/joomla_plugin_group.xml | 138 ++ admin/models/forms/layout.js | 10 +- admin/models/forms/library.js | 416 ++--- admin/models/forms/server.js | 688 ++++---- admin/models/forms/site_view.js | 128 +- admin/models/forms/template.js | 10 +- admin/models/forms/validation_rule.js | 14 +- admin/models/joomla_plugin.php | 1007 ++++++++++++ admin/models/joomla_plugin_group.php | 859 ++++++++++ admin/models/joomla_plugin_groups.php | 250 +++ admin/models/joomla_plugins.php | 571 +++++++ admin/models/server.php | 2 +- admin/models/validation_rule.php | 7 + admin/sql/install.mysql.utf8.sql | 153 ++ admin/sql/uninstall.mysql.utf8.sql | 5 + admin/sql/updates/mysql/2.9.21.sql | 59 + admin/sql/updates/mysql/2.9.31.sql | 92 ++ admin/tables/class_extends.php | 321 ++++ admin/tables/class_method.php | 321 ++++ admin/tables/class_property.php | 321 ++++ admin/tables/joomla_plugin.php | 321 ++++ admin/tables/joomla_plugin_group.php | 321 ++++ admin/views/admin_view/tmpl/edit.php | 368 ++--- admin/views/class_extendings/index.html | 1 + admin/views/class_extendings/tmpl/default.php | 85 + .../tmpl/default_batch_body.php | 18 + .../tmpl/default_batch_footer.php | 23 + .../class_extendings/tmpl/default_body.php | 97 ++ .../class_extendings/tmpl/default_foot.php | 18 + .../class_extendings/tmpl/default_head.php | 50 + .../class_extendings/tmpl/default_toolbar.php | 45 + admin/views/class_extendings/tmpl/index.html | 1 + admin/views/class_extendings/view.html.php | 294 ++++ admin/views/class_extends/submitbutton.js | 25 + admin/views/class_extends/tmpl/edit.php | 111 ++ admin/views/class_extends/tmpl/index.html | 1 + admin/views/class_extends/view.html.php | 195 +++ admin/views/class_method/submitbutton.js | 25 + admin/views/class_method/tmpl/edit.php | 130 ++ admin/views/class_method/tmpl/index.html | 1 + admin/views/class_method/view.html.php | 195 +++ admin/views/class_methods/index.html | 1 + admin/views/class_methods/tmpl/default.php | 85 + .../class_methods/tmpl/default_batch_body.php | 18 + .../tmpl/default_batch_footer.php | 23 + .../views/class_methods/tmpl/default_body.php | 108 ++ .../views/class_methods/tmpl/default_foot.php | 18 + .../views/class_methods/tmpl/default_head.php | 53 + .../class_methods/tmpl/default_toolbar.php | 45 + admin/views/class_methods/tmpl/index.html | 1 + admin/views/class_methods/view.html.php | 371 +++++ admin/views/class_properties/index.html | 1 + admin/views/class_properties/tmpl/default.php | 85 + .../tmpl/default_batch_body.php | 18 + .../tmpl/default_batch_footer.php | 23 + .../class_properties/tmpl/default_body.php | 108 ++ .../class_properties/tmpl/default_foot.php | 18 + .../class_properties/tmpl/default_head.php | 53 + .../class_properties/tmpl/default_toolbar.php | 45 + admin/views/class_properties/tmpl/index.html | 1 + admin/views/class_properties/view.html.php | 371 +++++ admin/views/class_property/submitbutton.js | 25 + admin/views/class_property/tmpl/edit.php | 125 ++ admin/views/class_property/tmpl/index.html | 1 + admin/views/class_property/view.html.php | 195 +++ admin/views/custom_admin_view/tmpl/edit.php | 100 +- admin/views/custom_code/tmpl/edit.php | 144 +- admin/views/dynamic_get/tmpl/edit.php | 454 +++--- admin/views/field/tmpl/edit.php | 108 +- admin/views/fieldtype/tmpl/edit.php | 470 +++--- admin/views/fieldtype/view.html.php | 2 +- admin/views/help_document/tmpl/edit.php | 60 +- admin/views/joomla_plugin/submitbutton.js | 25 + admin/views/joomla_plugin/tmpl/edit.php | 224 +++ admin/views/joomla_plugin/tmpl/index.html | 1 + admin/views/joomla_plugin/view.html.php | 216 +++ .../views/joomla_plugin_group/submitbutton.js | 25 + admin/views/joomla_plugin_group/tmpl/edit.php | 106 ++ .../views/joomla_plugin_group/tmpl/index.html | 1 + admin/views/joomla_plugin_group/view.html.php | 195 +++ admin/views/joomla_plugin_groups/index.html | 1 + .../joomla_plugin_groups/tmpl/default.php | 85 + .../tmpl/default_batch_body.php | 18 + .../tmpl/default_batch_footer.php | 23 + .../tmpl/default_body.php | 103 ++ .../tmpl/default_foot.php | 18 + .../tmpl/default_head.php | 50 + .../tmpl/default_toolbar.php | 45 + .../joomla_plugin_groups/tmpl/index.html | 1 + .../views/joomla_plugin_groups/view.html.php | 258 +++ admin/views/joomla_plugins/index.html | 1 + admin/views/joomla_plugins/tmpl/default.php | 108 ++ .../tmpl/default_batch_body.php | 18 + .../tmpl/default_batch_footer.php | 23 + .../joomla_plugins/tmpl/default_body.php | 112 ++ .../joomla_plugins/tmpl/default_foot.php | 18 + .../joomla_plugins/tmpl/default_head.php | 53 + .../joomla_plugins/tmpl/default_toolbar.php | 45 + admin/views/joomla_plugins/tmpl/index.html | 1 + admin/views/joomla_plugins/view.html.php | 371 +++++ admin/views/layout/tmpl/edit.php | 10 +- admin/views/library/tmpl/edit.php | 130 +- admin/views/server/tmpl/edit.php | 154 +- admin/views/server/view.html.php | 2 +- admin/views/site_view/tmpl/edit.php | 110 +- admin/views/template/tmpl/edit.php | 10 +- admin/views/validation_rules/view.html.php | 5 + componentbuilder.xml | 7 +- componentbuilder_update_server.xml | 34 + script.php | 641 +++++++- site/helpers/componentbuilder.php | 533 ++++++- 206 files changed, 25317 insertions(+), 3509 deletions(-) create mode 100644 admin/assets/css/class_extendings.css create mode 100644 admin/assets/css/class_extends.css create mode 100644 admin/assets/css/class_method.css create mode 100644 admin/assets/css/class_methods.css create mode 100644 admin/assets/css/class_properties.css create mode 100644 admin/assets/css/class_property.css create mode 100644 admin/assets/css/joomla_plugin.css create mode 100644 admin/assets/css/joomla_plugin_group.css create mode 100644 admin/assets/css/joomla_plugin_groups.css create mode 100644 admin/assets/css/joomla_plugins.css delete mode 100644 admin/assets/images/icons/joomla_component_add.png create mode 100644 admin/assets/images/icons/joomla_plugins.png create mode 100644 admin/controllers/class_extendings.php create mode 100644 admin/controllers/class_extends.php create mode 100644 admin/controllers/class_method.php create mode 100644 admin/controllers/class_methods.php create mode 100644 admin/controllers/class_properties.php create mode 100644 admin/controllers/class_property.php create mode 100644 admin/controllers/joomla_plugin.php create mode 100644 admin/controllers/joomla_plugin_group.php create mode 100644 admin/controllers/joomla_plugin_groups.php create mode 100644 admin/controllers/joomla_plugins.php create mode 100644 admin/layouts/class_extends/details_fullwidth.php create mode 100644 admin/layouts/class_extends/details_left.php create mode 100644 admin/layouts/class_extends/details_right.php create mode 100644 admin/layouts/class_extends/index.html create mode 100644 admin/layouts/class_extends/publishing.php create mode 100644 admin/layouts/class_extends/publlshing.php create mode 100644 admin/layouts/class_method/details_fullwidth.php create mode 100644 admin/layouts/class_method/details_left.php create mode 100644 admin/layouts/class_method/details_right.php create mode 100644 admin/layouts/class_method/index.html create mode 100644 admin/layouts/class_method/publishing.php create mode 100644 admin/layouts/class_method/publlshing.php create mode 100644 admin/layouts/class_property/details_left.php create mode 100644 admin/layouts/class_property/details_right.php create mode 100644 admin/layouts/class_property/index.html create mode 100644 admin/layouts/class_property/publishing.php create mode 100644 admin/layouts/class_property/publlshing.php create mode 100644 admin/layouts/joomla_plugin/configparams_fullwidth.php create mode 100644 admin/layouts/joomla_plugin/details_above.php create mode 100644 admin/layouts/joomla_plugin/details_fullwidth.php create mode 100644 admin/layouts/joomla_plugin/details_left.php create mode 100644 admin/layouts/joomla_plugin/details_right.php create mode 100644 admin/layouts/joomla_plugin/index.html create mode 100644 admin/layouts/joomla_plugin/publishing.php create mode 100644 admin/layouts/joomla_plugin/publlshing.php create mode 100644 admin/layouts/joomla_plugin_group/details_left.php create mode 100644 admin/layouts/joomla_plugin_group/details_right.php create mode 100644 admin/layouts/joomla_plugin_group/index.html create mode 100644 admin/layouts/joomla_plugin_group/publishing.php create mode 100644 admin/layouts/joomla_plugin_group/publlshing.php create mode 100644 admin/models/class_extendings.php create mode 100644 admin/models/class_extends.php create mode 100644 admin/models/class_method.php create mode 100644 admin/models/class_methods.php create mode 100644 admin/models/class_properties.php create mode 100644 admin/models/class_property.php create mode 100644 admin/models/fields/classextends.php create mode 100644 admin/models/fields/joomlaplugingroups.php create mode 100644 admin/models/fields/pluginsclassmethods.php create mode 100644 admin/models/fields/pluginsclassproperties.php create mode 100644 admin/models/forms/class_extends.js create mode 100644 admin/models/forms/class_extends.xml create mode 100644 admin/models/forms/class_method.js create mode 100644 admin/models/forms/class_method.xml create mode 100644 admin/models/forms/class_property.js create mode 100644 admin/models/forms/class_property.xml create mode 100644 admin/models/forms/joomla_plugin.js create mode 100644 admin/models/forms/joomla_plugin.xml create mode 100644 admin/models/forms/joomla_plugin_group.js create mode 100644 admin/models/forms/joomla_plugin_group.xml create mode 100644 admin/models/joomla_plugin.php create mode 100644 admin/models/joomla_plugin_group.php create mode 100644 admin/models/joomla_plugin_groups.php create mode 100644 admin/models/joomla_plugins.php create mode 100644 admin/sql/updates/mysql/2.9.21.sql create mode 100644 admin/sql/updates/mysql/2.9.31.sql create mode 100644 admin/tables/class_extends.php create mode 100644 admin/tables/class_method.php create mode 100644 admin/tables/class_property.php create mode 100644 admin/tables/joomla_plugin.php create mode 100644 admin/tables/joomla_plugin_group.php create mode 100644 admin/views/class_extendings/index.html create mode 100644 admin/views/class_extendings/tmpl/default.php create mode 100644 admin/views/class_extendings/tmpl/default_batch_body.php create mode 100644 admin/views/class_extendings/tmpl/default_batch_footer.php create mode 100644 admin/views/class_extendings/tmpl/default_body.php create mode 100644 admin/views/class_extendings/tmpl/default_foot.php create mode 100644 admin/views/class_extendings/tmpl/default_head.php create mode 100644 admin/views/class_extendings/tmpl/default_toolbar.php create mode 100644 admin/views/class_extendings/tmpl/index.html create mode 100644 admin/views/class_extendings/view.html.php create mode 100644 admin/views/class_extends/submitbutton.js create mode 100644 admin/views/class_extends/tmpl/edit.php create mode 100644 admin/views/class_extends/tmpl/index.html create mode 100644 admin/views/class_extends/view.html.php create mode 100644 admin/views/class_method/submitbutton.js create mode 100644 admin/views/class_method/tmpl/edit.php create mode 100644 admin/views/class_method/tmpl/index.html create mode 100644 admin/views/class_method/view.html.php create mode 100644 admin/views/class_methods/index.html create mode 100644 admin/views/class_methods/tmpl/default.php create mode 100644 admin/views/class_methods/tmpl/default_batch_body.php create mode 100644 admin/views/class_methods/tmpl/default_batch_footer.php create mode 100644 admin/views/class_methods/tmpl/default_body.php create mode 100644 admin/views/class_methods/tmpl/default_foot.php create mode 100644 admin/views/class_methods/tmpl/default_head.php create mode 100644 admin/views/class_methods/tmpl/default_toolbar.php create mode 100644 admin/views/class_methods/tmpl/index.html create mode 100644 admin/views/class_methods/view.html.php create mode 100644 admin/views/class_properties/index.html create mode 100644 admin/views/class_properties/tmpl/default.php create mode 100644 admin/views/class_properties/tmpl/default_batch_body.php create mode 100644 admin/views/class_properties/tmpl/default_batch_footer.php create mode 100644 admin/views/class_properties/tmpl/default_body.php create mode 100644 admin/views/class_properties/tmpl/default_foot.php create mode 100644 admin/views/class_properties/tmpl/default_head.php create mode 100644 admin/views/class_properties/tmpl/default_toolbar.php create mode 100644 admin/views/class_properties/tmpl/index.html create mode 100644 admin/views/class_properties/view.html.php create mode 100644 admin/views/class_property/submitbutton.js create mode 100644 admin/views/class_property/tmpl/edit.php create mode 100644 admin/views/class_property/tmpl/index.html create mode 100644 admin/views/class_property/view.html.php create mode 100644 admin/views/joomla_plugin/submitbutton.js create mode 100644 admin/views/joomla_plugin/tmpl/edit.php create mode 100644 admin/views/joomla_plugin/tmpl/index.html create mode 100644 admin/views/joomla_plugin/view.html.php create mode 100644 admin/views/joomla_plugin_group/submitbutton.js create mode 100644 admin/views/joomla_plugin_group/tmpl/edit.php create mode 100644 admin/views/joomla_plugin_group/tmpl/index.html create mode 100644 admin/views/joomla_plugin_group/view.html.php create mode 100644 admin/views/joomla_plugin_groups/index.html create mode 100644 admin/views/joomla_plugin_groups/tmpl/default.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/default_batch_body.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/default_batch_footer.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/default_body.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/default_foot.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/default_head.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/default_toolbar.php create mode 100644 admin/views/joomla_plugin_groups/tmpl/index.html create mode 100644 admin/views/joomla_plugin_groups/view.html.php create mode 100644 admin/views/joomla_plugins/index.html create mode 100644 admin/views/joomla_plugins/tmpl/default.php create mode 100644 admin/views/joomla_plugins/tmpl/default_batch_body.php create mode 100644 admin/views/joomla_plugins/tmpl/default_batch_footer.php create mode 100644 admin/views/joomla_plugins/tmpl/default_body.php create mode 100644 admin/views/joomla_plugins/tmpl/default_foot.php create mode 100644 admin/views/joomla_plugins/tmpl/default_head.php create mode 100644 admin/views/joomla_plugins/tmpl/default_toolbar.php create mode 100644 admin/views/joomla_plugins/tmpl/index.html create mode 100644 admin/views/joomla_plugins/view.html.php diff --git a/README.md b/README.md index b2a86bc53..1c130f6d8 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.21) 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.32) 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*: 8th July, 2019 -+ *Version*: 2.9.21 ++ *Last Build*: 15th July, 2019 ++ *Version*: 2.9.32 + *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*: **210080** -+ *Field count*: **1143** -+ *File count*: **1346** -+ *Folder count*: **209** ++ *Line count*: **232323** ++ *Field count*: **1221** ++ *File count*: **1497** ++ *Folder count*: **229** > 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 b2a86bc53..1c130f6d8 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.21) 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.32) 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*: 8th July, 2019 -+ *Version*: 2.9.21 ++ *Last Build*: 15th July, 2019 ++ *Version*: 2.9.32 + *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*: **210080** -+ *Field count*: **1143** -+ *File count*: **1346** -+ *Folder count*: **209** ++ *Line count*: **232323** ++ *Field count*: **1221** ++ *File count*: **1497** ++ *Folder count*: **229** > 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 f2126b51a..7e62111cc 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -71,6 +71,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -271,7 +305,6 @@ - @@ -281,6 +314,25 @@ + + + + + + + + + + + + + + + + + + + @@ -406,6 +458,7 @@ + @@ -430,6 +483,17 @@ +
+ + + + + + + + + +
@@ -497,6 +561,28 @@
+
+ + + + + + + + + +
+
+ + + + + + + + + +
@@ -774,6 +860,20 @@
+
+ + + + + + + + + +
+
+ +
diff --git a/admin/assets/css/class_extendings.css b/admin/assets/css/class_extendings.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/class_extendings.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/assets/css/class_extends.css b/admin/assets/css/class_extends.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/class_extends.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/assets/css/class_method.css b/admin/assets/css/class_method.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/class_method.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/assets/css/class_methods.css b/admin/assets/css/class_methods.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/class_methods.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/assets/css/class_properties.css b/admin/assets/css/class_properties.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/class_properties.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/assets/css/class_property.css b/admin/assets/css/class_property.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/class_property.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/assets/css/joomla_plugin.css b/admin/assets/css/joomla_plugin.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/joomla_plugin.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/assets/css/joomla_plugin_group.css b/admin/assets/css/joomla_plugin_group.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/joomla_plugin_group.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/assets/css/joomla_plugin_groups.css b/admin/assets/css/joomla_plugin_groups.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/joomla_plugin_groups.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/assets/css/joomla_plugins.css b/admin/assets/css/joomla_plugins.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/joomla_plugins.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/assets/images/icons/joomla_component_add.png b/admin/assets/images/icons/joomla_component_add.png deleted file mode 100644 index cf9ee7dc5251785b2a6569b88da954daa28627f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13685 zcmbVzV{~1Ow&;%8*lm&>JK4dGZ8vUg+qP}nYS7qL(^yT?*tQ$JeCM8X-}`aL{qfdV zUej1(tU2e3P>`4Sgh+r0002HoNs20c9R2^<;9)=Z1N;VK9|wGAF?DBUJ5y&j14k2p zkg=Vi2~f($z|2I+#K73YVbp{d0Dv;JP*HbQmy_i-va?|{_y>m3-Nya{8vx)HaJM%w zvNCZ78k(3{*z%EHbo7t{EsXg{zk%gIa`qx7<`$BkjwZ^U@+wB2Rz_ULqyqdvUU%*f z0yZYj20(WkYg;F7cRtd8(dGU)|K~OnDezw)&Q^S+|0R^VoB~k9&d~%2W@KeB0x>fK z+1VMH*}&}V%=ADO5HkxC=woGPU}ob6vvad>0RO#^esFU%Hsw|l75_J{k1IY>b7yCJ zZYCx-H#bH%Rz^EVGbUy(F0OxQu&^+EKrlFY*g6}yGuS$j{fC06iIb6|g}t+doh|Sm ziUx*uF3x ztp5`M3g&jsc24GY_COJ3b|C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_aO|@ z>y&=BZ4IdD{(Ia)T9Y(8<&a4h)6<;tw*C z?JUoIpE`!FE-q^f92^({Y=JX3!{9W!Jy*$M=Tgg(bVMZJCRqkE=W*N9GC#oVn=Iz&a5ubUX>_H z#&sW;r+ib}+uOG{o+jPeml>2th)+H}t(z|$c2qco7}a%zfQ9|BKGl$th7Or-Ww(dz zYEc(xG*UN+{p7PGb|sn@7uP+;C&>D8A|a_w^_Ees)e`$U*7FiYD>2;VG!BFUxMNMh zx<77(HQnFe!*_(PS;w&^1R=Y{iBG!!hGV+X#@60c-?nIkwe~fIO?z8s=L;!@;$xUd z2N^_IqL0Mm)aR-QUlkQ7JoH{l#wP#JkL{ee@OXdTAojc-rBYR-5^Uf&gnF*OS->*L?RZUl4lsl_dj zKt5NNmP=8{C0PcFFSN2}$COAY&A4MgEzPIf64~>>5B7N6>@N|&UlCh{r$yEMh!#WR z_Bm*M3@gdDYqOZ6VgTC2ongQ>07A0+O~u8_EGI$DA1gdJAVCzkdYU?TRK#iXIkD zaV8>f+UNO)Zx+qf+r<|Rp0MU=r;{X5v diff --git a/admin/assets/images/icons/joomla_plugins.png b/admin/assets/images/icons/joomla_plugins.png new file mode 100644 index 0000000000000000000000000000000000000000..72ea64609b2a29deab10579794d6e11396846830 GIT binary patch literal 28509 zcmV)lK%c*fP)gD);|1H_w?kPnZN|%kduH2h=M382x3@4QE_!wSKW1k8{DjGKrya)ji?Bs0;1$3 zQ8LUh3`3g0_KdD71# zBO*gj<)1py+0}WvuCA`=l0i*4QzK{Pu9sef)5F8xbZ^n!n4=h}`@b=N8M~A!JZnU?z>ldiVRod-#`1#pk zv)Q32^n$9Qv$G5J4fSYfXmD3oS2vZFmzAC`K3_;+D5|WiJVoF+S5Qz;R8mq}oRrk7 zrntDc>xaJA|7*t&3V@)Xpx#raOu6@-d+xdW;)^ei;fZZ+ZG~HPYabvXFOv=9sj2}& zp3vWlO#or{v%zj-aM<_@^p*?lZ5?Q6YyhbaXGLXYeQ9ZFadA;m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@Xj?BTdQWSkvj zqprbEL<+p&G3t>GTg4j}ly0)T$^v{Q)L?`IE^v`y>KPlJG!FbO390sfF@@|Pb% z$T=EM?4L>b*=^W{vm9ag-C_Yy12Ml?q+9pa=*xSvlB$&kjkdN#7Ox+@MwhQIv(Imn z+oh6IwaYFZR84i|Bu|yTd*JN(g_Q~lIid2+(N@N9W&NhvHz(T4`g;M;dws3|u-*MV zD5|i&-)I(m-_QFIODn;&O4i^H&>%o4M+jL?hcZ2!4h_$a#^R67=Dd5R(v)MrFV#A= zniPtnbZ$VZhivry*Ur-Ig%Wvj%)F}iOVCd=)F>16QK8o8{=*MWyiu;UOtWv6bZxit zd&9kl^7jvVz@N8kH}~G_TDDUtiS8$qDs3f{a2K!;D2fpa;dVKu#s|ZLkBlW_`=>MR z@u3LCBR%b4IX#q3_n=Jrk?sg-t23`b-e-CsWU z*6NWDK6#bjgCu3w{{|wrghn_2&SL*U{xr=AxuC> z9Rx=hqlt(oa_-8)A^slY2I)#4%znR|{dQ{Jr<(MB59XKYdYI2_%w_yUq ze1%F09s&1(#10xXVB)RJ-a6q#yHxW&tB3JLyB?%H^uE`&!`HnECDHvNl{vZA)2(_Z zxZf)OxlR6VKKL)|wNvh5r~E~~_Y!SC!MpY6KhsIy%?JJeOTQkbT<$^DRsAOVK@ 'joomla_components', + 'joomla_plugin' => 'joomla_plugins', 'admin_view' => 'admin_views', 'custom_admin_view' => 'custom_admin_views', 'site_view' => 'site_views', @@ -98,6 +99,8 @@ class ComponentbuilderController extends JControllerLegacy 'layout' => 'layouts', 'dynamic_get' => 'dynamic_gets', 'custom_code' => 'custom_codes', + 'class_property' => 'class_properties', + 'class_method' => 'class_methods', 'placeholder' => 'placeholders', 'library' => 'libraries', 'snippet' => 'snippets', @@ -124,7 +127,9 @@ class ComponentbuilderController extends JControllerLegacy 'component_placeholders' => 'components_placeholders', 'snippet_type' => 'snippet_types', 'library_config' => 'libraries_config', - 'library_files_folders_urls' => 'libraries_files_folders_urls' + 'library_files_folders_urls' => 'libraries_files_folders_urls', + 'class_extends' => 'class_extendings', + 'joomla_plugin_group' => 'joomla_plugin_groups' ); // check if this is a list view if (in_array($view, $views)) diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 53ff59742..3a4830f3b 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -31,6 +31,8 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getCronPath', 'ajax'); $this->registerTask('getJCBpackageInfo', 'ajax'); $this->registerTask('getCrowdinDetails', 'ajax'); + $this->registerTask('getClassCode', 'ajax'); + $this->registerTask('getClassCodeIds', 'ajax'); $this->registerTask('tableColumns', 'ajax'); $this->registerTask('fieldSelectOptions', 'ajax'); $this->registerTask('getDynamicScripts', 'ajax'); @@ -301,6 +303,84 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'getClassCode': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $idValue = $jinput->get('id', NULL, 'INT'); + $typeValue = $jinput->get('type', NULL, 'WORD'); + if($idValue && $typeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getClassCode($idValue, $typeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; + case 'getClassCodeIds': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $idValue = $jinput->get('id', NULL, 'INT'); + $typeValue = $jinput->get('type', NULL, 'WORD'); + if($idValue && $typeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getClassCodeIds($idValue, $typeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'tableColumns': try { diff --git a/admin/controllers/class_extendings.php b/admin/controllers/class_extendings.php new file mode 100644 index 000000000..fdd10006d --- /dev/null +++ b/admin/controllers/class_extendings.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'); + +/** + * Class_extendings Controller + */ +class ComponentbuilderControllerClass_extendings extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_CLASS_EXTENDINGS'; + + /** + * 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 = 'Class_extends', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } +} diff --git a/admin/controllers/class_extends.php b/admin/controllers/class_extends.php new file mode 100644 index 000000000..5464f7dd5 --- /dev/null +++ b/admin/controllers/class_extends.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'); + +/** + * Class_extends Controller + */ +class ComponentbuilderControllerClass_extends 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 = 'Class_extendings'; // 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('class_extends.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('class_extends.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('class_extends.access', 'com_componentbuilder.class_extends.' . (int) $recordId) && $user->authorise('class_extends.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('class_extends.edit.own', 'com_componentbuilder.class_extends.' . $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('class_extends.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('class_extends.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('Class_extends', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_extendings' . $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()) + { + return; + } + +} diff --git a/admin/controllers/class_method.php b/admin/controllers/class_method.php new file mode 100644 index 000000000..986fa6fb4 --- /dev/null +++ b/admin/controllers/class_method.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'); + +/** + * Class_method Controller + */ +class ComponentbuilderControllerClass_method 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 = 'Class_methods'; // 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('class_method.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('class_method.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('class_method.access', 'com_componentbuilder.class_method.' . (int) $recordId) && $user->authorise('class_method.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('class_method.edit', 'com_componentbuilder.class_method.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('class_method.edit.own', 'com_componentbuilder.class_method.' . $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('class_method.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('class_method.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('Class_method', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods' . $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()) + { + return; + } + +} diff --git a/admin/controllers/class_methods.php b/admin/controllers/class_methods.php new file mode 100644 index 000000000..af11b3c2c --- /dev/null +++ b/admin/controllers/class_methods.php @@ -0,0 +1,106 @@ + + * @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'); + +/** + * Class_methods Controller + */ +class ComponentbuilderControllerClass_methods extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_CLASS_METHODS'; + + /** + * 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 = 'Class_method', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } + + public function exportData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('class_method.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + JArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('Class_methods'); + // get the data to export + $data = $model->getExportData($pks); + if (ComponentbuilderHelper::checkArray($data)) + { + // now set the data to the spreadsheet + $date = JFactory::getDate(); + ComponentbuilderHelper::xls($data,'Class_methods_'.$date->format('jS_F_Y'),'Class methods exported ('.$date->format('jS F, Y').')','class methods'); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods', false), $message, 'error'); + return; + } + + + public function importData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('class_method.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + { + // Get the import model + $model = $this->getModel('Class_methods'); + // get the headers to import + $headers = $model->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + // Load headers to session. + $session = JFactory::getSession(); + $headers = json_encode($headers); + $session->set('class_method_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'class_methods'); + $session->set('dataType_VDM_IMPORTINTO', 'class_method'); + // Redirect to import view. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CLASS_METHODS'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message); + return; + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods', false), $message, 'error'); + return; + } +} diff --git a/admin/controllers/class_properties.php b/admin/controllers/class_properties.php new file mode 100644 index 000000000..80b1b40e0 --- /dev/null +++ b/admin/controllers/class_properties.php @@ -0,0 +1,106 @@ + + * @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'); + +/** + * Class_properties Controller + */ +class ComponentbuilderControllerClass_properties extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_CLASS_PROPERTIES'; + + /** + * 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 = 'Class_property', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } + + public function exportData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('class_property.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + JArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('Class_properties'); + // get the data to export + $data = $model->getExportData($pks); + if (ComponentbuilderHelper::checkArray($data)) + { + // now set the data to the spreadsheet + $date = JFactory::getDate(); + ComponentbuilderHelper::xls($data,'Class_properties_'.$date->format('jS_F_Y'),'Class properties exported ('.$date->format('jS F, Y').')','class properties'); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties', false), $message, 'error'); + return; + } + + + public function importData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('class_property.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + { + // Get the import model + $model = $this->getModel('Class_properties'); + // get the headers to import + $headers = $model->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + // Load headers to session. + $session = JFactory::getSession(); + $headers = json_encode($headers); + $session->set('class_property_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'class_properties'); + $session->set('dataType_VDM_IMPORTINTO', 'class_property'); + // Redirect to import view. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CLASS_PROPERTIES'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message); + return; + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties', false), $message, 'error'); + return; + } +} diff --git a/admin/controllers/class_property.php b/admin/controllers/class_property.php new file mode 100644 index 000000000..2dc93983d --- /dev/null +++ b/admin/controllers/class_property.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'); + +/** + * Class_property Controller + */ +class ComponentbuilderControllerClass_property 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 = 'Class_properties'; // 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('class_property.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('class_property.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('class_property.access', 'com_componentbuilder.class_property.' . (int) $recordId) && $user->authorise('class_property.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('class_property.edit', 'com_componentbuilder.class_property.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('class_property.edit.own', 'com_componentbuilder.class_property.' . $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('class_property.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('class_property.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('Class_property', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties' . $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()) + { + return; + } + +} diff --git a/admin/controllers/joomla_plugin.php b/admin/controllers/joomla_plugin.php new file mode 100644 index 000000000..9ed910e52 --- /dev/null +++ b/admin/controllers/joomla_plugin.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'); + +/** + * Joomla_plugin Controller + */ +class ComponentbuilderControllerJoomla_plugin 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'; // 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.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('joomla_plugin.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.access', 'com_componentbuilder.joomla_plugin.' . (int) $recordId) && $user->authorise('joomla_plugin.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('joomla_plugin.edit', 'com_componentbuilder.joomla_plugin.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('joomla_plugin.edit.own', 'com_componentbuilder.joomla_plugin.' . $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.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('joomla_plugin.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', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins' . $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()) + { + return; + } + +} diff --git a/admin/controllers/joomla_plugin_group.php b/admin/controllers/joomla_plugin_group.php new file mode 100644 index 000000000..b22c31396 --- /dev/null +++ b/admin/controllers/joomla_plugin_group.php @@ -0,0 +1,314 @@ + + * @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_group Controller + */ +class ComponentbuilderControllerJoomla_plugin_group 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_plugin_groups'; // 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_group.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return parent::allowAdd($data); + } + + /** + * 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; + + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('core.edit', 'com_componentbuilder.joomla_plugin_group.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('core.edit.own', 'com_componentbuilder.joomla_plugin_group.' . $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('core.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return parent::allowEdit($data, $key); + } + + /** + * 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_group', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugin_groups' . $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()) + { + return; + } + +} diff --git a/admin/controllers/joomla_plugin_groups.php b/admin/controllers/joomla_plugin_groups.php new file mode 100644 index 000000000..3cee15bba --- /dev/null +++ b/admin/controllers/joomla_plugin_groups.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_plugin_groups Controller + */ +class ComponentbuilderControllerJoomla_plugin_groups extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS'; + + /** + * 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_group', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } +} diff --git a/admin/controllers/joomla_plugins.php b/admin/controllers/joomla_plugins.php new file mode 100644 index 000000000..b78efc394 --- /dev/null +++ b/admin/controllers/joomla_plugins.php @@ -0,0 +1,182 @@ + + * @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 Controller + */ +class ComponentbuilderControllerJoomla_plugins extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGINS'; + + /** + * 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', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } + + public function exportData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('joomla_plugin.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + JArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('Joomla_plugins'); + // get the data to export + $data = $model->getExportData($pks); + if (ComponentbuilderHelper::checkArray($data)) + { + // now set the data to the spreadsheet + $date = JFactory::getDate(); + ComponentbuilderHelper::xls($data,'Joomla_plugins_'.$date->format('jS_F_Y'),'Joomla plugins exported ('.$date->format('jS F, Y').')','joomla plugins'); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false), $message, 'error'); + return; + } + + + public function importData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('joomla_plugin.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + { + // Get the import model + $model = $this->getModel('Joomla_plugins'); + // get the headers to import + $headers = $model->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + // Load headers to session. + $session = JFactory::getSession(); + $headers = json_encode($headers); + $session->set('joomla_plugin_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'joomla_plugins'); + $session->set('dataType_VDM_IMPORTINTO', 'joomla_plugin'); + // Redirect to import view. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_PLUGINS'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message); + return; + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false), $message, 'error'); + return; + } + + + /** + * Run the Expansion + * + * @return void + */ + public function runExpansion() + { + // Check for request forgeries + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + // check if user has the right + $user = JFactory::getUser(); + // set page redirect + $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false); + // set massage + $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); + // check if this user has the right to run expansion + if($user->authorise('joomla_plugins.run_expansion', 'com_componentbuilder')) + { + // set massage + $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); + // run expansion via API + $result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand'); + // is there a message returned + if (!is_numeric($result) && ComponentbuilderHelper::checkString($result)) + { + $this->setRedirect($redirect_url, $result); + return true; + } + elseif (is_numeric($result) && 1 == $result) + { + $message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB'); + $this->setRedirect($redirect_url, $message, 'message'); + return true; + } + } + $this->setRedirect($redirect_url, $message, 'error'); + return false; + } + + + /** + * get Boilerplate + * + * @return boolean + */ + public function getBoilerplate() + { + // Check for request forgeries + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + // check if user has the right + $user = JFactory::getUser(); + // set page redirect + $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false); + // set massage + $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE'); + // check if this user has the right to run expansion + if($user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder')) + { + // set massage + $message = JText::_('COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR'); + // Get the model + $model = $this->getModel('joomla_plugins'); + // check if there is any selections + if (!$model->getBoilerplate()) + { + $message = '' . JText::_('COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY') . ''; + $this->setRedirect($redirect_url, $message, 'message'); + return true; + } + } + $this->setRedirect($redirect_url, $message, 'error'); + return false; + } + +} diff --git a/admin/controllers/validation_rules.php b/admin/controllers/validation_rules.php index 02462dc22..ee89c1c18 100644 --- a/admin/controllers/validation_rules.php +++ b/admin/controllers/validation_rules.php @@ -102,5 +102,46 @@ class ComponentbuilderControllerValidation_rules extends JControllerAdmin $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error'); return; + } + + + /** + * Run the Expansion + * + * @return void + */ + public function runExpansion() + { + // Check for request forgeries + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + // check if user has the right + $user = JFactory::getUser(); + // set page redirect + $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false); + // set massage + $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); + // check if this user has the right to run expansion + if($user->authorise('validation_rules.run_expansion', 'com_componentbuilder')) + { + // set massage + $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); + // run expansion via API + $result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand'); + // is there a message returned + if (!is_numeric($result) && ComponentbuilderHelper::checkString($result)) + { + $this->setRedirect($redirect_url, $result); + return true; + } + elseif (is_numeric($result) && 1 == $result) + { + $message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB'); + $this->setRedirect($redirect_url, $message, 'message'); + return true; + } + } + $this->setRedirect($redirect_url, $message, 'error'); + return false; } + } diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index d3dfb9d3e..e21f8ffdb 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -70,6 +70,12 @@ abstract class ComponentbuilderHelper public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Community-Packages/git/trees/master"; public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Community-Packages/raw/master/"; + /** + * The bolerplate paths + **/ + public static $bolerplatePath = 'https://raw.githubusercontent.com/vdm-io/boilerplate/jcb/'; + public static $bolerplateAPI = 'https://api.github.com/repos/vdm-io/boilerplate/git/trees/jcb'; + // not needed at this time (maybe latter) public static $accessToken = ""; @@ -125,64 +131,509 @@ abstract class ComponentbuilderHelper ); /** - * get the method code + * get the class method or property * - * @input int The method ID + * @input int The method/property ID + * @input string The target type * * @returns string on success **/ - public static function getMethodCode($id) + public static function getClassCode($id, $type) { - // Get a db connection. - $db = JFactory::getDbo(); - // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.params','a.code'))); - $query->from($db->quoteName('#__componentbuilder_method','a')); - $query->where($db->quoteName('a.id') . ' = ' . (int) $id); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) + if ('property' === $type || 'method' === $type) { - $columns = $db->getTableColumns('#__componentbuilder_method'); - if(isset($columns['access'])) + // Get a db connection. + $db = JFactory::getDbo(); + // Get user object + $user = JFactory::getUser(); + // Create a new query object. + $query = $db->getQuery(true); + // get method + if ('method' === $type) { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); + $query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.arguments','a.code'))); } - } - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - // get the method - $method = $db->loadObject; - // combine method values - $combinded = array(); - // add comment if set - if (self::checkString($method->comment)) + // get property + elseif ('property' === $type) { - $combinded[] = $method->comment; + $query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.default'))); } - // set the method sginature - $combinded[] = "\t" . $method->visibility . ' function ' . $method->name . '(' . $method->params . ')'; - // set the method code - $combinded[] = "\t" . "{"; - // add comment if set - if (self::checkString($method->code)) + $query->from($db->quoteName('#__componentbuilder_class_' . $type,'a')); + $query->where($db->quoteName('a.id') . ' = ' . (int) $id); + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) { - $combinded[] = $method->code; + $columns = $db->getTableColumns('#__componentbuilder_class_' . $type); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } } - else + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) { - $combinded[] = "\t\t// add your code here"; + // get the code + $code = $db->loadObject(); + // combine method values + $combinded = array(); + // add comment if set + if (self::checkString($code->comment)) + { + $comment = array_map('trim', (array) explode(PHP_EOL, base64_decode($code->comment))); + $combinded[] = "\t" . implode(PHP_EOL . "\t ", $comment); + } + // build method + if ('method' === $type) + { + // set the method signature + if (self::checkString($code->arguments)) + { + $combinded[] = "\t" . $code->visibility . ' function ' . $code->name . '(' . base64_decode($code->arguments) . ')'; + } + else + { + $combinded[] = "\t" . $code->visibility . ' function ' . $code->name . '()'; + } + // set the method code + $combinded[] = "\t" . "{"; + // add code if set + if (self::checkString(trim($code->code))) + { + $combinded[] = base64_decode($code->code); + } + else + { + $combinded[] = "\t\t// add your code here"; + } + $combinded[] = "\t" . "}"; + } + else + { + if (self::checkString($code->default)) + { + $code->default = base64_decode($code->default); + if (is_int($code->default)) + { + // set the class property + $combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = ' . (int) $code->default . ';'; + } + elseif (is_float($code->default)) + { + // set the class property + $combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = ' . (float) $code->default . ';'; + } + elseif (('false' === $code->default || 'true' === $code->default) + || (self::checkString($code->default) && (strpos($code->default, 'array(') !== false || strpos($code->default, '"') !== false))) + { + // set the class property + $combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = ' . $code->default . ';'; + } + elseif (self::checkString($code->default) && strpos($code->default, '"') === false) + { + // set the class property + $combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = "' . $code->default . '";'; + } + else + { + // set the class property + $combinded[] = "\t" . $code->visibility . ' $' . $code->name . ';'; + } + } + else + { + // set the class property + $combinded[] = "\t" . $code->visibility . ' $' . $code->name . ';'; + } + } + // return the code + return implode(PHP_EOL, $combinded); } - $combinded[] = "\t" . "}"; - // return the method - return implode(PHP_EOL, $combinded); } return false; } + /** + * extract Boilerplate Class Extends + * + * @input string The class as a string + * @input string The type of class/extension + * + * @returns string on success + **/ + public static function extractBoilerplateClassExtends(&$class, $type) + { + if (($strings = self::getAllBetween($class, 'class ', '}')) !== false && self::checkArray($strings)) + { + foreach ($strings as $string) + { + if (($extends = self::getBetween($string, 'extends ', '{')) !== false && self::checkString($extends)) + { + return trim($extends); + } + } + } + return false; + } + + /** + * extract Boilerplate Class Header + * + * @input string The class as a string + * @input string The class being extended + * @input string The type of class/extension + * + * @returns string on success + **/ + public static function extractBoilerplateClassHeader(&$class, $extends, $type) + { + if (($string = self::getBetween($class, "defined('_JEXEC')", 'extends ' . $extends)) !== false && self::checkString($string)) + { + $headArray = explode(PHP_EOL, $string); + if (self::checkArray($headArray) && count($headArray) > 3) + { + // remove first since it still has the [or die;] string in it + array_shift($headArray); + // remove the last since it has the class declaration + array_pop($headArray); + // at this point we have the class comment still in as part of the header, lets remove that + $last = count($headArray); + while ($last > 0) + { + $last--; + if (isset($headArray[$last]) && strpos($headArray[$last], '*') !== false) + { + unset($headArray[$last]); + } + else + { + // moment the comment stops, we break out + $last = 0; + } + } + // make sure we only return if we have values + if (self::checkArray($headArray)) + { + return implode(PHP_EOL, $headArray); + } + } + } + return false; + } + + /** + * extract Boilerplate Class Comment + * + * @input string The class as a string + * @input string The class being extended + * @input string The type of class/extension + * + * @returns string on success + **/ + public static function extractBoilerplateClassComment(&$class, $extends, $type) + { + if (($string = self::getBetween($class, "defined('_JEXEC')", 'extends ' . $extends)) !== false && self::checkString($string)) + { + $headArray = explode(PHP_EOL, $string); + if (self::checkArray($headArray) && count($headArray) > 3) + { + $comment = array(); + // remove the last since it has the class declaration + array_pop($headArray); + // at this point we have the class comment still in as part of the header, lets remove that + $last = count($headArray); + while ($last > 0) + { + $last--; + if (isset($headArray[$last]) && strpos($headArray[$last], '*') !== false) + { + $comment[$last] = $headArray[$last]; + } + else + { + // moment the comment stops, we break out + $last = 0; + } + } + // make sure we only return if we have values + if (self::checkArray($comment)) + { + // set the correct order + ksort($comment); + return implode(PHP_EOL, $comment); + } + } + } + return false; + } + + /** + * extract Boilerplate Class Properties & Methods + * + * @input string The class as a string + * @input string The class being extended + * @input string The type of class/extension + * @input int The plugin groups + * + * @returns string on success + **/ + public static function extractBoilerplateClassPropertiesMethods(&$class, $extends, $type, $plugin_group = null) + { + $bucket = array('property' => array(), 'method' => array()); + // get the class code, and remove the head + $codeArrayTmp = explode('extends ' . $extends, $class); + // make sure we have the correct result + if (self::checkArray($codeArrayTmp) && count($codeArrayTmp) == 2) + { + // the triggers + $triggers = array('public' => 1, 'protected' => 2, 'private' => 3); + $codeArray = explode(PHP_EOL, $codeArrayTmp[1]); + unset($codeArrayTmp); + // clean the code + self::cleanBoilerplateCode($codeArray); + // temp bucket + $name = null; + $arg = null; + $target = null; + $visibility = null; + $tmp = array(); + $comment = array(); + // load method + $loadCode = function (&$bucket, &$target, &$name, &$arg, &$visibility, &$tmp, &$comment) use($type, $plugin_group){ + $_tmp = array( + 'name' => $name, + 'visibility' => $visibility, + 'extension_type' => $type + ); + // build filter + $filters = array('extension_type' => $type); + // add more data based on target + if ('method' === $target && self::checkArray($tmp)) + { + // clean the code + self::cleanBoilerplateCode($tmp); + // only load if there are values + if (self::checkArray($tmp, true)) + { + $_tmp['code'] = implode(PHP_EOL, $tmp); + } + else + { + $_tmp['code'] = ''; + } + // load arguments only if set + if (self::checkString($arg)) + { + $_tmp['arguments'] = $arg; + } + } + elseif ('property' === $target) + { + // load default only if set + if (self::checkString($arg)) + { + $_tmp['default'] = $arg; + } + } + // load comment only if set + if (self::checkArray($comment, true)) + { + $_tmp['comment'] = implode(PHP_EOL, $comment); + } + // load the group target + if ($plugin_group) + { + $_tmp['joomla_plugin_group'] = $plugin_group; + $filters['joomla_plugin_group'] = $plugin_group; + } + // load the local values + if (($locals = self::getLocalBoilerplate($name, $target, $type, $filters)) !== false) + { + foreach ($locals as $key => $value) + { + $_tmp[$key] = $value; + } + } + else + { + $_tmp['id'] = 0; + $_tmp['published'] = 1; + $_tmp['version'] = 1; + } + // store the data based on target + $bucket[$target][] = $_tmp; + }; + // now we start loading + foreach($codeArray as $line) + { + if ($visibility && $target && $name && strpos($line, '/**') !== false) + { + $loadCode($bucket, $target, $name, $arg, $visibility, $tmp, $comment); + // reset loop buckets + $name = null; + $arg = null; + $target = null; + $visibility = null; + $tmp = array(); + $comment = array(); + } + // load the comment before method/property + if (!$visibility && !$target && !$name && strpos($line, '*') !== false) + { + $comment[] = rtrim($line); + } + else + { + if (!$visibility && !$target && !$name) + { + // get the line values + $lineArray = array_values(array_map('trim', preg_split('/\s+/', trim($line)))); + // check if we are at the main line + if (isset($lineArray[0]) && isset($triggers[$lineArray[0]])) + { + $visibility = $lineArray[0]; + if (strpos($line, 'function') !== false) + { + $target = 'method'; + // get the name + $name = trim(self::getBetween($line, 'function ', '(')); + // get the arguments + $arg = trim(self::getBetween($line, ' ' . $name . '(', ')')); + } + else + { + $target = 'property'; + if (strpos($line, '=') !== false) + { + // get the name + $name = trim(self::getBetween($line, '$', '=')); + // get the default + $arg = trim(self::getBetween($line, '=', ';')); + } + else + { + // get the name + $name = trim(self::getBetween($line, '$', ';')); + } + } + } + } + else + { + $tmp[] = rtrim($line); + } + } + } + // check if a last method is still around + if ($visibility && $target && $name) + { + $loadCode($bucket, $target, $name, $arg, $visibility, $tmp, $comment); + // reset loop buckets + $name = null; + $arg = null; + $target = null; + $visibility = null; + $tmp = array(); + $comment = array(); + } + return $bucket; + } + return false; + } + + protected static function getLocalBoilerplate($name, $table, $extension_type, $filters = array()) + { + if ('property' === $table || 'method' === $table) + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + // get method + $query->select($db->quoteName(array('a.id','a.published','a.version'))); + $query->from($db->quoteName('#__componentbuilder_class_' . $table,'a')); + $query->where($db->quoteName('a.name') . ' = ' . $db->quote($name)); + $query->where($db->quoteName('a.extension_type') . ' = ' . $db->quote($extension_type)); + // add more filters + if (self::checkArray($filters)) + { + foreach($filters as $where => $value) + { + if (is_numeric($value)) + { + $query->where($db->quoteName('a.' . $where) . ' = ' . $value); + } + else + { + $query->where($db->quoteName('a.' . $where) . ' = ' . $db->quote($value)); + } + } + } + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // get the code + return $db->loadAssoc(); + } + } + return false; + } + + protected static function cleanBoilerplateCode(&$code) + { + // remove the first lines until a { is found + $key = 0; + $found = false; + while (!$found) + { + if (isset($code[$key])) + { + if (strpos($code[$key], '{') !== false) + { + unset($code[$key]); + // only remove the first } found + $found = true; + } + // remove empty lines + elseif (!self::checkString(trim($code[$key]))) + { + unset($code[$key]); + } + } + // check next line + $key++; + // stop loop at line 30 (really this should never happen) + if ($key > 30) + { + $found = true; + } + } + // reset all keys + $code = array_values($code); + // remove last lines until } + $last = count($code); + while ($last > 0) + { + $last--; + if (isset($code[$last])) + { + if (strpos($code[$last], '}') !== false) + { + unset($code[$last]); + // only remove the first } found + $last = 0; + } + // remove empty lines + elseif (!self::checkString(trim($code[$last]))) + { + unset($code[$last]); + } + } + } + } + /** * Making class or function name safe * @@ -198,7 +649,7 @@ abstract class ComponentbuilderHelper $name = self::replaceNumbers($name); } // remove all spaces and strange characters - return trim(reg_replace("/[^A-Za-z0-9]/", '', $name)); + return trim(preg_replace("/[^A-Za-z0-9_-]/", '', $name)); } /** @@ -4862,6 +5313,10 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS'), 'index.php?option=com_componentbuilder&view=joomla_components', $submenu === 'joomla_components'); } + if ($user->authorise('joomla_plugin.access', 'com_componentbuilder') && $user->authorise('joomla_plugin.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_PLUGINS'), 'index.php?option=com_componentbuilder&view=joomla_plugins', $submenu === 'joomla_plugins'); + } if ($user->authorise('admin_view.access', 'com_componentbuilder') && $user->authorise('admin_view.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=admin_views', $submenu === 'admin_views'); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 3968e9ea5..9f437be66 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -189,7 +189,11 @@ COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_DESC="The date this Admin Cu COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_LABEL="Created Date" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT="Editing the Admin Custom Tabs" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ERROR_UNIQUE_ALIAS="Another Admin Custom Tabs has the same alias." -COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT="// Add the tab HTML here. To access php values methodname->value; ?>" +COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT="// Add the tab HTML here. +// To access php values MethodName->value; ?> +// Note the convention, if in the PHP area above you added a method called getMethodName() +// Then [MethodName] becomes a class variable called $this->MethodName +// Which will hold the value/s your method returned." COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_LABEL="HTML" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ID="Id" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_DESC="The last user that modified this Admin Custom Tabs." @@ -1370,6 +1374,7 @@ COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, t COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project.
Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import please let us know." COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED="All the languages found in Joomla were successfully imported." COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" +COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER="Already selected, try another." COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add" COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB_A_SFIND_OUT_WHYA="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. (Make SURE to move this zipped backup package out of the tmp folder before doing an import)
If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers! Find out why!" COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" @@ -1410,6 +1415,7 @@ COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_SSA="Get the key from %s< COM_COMPONENTBUILDER_BGET_THE_KEY_FROM_SB_FOR_A_SSA="Get the key from %s for %s" COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION="Images not moved to correct location!" COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="Multiple Field (repeatable mode) id:%s mismatch in field:%s, and was removed from the field." +COM_COMPONENTBUILDER_BOILERPLATE_PLUGIN_S_DATA_COULD_NOT_BE_SAVED="Boilerplate (plugin - %s) data could not be saved" COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED="%s->%s in %s has id mismatch. So the %s was removed!" COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="%s could not be imported%s" COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="%s has been imported!" @@ -1430,6 +1436,290 @@ COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_ COM_COMPONENTBUILDER_CANCEL="Cancel" COM_COMPONENTBUILDER_CHAIN="Chain" COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS="Class Extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS="Class Extendings Access" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC="Allows the users in this group to access access class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_OPTIONS="Batch process the selected Class Extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_TIP="All changes will be applied to all selected Class Extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE="Class Extendings Batch Use" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE="Class Extendings Create" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC="Allows the users in this group to create create class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE="Class Extendings Delete" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC="Allows the users in this group to delete delete class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT="Class Extendings Edit" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY="Class Extendings Edit Created By" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE="Class Extendings Edit Created Date" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC="Allows the users in this group to edit the class extends" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN="Class Extendings Edit Own" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC="Allows the users in this group to edit edit own class extendings created by them" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE="Class Extendings Edit State" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class extends" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION="Class Extendings Edit Version" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_ARCHIVED="%s Class Extendings archived." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_ARCHIVED_1="%s Class Extends archived." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_CHECKED_IN_0="No Class Extends successfully checked in." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_CHECKED_IN_1="%d Class Extends successfully checked in." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_CHECKED_IN_MORE="%d Class Extendings successfully checked in." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_DELETED="%s Class Extendings deleted." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_DELETED_1="%s Class Extends deleted." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_FEATURED="%s Class Extendings featured." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_FEATURED_1="%s Class Extends featured." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_PUBLISHED="%s Class Extendings published." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_PUBLISHED_1="%s Class Extends published." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_TRASHED="%s Class Extendings trashed." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_TRASHED_1="%s Class Extends trashed." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_UNFEATURED="%s Class Extendings unfeatured." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_UNFEATURED_1="%s Class Extends unfeatured." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_UNPUBLISHED="%s Class Extendings unpublished." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_N_ITEMS_UNPUBLISHED_1="%s Class Extends unpublished." +COM_COMPONENTBUILDER_CLASS_EXTENDS="Class Extends" +COM_COMPONENTBUILDER_CLASS_EXTENDS_COMMENT="Comment" +COM_COMPONENTBUILDER_CLASS_EXTENDS_COMMENT_DESCRIPTION="The class comment" +COM_COMPONENTBUILDER_CLASS_EXTENDS_COMMENT_HINT="/** + * [NAME] + * + * @package [COMPONENT_NAME] + */" +COM_COMPONENTBUILDER_CLASS_EXTENDS_COMMENT_LABEL="Class Comment" +COM_COMPONENTBUILDER_CLASS_EXTENDS_COMPONENTS="components" +COM_COMPONENTBUILDER_CLASS_EXTENDS_CREATED_BY_DESC="The user that created this Class Extends." +COM_COMPONENTBUILDER_CLASS_EXTENDS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_CLASS_EXTENDS_CREATED_DATE_DESC="The date this Class Extends was created." +COM_COMPONENTBUILDER_CLASS_EXTENDS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_CLASS_EXTENDS_DETAILS="Details" +COM_COMPONENTBUILDER_CLASS_EXTENDS_EDIT="Editing the Class Extends" +COM_COMPONENTBUILDER_CLASS_EXTENDS_ERROR_UNIQUE_ALIAS="Another Class Extends has the same alias." +COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE="Extension Type" +COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_DESCRIPTION="Extension type this class_extends belongs to." +COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL="Extension Type" +COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD="Head" +COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD_DESCRIPTION="The class head, where JLoader, namespace and use is added, so that class being extended will work." +COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD_LABEL="Class Head" +COM_COMPONENTBUILDER_CLASS_EXTENDS_ID="Id" +COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_BY_DESC="The last user that modified this Class Extends." +COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_DATE_DESC="The date this Class Extends was modified." +COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_CLASS_EXTENDS_MODULES="modules" +COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME="Name" +COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_LABEL="Name" +COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_CLASS_EXTENDS_NEW="A New Class Extends" +COM_COMPONENTBUILDER_CLASS_EXTENDS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_CLASS_EXTENDS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_CLASS_EXTENDS_PLUGINS="plugins" +COM_COMPONENTBUILDER_CLASS_EXTENDS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_CLASS_EXTENDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Class Extends to customise the alias." +COM_COMPONENTBUILDER_CLASS_EXTENDS_SELECT_AN_OPTION="Select an option" +COM_COMPONENTBUILDER_CLASS_EXTENDS_STATUS="Status" +COM_COMPONENTBUILDER_CLASS_EXTENDS_VERSION_DESC="A count of the number of times this Class Extends has been revised." +COM_COMPONENTBUILDER_CLASS_EXTENDS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_CLASS_METHOD="Class Method" +COM_COMPONENTBUILDER_CLASS_METHODS="Class Methods" +COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS="Class Methods Access" +COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC="Allows the users in this group to access access class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_OPTIONS="Batch process the selected Class Methods" +COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_TIP="All changes will be applied to all selected Class Methods" +COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE="Class Methods Batch Use" +COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_CREATE="Class Methods Create" +COM_COMPONENTBUILDER_CLASS_METHODS_CREATE_DESC="Allows the users in this group to create create class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_DELETE="Class Methods Delete" +COM_COMPONENTBUILDER_CLASS_METHODS_DELETE_DESC="Allows the users in this group to delete delete class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT="Class Methods Edit" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY="Class Methods Edit Created By" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE="Class Methods Edit Created Date" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_DESC="Allows the users in this group to edit the class method" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN="Class Methods Edit Own" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN_DESC="Allows the users in this group to edit edit own class methods created by them" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE="Class Methods Edit State" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class method" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION="Class Methods Edit Version" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT="Class Methods Export" +COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT_DESC="Allows the users in this group to export export class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT="Class Methods Import" +COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT_DESC="Allows the users in this group to import import class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_ARCHIVED="%s Class Methods archived." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_ARCHIVED_1="%s Class Method archived." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_CHECKED_IN_0="No Class Method successfully checked in." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_CHECKED_IN_1="%d Class Method successfully checked in." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_CHECKED_IN_MORE="%d Class Methods successfully checked in." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_DELETED="%s Class Methods deleted." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_DELETED_1="%s Class Method deleted." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_FEATURED="%s Class Methods featured." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_FEATURED_1="%s Class Method featured." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_PUBLISHED="%s Class Methods published." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_PUBLISHED_1="%s Class Method published." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_TRASHED="%s Class Methods trashed." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_TRASHED_1="%s Class Method trashed." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_UNFEATURED="%s Class Methods unfeatured." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_UNFEATURED_1="%s Class Method unfeatured." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_UNPUBLISHED="%s Class Methods unpublished." +COM_COMPONENTBUILDER_CLASS_METHODS_N_ITEMS_UNPUBLISHED_1="%s Class Method unpublished." +COM_COMPONENTBUILDER_CLASS_METHOD_ARGUMENTS="Arguments" +COM_COMPONENTBUILDER_CLASS_METHOD_ARGUMENTS_DESCRIPTION="You can add as many as you need, with comma separation." +COM_COMPONENTBUILDER_CLASS_METHOD_ARGUMENTS_HINT="$context, &$value" +COM_COMPONENTBUILDER_CLASS_METHOD_ARGUMENTS_LABEL="Params
Method Arguments" +COM_COMPONENTBUILDER_CLASS_METHOD_CODE="Code" +COM_COMPONENTBUILDER_CLASS_METHOD_CODE_DESCRIPTION="Add the code here." +COM_COMPONENTBUILDER_CLASS_METHOD_CODE_LABEL="Code" +COM_COMPONENTBUILDER_CLASS_METHOD_COMMENT="Comment" +COM_COMPONENTBUILDER_CLASS_METHOD_COMMENT_DESCRIPTION="The comment" +COM_COMPONENTBUILDER_CLASS_METHOD_COMMENT_HINT="/** + * [NAME] + * + * [PARAMS] + * + */" +COM_COMPONENTBUILDER_CLASS_METHOD_COMMENT_LABEL="Comment" +COM_COMPONENTBUILDER_CLASS_METHOD_COMPONENTS="components" +COM_COMPONENTBUILDER_CLASS_METHOD_CREATED_BY_DESC="The user that created this Class Method." +COM_COMPONENTBUILDER_CLASS_METHOD_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_CLASS_METHOD_CREATED_DATE_DESC="The date this Class Method was created." +COM_COMPONENTBUILDER_CLASS_METHOD_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_CLASS_METHOD_DETAILS="Details" +COM_COMPONENTBUILDER_CLASS_METHOD_EDIT="Editing the Class Method" +COM_COMPONENTBUILDER_CLASS_METHOD_ERROR_UNIQUE_ALIAS="Another Class Method has the same alias." +COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE="Extension Type" +COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_DESCRIPTION="Extension type this class_method belongs to." +COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL="Extension Type" +COM_COMPONENTBUILDER_CLASS_METHOD_ID="Id" +COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP="Joomla Plugin Group" +COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group" +COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_BY_DESC="The last user that modified this Class Method." +COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_DATE_DESC="The date this Class Method was modified." +COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_CLASS_METHOD_MODULES="modules" +COM_COMPONENTBUILDER_CLASS_METHOD_NAME="Name" +COM_COMPONENTBUILDER_CLASS_METHOD_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_CLASS_METHOD_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_CLASS_METHOD_NAME_LABEL="Name" +COM_COMPONENTBUILDER_CLASS_METHOD_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_CLASS_METHOD_NEW="A New Class Method" +COM_COMPONENTBUILDER_CLASS_METHOD_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_CLASS_METHOD_PERMISSION="Permissions" +COM_COMPONENTBUILDER_CLASS_METHOD_PLUGINS="plugins" +COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE="private" +COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED="protected" +COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC="public" +COM_COMPONENTBUILDER_CLASS_METHOD_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_CLASS_METHOD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Class Method to customise the alias." +COM_COMPONENTBUILDER_CLASS_METHOD_SELECT_AN_OPTION="Select an option" +COM_COMPONENTBUILDER_CLASS_METHOD_STATUS="Status" +COM_COMPONENTBUILDER_CLASS_METHOD_VERSION_DESC="A count of the number of times this Class Method has been revised." +COM_COMPONENTBUILDER_CLASS_METHOD_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY="Visibility" +COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_DESCRIPTION="The visibility of a function/method or property can be defined by prefixing the declaration with the keywords public, protected or private." +COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL="Visibility" +COM_COMPONENTBUILDER_CLASS_PROPERTIES="Class Properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS="Class Properties Access" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS_DESC="Allows the users in this group to access access class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_OPTIONS="Batch process the selected Class Properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_TIP="All changes will be applied to all selected Class Properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE="Class Properties Batch Use" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE="Class Properties Create" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE_DESC="Allows the users in this group to create create class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE="Class Properties Delete" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE_DESC="Allows the users in this group to delete delete class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT="Class Properties Edit" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY="Class Properties Edit Created By" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE="Class Properties Edit Created Date" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_DESC="Allows the users in this group to edit the class property" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN="Class Properties Edit Own" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own class properties created by them" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE="Class Properties Edit State" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the class property" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION="Class Properties Edit Version" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT="Class Properties Export" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT_DESC="Allows the users in this group to export export class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT="Class Properties Import" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT_DESC="Allows the users in this group to import import class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_ARCHIVED="%s Class Properties archived." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_ARCHIVED_1="%s Class Property archived." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_CHECKED_IN_0="No Class Property successfully checked in." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_CHECKED_IN_1="%d Class Property successfully checked in." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_CHECKED_IN_MORE="%d Class Properties successfully checked in." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_DELETED="%s Class Properties deleted." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_DELETED_1="%s Class Property deleted." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_FEATURED="%s Class Properties featured." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_FEATURED_1="%s Class Property featured." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_PUBLISHED="%s Class Properties published." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_PUBLISHED_1="%s Class Property published." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_TRASHED="%s Class Properties trashed." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_TRASHED_1="%s Class Property trashed." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_UNFEATURED="%s Class Properties unfeatured." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_UNFEATURED_1="%s Class Property unfeatured." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_UNPUBLISHED="%s Class Properties unpublished." +COM_COMPONENTBUILDER_CLASS_PROPERTIES_N_ITEMS_UNPUBLISHED_1="%s Class Property unpublished." +COM_COMPONENTBUILDER_CLASS_PROPERTY="Class Property" +COM_COMPONENTBUILDER_CLASS_PROPERTY_COMMENT="Comment" +COM_COMPONENTBUILDER_CLASS_PROPERTY_COMMENT_DESCRIPTION="The comment" +COM_COMPONENTBUILDER_CLASS_PROPERTY_COMMENT_HINT="/** + * [NAME] + * + * [PARAMS] + * + */" +COM_COMPONENTBUILDER_CLASS_PROPERTY_COMMENT_LABEL="Comment" +COM_COMPONENTBUILDER_CLASS_PROPERTY_COMPONENTS="components" +COM_COMPONENTBUILDER_CLASS_PROPERTY_CREATED_BY_DESC="The user that created this Class Property." +COM_COMPONENTBUILDER_CLASS_PROPERTY_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_CLASS_PROPERTY_CREATED_DATE_DESC="The date this Class Property was created." +COM_COMPONENTBUILDER_CLASS_PROPERTY_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT="Default" +COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_DESCRIPTION="Enter default value" +COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_HINT="Default Value Here" +COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_LABEL="Default" +COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_MESSAGE="Error! Please add default value here." +COM_COMPONENTBUILDER_CLASS_PROPERTY_DETAILS="Details" +COM_COMPONENTBUILDER_CLASS_PROPERTY_EDIT="Editing the Class Property" +COM_COMPONENTBUILDER_CLASS_PROPERTY_ERROR_UNIQUE_ALIAS="Another Class Property has the same alias." +COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE="Extension Type" +COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_DESCRIPTION="Extension type this class_property belongs to." +COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL="Extension Type" +COM_COMPONENTBUILDER_CLASS_PROPERTY_ID="Id" +COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP="Joomla Plugin Group" +COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group" +COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_BY_DESC="The last user that modified this Class Property." +COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_DATE_DESC="The date this Class Property was modified." +COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_CLASS_PROPERTY_MODULES="modules" +COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME="Name" +COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_LABEL="Name" +COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_CLASS_PROPERTY_NEW="A New Class Property" +COM_COMPONENTBUILDER_CLASS_PROPERTY_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_CLASS_PROPERTY_PERMISSION="Permissions" +COM_COMPONENTBUILDER_CLASS_PROPERTY_PLUGINS="plugins" +COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE="private" +COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED="protected" +COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC="public" +COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_CLASS_PROPERTY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Class Property to customise the alias." +COM_COMPONENTBUILDER_CLASS_PROPERTY_SELECT_AN_OPTION="Select an option" +COM_COMPONENTBUILDER_CLASS_PROPERTY_STATUS="Status" +COM_COMPONENTBUILDER_CLASS_PROPERTY_VERSION_DESC="A count of the number of times this Class Property has been revised." +COM_COMPONENTBUILDER_CLASS_PROPERTY_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY="Visibility" +COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_DESCRIPTION="The visibility of a function/method or property can be defined by prefixing the declaration with the keywords public, protected or private." +COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL="Visibility" COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" COM_COMPONENTBUILDER_CLONE="Clone" COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!" @@ -2485,7 +2775,11 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_DESCRIPTION="Enter Header Here" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_HINT="Header Here" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_LABEL="Header" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_MESSAGE="Error! Please add header here." -COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT="// Add the tab HTML here. To access php values methodname->value; ?>" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT="// Add the tab HTML here. +// To access php values MethodName->value; ?> +// Note the convention, if in the PHP area above you added a method called getMethodName() +// Then [MethodName] becomes a class variable called $this->MethodName +// Which will hold the value/s your method returned." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL="HTML" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ID="Id" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT="Joomla Component" @@ -2500,6 +2794,7 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_HINT="Name Here" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_LABEL="Name" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW="A New Component Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_PHP_DASHBOARD_NOTE_DESCRIPTION="Adding custom PHP method to the dashboard model
use the public function getMethodName() to insure the data is set to the view,
Note the convention public function get...() replace the ... with the unique method name." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PERMISSION="Permissions" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS="Php Dashboard Methods" @@ -3885,7 +4180,7 @@ COM_COMPONENTBUILDER_DASHBOARD_GET_SNIPPETS="Get Snippets

" COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents

" COM_COMPONENTBUILDER_DASHBOARD_IMPORTJCBPACKAGES="Import JCB Packages

" COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENTS="Joomla Components

" -COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENT_ADD="Add Joomla Component

" +COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_PLUGINS="Joomla Plugins

" COM_COMPONENTBUILDER_DASHBOARD_LANGUAGE_TRANSLATIONS="Language Translations

" COM_COMPONENTBUILDER_DASHBOARD_LAYOUTS="Layouts

" COM_COMPONENTBUILDER_DASHBOARD_LAYOUT_ADD="Add Layout

" @@ -4746,8 +5041,11 @@ COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again." COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: %s" COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries" +COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR="Getting joomla_plugin boilerplate failed, if the issue continues, inform your system administrator!" +COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY="Getting joomla_plugin boilerplate was successfully!" COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets" COM_COMPONENTBUILDER_GET_AN_ACCOUNT_WITH_GITHUB_BSB="Get an Account with gitHub: %s" +COM_COMPONENTBUILDER_GET_BOILERPLATE="Get Boilerplate" COM_COMPONENTBUILDER_GET_PACKAGE="Get Package" COM_COMPONENTBUILDER_GET_SNIPPET="Get snippet" COM_COMPONENTBUILDER_GET_SNIPPETS="Get Snippets" @@ -4777,6 +5075,7 @@ COM_COMPONENTBUILDER_GLUECODE="Glue/Code" COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!" COM_COMPONENTBUILDER_GREAT_THIS_PLACEHOLDER_WILL_WORK="Great, this placeholder will work!" COM_COMPONENTBUILDER_GREAT_THIS_VALIDATION_RULE_NAME_S_WILL_WORK="Great, this validation rule name (%s) will work!" +COM_COMPONENTBUILDER_GROUP="group" COM_COMPONENTBUILDER_HAS_METADATA="Has Metadata" COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document" COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents" @@ -4933,6 +5232,8 @@ COM_COMPONENTBUILDER_IMPORT_S="Import %s" COM_COMPONENTBUILDER_IMPORT_SELECT_FILE="Select File" COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_DIRECTORY="Set the path to file" COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_ADMIN_VIEWS="Select the file to import data to admin_views." +COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CLASS_METHODS="Select the file to import data to class_methods." +COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CLASS_PROPERTIES="Select the file to import data to class_properties." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CUSTOM_ADMIN_VIEWS="Select the file to import data to custom_admin_views." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CUSTOM_CODES="Select the file to import data to custom_codes." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_DYNAMIC_GETS="Select the file to import data to dynamic_gets." @@ -4940,6 +5241,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDS="Select the file to import da COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDTYPES="Select the file to import data to fieldtypes." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS="Select the file to import data to help_documents." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS="Select the file to import data to joomla_components." +COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_PLUGINS="Select the file to import data to joomla_plugins." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGES="Select the file to import data to languages." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGE_TRANSLATIONS="Select the file to import data to language_translations." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LAYOUTS="Select the file to import data to layouts." @@ -4982,8 +5284,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CODE_NAME="Code Name" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_COMPANY_DETAILS="Company Details" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE="Joomla Components Create" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC="Allows the users in this group to create create joomla components" -COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD="Joomla Components Dashboard Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of joomla component" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST="Joomla Components Dashboard List" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of joomla component" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE="Joomla Components Delete" @@ -5482,6 +5782,168 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_MESSAGE="Error! Please add websi COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES="Yes" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP="ZIP" COM_COMPONENTBUILDER_JOOMLA_FIELDS="Joomla fields" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN="Joomla Plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS="Joomla Plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS="Joomla Plugins Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC="Allows the users in this group to access access joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_OPTIONS="Batch process the selected Joomla Plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_TIP="All changes will be applied to all selected Joomla Plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE="Joomla Plugins Batch Use" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE="Joomla Plugins Create" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC="Allows the users in this group to create create joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST="Joomla Plugins Dashboard List" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE="Joomla Plugins Delete" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE_DESC="Allows the users in this group to delete delete joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT="Joomla Plugins Edit" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY="Joomla Plugins Edit Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE="Joomla Plugins Edit Created Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_DESC="Allows the users in this group to edit the joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN="Joomla Plugins Edit Own" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins created by them" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE="Joomla Plugins Edit State" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION="Joomla Plugins Edit Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT="Joomla Plugins Export" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT_DESC="Allows the users in this group to export export joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT="Joomla Plugins Import" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT_DESC="Allows the users in this group to import import joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_ARCHIVED="%s Joomla Plugins archived." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_ARCHIVED_1="%s Joomla Plugin archived." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_CHECKED_IN_0="No Joomla Plugin successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_CHECKED_IN_1="%d Joomla Plugin successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_CHECKED_IN_MORE="%d Joomla Plugins successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_DELETED="%s Joomla Plugins deleted." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_DELETED_1="%s Joomla Plugin deleted." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_FEATURED="%s Joomla Plugins featured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_FEATURED_1="%s Joomla Plugin featured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_PUBLISHED="%s Joomla Plugins published." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_PUBLISHED_1="%s Joomla Plugin published." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_TRASHED="%s Joomla Plugins trashed." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_TRASHED_1="%s Joomla Plugin trashed." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_UNFEATURED="%s Joomla Plugins unfeatured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_UNFEATURED_1="%s Joomla Plugin unfeatured." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_UNPUBLISHED="%s Joomla Plugins unpublished." +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_PLUGIN_CLASS_EXTENDS="Class Extends" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL="Extends" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CONFIGPARAMS="Config/Params" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_BY_DESC="The user that created this Joomla Plugin." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_DATE_DESC="The date this Joomla Plugin was created." +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_DETAILS="Details" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT="Editing the Joomla Plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ERROR_UNIQUE_ALIAS="Another Joomla Plugin has the same alias." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELD="Field" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELDS="Fields" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELDS_LABEL="Fields" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELD_DESCRIPTION="Select a field" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELD_LABEL="Field" +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_GROUP="Joomla Plugin Group" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS="Joomla Plugin Groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS="Joomla Plugin Groups Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS_DESC="Allows the users in this group to access access joomla plugin groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_OPTIONS="Batch process the selected Joomla Plugin Groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_TIP="All changes will be applied to all selected Joomla Plugin Groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE="Joomla Plugin Groups Batch Use" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugin groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION="Joomla Plugin Groups Edit Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugin groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_ARCHIVED="%s Joomla Plugin Groups archived." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_ARCHIVED_1="%s Joomla Plugin Group archived." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_CHECKED_IN_0="No Joomla Plugin Group successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_CHECKED_IN_1="%d Joomla Plugin Group successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_CHECKED_IN_MORE="%d Joomla Plugin Groups successfully checked in." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_DELETED="%s Joomla Plugin Groups deleted." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_DELETED_1="%s Joomla Plugin Group deleted." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_FEATURED="%s Joomla Plugin Groups featured." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_FEATURED_1="%s Joomla Plugin Group featured." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_PUBLISHED="%s Joomla Plugin Groups published." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_PUBLISHED_1="%s Joomla Plugin Group published." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_TRASHED="%s Joomla Plugin Groups trashed." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_TRASHED_1="%s Joomla Plugin Group trashed." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNFEATURED="%s Joomla Plugin Groups unfeatured." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNFEATURED_1="%s Joomla Plugin Group unfeatured." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNPUBLISHED="%s Joomla Plugin Groups unpublished." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNPUBLISHED_1="%s Joomla Plugin Group unpublished." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS="Class Extends" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL="Extends" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_BY_DESC="The user that created this Joomla Plugin Group." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_DATE_DESC="The date this Joomla Plugin Group was created." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_DETAILS="Details" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_EDIT="Editing the Joomla Plugin Group" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_ERROR_UNIQUE_ALIAS="Another Joomla Plugin Group has the same alias." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_ID="Id" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_MODIFIED_BY_DESC="The last user that modified this Joomla Plugin Group." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_MODIFIED_DATE_DESC="The date this Joomla Plugin Group was modified." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME="Name" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_LABEL="Name" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NEW="A New Joomla Plugin Group" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_PERMISSION="Permissions" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Plugin Group to customise the alias." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_STATUS="Status" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_VERSION_DESC="A count of the number of times this Joomla Plugin Group has been revised." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ID="Id" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP="Joomla Plugin Group" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MAIN_CLASS_CODE="Main Class Code" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MAIN_CLASS_CODE_DESCRIPTION="Add the class properties & methods here." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MAIN_CLASS_CODE_LABEL="Class Properties & Methods" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD="Method" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_LABEL="Methods" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_SELECTION="Method Selection" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_SELECTION_DESCRIPTION="Select methods you want to use in your plugin class." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_SELECTION_LABEL="Method Selection" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MODIFIED_BY_DESC="The last user that modified this Joomla Plugin." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MODIFIED_DATE_DESC="The date this Joomla Plugin was modified." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME="Name" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_HINT="Name Here" +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_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_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.

" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_PLUGIN_LABEL="Easy Plugin Build Options" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PERMISSION="Permissions" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY="Property" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_LABEL="Properties" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_SELECTION="Property Selection" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_SELECTION_DESCRIPTION="Select properties you want to use in your plugin class." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_SELECTION_LABEL="Property Selection" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS="Joomla Plugin Run Expansion Button Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Plugin to customise the alias." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_STATUS="Status" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_DESC="A count of the number of times this Joomla Plugin has been revised." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_JUST_GET_ALL_SNIPPETS="Just Get All Snippets" COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History" COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" @@ -7207,6 +7669,7 @@ COM_COMPONENTBUILDER_SUBMENU_FIELDTYPES="Fieldtypes" COM_COMPONENTBUILDER_SUBMENU_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS="Joomla Components" +COM_COMPONENTBUILDER_SUBMENU_JOOMLA_PLUGINS="Joomla Plugins" COM_COMPONENTBUILDER_SUBMENU_LANGUAGES="Languages" COM_COMPONENTBUILDER_SUBMENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts" @@ -7511,6 +7974,8 @@ COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_DESCRIPTION="Add your PHP here! [Do not COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_HINT="// PHP class methods and fields can be added here" COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_LABEL="PHP (class methods)" COM_COMPONENTBUILDER_VALIDATION_RULE_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS="Validation Rule Run Expansion Button Access" +COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_VALIDATION_RULE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Validation Rule to customise the alias." COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION="Short Description" COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_DESCRIPTION="Enter short description" @@ -7551,6 +8016,7 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help." COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help." COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE="You do not have permission to run the expansion module!" +COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE="You do not have permission to run the get boilerplate module!" COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_TRANSLATOR_MODULE="You do not have permission to run the translator module!" COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_SHARE_THE_SNIPPETS_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to share the snippets, please contact your system administrator for more help." COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_S_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then %s %s is considered bad practice." 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 4d342ddc2..5a9e24166 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -111,6 +111,74 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu" COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of admin view" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS="Class Extendings Access" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC="Allows the users in this group to access access class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE="Class Extendings Batch Use" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE="Class Extendings Create" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC="Allows the users in this group to create create class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE="Class Extendings Delete" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC="Allows the users in this group to delete delete class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT="Class Extendings Edit" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY="Class Extendings Edit Created By" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE="Class Extendings Edit Created Date" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class extendings" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC="Allows the users in this group to edit the class extends" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN="Class Extendings Edit Own" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC="Allows the users in this group to edit edit own class extendings created by them" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE="Class Extendings Edit State" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class extends" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION="Class Extendings Edit Version" +COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class extendings" +COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS="Class Methods Access" +COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC="Allows the users in this group to access access class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE="Class Methods Batch Use" +COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_CREATE="Class Methods Create" +COM_COMPONENTBUILDER_CLASS_METHODS_CREATE_DESC="Allows the users in this group to create create class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_DELETE="Class Methods Delete" +COM_COMPONENTBUILDER_CLASS_METHODS_DELETE_DESC="Allows the users in this group to delete delete class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT="Class Methods Edit" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY="Class Methods Edit Created By" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE="Class Methods Edit Created Date" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_DESC="Allows the users in this group to edit the class method" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN="Class Methods Edit Own" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN_DESC="Allows the users in this group to edit edit own class methods created by them" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE="Class Methods Edit State" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class method" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION="Class Methods Edit Version" +COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT="Class Methods Export" +COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT_DESC="Allows the users in this group to export export class methods" +COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT="Class Methods Import" +COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT_DESC="Allows the users in this group to import import class methods" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS="Class Properties Access" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS_DESC="Allows the users in this group to access access class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE="Class Properties Batch Use" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE="Class Properties Create" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE_DESC="Allows the users in this group to create create class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE="Class Properties Delete" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE_DESC="Allows the users in this group to delete delete class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT="Class Properties Edit" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY="Class Properties Edit Created By" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE="Class Properties Edit Created Date" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_DESC="Allows the users in this group to edit the class property" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN="Class Properties Edit Own" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own class properties created by them" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE="Class Properties Edit State" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the class property" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION="Class Properties Edit Version" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT="Class Properties Export" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT_DESC="Allows the users in this group to export export class properties" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT="Class Properties Import" +COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT_DESC="Allows the users in this group to import import class properties" COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access" COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler." COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access" @@ -520,8 +588,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE="Joomla Components Batch Use" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla components" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE="Joomla Components Create" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC="Allows the users in this group to create create joomla components" -COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD="Joomla Components Dashboard Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of joomla component" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST="Joomla Components Dashboard List" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of joomla component" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE="Joomla Components Delete" @@ -552,6 +618,44 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS="Joomla Plugins Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC="Allows the users in this group to access access joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE="Joomla Plugins Batch Use" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE="Joomla Plugins Create" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC="Allows the users in this group to create create joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST="Joomla Plugins Dashboard List" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE="Joomla Plugins Delete" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE_DESC="Allows the users in this group to delete delete joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT="Joomla Plugins Edit" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY="Joomla Plugins Edit Created By" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE="Joomla Plugins Edit Created Date" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_DESC="Allows the users in this group to edit the joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN="Joomla Plugins Edit Own" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins created by them" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE="Joomla Plugins Edit State" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION="Joomla Plugins Edit Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT="Joomla Plugins Export" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT_DESC="Allows the users in this group to export export joomla plugins" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT="Joomla Plugins Import" +COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT_DESC="Allows the users in this group to import import joomla plugins" +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_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" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS_DESC="Allows the users in this group to access access joomla plugin groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE="Joomla Plugin Groups Batch Use" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugin groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION="Joomla Plugin Groups Edit Version" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugin groups" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS="Joomla Plugin Run Expansion Button Access" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access" COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages" COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use" @@ -700,6 +804,7 @@ COM_COMPONENTBUILDER_MENU_FIELDS="Fields" COM_COMPONENTBUILDER_MENU_FIELDTYPES="Fieldtypes" COM_COMPONENTBUILDER_MENU_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS="Joomla Components" +COM_COMPONENTBUILDER_MENU_JOOMLA_PLUGINS="Joomla Plugins" COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries" @@ -885,4 +990,6 @@ COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this grou COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import" COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules" COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu" -COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to submenu of validation rule" \ No newline at end of file +COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to submenu of validation rule" +COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS="Validation Rule Run Expansion Button Access" +COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." \ No newline at end of file diff --git a/admin/layouts/class_extends/details_fullwidth.php b/admin/layouts/class_extends/details_fullwidth.php new file mode 100644 index 000000000..ea642173e --- /dev/null +++ b/admin/layouts/class_extends/details_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( + 'head' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/class_extends/details_left.php b/admin/layouts/class_extends/details_left.php new file mode 100644 index 000000000..58bb36566 --- /dev/null +++ b/admin/layouts/class_extends/details_left.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'); + +// 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( + 'name', + 'extension_type' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/class_extends/details_right.php b/admin/layouts/class_extends/details_right.php new file mode 100644 index 000000000..b8b2905dc --- /dev/null +++ b/admin/layouts/class_extends/details_right.php @@ -0,0 +1,42 @@ + + * @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( + 'comment' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/class_extends/index.html b/admin/layouts/class_extends/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/class_extends/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/class_extends/publishing.php b/admin/layouts/class_extends/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/class_extends/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/class_extends/publlshing.php b/admin/layouts/class_extends/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/class_extends/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/class_method/details_fullwidth.php b/admin/layouts/class_method/details_fullwidth.php new file mode 100644 index 000000000..9ca23c02f --- /dev/null +++ b/admin/layouts/class_method/details_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( + 'code' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/class_method/details_left.php b/admin/layouts/class_method/details_left.php new file mode 100644 index 000000000..ebfdf3913 --- /dev/null +++ b/admin/layouts/class_method/details_left.php @@ -0,0 +1,46 @@ + + * @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( + 'name', + 'arguments', + 'visibility', + 'extension_type', + 'joomla_plugin_group' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/class_method/details_right.php b/admin/layouts/class_method/details_right.php new file mode 100644 index 000000000..b8b2905dc --- /dev/null +++ b/admin/layouts/class_method/details_right.php @@ -0,0 +1,42 @@ + + * @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( + 'comment' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/class_method/index.html b/admin/layouts/class_method/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/class_method/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/class_method/publishing.php b/admin/layouts/class_method/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/class_method/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/class_method/publlshing.php b/admin/layouts/class_method/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/class_method/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/class_property/details_left.php b/admin/layouts/class_property/details_left.php new file mode 100644 index 000000000..8b5a1db11 --- /dev/null +++ b/admin/layouts/class_property/details_left.php @@ -0,0 +1,46 @@ + + * @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( + 'name', + 'visibility', + 'default', + 'extension_type', + 'joomla_plugin_group' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/class_property/details_right.php b/admin/layouts/class_property/details_right.php new file mode 100644 index 000000000..b8b2905dc --- /dev/null +++ b/admin/layouts/class_property/details_right.php @@ -0,0 +1,42 @@ + + * @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( + 'comment' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/class_property/index.html b/admin/layouts/class_property/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/class_property/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/class_property/publishing.php b/admin/layouts/class_property/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/class_property/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/class_property/publlshing.php b/admin/layouts/class_property/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/class_property/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/component_dashboard/dashboard_fullwidth.php b/admin/layouts/component_dashboard/dashboard_fullwidth.php index 075cab4d6..86317ad03 100644 --- a/admin/layouts/component_dashboard/dashboard_fullwidth.php +++ b/admin/layouts/component_dashboard/dashboard_fullwidth.php @@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'note_php_dashboard_note', 'php_dashboard_methods', 'dashboard_tab' ); diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 4968f6ab3..2c946f2bf 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vxqfields; +$items = $displayData->vxsfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/joomla_plugin/configparams_fullwidth.php b/admin/layouts/joomla_plugin/configparams_fullwidth.php new file mode 100644 index 000000000..c3f86b0bd --- /dev/null +++ b/admin/layouts/joomla_plugin/configparams_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( + 'fields' +); + +$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/details_above.php b/admin/layouts/joomla_plugin/details_above.php new file mode 100644 index 000000000..8e191208e --- /dev/null +++ b/admin/layouts/joomla_plugin/details_above.php @@ -0,0 +1,46 @@ + + * @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( + 'name', + 'class_extends', + 'joomla_plugin_group' +); + +$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/details_fullwidth.php b/admin/layouts/joomla_plugin/details_fullwidth.php new file mode 100644 index 000000000..3405d91b5 --- /dev/null +++ b/admin/layouts/joomla_plugin/details_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( + 'main_class_code' +); + +$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/details_left.php b/admin/layouts/joomla_plugin/details_left.php new file mode 100644 index 000000000..a1a01c5ee --- /dev/null +++ b/admin/layouts/joomla_plugin/details_left.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'); + +// 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( + 'note_beta_stage', + 'note_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/details_right.php b/admin/layouts/joomla_plugin/details_right.php new file mode 100644 index 000000000..3758c5d79 --- /dev/null +++ b/admin/layouts/joomla_plugin/details_right.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'); + +// 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( + 'property_selection', + 'method_selection' +); + +$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/index.html b/admin/layouts/joomla_plugin/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/joomla_plugin/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/joomla_plugin/publishing.php b/admin/layouts/joomla_plugin/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/joomla_plugin/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/publlshing.php b/admin/layouts/joomla_plugin/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/joomla_plugin/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_group/details_left.php b/admin/layouts/joomla_plugin_group/details_left.php new file mode 100644 index 000000000..18159298f --- /dev/null +++ b/admin/layouts/joomla_plugin_group/details_left.php @@ -0,0 +1,42 @@ + + * @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( + 'name' +); + +$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_group/details_right.php b/admin/layouts/joomla_plugin_group/details_right.php new file mode 100644 index 000000000..897b29793 --- /dev/null +++ b/admin/layouts/joomla_plugin_group/details_right.php @@ -0,0 +1,42 @@ + + * @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( + 'class_extends' +); + +$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_group/index.html b/admin/layouts/joomla_plugin_group/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/joomla_plugin_group/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/joomla_plugin_group/publishing.php b/admin/layouts/joomla_plugin_group/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/joomla_plugin_group/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_group/publlshing.php b/admin/layouts/joomla_plugin_group/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/joomla_plugin_group/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/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 70894c881..a2678ba90 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyalinked_components; +$items = $displayData->vyclinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/ajax.php b/admin/models/ajax.php index c72d9bd91..9990e6570 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -249,6 +249,27 @@ class ComponentbuilderModelAjax extends JModelList return function_exists('curl_version'); } + // Used in joomla_plugin + public function getClassCode($id, $type) + { + return ComponentbuilderHelper::getClassCode($id, $type); + } + + + public function getClassCodeIds($id, $type) + { + if ('property' === $type || 'method' === $type) + { + return ComponentbuilderHelper::getVars('class_' . $type, $id, 'joomla_plugin_group', 'id'); + } + elseif ('joomla_plugin_group' === $type) + { + return ComponentbuilderHelper::getVars($type, $id, 'class_extends', 'id'); + } + return false; + } + + // Used in admin_view protected $viewid = array(); @@ -2721,7 +2742,7 @@ class ComponentbuilderModelAjax extends JModelList foreach($field['php'] as $name => $values) { $value = implode(PHP_EOL, $values['value']); - $textarea = $this->buildFieldTexteara($name, $values['desc'], $value, substr_count( $value, PHP_EOL )); + $textarea = $this->buildFieldTextarea($name, $values['desc'], $value, substr_count( $value, PHP_EOL )); // load the html $field['textarea'][] = '
'. $textarea->label . '
' . $textarea->input . '

'; } @@ -2761,7 +2782,7 @@ class ComponentbuilderModelAjax extends JModelList return null; } - protected function buildFieldTexteara($name, $desc, $default, $rows) + protected function buildFieldTextarea($name, $desc, $default, $rows) { // get the textarea $textarea = JFormHelper::loadFieldType('textarea', true); diff --git a/admin/models/class_extendings.php b/admin/models/class_extendings.php new file mode 100644 index 000000000..37a3781f0 --- /dev/null +++ b/admin/models/class_extendings.php @@ -0,0 +1,297 @@ + + * @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'); + +/** + * Class_extendings Model + */ +class ComponentbuilderModelClass_extendings 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', + 'a.name','name', + 'a.extension_type','extension_type' + ); + } + + 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; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); + $this->setState('filter.extension_type', $extension_type); + + $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('class_extends.access', 'com_componentbuilder.class_extends.' . (int) $item->id) && JFactory::getUser()->authorise('class_extends.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert extension_type + $item->extension_type = $this->selectionTranslation($item->extension_type, 'extension_type'); + } + } + + + // return items + return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of extension_type language strings + if ($name === 'extension_type') + { + $extension_typeArray = array( + 0 => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_SELECT_AN_OPTION', + 'components' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_COMPONENTS', + 'plugins' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_PLUGINS', + 'modules' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_MODULES' + ); + // Now check if value is found in this array + if (isset($extension_typeArray[$value]) && ComponentbuilderHelper::checkString($extension_typeArray[$value])) + { + return $extension_typeArray[$value]; + } + } + return $value; + } + + /** + * 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_class_extends', 'a')); + + // 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 . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.extension_type LIKE '.$search.' OR a.head LIKE '.$search.' OR a.comment LIKE '.$search.')'); + } + } + + // Filter by Extension_type. + if ($extension_type = $this->getState('filter.extension_type')) + { + $query->where('a.extension_type = ' . $db->quote($db->escape($extension_type))); + } + + // 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'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.extension_type'); + + 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_class_extends')); + $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_class_extends'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/class_extends.php b/admin/models/class_extends.php new file mode 100644 index 000000000..161971607 --- /dev/null +++ b/admin/models/class_extends.php @@ -0,0 +1,907 @@ + + * @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 Class_extends Model + */ +class ComponentbuilderModelClass_extends extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'extension_type' + ), + 'right' => array( + 'comment' + ), + 'fullwidth' => array( + 'head' + ) + ) + ); + + /** + * @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.class_extends'; + + /** + * 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 = 'class_extends', $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->head)) + { + // base64 Decode head. + $item->head = base64_decode($item->head); + } + + if (!empty($item->comment)) + { + // base64 Decode comment. + $item->comment = base64_decode($item->comment); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.class_extends'); + } + } + + 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.class_extends', 'class_extends', $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('class_extends.edit.state', 'com_componentbuilder.class_extends.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_extends.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('class_extends.edit.created_by', 'com_componentbuilder.class_extends.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_extends.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('class_extends.edit.created', 'com_componentbuilder.class_extends.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_extends.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); + } + } + + // update all editors to use this components global editor + $global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); + // now get all the editor fields + $editors = $form->getXml()->xpath("//field[@type='editor']"); + // check if we found any + if (ComponentbuilderHelper::checkArray($editors)) + { + foreach ($editors as $editor) + { + // get the field names + $name = (string) $editor['name']; + // set the field editor value (with none as fallback) + $form->setFieldAttribute($name, 'editor', $global_editor . '|none'); + } + } + + 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/class_extends.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('class_extends.delete', 'com_componentbuilder.class_extends.' . (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('class_extends.edit.state', 'com_componentbuilder.class_extends.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('class_extends.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('class_extends.edit', 'com_componentbuilder.class_extends.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('class_extends.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_class_extends')); + $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.class_extends.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('class_extends'); + $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('class_extends'); + } + + if (!$this->canDo->get('class_extends.create') && !$this->canDo->get('class_extends.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('class_extends.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('class_extends.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->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } + + // 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('class_extends'); + } + + if (!$this->canDo->get('class_extends.edit') && !$this->canDo->get('class_extends.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('class_extends.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('class_extends.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; + } + + // make sure the name is safe to be used as a class name + $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); + + // Set the head string to base64 string. + if (isset($data['head'])) + { + $data['head'] = base64_encode($data['head']); + } + + // Set the comment string to base64 string. + if (isset($data['comment'])) + { + $data['comment'] = base64_encode($data['comment']); + } + + // 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/class_method.php b/admin/models/class_method.php new file mode 100644 index 000000000..987395b88 --- /dev/null +++ b/admin/models/class_method.php @@ -0,0 +1,958 @@ + + * @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 Class_method Model + */ +class ComponentbuilderModelClass_method extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'arguments', + 'visibility', + 'extension_type', + 'joomla_plugin_group' + ), + 'right' => array( + 'comment' + ), + 'fullwidth' => array( + 'code' + ) + ) + ); + + /** + * @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.class_method'; + + /** + * 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 = 'class_method', $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->code)) + { + // base64 Decode code. + $item->code = base64_decode($item->code); + } + + if (!empty($item->comment)) + { + // base64 Decode comment. + $item->comment = base64_decode($item->comment); + } + + if (!empty($item->arguments)) + { + // base64 Decode arguments. + $item->arguments = base64_decode($item->arguments); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.class_method'); + } + } + + 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.class_method', 'class_method', $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('class_method.edit.state', 'com_componentbuilder.class_method.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_method.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('class_method.edit.created_by', 'com_componentbuilder.class_method.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_method.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('class_method.edit.created', 'com_componentbuilder.class_method.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_method.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); + } + } + + // update all editors to use this components global editor + $global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); + // now get all the editor fields + $editors = $form->getXml()->xpath("//field[@type='editor']"); + // check if we found any + if (ComponentbuilderHelper::checkArray($editors)) + { + foreach ($editors as $editor) + { + // get the field names + $name = (string) $editor['name']; + // set the field editor value (with none as fallback) + $form->setFieldAttribute($name, 'editor', $global_editor . '|none'); + } + } + + 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/class_method.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('class_method.delete', 'com_componentbuilder.class_method.' . (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('class_method.edit.state', 'com_componentbuilder.class_method.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('class_method.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('class_method.edit', 'com_componentbuilder.class_method.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('class_method.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_class_method')); + $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.class_method.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ + public function validate($form, $data, $group = null) + { + // check if the not_required field is set + if (ComponentbuilderHelper::checkString($data['not_required'])) + { + $requiredFields = (array) explode(',',(string) $data['not_required']); + $requiredFields = array_unique($requiredFields); + // now change the required field attributes value + foreach ($requiredFields as $requiredField) + { + // make sure there is a string value + if (ComponentbuilderHelper::checkString($requiredField)) + { + // change to false + $form->setFieldAttribute($requiredField, 'required', 'false'); + // also clear the data set + $data[$requiredField] = ''; + } + } + } + return parent::validate($form, $data, $group); + } + + /** + * 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('class_method'); + $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('class_method'); + } + + if (!$this->canDo->get('class_method.create') && !$this->canDo->get('class_method.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('class_method.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('class_method.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->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } + + // 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('class_method'); + } + + if (!$this->canDo->get('class_method.edit') && !$this->canDo->get('class_method.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('class_method.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('class_method.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; + } + + // make sure the name is safe to be used as a function name + $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); + + // Set the code string to base64 string. + if (isset($data['code'])) + { + $data['code'] = base64_encode($data['code']); + } + + // Set the comment string to base64 string. + if (isset($data['comment'])) + { + $data['comment'] = base64_encode($data['comment']); + } + + // Set the arguments string to base64 string. + if (isset($data['arguments'])) + { + $data['arguments'] = base64_encode($data['arguments']); + } + + // 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/class_methods.php b/admin/models/class_methods.php new file mode 100644 index 000000000..fd5ee8b88 --- /dev/null +++ b/admin/models/class_methods.php @@ -0,0 +1,431 @@ + + * @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'); + +/** + * Class_methods Model + */ +class ComponentbuilderModelClass_methods 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', + 'a.name','name', + 'a.visibility','visibility', + 'a.extension_type','extension_type' + ); + } + + 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; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility'); + $this->setState('filter.visibility', $visibility); + + $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); + $this->setState('filter.extension_type', $extension_type); + + $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('class_method.access', 'com_componentbuilder.class_method.' . (int) $item->id) && JFactory::getUser()->authorise('class_method.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert visibility + $item->visibility = $this->selectionTranslation($item->visibility, 'visibility'); + // convert extension_type + $item->extension_type = $this->selectionTranslation($item->extension_type, 'extension_type'); + } + } + + + // return items + return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of visibility language strings + if ($name === 'visibility') + { + $visibilityArray = array( + 'public' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC', + 'protected' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED', + 'private' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE' + ); + // Now check if value is found in this array + if (isset($visibilityArray[$value]) && ComponentbuilderHelper::checkString($visibilityArray[$value])) + { + return $visibilityArray[$value]; + } + } + // Array of extension_type language strings + if ($name === 'extension_type') + { + $extension_typeArray = array( + 0 => 'COM_COMPONENTBUILDER_CLASS_METHOD_SELECT_AN_OPTION', + 'components' => 'COM_COMPONENTBUILDER_CLASS_METHOD_COMPONENTS', + 'plugins' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PLUGINS', + 'modules' => 'COM_COMPONENTBUILDER_CLASS_METHOD_MODULES' + ); + // Now check if value is found in this array + if (isset($extension_typeArray[$value]) && ComponentbuilderHelper::checkString($extension_typeArray[$value])) + { + return $extension_typeArray[$value]; + } + } + return $value; + } + + /** + * 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_class_method', 'a')); + + // From the componentbuilder_joomla_plugin_group table. + $query->select($db->quoteName('g.name','joomla_plugin_group_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin_group', 'g') . ' ON (' . $db->quoteName('a.joomla_plugin_group') . ' = ' . $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 . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.visibility LIKE '.$search.' OR a.extension_type LIKE '.$search.' OR a.comment LIKE '.$search.' OR a.arguments LIKE '.$search.')'); + } + } + + // Filter by Visibility. + if ($visibility = $this->getState('filter.visibility')) + { + $query->where('a.visibility = ' . $db->quote($db->escape($visibility))); + } + // Filter by Extension_type. + if ($extension_type = $this->getState('filter.extension_type')) + { + $query->where('a.extension_type = ' . $db->quote($db->escape($extension_type))); + } + + // 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 list export data. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExportData($pks) + { + // setup the query + if (ComponentbuilderHelper::checkArray($pks)) + { + // Set a value to know this is exporting method. + $_export = true; + // 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_class_method table + $query->from($db->quoteName('#__componentbuilder_class_method', 'a')); + $query->where('a.id IN (' . implode(',',$pks) . ')'); + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + $access = (JFactory::getUser()->authorise('class_method.access', 'com_componentbuilder.class_method.' . (int) $item->id) && JFactory::getUser()->authorise('class_method.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + // decode code + $item->code = base64_decode($item->code); + // decode comment + $item->comment = base64_decode($item->comment); + // decode arguments + $item->arguments = base64_decode($item->arguments); + // unset the values we don't want exported. + unset($item->asset_id); + unset($item->checked_out); + unset($item->checked_out_time); + } + } + // Add headers to items array. + $headers = $this->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + array_unshift($items,$headers); + } + return $items; + } + } + return false; + } + + /** + * Method to get header. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExImPortHeaders() + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__componentbuilder_class_method"); + if (ComponentbuilderHelper::checkArray($columns)) + { + // remove the headers you don't import/export. + unset($columns['asset_id']); + unset($columns['checked_out']); + unset($columns['checked_out_time']); + $headers = new stdClass(); + foreach ($columns as $column => $type) + { + $headers->{$column} = $column; + } + return $headers; + } + return false; + } + + /** + * 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'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.visibility'); + $id .= ':' . $this->getState('filter.extension_type'); + + 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_class_method')); + $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_class_method'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php new file mode 100644 index 000000000..e5d157df0 --- /dev/null +++ b/admin/models/class_properties.php @@ -0,0 +1,429 @@ + + * @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'); + +/** + * Class_properties Model + */ +class ComponentbuilderModelClass_properties 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', + 'a.name','name', + 'a.visibility','visibility', + 'a.extension_type','extension_type' + ); + } + + 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; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility'); + $this->setState('filter.visibility', $visibility); + + $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); + $this->setState('filter.extension_type', $extension_type); + + $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('class_property.access', 'com_componentbuilder.class_property.' . (int) $item->id) && JFactory::getUser()->authorise('class_property.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert visibility + $item->visibility = $this->selectionTranslation($item->visibility, 'visibility'); + // convert extension_type + $item->extension_type = $this->selectionTranslation($item->extension_type, 'extension_type'); + } + } + + + // return items + return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of visibility language strings + if ($name === 'visibility') + { + $visibilityArray = array( + 'public' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC', + 'protected' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED', + 'private' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE' + ); + // Now check if value is found in this array + if (isset($visibilityArray[$value]) && ComponentbuilderHelper::checkString($visibilityArray[$value])) + { + return $visibilityArray[$value]; + } + } + // Array of extension_type language strings + if ($name === 'extension_type') + { + $extension_typeArray = array( + 0 => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_SELECT_AN_OPTION', + 'components' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_COMPONENTS', + 'plugins' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PLUGINS', + 'modules' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_MODULES' + ); + // Now check if value is found in this array + if (isset($extension_typeArray[$value]) && ComponentbuilderHelper::checkString($extension_typeArray[$value])) + { + return $extension_typeArray[$value]; + } + } + return $value; + } + + /** + * 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_class_property', 'a')); + + // From the componentbuilder_joomla_plugin_group table. + $query->select($db->quoteName('g.name','joomla_plugin_group_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin_group', 'g') . ' ON (' . $db->quoteName('a.joomla_plugin_group') . ' = ' . $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 . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.visibility LIKE '.$search.' OR a.extension_type LIKE '.$search.' OR a.comment LIKE '.$search.')'); + } + } + + // Filter by Visibility. + if ($visibility = $this->getState('filter.visibility')) + { + $query->where('a.visibility = ' . $db->quote($db->escape($visibility))); + } + // Filter by Extension_type. + if ($extension_type = $this->getState('filter.extension_type')) + { + $query->where('a.extension_type = ' . $db->quote($db->escape($extension_type))); + } + + // 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 list export data. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExportData($pks) + { + // setup the query + if (ComponentbuilderHelper::checkArray($pks)) + { + // Set a value to know this is exporting method. + $_export = true; + // 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_class_property table + $query->from($db->quoteName('#__componentbuilder_class_property', 'a')); + $query->where('a.id IN (' . implode(',',$pks) . ')'); + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + $access = (JFactory::getUser()->authorise('class_property.access', 'com_componentbuilder.class_property.' . (int) $item->id) && JFactory::getUser()->authorise('class_property.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + // decode comment + $item->comment = base64_decode($item->comment); + // decode default + $item->default = base64_decode($item->default); + // unset the values we don't want exported. + unset($item->asset_id); + unset($item->checked_out); + unset($item->checked_out_time); + } + } + // Add headers to items array. + $headers = $this->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + array_unshift($items,$headers); + } + return $items; + } + } + return false; + } + + /** + * Method to get header. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExImPortHeaders() + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__componentbuilder_class_property"); + if (ComponentbuilderHelper::checkArray($columns)) + { + // remove the headers you don't import/export. + unset($columns['asset_id']); + unset($columns['checked_out']); + unset($columns['checked_out_time']); + $headers = new stdClass(); + foreach ($columns as $column => $type) + { + $headers->{$column} = $column; + } + return $headers; + } + return false; + } + + /** + * 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'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.visibility'); + $id .= ':' . $this->getState('filter.extension_type'); + + 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_class_property')); + $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_class_property'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/class_property.php b/admin/models/class_property.php new file mode 100644 index 000000000..4557ceb53 --- /dev/null +++ b/admin/models/class_property.php @@ -0,0 +1,943 @@ + + * @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 Class_property Model + */ +class ComponentbuilderModelClass_property extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'visibility', + 'default', + 'extension_type', + 'joomla_plugin_group' + ), + 'right' => array( + 'comment' + ) + ) + ); + + /** + * @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.class_property'; + + /** + * 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 = 'class_property', $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->comment)) + { + // base64 Decode comment. + $item->comment = base64_decode($item->comment); + } + + if (!empty($item->default)) + { + // base64 Decode default. + $item->default = base64_decode($item->default); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.class_property'); + } + } + + 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.class_property', 'class_property', $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('class_property.edit.state', 'com_componentbuilder.class_property.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_property.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('class_property.edit.created_by', 'com_componentbuilder.class_property.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_property.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('class_property.edit.created', 'com_componentbuilder.class_property.' . (int) $id)) + || ($id == 0 && !$user->authorise('class_property.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); + } + } + + // update all editors to use this components global editor + $global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); + // now get all the editor fields + $editors = $form->getXml()->xpath("//field[@type='editor']"); + // check if we found any + if (ComponentbuilderHelper::checkArray($editors)) + { + foreach ($editors as $editor) + { + // get the field names + $name = (string) $editor['name']; + // set the field editor value (with none as fallback) + $form->setFieldAttribute($name, 'editor', $global_editor . '|none'); + } + } + + 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/class_property.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('class_property.delete', 'com_componentbuilder.class_property.' . (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('class_property.edit.state', 'com_componentbuilder.class_property.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('class_property.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('class_property.edit', 'com_componentbuilder.class_property.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('class_property.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_class_property')); + $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.class_property.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ + public function validate($form, $data, $group = null) + { + // check if the not_required field is set + if (ComponentbuilderHelper::checkString($data['not_required'])) + { + $requiredFields = (array) explode(',',(string) $data['not_required']); + $requiredFields = array_unique($requiredFields); + // now change the required field attributes value + foreach ($requiredFields as $requiredField) + { + // make sure there is a string value + if (ComponentbuilderHelper::checkString($requiredField)) + { + // change to false + $form->setFieldAttribute($requiredField, 'required', 'false'); + // also clear the data set + $data[$requiredField] = ''; + } + } + } + return parent::validate($form, $data, $group); + } + + /** + * 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('class_property'); + $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('class_property'); + } + + if (!$this->canDo->get('class_property.create') && !$this->canDo->get('class_property.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('class_property.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('class_property.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->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } + + // 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('class_property'); + } + + if (!$this->canDo->get('class_property.edit') && !$this->canDo->get('class_property.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('class_property.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('class_property.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; + } + + // make sure the name is safe to be used as a function name + $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); + + // Set the comment string to base64 string. + if (isset($data['comment'])) + { + $data['comment'] = base64_encode($data['comment']); + } + + // Set the default string to base64 string. + if (isset($data['default'])) + { + $data['default'] = base64_encode($data['default']); + } + + // 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/component_dashboard.php b/admin/models/component_dashboard.php index 3c386aeeb..38d85aca3 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -27,6 +27,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin protected $tabLayoutFields = array( 'dashboard' => array( 'fullwidth' => array( + 'note_php_dashboard_note', 'php_dashboard_methods', 'dashboard_tab' ), diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index b59609f41..d727bbf87 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -25,7 +25,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_plugins', 'png.admin_view.add', 'png.admin_views', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents') ); // view access array $viewAccess = array( @@ -38,7 +38,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'joomla_component.access' => 'joomla_component.access', 'joomla_components.submenu' => 'joomla_component.submenu', 'joomla_components.dashboard_list' => 'joomla_component.dashboard_list', - 'joomla_component.dashboard_add' => 'joomla_component.dashboard_add', + 'joomla_plugin.create' => 'joomla_plugin.create', + 'joomla_plugins.access' => 'joomla_plugin.access', + 'joomla_plugin.access' => 'joomla_plugin.access', + 'joomla_plugins.submenu' => 'joomla_plugin.submenu', + 'joomla_plugins.dashboard_list' => 'joomla_plugin.dashboard_list', 'admin_view.create' => 'admin_view.create', 'admin_views.access' => 'admin_view.access', 'admin_view.access' => 'admin_view.access', @@ -76,6 +80,12 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'custom_code.access' => 'custom_code.access', 'custom_codes.submenu' => 'custom_code.submenu', 'custom_codes.dashboard_list' => 'custom_code.dashboard_list', + 'class_property.create' => 'class_property.create', + 'class_properties.access' => 'class_property.access', + 'class_property.access' => 'class_property.access', + 'class_method.create' => 'class_method.create', + 'class_methods.access' => 'class_method.access', + 'class_method.access' => 'class_method.access', 'placeholder.create' => 'placeholder.create', 'placeholders.access' => 'placeholder.access', 'placeholder.access' => 'placeholder.access', @@ -175,7 +185,12 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'library_config.access' => 'library_config.access', 'library_files_folders_urls.create' => 'library_files_folders_urls.create', 'libraries_files_folders_urls.access' => 'library_files_folders_urls.access', - 'library_files_folders_urls.access' => 'library_files_folders_urls.access'); + 'library_files_folders_urls.access' => 'library_files_folders_urls.access', + 'class_extends.create' => 'class_extends.create', + 'class_extendings.access' => 'class_extends.access', + 'class_extends.access' => 'class_extends.access', + 'joomla_plugin_groups.access' => 'joomla_plugin_group.access', + 'joomla_plugin_group.access' => 'joomla_plugin_group.access'); // loop over the $views foreach($viewGroups as $group => $views) { diff --git a/admin/models/fields/classextends.php b/admin/models/fields/classextends.php new file mode 100644 index 000000000..5fdc5bc83 --- /dev/null +++ b/admin/models/fields/classextends.php @@ -0,0 +1,174 @@ + + * @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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classextends Form Field class for the Componentbuilder component + */ +class JFormFieldClassextends extends JFormFieldList +{ + /** + * The classextends field type. + * + * @var string + */ + public $type = 'classextends'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create class_extends + if ($user->authorise('class_extends.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit class_extends + if ($user->authorise('class_extends.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=class_extendings&task=class_extends.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for class_extends field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','class_extends_name'))); + $query->from($db->quoteName('#__componentbuilder_class_extends', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.name ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_class_extends'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select a class'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->class_extends_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/joomlaplugingroups.php b/admin/models/fields/joomlaplugingroups.php new file mode 100644 index 000000000..92ec0955c --- /dev/null +++ b/admin/models/fields/joomlaplugingroups.php @@ -0,0 +1,174 @@ + + * @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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Joomlaplugingroups Form Field class for the Componentbuilder component + */ +class JFormFieldJoomlaplugingroups extends JFormFieldList +{ + /** + * The joomlaplugingroups field type. + * + * @var string + */ + public $type = 'joomlaplugingroups'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create joomla_plugin_group + if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit joomla_plugin_group + if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=joomla_plugin_group.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for joomla_plugin_group field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','joomla_plugin_group_name'))); + $query->from($db->quoteName('#__componentbuilder_joomla_plugin_group', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.name ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_joomla_plugin_group'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select a group'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->joomla_plugin_group_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/pluginsclassmethods.php b/admin/models/fields/pluginsclassmethods.php new file mode 100644 index 000000000..c59817bbe --- /dev/null +++ b/admin/models/fields/pluginsclassmethods.php @@ -0,0 +1,81 @@ + + * @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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Pluginsclassmethods Form Field class for the Componentbuilder component + */ +class JFormFieldPluginsclassmethods extends JFormFieldList +{ + /** + * The pluginsclassmethods field type. + * + * @var string + */ + public $type = 'pluginsclassmethods'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + +// Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name','a.visibility'),array('id','method_name','visibility'))); + $query->from($db->quoteName('#__componentbuilder_class_method', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->where($db->quoteName('a.extension_type') . ' = ' . $db->quote('plugins')); + $query->order('a.name ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_class_method'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select a method'); + foreach($items as $item) + { + // we are using this code in more then one field JCB custom_code + if ('method' === 'method') + { + $select = $item->visibility . ' function ' . $item->method_name . '()'; + } + else + { + $select = $item->visibility . ' $' . $item->method_name; + } + $options[] = JHtml::_('select.option', $item->id, $select); + } + } + return $options; + } +} diff --git a/admin/models/fields/pluginsclassproperties.php b/admin/models/fields/pluginsclassproperties.php new file mode 100644 index 000000000..6aa830d64 --- /dev/null +++ b/admin/models/fields/pluginsclassproperties.php @@ -0,0 +1,81 @@ + + * @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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Pluginsclassproperties Form Field class for the Componentbuilder component + */ +class JFormFieldPluginsclassproperties extends JFormFieldList +{ + /** + * The pluginsclassproperties field type. + * + * @var string + */ + public $type = 'pluginsclassproperties'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + +// Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name','a.visibility'),array('id','property_name','visibility'))); + $query->from($db->quoteName('#__componentbuilder_class_property', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->where($db->quoteName('a.extension_type') . ' = ' . $db->quote('plugins')); + $query->order('a.name ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_class_property'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select a property'); + foreach($items as $item) + { + // we are using this code in more then one field JCB custom_code + if ('method' === 'property') + { + $select = $item->visibility . ' function ' . $item->property_name . '()'; + } + else + { + $select = $item->visibility . ' $' . $item->property_name; + } + $options[] = JHtml::_('select.option', $item->id, $select); + } + } + return $options; + } +} diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 1c4f8c295..04bfa9450 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -203,7 +203,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVxqfields() + public function getVxsfields() { // Get the user object. $user = JFactory::getUser(); @@ -285,13 +285,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVxqfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVxsfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVxqfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVxsfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVxqfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVxsfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVxqfields($item->store, 'store'); + $item->store = $this->selectionTranslationVxsfields($item->store, 'store'); } } @@ -305,7 +305,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVxqfields($value,$name) + public function selectionTranslationVxsfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index d4c61abbc..14d738498 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,123 +9,123 @@ */ // Some Global Values -jform_vvvvvybvwd_required = false; -jform_vvvvvycvwe_required = false; -jform_vvvvvygvwf_required = false; -jform_vvvvvygvwg_required = false; -jform_vvvvvygvwh_required = false; -jform_vvvvvygvwi_required = false; -jform_vvvvvygvwj_required = false; -jform_vvvvvygvwk_required = false; -jform_vvvvvygvwl_required = false; +jform_vvvvvydvwd_required = false; +jform_vvvvvyevwe_required = false; +jform_vvvvvyivwf_required = false; +jform_vvvvvyivwg_required = false; +jform_vvvvvyivwh_required = false; +jform_vvvvvyivwi_required = false; +jform_vvvvvyivwj_required = false; +jform_vvvvvyivwk_required = false; +jform_vvvvvyivwl_required = false; // Initial Script jQuery(document).ready(function() { - var add_css_view_vvvvvxb = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvvxb(add_css_view_vvvvvxb); + var add_css_view_vvvvvxd = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvvxd(add_css_view_vvvvvxd); - var add_css_views_vvvvvxc = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvvxc(add_css_views_vvvvvxc); + var add_css_views_vvvvvxe = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvvxe(add_css_views_vvvvvxe); - var add_javascript_view_file_vvvvvxd = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); - vvvvvxd(add_javascript_view_file_vvvvvxd); + var add_javascript_view_file_vvvvvxf = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); + vvvvvxf(add_javascript_view_file_vvvvvxf); - var add_javascript_views_file_vvvvvxe = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); - vvvvvxe(add_javascript_views_file_vvvvvxe); + var add_javascript_views_file_vvvvvxg = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); + vvvvvxg(add_javascript_views_file_vvvvvxg); - var add_javascript_view_footer_vvvvvxf = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvvxf(add_javascript_view_footer_vvvvvxf); + var add_javascript_view_footer_vvvvvxh = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvvxh(add_javascript_view_footer_vvvvvxh); - var add_javascript_views_footer_vvvvvxg = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvvxg(add_javascript_views_footer_vvvvvxg); + var add_javascript_views_footer_vvvvvxi = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvvxi(add_javascript_views_footer_vvvvvxi); - var add_php_ajax_vvvvvxh = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvxh(add_php_ajax_vvvvvxh); + var add_php_ajax_vvvvvxj = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvxj(add_php_ajax_vvvvvxj); - var add_php_getitem_vvvvvxi = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); - vvvvvxi(add_php_getitem_vvvvvxi); + var add_php_getitem_vvvvvxk = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); + vvvvvxk(add_php_getitem_vvvvvxk); - var add_php_getitems_vvvvvxj = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); - vvvvvxj(add_php_getitems_vvvvvxj); + var add_php_getitems_vvvvvxl = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); + vvvvvxl(add_php_getitems_vvvvvxl); - var add_php_getitems_after_all_vvvvvxk = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); - vvvvvxk(add_php_getitems_after_all_vvvvvxk); + var add_php_getitems_after_all_vvvvvxm = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); + vvvvvxm(add_php_getitems_after_all_vvvvvxm); - var add_php_getlistquery_vvvvvxl = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); - vvvvvxl(add_php_getlistquery_vvvvvxl); + var add_php_getlistquery_vvvvvxn = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + vvvvvxn(add_php_getlistquery_vvvvvxn); - var add_php_getform_vvvvvxm = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); - vvvvvxm(add_php_getform_vvvvvxm); + var add_php_getform_vvvvvxo = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); + vvvvvxo(add_php_getform_vvvvvxo); - var add_php_before_save_vvvvvxn = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); - vvvvvxn(add_php_before_save_vvvvvxn); + var add_php_before_save_vvvvvxp = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); + vvvvvxp(add_php_before_save_vvvvvxp); - var add_php_save_vvvvvxo = jQuery("#jform_add_php_save input[type='radio']:checked").val(); - vvvvvxo(add_php_save_vvvvvxo); + var add_php_save_vvvvvxq = jQuery("#jform_add_php_save input[type='radio']:checked").val(); + vvvvvxq(add_php_save_vvvvvxq); - var add_php_postsavehook_vvvvvxp = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); - vvvvvxp(add_php_postsavehook_vvvvvxp); + var add_php_postsavehook_vvvvvxr = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); + vvvvvxr(add_php_postsavehook_vvvvvxr); - var add_php_allowadd_vvvvvxq = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); - vvvvvxq(add_php_allowadd_vvvvvxq); + var add_php_allowadd_vvvvvxs = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); + vvvvvxs(add_php_allowadd_vvvvvxs); - var add_php_allowedit_vvvvvxr = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); - vvvvvxr(add_php_allowedit_vvvvvxr); + var add_php_allowedit_vvvvvxt = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); + vvvvvxt(add_php_allowedit_vvvvvxt); - var add_php_before_cancel_vvvvvxs = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); - vvvvvxs(add_php_before_cancel_vvvvvxs); + var add_php_before_cancel_vvvvvxu = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvxu(add_php_before_cancel_vvvvvxu); - var add_php_after_cancel_vvvvvxt = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); - vvvvvxt(add_php_after_cancel_vvvvvxt); + var add_php_after_cancel_vvvvvxv = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); + vvvvvxv(add_php_after_cancel_vvvvvxv); - var add_php_batchcopy_vvvvvxu = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxu(add_php_batchcopy_vvvvvxu); + var add_php_batchcopy_vvvvvxw = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxw(add_php_batchcopy_vvvvvxw); - var add_php_batchmove_vvvvvxv = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxv(add_php_batchmove_vvvvvxv); + var add_php_batchmove_vvvvvxx = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxx(add_php_batchmove_vvvvvxx); - var add_php_before_publish_vvvvvxw = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxw(add_php_before_publish_vvvvvxw); + var add_php_before_publish_vvvvvxy = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxy(add_php_before_publish_vvvvvxy); - var add_php_after_publish_vvvvvxx = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxx(add_php_after_publish_vvvvvxx); + var add_php_after_publish_vvvvvxz = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxz(add_php_after_publish_vvvvvxz); - var add_php_before_delete_vvvvvxy = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxy(add_php_before_delete_vvvvvxy); + var add_php_before_delete_vvvvvya = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvya(add_php_before_delete_vvvvvya); - var add_php_after_delete_vvvvvxz = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxz(add_php_after_delete_vvvvvxz); + var add_php_after_delete_vvvvvyb = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvyb(add_php_after_delete_vvvvvyb); - var add_php_document_vvvvvya = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvya(add_php_document_vvvvvya); + var add_php_document_vvvvvyc = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyc(add_php_document_vvvvvyc); - var add_sql_vvvvvyb = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyb(add_sql_vvvvvyb); - - var source_vvvvvyc = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvyc = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc); + var add_sql_vvvvvyd = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyd(add_sql_vvvvvyd); var source_vvvvvye = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvye = jQuery("#jform_add_sql input[type='radio']:checked").val(); vvvvvye(source_vvvvvye,add_sql_vvvvvye); - var add_custom_import_vvvvvyg = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvyg(add_custom_import_vvvvvyg); + var source_vvvvvyg = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyg = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyg(source_vvvvvyg,add_sql_vvvvvyg); - var add_custom_import_vvvvvyh = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvyh(add_custom_import_vvvvvyh); + var add_custom_import_vvvvvyi = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyi(add_custom_import_vvvvvyi); - var add_custom_button_vvvvvyi = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyi(add_custom_button_vvvvvyi); + var add_custom_import_vvvvvyj = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyj(add_custom_import_vvvvvyj); + + var add_custom_button_vvvvvyk = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyk(add_custom_button_vvvvvyk); }); -// the vvvvvxb function -function vvvvvxb(add_css_view_vvvvvxb) +// the vvvvvxd function +function vvvvvxd(add_css_view_vvvvvxd) { // set the function logic - if (add_css_view_vvvvvxb == 1) + if (add_css_view_vvvvvxd == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -135,11 +135,11 @@ function vvvvvxb(add_css_view_vvvvvxb) } } -// the vvvvvxc function -function vvvvvxc(add_css_views_vvvvvxc) +// the vvvvvxe function +function vvvvvxe(add_css_views_vvvvvxe) { // set the function logic - if (add_css_views_vvvvvxc == 1) + if (add_css_views_vvvvvxe == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -149,11 +149,11 @@ function vvvvvxc(add_css_views_vvvvvxc) } } -// the vvvvvxd function -function vvvvvxd(add_javascript_view_file_vvvvvxd) +// the vvvvvxf function +function vvvvvxf(add_javascript_view_file_vvvvvxf) { // set the function logic - if (add_javascript_view_file_vvvvvxd == 1) + if (add_javascript_view_file_vvvvvxf == 1) { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show(); } @@ -163,11 +163,11 @@ function vvvvvxd(add_javascript_view_file_vvvvvxd) } } -// the vvvvvxe function -function vvvvvxe(add_javascript_views_file_vvvvvxe) +// the vvvvvxg function +function vvvvvxg(add_javascript_views_file_vvvvvxg) { // set the function logic - if (add_javascript_views_file_vvvvvxe == 1) + if (add_javascript_views_file_vvvvvxg == 1) { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show(); } @@ -177,11 +177,11 @@ function vvvvvxe(add_javascript_views_file_vvvvvxe) } } -// the vvvvvxf function -function vvvvvxf(add_javascript_view_footer_vvvvvxf) +// the vvvvvxh function +function vvvvvxh(add_javascript_view_footer_vvvvvxh) { // set the function logic - if (add_javascript_view_footer_vvvvvxf == 1) + if (add_javascript_view_footer_vvvvvxh == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -191,11 +191,11 @@ function vvvvvxf(add_javascript_view_footer_vvvvvxf) } } -// the vvvvvxg function -function vvvvvxg(add_javascript_views_footer_vvvvvxg) +// the vvvvvxi function +function vvvvvxi(add_javascript_views_footer_vvvvvxi) { // set the function logic - if (add_javascript_views_footer_vvvvvxg == 1) + if (add_javascript_views_footer_vvvvvxi == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } @@ -205,11 +205,11 @@ function vvvvvxg(add_javascript_views_footer_vvvvvxg) } } -// the vvvvvxh function -function vvvvvxh(add_php_ajax_vvvvvxh) +// the vvvvvxj function +function vvvvvxj(add_php_ajax_vvvvvxj) { // set the function logic - if (add_php_ajax_vvvvvxh == 1) + if (add_php_ajax_vvvvvxj == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); @@ -221,11 +221,11 @@ function vvvvvxh(add_php_ajax_vvvvvxh) } } -// the vvvvvxi function -function vvvvvxi(add_php_getitem_vvvvvxi) +// the vvvvvxk function +function vvvvvxk(add_php_getitem_vvvvvxk) { // set the function logic - if (add_php_getitem_vvvvvxi == 1) + if (add_php_getitem_vvvvvxk == 1) { jQuery('#jform_php_getitem-lbl').closest('.control-group').show(); } @@ -235,11 +235,11 @@ function vvvvvxi(add_php_getitem_vvvvvxi) } } -// the vvvvvxj function -function vvvvvxj(add_php_getitems_vvvvvxj) +// the vvvvvxl function +function vvvvvxl(add_php_getitems_vvvvvxl) { // set the function logic - if (add_php_getitems_vvvvvxj == 1) + if (add_php_getitems_vvvvvxl == 1) { jQuery('#jform_php_getitems-lbl').closest('.control-group').show(); } @@ -249,11 +249,11 @@ function vvvvvxj(add_php_getitems_vvvvvxj) } } -// the vvvvvxk function -function vvvvvxk(add_php_getitems_after_all_vvvvvxk) +// the vvvvvxm function +function vvvvvxm(add_php_getitems_after_all_vvvvvxm) { // set the function logic - if (add_php_getitems_after_all_vvvvvxk == 1) + if (add_php_getitems_after_all_vvvvvxm == 1) { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show(); } @@ -263,11 +263,11 @@ function vvvvvxk(add_php_getitems_after_all_vvvvvxk) } } -// the vvvvvxl function -function vvvvvxl(add_php_getlistquery_vvvvvxl) +// the vvvvvxn function +function vvvvvxn(add_php_getlistquery_vvvvvxn) { // set the function logic - if (add_php_getlistquery_vvvvvxl == 1) + if (add_php_getlistquery_vvvvvxn == 1) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } @@ -277,11 +277,11 @@ function vvvvvxl(add_php_getlistquery_vvvvvxl) } } -// the vvvvvxm function -function vvvvvxm(add_php_getform_vvvvvxm) +// the vvvvvxo function +function vvvvvxo(add_php_getform_vvvvvxo) { // set the function logic - if (add_php_getform_vvvvvxm == 1) + if (add_php_getform_vvvvvxo == 1) { jQuery('#jform_php_getform-lbl').closest('.control-group').show(); } @@ -291,11 +291,11 @@ function vvvvvxm(add_php_getform_vvvvvxm) } } -// the vvvvvxn function -function vvvvvxn(add_php_before_save_vvvvvxn) +// the vvvvvxp function +function vvvvvxp(add_php_before_save_vvvvvxp) { // set the function logic - if (add_php_before_save_vvvvvxn == 1) + if (add_php_before_save_vvvvvxp == 1) { jQuery('#jform_php_before_save-lbl').closest('.control-group').show(); } @@ -305,11 +305,11 @@ function vvvvvxn(add_php_before_save_vvvvvxn) } } -// the vvvvvxo function -function vvvvvxo(add_php_save_vvvvvxo) +// the vvvvvxq function +function vvvvvxq(add_php_save_vvvvvxq) { // set the function logic - if (add_php_save_vvvvvxo == 1) + if (add_php_save_vvvvvxq == 1) { jQuery('#jform_php_save-lbl').closest('.control-group').show(); } @@ -319,11 +319,11 @@ function vvvvvxo(add_php_save_vvvvvxo) } } -// the vvvvvxp function -function vvvvvxp(add_php_postsavehook_vvvvvxp) +// the vvvvvxr function +function vvvvvxr(add_php_postsavehook_vvvvvxr) { // set the function logic - if (add_php_postsavehook_vvvvvxp == 1) + if (add_php_postsavehook_vvvvvxr == 1) { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show(); } @@ -333,11 +333,11 @@ function vvvvvxp(add_php_postsavehook_vvvvvxp) } } -// the vvvvvxq function -function vvvvvxq(add_php_allowadd_vvvvvxq) +// the vvvvvxs function +function vvvvvxs(add_php_allowadd_vvvvvxs) { // set the function logic - if (add_php_allowadd_vvvvvxq == 1) + if (add_php_allowadd_vvvvvxs == 1) { jQuery('#jform_php_allowadd-lbl').closest('.control-group').show(); } @@ -347,11 +347,11 @@ function vvvvvxq(add_php_allowadd_vvvvvxq) } } -// the vvvvvxr function -function vvvvvxr(add_php_allowedit_vvvvvxr) +// the vvvvvxt function +function vvvvvxt(add_php_allowedit_vvvvvxt) { // set the function logic - if (add_php_allowedit_vvvvvxr == 1) + if (add_php_allowedit_vvvvvxt == 1) { jQuery('#jform_php_allowedit-lbl').closest('.control-group').show(); } @@ -361,11 +361,11 @@ function vvvvvxr(add_php_allowedit_vvvvvxr) } } -// the vvvvvxs function -function vvvvvxs(add_php_before_cancel_vvvvvxs) +// the vvvvvxu function +function vvvvvxu(add_php_before_cancel_vvvvvxu) { // set the function logic - if (add_php_before_cancel_vvvvvxs == 1) + if (add_php_before_cancel_vvvvvxu == 1) { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); } @@ -375,11 +375,11 @@ function vvvvvxs(add_php_before_cancel_vvvvvxs) } } -// the vvvvvxt function -function vvvvvxt(add_php_after_cancel_vvvvvxt) +// the vvvvvxv function +function vvvvvxv(add_php_after_cancel_vvvvvxv) { // set the function logic - if (add_php_after_cancel_vvvvvxt == 1) + if (add_php_after_cancel_vvvvvxv == 1) { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show(); } @@ -389,11 +389,11 @@ function vvvvvxt(add_php_after_cancel_vvvvvxt) } } -// the vvvvvxu function -function vvvvvxu(add_php_batchcopy_vvvvvxu) +// the vvvvvxw function +function vvvvvxw(add_php_batchcopy_vvvvvxw) { // set the function logic - if (add_php_batchcopy_vvvvvxu == 1) + if (add_php_batchcopy_vvvvvxw == 1) { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); } @@ -403,11 +403,11 @@ function vvvvvxu(add_php_batchcopy_vvvvvxu) } } -// the vvvvvxv function -function vvvvvxv(add_php_batchmove_vvvvvxv) +// the vvvvvxx function +function vvvvvxx(add_php_batchmove_vvvvvxx) { // set the function logic - if (add_php_batchmove_vvvvvxv == 1) + if (add_php_batchmove_vvvvvxx == 1) { jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); } @@ -417,11 +417,11 @@ function vvvvvxv(add_php_batchmove_vvvvvxv) } } -// the vvvvvxw function -function vvvvvxw(add_php_before_publish_vvvvvxw) +// the vvvvvxy function +function vvvvvxy(add_php_before_publish_vvvvvxy) { // set the function logic - if (add_php_before_publish_vvvvvxw == 1) + if (add_php_before_publish_vvvvvxy == 1) { jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); } @@ -431,11 +431,11 @@ function vvvvvxw(add_php_before_publish_vvvvvxw) } } -// the vvvvvxx function -function vvvvvxx(add_php_after_publish_vvvvvxx) +// the vvvvvxz function +function vvvvvxz(add_php_after_publish_vvvvvxz) { // set the function logic - if (add_php_after_publish_vvvvvxx == 1) + if (add_php_after_publish_vvvvvxz == 1) { jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); } @@ -445,11 +445,11 @@ function vvvvvxx(add_php_after_publish_vvvvvxx) } } -// the vvvvvxy function -function vvvvvxy(add_php_before_delete_vvvvvxy) +// the vvvvvya function +function vvvvvya(add_php_before_delete_vvvvvya) { // set the function logic - if (add_php_before_delete_vvvvvxy == 1) + if (add_php_before_delete_vvvvvya == 1) { jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); } @@ -459,11 +459,11 @@ function vvvvvxy(add_php_before_delete_vvvvvxy) } } -// the vvvvvxz function -function vvvvvxz(add_php_after_delete_vvvvvxz) +// the vvvvvyb function +function vvvvvyb(add_php_after_delete_vvvvvyb) { // set the function logic - if (add_php_after_delete_vvvvvxz == 1) + if (add_php_after_delete_vvvvvyb == 1) { jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); } @@ -473,11 +473,11 @@ function vvvvvxz(add_php_after_delete_vvvvvxz) } } -// the vvvvvya function -function vvvvvya(add_php_document_vvvvvya) +// the vvvvvyc function +function vvvvvyc(add_php_document_vvvvvyc) { // set the function logic - if (add_php_document_vvvvvya == 1) + if (add_php_document_vvvvvyc == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -487,66 +487,34 @@ function vvvvvya(add_php_document_vvvvvya) } } -// the vvvvvyb function -function vvvvvyb(add_sql_vvvvvyb) +// the vvvvvyd function +function vvvvvyd(add_sql_vvvvvyd) { // set the function logic - if (add_sql_vvvvvyb == 1) + if (add_sql_vvvvvyd == 1) { jQuery('#jform_source').closest('.control-group').show(); // add required attribute to source field - if (jform_vvvvvybvwd_required) + if (jform_vvvvvydvwd_required) { updateFieldRequired('source',0); jQuery('#jform_source').prop('required','required'); jQuery('#jform_source').attr('aria-required',true); jQuery('#jform_source').addClass('required'); - jform_vvvvvybvwd_required = false; + jform_vvvvvydvwd_required = false; } } else { jQuery('#jform_source').closest('.control-group').hide(); // remove required attribute from source field - if (!jform_vvvvvybvwd_required) + if (!jform_vvvvvydvwd_required) { updateFieldRequired('source',1); jQuery('#jform_source').removeAttr('required'); jQuery('#jform_source').removeAttr('aria-required'); jQuery('#jform_source').removeClass('required'); - jform_vvvvvybvwd_required = true; - } - } -} - -// the vvvvvyc function -function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) -{ - // set the function logic - if (source_vvvvvyc == 2 && add_sql_vvvvvyc == 1) - { - jQuery('#jform_sql').closest('.control-group').show(); - // add required attribute to sql field - if (jform_vvvvvycvwe_required) - { - updateFieldRequired('sql',0); - jQuery('#jform_sql').prop('required','required'); - jQuery('#jform_sql').attr('aria-required',true); - jQuery('#jform_sql').addClass('required'); - jform_vvvvvycvwe_required = false; - } - } - else - { - jQuery('#jform_sql').closest('.control-group').hide(); - // remove required attribute from sql field - if (!jform_vvvvvycvwe_required) - { - updateFieldRequired('sql',1); - jQuery('#jform_sql').removeAttr('required'); - jQuery('#jform_sql').removeAttr('aria-required'); - jQuery('#jform_sql').removeClass('required'); - jform_vvvvvycvwe_required = true; + jform_vvvvvydvwd_required = true; } } } @@ -555,7 +523,39 @@ function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) function vvvvvye(source_vvvvvye,add_sql_vvvvvye) { // set the function logic - if (source_vvvvvye == 1 && add_sql_vvvvvye == 1) + if (source_vvvvvye == 2 && add_sql_vvvvvye == 1) + { + jQuery('#jform_sql').closest('.control-group').show(); + // add required attribute to sql field + if (jform_vvvvvyevwe_required) + { + updateFieldRequired('sql',0); + jQuery('#jform_sql').prop('required','required'); + jQuery('#jform_sql').attr('aria-required',true); + jQuery('#jform_sql').addClass('required'); + jform_vvvvvyevwe_required = false; + } + } + else + { + jQuery('#jform_sql').closest('.control-group').hide(); + // remove required attribute from sql field + if (!jform_vvvvvyevwe_required) + { + updateFieldRequired('sql',1); + jQuery('#jform_sql').removeAttr('required'); + jQuery('#jform_sql').removeAttr('aria-required'); + jQuery('#jform_sql').removeClass('required'); + jform_vvvvvyevwe_required = true; + } + } +} + +// the vvvvvyg function +function vvvvvyg(source_vvvvvyg,add_sql_vvvvvyg) +{ + // set the function logic + if (source_vvvvvyg == 1 && add_sql_vvvvvyg == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -565,165 +565,165 @@ function vvvvvye(source_vvvvvye,add_sql_vvvvvye) } } -// the vvvvvyg function -function vvvvvyg(add_custom_import_vvvvvyg) +// the vvvvvyi function +function vvvvvyi(add_custom_import_vvvvvyi) { // set the function logic - if (add_custom_import_vvvvvyg == 1) + if (add_custom_import_vvvvvyi == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field - if (jform_vvvvvygvwf_required) + if (jform_vvvvvyivwf_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_vvvvvygvwf_required = false; + jform_vvvvvyivwf_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_vvvvvygvwg_required) + if (jform_vvvvvyivwg_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_vvvvvygvwg_required = false; + jform_vvvvvyivwg_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field - if (jform_vvvvvygvwh_required) + if (jform_vvvvvyivwh_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_vvvvvygvwh_required = false; + jform_vvvvvyivwh_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field - if (jform_vvvvvygvwi_required) + if (jform_vvvvvyivwi_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_vvvvvygvwi_required = false; + jform_vvvvvyivwi_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field - if (jform_vvvvvygvwj_required) + if (jform_vvvvvyivwj_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_vvvvvygvwj_required = false; + jform_vvvvvyivwj_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field - if (jform_vvvvvygvwk_required) + if (jform_vvvvvyivwk_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_vvvvvygvwk_required = false; + jform_vvvvvyivwk_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field - if (jform_vvvvvygvwl_required) + if (jform_vvvvvyivwl_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_vvvvvygvwl_required = false; + jform_vvvvvyivwl_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field - if (!jform_vvvvvygvwf_required) + if (!jform_vvvvvyivwf_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_vvvvvygvwf_required = true; + jform_vvvvvyivwf_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_vvvvvygvwg_required) + if (!jform_vvvvvyivwg_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_vvvvvygvwg_required = true; + jform_vvvvvyivwg_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field - if (!jform_vvvvvygvwh_required) + if (!jform_vvvvvyivwh_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_vvvvvygvwh_required = true; + jform_vvvvvyivwh_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field - if (!jform_vvvvvygvwi_required) + if (!jform_vvvvvyivwi_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_vvvvvygvwi_required = true; + jform_vvvvvyivwi_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field - if (!jform_vvvvvygvwj_required) + if (!jform_vvvvvyivwj_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_vvvvvygvwj_required = true; + jform_vvvvvyivwj_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field - if (!jform_vvvvvygvwk_required) + if (!jform_vvvvvyivwk_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_vvvvvygvwk_required = true; + jform_vvvvvyivwk_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field - if (!jform_vvvvvygvwl_required) + if (!jform_vvvvvyivwl_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_vvvvvygvwl_required = true; + jform_vvvvvyivwl_required = true; } } } -// the vvvvvyh function -function vvvvvyh(add_custom_import_vvvvvyh) +// the vvvvvyj function +function vvvvvyj(add_custom_import_vvvvvyj) { // set the function logic - if (add_custom_import_vvvvvyh == 0) + if (add_custom_import_vvvvvyj == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -733,11 +733,11 @@ function vvvvvyh(add_custom_import_vvvvvyh) } } -// the vvvvvyi function -function vvvvvyi(add_custom_button_vvvvvyi) +// the vvvvvyk function +function vvvvvyk(add_custom_button_vvvvvyk) { // set the function logic - if (add_custom_button_vvvvvyi == 1) + if (add_custom_button_vvvvvyk == 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_extends.js b/admin/models/forms/class_extends.js new file mode 100644 index 000000000..406de38ba --- /dev/null +++ b/admin/models/forms/class_extends.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/class_extends.xml b/admin/models/forms/class_extends.xml new file mode 100644 index 000000000..7f418a370 --- /dev/null +++ b/admin/models/forms/class_extends.xml @@ -0,0 +1,176 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/class_method.js b/admin/models/forms/class_method.js new file mode 100644 index 000000000..2f850ef20 --- /dev/null +++ b/admin/models/forms/class_method.js @@ -0,0 +1,111 @@ +/** + * @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 + */ + +// Some Global Values +jform_vvvvwaovxe_required = false; + +// Initial Script +jQuery(document).ready(function() +{ + var extension_type_vvvvwao = jQuery("#jform_extension_type").val(); + vvvvwao(extension_type_vvvvwao); +}); + +// the vvvvwao function +function vvvvwao(extension_type_vvvvwao) +{ + if (isSet(extension_type_vvvvwao) && extension_type_vvvvwao.constructor !== Array) + { + var temp_vvvvwao = extension_type_vvvvwao; + var extension_type_vvvvwao = []; + extension_type_vvvvwao.push(temp_vvvvwao); + } + else if (!isSet(extension_type_vvvvwao)) + { + var extension_type_vvvvwao = []; + } + var extension_type = extension_type_vvvvwao.some(extension_type_vvvvwao_SomeFunc); + + + // set this function logic + if (extension_type) + { + jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); + // add required attribute to joomla_plugin_group field + if (jform_vvvvwaovxe_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_vvvvwaovxe_required = false; + } + } + else + { + jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); + // remove required attribute from joomla_plugin_group field + if (!jform_vvvvwaovxe_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_vvvvwaovxe_required = true; + } + } +} + +// the vvvvwao Some function +function extension_type_vvvvwao_SomeFunc(extension_type_vvvvwao) +{ + // set the function logic + if (extension_type_vvvvwao == 'plugins' || extension_type_vvvvwao == 'plugin') + { + return true; + } + return false; +} + +// update required fields +function updateFieldRequired(name,status) +{ + var not_required = jQuery('#jform_not_required').val(); + + if(status == 1) + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required+','+name; + } + else + { + not_required = ','+name; + } + } + else + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required.replace(','+name,''); + } + } + + jQuery('#jform_not_required').val(not_required); +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} diff --git a/admin/models/forms/class_method.xml b/admin/models/forms/class_method.xml new file mode 100644 index 000000000..9c65bf583 --- /dev/null +++ b/admin/models/forms/class_method.xml @@ -0,0 +1,217 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/class_property.js b/admin/models/forms/class_property.js new file mode 100644 index 000000000..c048e3d67 --- /dev/null +++ b/admin/models/forms/class_property.js @@ -0,0 +1,111 @@ +/** + * @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 + */ + +// Some Global Values +jform_vvvvwanvxd_required = false; + +// Initial Script +jQuery(document).ready(function() +{ + var extension_type_vvvvwan = jQuery("#jform_extension_type").val(); + vvvvwan(extension_type_vvvvwan); +}); + +// the vvvvwan function +function vvvvwan(extension_type_vvvvwan) +{ + if (isSet(extension_type_vvvvwan) && extension_type_vvvvwan.constructor !== Array) + { + var temp_vvvvwan = extension_type_vvvvwan; + var extension_type_vvvvwan = []; + extension_type_vvvvwan.push(temp_vvvvwan); + } + else if (!isSet(extension_type_vvvvwan)) + { + var extension_type_vvvvwan = []; + } + var extension_type = extension_type_vvvvwan.some(extension_type_vvvvwan_SomeFunc); + + + // set this function logic + if (extension_type) + { + jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); + // add required attribute to joomla_plugin_group field + if (jform_vvvvwanvxd_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_vvvvwanvxd_required = false; + } + } + else + { + jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); + // remove required attribute from joomla_plugin_group field + if (!jform_vvvvwanvxd_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_vvvvwanvxd_required = true; + } + } +} + +// the vvvvwan Some function +function extension_type_vvvvwan_SomeFunc(extension_type_vvvvwan) +{ + // set the function logic + if (extension_type_vvvvwan == 'plugins' || extension_type_vvvvwan == 'plugin') + { + return true; + } + return false; +} + +// update required fields +function updateFieldRequired(name,status) +{ + var not_required = jQuery('#jform_not_required').val(); + + if(status == 1) + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required+','+name; + } + else + { + not_required = ','+name; + } + } + else + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required.replace(','+name,''); + } + } + + jQuery('#jform_not_required').val(not_required); +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} diff --git a/admin/models/forms/class_property.xml b/admin/models/forms/class_property.xml new file mode 100644 index 000000000..f72397049 --- /dev/null +++ b/admin/models/forms/class_property.xml @@ -0,0 +1,201 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/component_dashboard.xml b/admin/models/forms/component_dashboard.xml index cc70427cd..c9df3de30 100644 --- a/admin/models/forms/component_dashboard.xml +++ b/admin/models/forms/component_dashboard.xml @@ -98,6 +98,19 @@ readonly="true" button="false" /> + + - - + + diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index f14df1c29..e457b475f 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_vvvvvyj = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyj(add_php_view_vvvvvyj); + var add_php_view_vvvvvyl = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvyl(add_php_view_vvvvvyl); - var add_php_jview_display_vvvvvyk = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvyk(add_php_jview_display_vvvvvyk); + var add_php_jview_display_vvvvvym = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvym(add_php_jview_display_vvvvvym); - var add_php_jview_vvvvvyl = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvyl(add_php_jview_vvvvvyl); + var add_php_jview_vvvvvyn = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvyn(add_php_jview_vvvvvyn); - var add_php_document_vvvvvym = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvym(add_php_document_vvvvvym); + var add_php_document_vvvvvyo = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyo(add_php_document_vvvvvyo); - var add_css_document_vvvvvyn = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvyn(add_css_document_vvvvvyn); + var add_css_document_vvvvvyp = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvyp(add_css_document_vvvvvyp); - var add_javascript_file_vvvvvyo = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); - vvvvvyo(add_javascript_file_vvvvvyo); + var add_javascript_file_vvvvvyq = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); + vvvvvyq(add_javascript_file_vvvvvyq); - var add_js_document_vvvvvyp = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvyp(add_js_document_vvvvvyp); + var add_js_document_vvvvvyr = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvyr(add_js_document_vvvvvyr); - var add_custom_button_vvvvvyq = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyq(add_custom_button_vvvvvyq); + var add_custom_button_vvvvvys = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvys(add_custom_button_vvvvvys); - var add_css_vvvvvyr = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvyr(add_css_vvvvvyr); + var add_css_vvvvvyt = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvyt(add_css_vvvvvyt); - var add_php_ajax_vvvvvys = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvys(add_php_ajax_vvvvvys); + var add_php_ajax_vvvvvyu = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvyu(add_php_ajax_vvvvvyu); }); -// the vvvvvyj function -function vvvvvyj(add_php_view_vvvvvyj) +// the vvvvvyl function +function vvvvvyl(add_php_view_vvvvvyl) { // set the function logic - if (add_php_view_vvvvvyj == 1) + if (add_php_view_vvvvvyl == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } @@ -56,11 +56,11 @@ function vvvvvyj(add_php_view_vvvvvyj) } } -// the vvvvvyk function -function vvvvvyk(add_php_jview_display_vvvvvyk) +// the vvvvvym function +function vvvvvym(add_php_jview_display_vvvvvym) { // set the function logic - if (add_php_jview_display_vvvvvyk == 1) + if (add_php_jview_display_vvvvvym == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } @@ -70,11 +70,11 @@ function vvvvvyk(add_php_jview_display_vvvvvyk) } } -// the vvvvvyl function -function vvvvvyl(add_php_jview_vvvvvyl) +// the vvvvvyn function +function vvvvvyn(add_php_jview_vvvvvyn) { // set the function logic - if (add_php_jview_vvvvvyl == 1) + if (add_php_jview_vvvvvyn == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } @@ -84,11 +84,11 @@ function vvvvvyl(add_php_jview_vvvvvyl) } } -// the vvvvvym function -function vvvvvym(add_php_document_vvvvvym) +// the vvvvvyo function +function vvvvvyo(add_php_document_vvvvvyo) { // set the function logic - if (add_php_document_vvvvvym == 1) + if (add_php_document_vvvvvyo == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -98,11 +98,11 @@ function vvvvvym(add_php_document_vvvvvym) } } -// the vvvvvyn function -function vvvvvyn(add_css_document_vvvvvyn) +// the vvvvvyp function +function vvvvvyp(add_css_document_vvvvvyp) { // set the function logic - if (add_css_document_vvvvvyn == 1) + if (add_css_document_vvvvvyp == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } @@ -112,11 +112,11 @@ function vvvvvyn(add_css_document_vvvvvyn) } } -// the vvvvvyo function -function vvvvvyo(add_javascript_file_vvvvvyo) +// the vvvvvyq function +function vvvvvyq(add_javascript_file_vvvvvyq) { // set the function logic - if (add_javascript_file_vvvvvyo == 1) + if (add_javascript_file_vvvvvyq == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } @@ -126,11 +126,11 @@ function vvvvvyo(add_javascript_file_vvvvvyo) } } -// the vvvvvyp function -function vvvvvyp(add_js_document_vvvvvyp) +// the vvvvvyr function +function vvvvvyr(add_js_document_vvvvvyr) { // set the function logic - if (add_js_document_vvvvvyp == 1) + if (add_js_document_vvvvvyr == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } @@ -140,11 +140,11 @@ function vvvvvyp(add_js_document_vvvvvyp) } } -// the vvvvvyq function -function vvvvvyq(add_custom_button_vvvvvyq) +// the vvvvvys function +function vvvvvys(add_custom_button_vvvvvys) { // set the function logic - if (add_custom_button_vvvvvyq == 1) + if (add_custom_button_vvvvvys == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); @@ -158,11 +158,11 @@ function vvvvvyq(add_custom_button_vvvvvyq) } } -// the vvvvvyr function -function vvvvvyr(add_css_vvvvvyr) +// the vvvvvyt function +function vvvvvyt(add_css_vvvvvyt) { // set the function logic - if (add_css_vvvvvyr == 1) + if (add_css_vvvvvyt == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } @@ -172,11 +172,11 @@ function vvvvvyr(add_css_vvvvvyr) } } -// the vvvvvys function -function vvvvvys(add_php_ajax_vvvvvys) +// the vvvvvyu function +function vvvvvyu(add_php_ajax_vvvvvyu) { // set the function logic - if (add_php_ajax_vvvvvys == 1) + if (add_php_ajax_vvvvvyu == 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 061338a81..95e2b0589 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -9,44 +9,44 @@ */ // Some Global Values -jform_vvvvwahvwz_required = false; -jform_vvvvwaivxa_required = false; -jform_vvvvwaivxb_required = false; -jform_vvvvwaivxc_required = false; +jform_vvvvwajvwz_required = false; +jform_vvvvwakvxa_required = false; +jform_vvvvwakvxb_required = false; +jform_vvvvwakvxc_required = false; // Initial Script jQuery(document).ready(function() { - var target_vvvvwah = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwah(target_vvvvwah); - - var target_vvvvwai = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwai(target_vvvvwai); - var target_vvvvwaj = jQuery("#jform_target input[type='radio']:checked").val(); - var type_vvvvwaj = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvwaj(target_vvvvwaj,type_vvvvwaj); + vvvvwaj(target_vvvvwaj); - var type_vvvvwak = jQuery("#jform_type input[type='radio']:checked").val(); var target_vvvvwak = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwak(type_vvvvwak,target_vvvvwak); + vvvvwak(target_vvvvwak); + + var target_vvvvwal = jQuery("#jform_target input[type='radio']:checked").val(); + var type_vvvvwal = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwal(target_vvvvwal,type_vvvvwal); + + var type_vvvvwam = jQuery("#jform_type input[type='radio']:checked").val(); + var target_vvvvwam = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwam(type_vvvvwam,target_vvvvwam); }); -// the vvvvwah function -function vvvvwah(target_vvvvwah) +// the vvvvwaj function +function vvvvwaj(target_vvvvwaj) { // set the function logic - if (target_vvvvwah == 2) + if (target_vvvvwaj == 2) { jQuery('#jform_function_name').closest('.control-group').show(); // add required attribute to function_name field - if (jform_vvvvwahvwz_required) + if (jform_vvvvwajvwz_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_vvvvwahvwz_required = false; + jform_vvvvwajvwz_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); jQuery('#jform_system_name').closest('.control-group').show(); @@ -55,102 +55,102 @@ function vvvvwah(target_vvvvwah) { jQuery('#jform_function_name').closest('.control-group').hide(); // remove required attribute from function_name field - if (!jform_vvvvwahvwz_required) + if (!jform_vvvvwajvwz_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_vvvvwahvwz_required = true; + jform_vvvvwajvwz_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); } } -// the vvvvwai function -function vvvvwai(target_vvvvwai) +// the vvvvwak function +function vvvvwak(target_vvvvwak) { // set the function logic - if (target_vvvvwai == 1) + if (target_vvvvwak == 1) { jQuery('#jform_component').closest('.control-group').show(); // add required attribute to component field - if (jform_vvvvwaivxa_required) + if (jform_vvvvwakvxa_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); - jform_vvvvwaivxa_required = false; + jform_vvvvwakvxa_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field - if (jform_vvvvwaivxb_required) + if (jform_vvvvwakvxb_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvwaivxb_required = false; + jform_vvvvwakvxb_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_vvvvwaivxc_required) + if (jform_vvvvwakvxc_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); - jform_vvvvwaivxc_required = false; + jform_vvvvwakvxc_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); // remove required attribute from component field - if (!jform_vvvvwaivxa_required) + if (!jform_vvvvwakvxa_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); - jform_vvvvwaivxa_required = true; + jform_vvvvwakvxa_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field - if (!jform_vvvvwaivxb_required) + if (!jform_vvvvwakvxb_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvwaivxb_required = true; + jform_vvvvwakvxb_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_vvvvwaivxc_required) + if (!jform_vvvvwakvxc_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); - jform_vvvvwaivxc_required = true; + jform_vvvvwakvxc_required = true; } } } -// the vvvvwaj function -function vvvvwaj(target_vvvvwaj,type_vvvvwaj) +// the vvvvwal function +function vvvvwal(target_vvvvwal,type_vvvvwal) { // set the function logic - if (target_vvvvwaj == 1 && type_vvvvwaj == 1) + if (target_vvvvwal == 1 && type_vvvvwal == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); @@ -162,11 +162,11 @@ function vvvvwaj(target_vvvvwaj,type_vvvvwaj) } } -// the vvvvwak function -function vvvvwak(type_vvvvwak,target_vvvvwak) +// the vvvvwam function +function vvvvwam(type_vvvvwam,target_vvvvwam) { // set the function logic - if (type_vvvvwak == 1 && target_vvvvwak == 1) + if (type_vvvvwam == 1 && target_vvvvwam == 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 b527188fa..b9eea9c07 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -9,31 +9,25 @@ */ // Some Global Values -jform_vvvvvzgvwm_required = false; -jform_vvvvvzivwn_required = false; -jform_vvvvvzjvwo_required = false; -jform_vvvvvzkvwp_required = false; -jform_vvvvvzlvwq_required = false; -jform_vvvvvzwvwr_required = false; -jform_vvvvvzwvws_required = false; -jform_vvvvwabvwt_required = false; -jform_vvvvwabvwu_required = false; -jform_vvvvwabvwv_required = false; -jform_vvvvwacvww_required = false; -jform_vvvvwadvwx_required = false; -jform_vvvvwaevwy_required = false; +jform_vvvvvzivwm_required = false; +jform_vvvvvzkvwn_required = false; +jform_vvvvvzlvwo_required = false; +jform_vvvvvzmvwp_required = false; +jform_vvvvvznvwq_required = false; +jform_vvvvvzyvwr_required = false; +jform_vvvvvzyvws_required = false; +jform_vvvvwadvwt_required = false; +jform_vvvvwadvwu_required = false; +jform_vvvvwadvwv_required = false; +jform_vvvvwaevww_required = false; +jform_vvvvwafvwx_required = false; +jform_vvvvwagvwy_required = false; // Initial Script jQuery(document).ready(function() { - var gettype_vvvvvzg = jQuery("#jform_gettype").val(); - vvvvvzg(gettype_vvvvvzg); - - var main_source_vvvvvzh = jQuery("#jform_main_source").val(); - vvvvvzh(main_source_vvvvvzh); - - var main_source_vvvvvzi = jQuery("#jform_main_source").val(); - vvvvvzi(main_source_vvvvvzi); + var gettype_vvvvvzi = jQuery("#jform_gettype").val(); + vvvvvzi(gettype_vvvvvzi); var main_source_vvvvvzj = jQuery("#jform_main_source").val(); vvvvvzj(main_source_vvvvvzj); @@ -44,77 +38,83 @@ jQuery(document).ready(function() var main_source_vvvvvzl = jQuery("#jform_main_source").val(); vvvvvzl(main_source_vvvvvzl); - var addcalculation_vvvvvzm = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - vvvvvzm(addcalculation_vvvvvzm); + var main_source_vvvvvzm = jQuery("#jform_main_source").val(); + vvvvvzm(main_source_vvvvvzm); - var addcalculation_vvvvvzn = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - var gettype_vvvvvzn = jQuery("#jform_gettype").val(); - vvvvvzn(addcalculation_vvvvvzn,gettype_vvvvvzn); + var main_source_vvvvvzn = jQuery("#jform_main_source").val(); + vvvvvzn(main_source_vvvvvzn); var addcalculation_vvvvvzo = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - var gettype_vvvvvzo = jQuery("#jform_gettype").val(); - vvvvvzo(addcalculation_vvvvvzo,gettype_vvvvvzo); + vvvvvzo(addcalculation_vvvvvzo); - var main_source_vvvvvzr = jQuery("#jform_main_source").val(); - vvvvvzr(main_source_vvvvvzr); + var addcalculation_vvvvvzp = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + var gettype_vvvvvzp = jQuery("#jform_gettype").val(); + vvvvvzp(addcalculation_vvvvvzp,gettype_vvvvvzp); - var main_source_vvvvvzs = jQuery("#jform_main_source").val(); - vvvvvzs(main_source_vvvvvzs); + var addcalculation_vvvvvzq = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + var gettype_vvvvvzq = jQuery("#jform_gettype").val(); + vvvvvzq(addcalculation_vvvvvzq,gettype_vvvvvzq); - var add_php_before_getitem_vvvvvzt = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); - var gettype_vvvvvzt = jQuery("#jform_gettype").val(); - vvvvvzt(add_php_before_getitem_vvvvvzt,gettype_vvvvvzt); + var main_source_vvvvvzt = jQuery("#jform_main_source").val(); + vvvvvzt(main_source_vvvvvzt); - var add_php_after_getitem_vvvvvzu = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); - var gettype_vvvvvzu = jQuery("#jform_gettype").val(); - vvvvvzu(add_php_after_getitem_vvvvvzu,gettype_vvvvvzu); + var main_source_vvvvvzu = jQuery("#jform_main_source").val(); + vvvvvzu(main_source_vvvvvzu); + var add_php_before_getitem_vvvvvzv = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); + var gettype_vvvvvzv = jQuery("#jform_gettype").val(); + vvvvvzv(add_php_before_getitem_vvvvvzv,gettype_vvvvvzv); + + var add_php_after_getitem_vvvvvzw = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); var gettype_vvvvvzw = jQuery("#jform_gettype").val(); - vvvvvzw(gettype_vvvvvzw); + vvvvvzw(add_php_after_getitem_vvvvvzw,gettype_vvvvvzw); - var add_php_getlistquery_vvvvvzx = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); - var gettype_vvvvvzx = jQuery("#jform_gettype").val(); - vvvvvzx(add_php_getlistquery_vvvvvzx,gettype_vvvvvzx); - - var add_php_before_getitems_vvvvvzy = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); var gettype_vvvvvzy = jQuery("#jform_gettype").val(); - vvvvvzy(add_php_before_getitems_vvvvvzy,gettype_vvvvvzy); + vvvvvzy(gettype_vvvvvzy); - var add_php_after_getitems_vvvvvzz = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); + var add_php_getlistquery_vvvvvzz = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); var gettype_vvvvvzz = jQuery("#jform_gettype").val(); - vvvvvzz(add_php_after_getitems_vvvvvzz,gettype_vvvvvzz); + vvvvvzz(add_php_getlistquery_vvvvvzz,gettype_vvvvvzz); + var add_php_before_getitems_vvvvwaa = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); + var gettype_vvvvwaa = jQuery("#jform_gettype").val(); + vvvvwaa(add_php_before_getitems_vvvvwaa,gettype_vvvvwaa); + + var add_php_after_getitems_vvvvwab = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); var gettype_vvvvwab = jQuery("#jform_gettype").val(); - vvvvwab(gettype_vvvvwab); - - var gettype_vvvvwac = jQuery("#jform_gettype").val(); - vvvvwac(gettype_vvvvwac); + vvvvwab(add_php_after_getitems_vvvvwab,gettype_vvvvwab); var gettype_vvvvwad = jQuery("#jform_gettype").val(); vvvvwad(gettype_vvvvwad); var gettype_vvvvwae = jQuery("#jform_gettype").val(); - var add_php_router_parse_vvvvwae = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); - vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae); + vvvvwae(gettype_vvvvwae); + + var gettype_vvvvwaf = jQuery("#jform_gettype").val(); + vvvvwaf(gettype_vvvvwaf); var gettype_vvvvwag = jQuery("#jform_gettype").val(); - vvvvwag(gettype_vvvvwag); + var add_php_router_parse_vvvvwag = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); + vvvvwag(gettype_vvvvwag,add_php_router_parse_vvvvwag); + + var gettype_vvvvwai = jQuery("#jform_gettype").val(); + vvvvwai(gettype_vvvvwai); }); -// the vvvvvzg function -function vvvvvzg(gettype_vvvvvzg) +// the vvvvvzi function +function vvvvvzi(gettype_vvvvvzi) { - if (isSet(gettype_vvvvvzg) && gettype_vvvvvzg.constructor !== Array) + if (isSet(gettype_vvvvvzi) && gettype_vvvvvzi.constructor !== Array) { - var temp_vvvvvzg = gettype_vvvvvzg; - var gettype_vvvvvzg = []; - gettype_vvvvvzg.push(temp_vvvvvzg); + var temp_vvvvvzi = gettype_vvvvvzi; + var gettype_vvvvvzi = []; + gettype_vvvvvzi.push(temp_vvvvvzi); } - else if (!isSet(gettype_vvvvvzg)) + else if (!isSet(gettype_vvvvvzi)) { - var gettype_vvvvvzg = []; + var gettype_vvvvvzi = []; } - var gettype = gettype_vvvvvzg.some(gettype_vvvvvzg_SomeFunc); + var gettype = gettype_vvvvvzi.some(gettype_vvvvvzi_SomeFunc); // set this function logic @@ -122,129 +122,35 @@ function vvvvvzg(gettype_vvvvvzg) { jQuery('#jform_getcustom').closest('.control-group').show(); // add required attribute to getcustom field - if (jform_vvvvvzgvwm_required) + if (jform_vvvvvzivwm_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); - jform_vvvvvzgvwm_required = false; + jform_vvvvvzivwm_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); // remove required attribute from getcustom field - if (!jform_vvvvvzgvwm_required) + if (!jform_vvvvvzivwm_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); - jform_vvvvvzgvwm_required = true; - } - } -} - -// the vvvvvzg Some function -function gettype_vvvvvzg_SomeFunc(gettype_vvvvvzg) -{ - // set the function logic - if (gettype_vvvvvzg == 3 || gettype_vvvvvzg == 4) - { - return true; - } - return false; -} - -// the vvvvvzh function -function vvvvvzh(main_source_vvvvvzh) -{ - if (isSet(main_source_vvvvvzh) && main_source_vvvvvzh.constructor !== Array) - { - var temp_vvvvvzh = main_source_vvvvvzh; - var main_source_vvvvvzh = []; - main_source_vvvvvzh.push(temp_vvvvvzh); - } - else if (!isSet(main_source_vvvvvzh)) - { - var main_source_vvvvvzh = []; - } - var main_source = main_source_vvvvvzh.some(main_source_vvvvvzh_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 vvvvvzh Some function -function main_source_vvvvvzh_SomeFunc(main_source_vvvvvzh) -{ - // set the function logic - if (main_source_vvvvvzh == 1 || main_source_vvvvvzh == 2) - { - return true; - } - return false; -} - -// the vvvvvzi function -function vvvvvzi(main_source_vvvvvzi) -{ - if (isSet(main_source_vvvvvzi) && main_source_vvvvvzi.constructor !== Array) - { - var temp_vvvvvzi = main_source_vvvvvzi; - var main_source_vvvvvzi = []; - main_source_vvvvvzi.push(temp_vvvvvzi); - } - else if (!isSet(main_source_vvvvvzi)) - { - var main_source_vvvvvzi = []; - } - var main_source = main_source_vvvvvzi.some(main_source_vvvvvzi_SomeFunc); - - - // 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_vvvvvzivwn_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_vvvvvzivwn_required = false; - } - } - else - { - jQuery('#jform_view_table_main').closest('.control-group').hide(); - // remove required attribute from view_table_main field - if (!jform_vvvvvzivwn_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_vvvvvzivwn_required = true; + jform_vvvvvzivwm_required = true; } } } // the vvvvvzi Some function -function main_source_vvvvvzi_SomeFunc(main_source_vvvvvzi) +function gettype_vvvvvzi_SomeFunc(gettype_vvvvvzi) { // set the function logic - if (main_source_vvvvvzi == 1) + if (gettype_vvvvvzi == 3 || gettype_vvvvvzi == 4) { return true; } @@ -270,29 +176,11 @@ function vvvvvzj(main_source_vvvvvzj) // set this function logic if (main_source) { - jQuery('#jform_view_selection').closest('.control-group').show(); - // add required attribute to view_selection field - if (jform_vvvvvzjvwo_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_vvvvvzjvwo_required = false; - } + jQuery('#jform_select_all').closest('.control-group').show(); } else { - jQuery('#jform_view_selection').closest('.control-group').hide(); - // remove required attribute from view_selection field - if (!jform_vvvvvzjvwo_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_vvvvvzjvwo_required = true; - } + jQuery('#jform_select_all').closest('.control-group').hide(); } } @@ -300,7 +188,7 @@ function vvvvvzj(main_source_vvvvvzj) function main_source_vvvvvzj_SomeFunc(main_source_vvvvvzj) { // set the function logic - if (main_source_vvvvvzj == 1) + if (main_source_vvvvvzj == 1 || main_source_vvvvvzj == 2) { return true; } @@ -326,28 +214,28 @@ function vvvvvzk(main_source_vvvvvzk) // 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_vvvvvzkvwp_required) + jQuery('#jform_view_table_main').closest('.control-group').show(); + // add required attribute to view_table_main field + if (jform_vvvvvzkvwn_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_vvvvvzkvwp_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_vvvvvzkvwn_required = false; } } else { - jQuery('#jform_db_table_main').closest('.control-group').hide(); - // remove required attribute from db_table_main field - if (!jform_vvvvvzkvwp_required) + jQuery('#jform_view_table_main').closest('.control-group').hide(); + // remove required attribute from view_table_main field + if (!jform_vvvvvzkvwn_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_vvvvvzkvwp_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_vvvvvzkvwn_required = true; } } } @@ -356,7 +244,7 @@ function vvvvvzk(main_source_vvvvvzk) function main_source_vvvvvzk_SomeFunc(main_source_vvvvvzk) { // set the function logic - if (main_source_vvvvvzk == 2) + if (main_source_vvvvvzk == 1) { return true; } @@ -382,28 +270,28 @@ function vvvvvzl(main_source_vvvvvzl) // set this function logic if (main_source) { - jQuery('#jform_db_selection').closest('.control-group').show(); - // add required attribute to db_selection field - if (jform_vvvvvzlvwq_required) + jQuery('#jform_view_selection').closest('.control-group').show(); + // add required attribute to view_selection field + if (jform_vvvvvzlvwo_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_vvvvvzlvwq_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_vvvvvzlvwo_required = false; } } else { - jQuery('#jform_db_selection').closest('.control-group').hide(); - // remove required attribute from db_selection field - if (!jform_vvvvvzlvwq_required) + jQuery('#jform_view_selection').closest('.control-group').hide(); + // remove required attribute from view_selection field + if (!jform_vvvvvzlvwo_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_vvvvvzlvwq_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_vvvvvzlvwo_required = true; } } } @@ -412,7 +300,7 @@ function vvvvvzl(main_source_vvvvvzl) function main_source_vvvvvzl_SomeFunc(main_source_vvvvvzl) { // set the function logic - if (main_source_vvvvvzl == 2) + if (main_source_vvvvvzl == 1) { return true; } @@ -420,10 +308,122 @@ function main_source_vvvvvzl_SomeFunc(main_source_vvvvvzl) } // the vvvvvzm function -function vvvvvzm(addcalculation_vvvvvzm) +function vvvvvzm(main_source_vvvvvzm) +{ + if (isSet(main_source_vvvvvzm) && main_source_vvvvvzm.constructor !== Array) + { + var temp_vvvvvzm = main_source_vvvvvzm; + var main_source_vvvvvzm = []; + main_source_vvvvvzm.push(temp_vvvvvzm); + } + else if (!isSet(main_source_vvvvvzm)) + { + var main_source_vvvvvzm = []; + } + var main_source = main_source_vvvvvzm.some(main_source_vvvvvzm_SomeFunc); + + + // 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_vvvvvzmvwp_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_vvvvvzmvwp_required = false; + } + } + else + { + jQuery('#jform_db_table_main').closest('.control-group').hide(); + // remove required attribute from db_table_main field + if (!jform_vvvvvzmvwp_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_vvvvvzmvwp_required = true; + } + } +} + +// the vvvvvzm Some function +function main_source_vvvvvzm_SomeFunc(main_source_vvvvvzm) { // set the function logic - if (addcalculation_vvvvvzm == 1) + if (main_source_vvvvvzm == 2) + { + return true; + } + return false; +} + +// the vvvvvzn function +function vvvvvzn(main_source_vvvvvzn) +{ + if (isSet(main_source_vvvvvzn) && main_source_vvvvvzn.constructor !== Array) + { + var temp_vvvvvzn = main_source_vvvvvzn; + var main_source_vvvvvzn = []; + main_source_vvvvvzn.push(temp_vvvvvzn); + } + else if (!isSet(main_source_vvvvvzn)) + { + var main_source_vvvvvzn = []; + } + var main_source = main_source_vvvvvzn.some(main_source_vvvvvzn_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_vvvvvznvwq_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_vvvvvznvwq_required = false; + } + } + else + { + jQuery('#jform_db_selection').closest('.control-group').hide(); + // remove required attribute from db_selection field + if (!jform_vvvvvznvwq_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_vvvvvznvwq_required = true; + } + } +} + +// the vvvvvzn Some function +function main_source_vvvvvzn_SomeFunc(main_source_vvvvvzn) +{ + // set the function logic + if (main_source_vvvvvzn == 2) + { + return true; + } + return false; +} + +// the vvvvvzo function +function vvvvvzo(addcalculation_vvvvvzo) +{ + // set the function logic + if (addcalculation_vvvvvzo == 1) { jQuery('#jform_php_calculation-lbl').closest('.control-group').show(); } @@ -433,32 +433,32 @@ function vvvvvzm(addcalculation_vvvvvzm) } } -// the vvvvvzn function -function vvvvvzn(addcalculation_vvvvvzn,gettype_vvvvvzn) +// the vvvvvzp function +function vvvvvzp(addcalculation_vvvvvzp,gettype_vvvvvzp) { - if (isSet(addcalculation_vvvvvzn) && addcalculation_vvvvvzn.constructor !== Array) + if (isSet(addcalculation_vvvvvzp) && addcalculation_vvvvvzp.constructor !== Array) { - var temp_vvvvvzn = addcalculation_vvvvvzn; - var addcalculation_vvvvvzn = []; - addcalculation_vvvvvzn.push(temp_vvvvvzn); + var temp_vvvvvzp = addcalculation_vvvvvzp; + var addcalculation_vvvvvzp = []; + addcalculation_vvvvvzp.push(temp_vvvvvzp); } - else if (!isSet(addcalculation_vvvvvzn)) + else if (!isSet(addcalculation_vvvvvzp)) { - var addcalculation_vvvvvzn = []; + var addcalculation_vvvvvzp = []; } - var addcalculation = addcalculation_vvvvvzn.some(addcalculation_vvvvvzn_SomeFunc); + var addcalculation = addcalculation_vvvvvzp.some(addcalculation_vvvvvzp_SomeFunc); - if (isSet(gettype_vvvvvzn) && gettype_vvvvvzn.constructor !== Array) + if (isSet(gettype_vvvvvzp) && gettype_vvvvvzp.constructor !== Array) { - var temp_vvvvvzn = gettype_vvvvvzn; - var gettype_vvvvvzn = []; - gettype_vvvvvzn.push(temp_vvvvvzn); + var temp_vvvvvzp = gettype_vvvvvzp; + var gettype_vvvvvzp = []; + gettype_vvvvvzp.push(temp_vvvvvzp); } - else if (!isSet(gettype_vvvvvzn)) + else if (!isSet(gettype_vvvvvzp)) { - var gettype_vvvvvzn = []; + var gettype_vvvvvzp = []; } - var gettype = gettype_vvvvvzn.some(gettype_vvvvvzn_SomeFunc); + var gettype = gettype_vvvvvzp.some(gettype_vvvvvzp_SomeFunc); // set this function logic @@ -472,54 +472,54 @@ function vvvvvzn(addcalculation_vvvvvzn,gettype_vvvvvzn) } } -// the vvvvvzn Some function -function addcalculation_vvvvvzn_SomeFunc(addcalculation_vvvvvzn) +// the vvvvvzp Some function +function addcalculation_vvvvvzp_SomeFunc(addcalculation_vvvvvzp) { // set the function logic - if (addcalculation_vvvvvzn == 1) + if (addcalculation_vvvvvzp == 1) { return true; } return false; } -// the vvvvvzn Some function -function gettype_vvvvvzn_SomeFunc(gettype_vvvvvzn) +// the vvvvvzp Some function +function gettype_vvvvvzp_SomeFunc(gettype_vvvvvzp) { // set the function logic - if (gettype_vvvvvzn == 1 || gettype_vvvvvzn == 3) + if (gettype_vvvvvzp == 1 || gettype_vvvvvzp == 3) { return true; } return false; } -// the vvvvvzo function -function vvvvvzo(addcalculation_vvvvvzo,gettype_vvvvvzo) +// the vvvvvzq function +function vvvvvzq(addcalculation_vvvvvzq,gettype_vvvvvzq) { - if (isSet(addcalculation_vvvvvzo) && addcalculation_vvvvvzo.constructor !== Array) + if (isSet(addcalculation_vvvvvzq) && addcalculation_vvvvvzq.constructor !== Array) { - var temp_vvvvvzo = addcalculation_vvvvvzo; - var addcalculation_vvvvvzo = []; - addcalculation_vvvvvzo.push(temp_vvvvvzo); + var temp_vvvvvzq = addcalculation_vvvvvzq; + var addcalculation_vvvvvzq = []; + addcalculation_vvvvvzq.push(temp_vvvvvzq); } - else if (!isSet(addcalculation_vvvvvzo)) + else if (!isSet(addcalculation_vvvvvzq)) { - var addcalculation_vvvvvzo = []; + var addcalculation_vvvvvzq = []; } - var addcalculation = addcalculation_vvvvvzo.some(addcalculation_vvvvvzo_SomeFunc); + var addcalculation = addcalculation_vvvvvzq.some(addcalculation_vvvvvzq_SomeFunc); - if (isSet(gettype_vvvvvzo) && gettype_vvvvvzo.constructor !== Array) + if (isSet(gettype_vvvvvzq) && gettype_vvvvvzq.constructor !== Array) { - var temp_vvvvvzo = gettype_vvvvvzo; - var gettype_vvvvvzo = []; - gettype_vvvvvzo.push(temp_vvvvvzo); + var temp_vvvvvzq = gettype_vvvvvzq; + var gettype_vvvvvzq = []; + gettype_vvvvvzq.push(temp_vvvvvzq); } - else if (!isSet(gettype_vvvvvzo)) + else if (!isSet(gettype_vvvvvzq)) { - var gettype_vvvvvzo = []; + var gettype_vvvvvzq = []; } - var gettype = gettype_vvvvvzo.some(gettype_vvvvvzo_SomeFunc); + var gettype = gettype_vvvvvzq.some(gettype_vvvvvzq_SomeFunc); // set this function logic @@ -533,42 +533,42 @@ function vvvvvzo(addcalculation_vvvvvzo,gettype_vvvvvzo) } } -// the vvvvvzo Some function -function addcalculation_vvvvvzo_SomeFunc(addcalculation_vvvvvzo) +// the vvvvvzq Some function +function addcalculation_vvvvvzq_SomeFunc(addcalculation_vvvvvzq) { // set the function logic - if (addcalculation_vvvvvzo == 1) + if (addcalculation_vvvvvzq == 1) { return true; } return false; } -// the vvvvvzo Some function -function gettype_vvvvvzo_SomeFunc(gettype_vvvvvzo) +// the vvvvvzq Some function +function gettype_vvvvvzq_SomeFunc(gettype_vvvvvzq) { // set the function logic - if (gettype_vvvvvzo == 2 || gettype_vvvvvzo == 4) + if (gettype_vvvvvzq == 2 || gettype_vvvvvzq == 4) { return true; } return false; } -// the vvvvvzr function -function vvvvvzr(main_source_vvvvvzr) +// the vvvvvzt function +function vvvvvzt(main_source_vvvvvzt) { - if (isSet(main_source_vvvvvzr) && main_source_vvvvvzr.constructor !== Array) + if (isSet(main_source_vvvvvzt) && main_source_vvvvvzt.constructor !== Array) { - var temp_vvvvvzr = main_source_vvvvvzr; - var main_source_vvvvvzr = []; - main_source_vvvvvzr.push(temp_vvvvvzr); + var temp_vvvvvzt = main_source_vvvvvzt; + var main_source_vvvvvzt = []; + main_source_vvvvvzt.push(temp_vvvvvzt); } - else if (!isSet(main_source_vvvvvzr)) + else if (!isSet(main_source_vvvvvzt)) { - var main_source_vvvvvzr = []; + var main_source_vvvvvzt = []; } - var main_source = main_source_vvvvvzr.some(main_source_vvvvvzr_SomeFunc); + var main_source = main_source_vvvvvzt.some(main_source_vvvvvzt_SomeFunc); // set this function logic @@ -582,31 +582,31 @@ function vvvvvzr(main_source_vvvvvzr) } } -// the vvvvvzr Some function -function main_source_vvvvvzr_SomeFunc(main_source_vvvvvzr) +// the vvvvvzt Some function +function main_source_vvvvvzt_SomeFunc(main_source_vvvvvzt) { // set the function logic - if (main_source_vvvvvzr == 3) + if (main_source_vvvvvzt == 3) { return true; } return false; } -// the vvvvvzs function -function vvvvvzs(main_source_vvvvvzs) +// the vvvvvzu function +function vvvvvzu(main_source_vvvvvzu) { - if (isSet(main_source_vvvvvzs) && main_source_vvvvvzs.constructor !== Array) + if (isSet(main_source_vvvvvzu) && main_source_vvvvvzu.constructor !== Array) { - var temp_vvvvvzs = main_source_vvvvvzs; - var main_source_vvvvvzs = []; - main_source_vvvvvzs.push(temp_vvvvvzs); + var temp_vvvvvzu = main_source_vvvvvzu; + var main_source_vvvvvzu = []; + main_source_vvvvvzu.push(temp_vvvvvzu); } - else if (!isSet(main_source_vvvvvzs)) + else if (!isSet(main_source_vvvvvzu)) { - var main_source_vvvvvzs = []; + var main_source_vvvvvzu = []; } - var main_source = main_source_vvvvvzs.some(main_source_vvvvvzs_SomeFunc); + var main_source = main_source_vvvvvzu.some(main_source_vvvvvzu_SomeFunc); // set this function logic @@ -632,43 +632,43 @@ function vvvvvzs(main_source_vvvvvzs) } } -// the vvvvvzs Some function -function main_source_vvvvvzs_SomeFunc(main_source_vvvvvzs) +// the vvvvvzu Some function +function main_source_vvvvvzu_SomeFunc(main_source_vvvvvzu) { // set the function logic - if (main_source_vvvvvzs == 1 || main_source_vvvvvzs == 2) + if (main_source_vvvvvzu == 1 || main_source_vvvvvzu == 2) { return true; } return false; } -// the vvvvvzt function -function vvvvvzt(add_php_before_getitem_vvvvvzt,gettype_vvvvvzt) +// the vvvvvzv function +function vvvvvzv(add_php_before_getitem_vvvvvzv,gettype_vvvvvzv) { - if (isSet(add_php_before_getitem_vvvvvzt) && add_php_before_getitem_vvvvvzt.constructor !== Array) + if (isSet(add_php_before_getitem_vvvvvzv) && add_php_before_getitem_vvvvvzv.constructor !== Array) { - var temp_vvvvvzt = add_php_before_getitem_vvvvvzt; - var add_php_before_getitem_vvvvvzt = []; - add_php_before_getitem_vvvvvzt.push(temp_vvvvvzt); + var temp_vvvvvzv = add_php_before_getitem_vvvvvzv; + var add_php_before_getitem_vvvvvzv = []; + add_php_before_getitem_vvvvvzv.push(temp_vvvvvzv); } - else if (!isSet(add_php_before_getitem_vvvvvzt)) + else if (!isSet(add_php_before_getitem_vvvvvzv)) { - var add_php_before_getitem_vvvvvzt = []; + var add_php_before_getitem_vvvvvzv = []; } - var add_php_before_getitem = add_php_before_getitem_vvvvvzt.some(add_php_before_getitem_vvvvvzt_SomeFunc); + var add_php_before_getitem = add_php_before_getitem_vvvvvzv.some(add_php_before_getitem_vvvvvzv_SomeFunc); - if (isSet(gettype_vvvvvzt) && gettype_vvvvvzt.constructor !== Array) + if (isSet(gettype_vvvvvzv) && gettype_vvvvvzv.constructor !== Array) { - var temp_vvvvvzt = gettype_vvvvvzt; - var gettype_vvvvvzt = []; - gettype_vvvvvzt.push(temp_vvvvvzt); + var temp_vvvvvzv = gettype_vvvvvzv; + var gettype_vvvvvzv = []; + gettype_vvvvvzv.push(temp_vvvvvzv); } - else if (!isSet(gettype_vvvvvzt)) + else if (!isSet(gettype_vvvvvzv)) { - var gettype_vvvvvzt = []; + var gettype_vvvvvzv = []; } - var gettype = gettype_vvvvvzt.some(gettype_vvvvvzt_SomeFunc); + var gettype = gettype_vvvvvzv.some(gettype_vvvvvzv_SomeFunc); // set this function logic @@ -682,83 +682,22 @@ function vvvvvzt(add_php_before_getitem_vvvvvzt,gettype_vvvvvzt) } } -// the vvvvvzt Some function -function add_php_before_getitem_vvvvvzt_SomeFunc(add_php_before_getitem_vvvvvzt) +// the vvvvvzv Some function +function add_php_before_getitem_vvvvvzv_SomeFunc(add_php_before_getitem_vvvvvzv) { // set the function logic - if (add_php_before_getitem_vvvvvzt == 1) + if (add_php_before_getitem_vvvvvzv == 1) { return true; } return false; } -// the vvvvvzt Some function -function gettype_vvvvvzt_SomeFunc(gettype_vvvvvzt) +// the vvvvvzv Some function +function gettype_vvvvvzv_SomeFunc(gettype_vvvvvzv) { // set the function logic - if (gettype_vvvvvzt == 1 || gettype_vvvvvzt == 3) - { - return true; - } - return false; -} - -// the vvvvvzu function -function vvvvvzu(add_php_after_getitem_vvvvvzu,gettype_vvvvvzu) -{ - if (isSet(add_php_after_getitem_vvvvvzu) && add_php_after_getitem_vvvvvzu.constructor !== Array) - { - var temp_vvvvvzu = add_php_after_getitem_vvvvvzu; - var add_php_after_getitem_vvvvvzu = []; - add_php_after_getitem_vvvvvzu.push(temp_vvvvvzu); - } - else if (!isSet(add_php_after_getitem_vvvvvzu)) - { - var add_php_after_getitem_vvvvvzu = []; - } - var add_php_after_getitem = add_php_after_getitem_vvvvvzu.some(add_php_after_getitem_vvvvvzu_SomeFunc); - - if (isSet(gettype_vvvvvzu) && gettype_vvvvvzu.constructor !== Array) - { - var temp_vvvvvzu = gettype_vvvvvzu; - var gettype_vvvvvzu = []; - gettype_vvvvvzu.push(temp_vvvvvzu); - } - else if (!isSet(gettype_vvvvvzu)) - { - var gettype_vvvvvzu = []; - } - var gettype = gettype_vvvvvzu.some(gettype_vvvvvzu_SomeFunc); - - - // set this function logic - if (add_php_after_getitem && gettype) - { - jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); - } - else - { - jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); - } -} - -// the vvvvvzu Some function -function add_php_after_getitem_vvvvvzu_SomeFunc(add_php_after_getitem_vvvvvzu) -{ - // set the function logic - if (add_php_after_getitem_vvvvvzu == 1) - { - return true; - } - return false; -} - -// the vvvvvzu Some function -function gettype_vvvvvzu_SomeFunc(gettype_vvvvvzu) -{ - // set the function logic - if (gettype_vvvvvzu == 1 || gettype_vvvvvzu == 3) + if (gettype_vvvvvzv == 1 || gettype_vvvvvzv == 3) { return true; } @@ -766,8 +705,20 @@ function gettype_vvvvvzu_SomeFunc(gettype_vvvvvzu) } // the vvvvvzw function -function vvvvvzw(gettype_vvvvvzw) +function vvvvvzw(add_php_after_getitem_vvvvvzw,gettype_vvvvvzw) { + if (isSet(add_php_after_getitem_vvvvvzw) && add_php_after_getitem_vvvvvzw.constructor !== Array) + { + var temp_vvvvvzw = add_php_after_getitem_vvvvvzw; + var add_php_after_getitem_vvvvvzw = []; + add_php_after_getitem_vvvvvzw.push(temp_vvvvvzw); + } + else if (!isSet(add_php_after_getitem_vvvvvzw)) + { + var add_php_after_getitem_vvvvvzw = []; + } + var add_php_after_getitem = add_php_after_getitem_vvvvvzw.some(add_php_after_getitem_vvvvvzw_SomeFunc); + if (isSet(gettype_vvvvvzw) && gettype_vvvvvzw.constructor !== Array) { var temp_vvvvvzw = gettype_vvvvvzw; @@ -782,54 +733,27 @@ function vvvvvzw(gettype_vvvvvzw) // 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_vvvvvzwvwr_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_vvvvvzwvwr_required = false; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); - // add required attribute to add_php_before_getitem field - if (jform_vvvvvzwvws_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_vvvvvzwvws_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_vvvvvzwvwr_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_vvvvvzwvwr_required = true; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); - // remove required attribute from add_php_before_getitem field - if (!jform_vvvvvzwvws_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_vvvvvzwvws_required = true; - } + jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); } } +// the vvvvvzw Some function +function add_php_after_getitem_vvvvvzw_SomeFunc(add_php_after_getitem_vvvvvzw) +{ + // set the function logic + if (add_php_after_getitem_vvvvvzw == 1) + { + return true; + } + return false; +} + // the vvvvvzw Some function function gettype_vvvvvzw_SomeFunc(gettype_vvvvvzw) { @@ -841,82 +765,9 @@ function gettype_vvvvvzw_SomeFunc(gettype_vvvvvzw) return false; } -// the vvvvvzx function -function vvvvvzx(add_php_getlistquery_vvvvvzx,gettype_vvvvvzx) -{ - if (isSet(add_php_getlistquery_vvvvvzx) && add_php_getlistquery_vvvvvzx.constructor !== Array) - { - var temp_vvvvvzx = add_php_getlistquery_vvvvvzx; - var add_php_getlistquery_vvvvvzx = []; - add_php_getlistquery_vvvvvzx.push(temp_vvvvvzx); - } - else if (!isSet(add_php_getlistquery_vvvvvzx)) - { - var add_php_getlistquery_vvvvvzx = []; - } - var add_php_getlistquery = add_php_getlistquery_vvvvvzx.some(add_php_getlistquery_vvvvvzx_SomeFunc); - - if (isSet(gettype_vvvvvzx) && gettype_vvvvvzx.constructor !== Array) - { - var temp_vvvvvzx = gettype_vvvvvzx; - var gettype_vvvvvzx = []; - gettype_vvvvvzx.push(temp_vvvvvzx); - } - else if (!isSet(gettype_vvvvvzx)) - { - var gettype_vvvvvzx = []; - } - var gettype = gettype_vvvvvzx.some(gettype_vvvvvzx_SomeFunc); - - - // set this function logic - if (add_php_getlistquery && gettype) - { - jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); - } - else - { - jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); - } -} - -// the vvvvvzx Some function -function add_php_getlistquery_vvvvvzx_SomeFunc(add_php_getlistquery_vvvvvzx) -{ - // set the function logic - if (add_php_getlistquery_vvvvvzx == 1) - { - return true; - } - return false; -} - -// the vvvvvzx Some function -function gettype_vvvvvzx_SomeFunc(gettype_vvvvvzx) -{ - // set the function logic - if (gettype_vvvvvzx == 2 || gettype_vvvvvzx == 4) - { - return true; - } - return false; -} - // the vvvvvzy function -function vvvvvzy(add_php_before_getitems_vvvvvzy,gettype_vvvvvzy) +function vvvvvzy(gettype_vvvvvzy) { - if (isSet(add_php_before_getitems_vvvvvzy) && add_php_before_getitems_vvvvvzy.constructor !== Array) - { - var temp_vvvvvzy = add_php_before_getitems_vvvvvzy; - var add_php_before_getitems_vvvvvzy = []; - add_php_before_getitems_vvvvvzy.push(temp_vvvvvzy); - } - else if (!isSet(add_php_before_getitems_vvvvvzy)) - { - var add_php_before_getitems_vvvvvzy = []; - } - var add_php_before_getitems = add_php_before_getitems_vvvvvzy.some(add_php_before_getitems_vvvvvzy_SomeFunc); - if (isSet(gettype_vvvvvzy) && gettype_vvvvvzy.constructor !== Array) { var temp_vvvvvzy = gettype_vvvvvzy; @@ -931,32 +782,59 @@ function vvvvvzy(add_php_before_getitems_vvvvvzy,gettype_vvvvvzy) // set this function logic - if (add_php_before_getitems && gettype) + if (gettype) { - jQuery('#jform_php_before_getitems-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_vvvvvzyvwr_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_vvvvvzyvwr_required = false; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); + // add required attribute to add_php_before_getitem field + if (jform_vvvvvzyvws_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_vvvvvzyvws_required = false; + } } else { - jQuery('#jform_php_before_getitems-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_vvvvvzyvwr_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_vvvvvzyvwr_required = true; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); + // remove required attribute from add_php_before_getitem field + if (!jform_vvvvvzyvws_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_vvvvvzyvws_required = true; + } } } -// the vvvvvzy Some function -function add_php_before_getitems_vvvvvzy_SomeFunc(add_php_before_getitems_vvvvvzy) -{ - // set the function logic - if (add_php_before_getitems_vvvvvzy == 1) - { - return true; - } - return false; -} - // the vvvvvzy Some function function gettype_vvvvvzy_SomeFunc(gettype_vvvvvzy) { // set the function logic - if (gettype_vvvvvzy == 2 || gettype_vvvvvzy == 4) + if (gettype_vvvvvzy == 1 || gettype_vvvvvzy == 3) { return true; } @@ -964,19 +842,19 @@ function gettype_vvvvvzy_SomeFunc(gettype_vvvvvzy) } // the vvvvvzz function -function vvvvvzz(add_php_after_getitems_vvvvvzz,gettype_vvvvvzz) +function vvvvvzz(add_php_getlistquery_vvvvvzz,gettype_vvvvvzz) { - if (isSet(add_php_after_getitems_vvvvvzz) && add_php_after_getitems_vvvvvzz.constructor !== Array) + if (isSet(add_php_getlistquery_vvvvvzz) && add_php_getlistquery_vvvvvzz.constructor !== Array) { - var temp_vvvvvzz = add_php_after_getitems_vvvvvzz; - var add_php_after_getitems_vvvvvzz = []; - add_php_after_getitems_vvvvvzz.push(temp_vvvvvzz); + var temp_vvvvvzz = add_php_getlistquery_vvvvvzz; + var add_php_getlistquery_vvvvvzz = []; + add_php_getlistquery_vvvvvzz.push(temp_vvvvvzz); } - else if (!isSet(add_php_after_getitems_vvvvvzz)) + else if (!isSet(add_php_getlistquery_vvvvvzz)) { - var add_php_after_getitems_vvvvvzz = []; + var add_php_getlistquery_vvvvvzz = []; } - var add_php_after_getitems = add_php_after_getitems_vvvvvzz.some(add_php_after_getitems_vvvvvzz_SomeFunc); + var add_php_getlistquery = add_php_getlistquery_vvvvvzz.some(add_php_getlistquery_vvvvvzz_SomeFunc); if (isSet(gettype_vvvvvzz) && gettype_vvvvvzz.constructor !== Array) { @@ -992,21 +870,21 @@ function vvvvvzz(add_php_after_getitems_vvvvvzz,gettype_vvvvvzz) // set this function logic - if (add_php_after_getitems && gettype) + if (add_php_getlistquery && gettype) { - jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show(); + jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } else { - jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); + jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); } } // the vvvvvzz Some function -function add_php_after_getitems_vvvvvzz_SomeFunc(add_php_after_getitems_vvvvvzz) +function add_php_getlistquery_vvvvvzz_SomeFunc(add_php_getlistquery_vvvvvzz) { // set the function logic - if (add_php_after_getitems_vvvvvzz == 1) + if (add_php_getlistquery_vvvvvzz == 1) { return true; } @@ -1024,9 +902,82 @@ function gettype_vvvvvzz_SomeFunc(gettype_vvvvvzz) return false; } -// the vvvvwab function -function vvvvwab(gettype_vvvvwab) +// the vvvvwaa function +function vvvvwaa(add_php_before_getitems_vvvvwaa,gettype_vvvvwaa) { + if (isSet(add_php_before_getitems_vvvvwaa) && add_php_before_getitems_vvvvwaa.constructor !== Array) + { + var temp_vvvvwaa = add_php_before_getitems_vvvvwaa; + var add_php_before_getitems_vvvvwaa = []; + add_php_before_getitems_vvvvwaa.push(temp_vvvvwaa); + } + else if (!isSet(add_php_before_getitems_vvvvwaa)) + { + var add_php_before_getitems_vvvvwaa = []; + } + var add_php_before_getitems = add_php_before_getitems_vvvvwaa.some(add_php_before_getitems_vvvvwaa_SomeFunc); + + if (isSet(gettype_vvvvwaa) && gettype_vvvvwaa.constructor !== Array) + { + var temp_vvvvwaa = gettype_vvvvwaa; + var gettype_vvvvwaa = []; + gettype_vvvvwaa.push(temp_vvvvwaa); + } + else if (!isSet(gettype_vvvvwaa)) + { + var gettype_vvvvwaa = []; + } + var gettype = gettype_vvvvwaa.some(gettype_vvvvwaa_SomeFunc); + + + // set this function logic + if (add_php_before_getitems && gettype) + { + jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); + } +} + +// the vvvvwaa Some function +function add_php_before_getitems_vvvvwaa_SomeFunc(add_php_before_getitems_vvvvwaa) +{ + // set the function logic + if (add_php_before_getitems_vvvvwaa == 1) + { + return true; + } + return false; +} + +// the vvvvwaa Some function +function gettype_vvvvwaa_SomeFunc(gettype_vvvvwaa) +{ + // set the function logic + if (gettype_vvvvwaa == 2 || gettype_vvvvwaa == 4) + { + return true; + } + return false; +} + +// the vvvvwab function +function vvvvwab(add_php_after_getitems_vvvvwab,gettype_vvvvwab) +{ + if (isSet(add_php_after_getitems_vvvvwab) && add_php_after_getitems_vvvvwab.constructor !== Array) + { + var temp_vvvvwab = add_php_after_getitems_vvvvwab; + var add_php_after_getitems_vvvvwab = []; + add_php_after_getitems_vvvvwab.push(temp_vvvvwab); + } + else if (!isSet(add_php_after_getitems_vvvvwab)) + { + var add_php_after_getitems_vvvvwab = []; + } + var add_php_after_getitems = add_php_after_getitems_vvvvwab.some(add_php_after_getitems_vvvvwab_SomeFunc); + if (isSet(gettype_vvvvwab) && gettype_vvvvwab.constructor !== Array) { var temp_vvvvwab = gettype_vvvvwab; @@ -1041,74 +992,27 @@ function vvvvwab(gettype_vvvvwab) // 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_vvvvwabvwt_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_vvvvwabvwt_required = false; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); - // add required attribute to add_php_before_getitems field - if (jform_vvvvwabvwu_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_vvvvwabvwu_required = false; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); - // add required attribute to add_php_getlistquery field - if (jform_vvvvwabvwv_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_vvvvwabvwv_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_vvvvwabvwt_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_vvvvwabvwt_required = true; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); - // remove required attribute from add_php_before_getitems field - if (!jform_vvvvwabvwu_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_vvvvwabvwu_required = true; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); - // remove required attribute from add_php_getlistquery field - if (!jform_vvvvwabvwv_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_vvvvwabvwv_required = true; - } + jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); } } +// the vvvvwab Some function +function add_php_after_getitems_vvvvwab_SomeFunc(add_php_after_getitems_vvvvwab) +{ + // set the function logic + if (add_php_after_getitems_vvvvwab == 1) + { + return true; + } + return false; +} + // the vvvvwab Some function function gettype_vvvvwab_SomeFunc(gettype_vvvvwab) { @@ -1120,62 +1024,6 @@ function gettype_vvvvwab_SomeFunc(gettype_vvvvwab) return false; } -// the vvvvwac function -function vvvvwac(gettype_vvvvwac) -{ - if (isSet(gettype_vvvvwac) && gettype_vvvvwac.constructor !== Array) - { - var temp_vvvvwac = gettype_vvvvwac; - var gettype_vvvvwac = []; - gettype_vvvvwac.push(temp_vvvvwac); - } - else if (!isSet(gettype_vvvvwac)) - { - var gettype_vvvvwac = []; - } - var gettype = gettype_vvvvwac.some(gettype_vvvvwac_SomeFunc); - - - // set this function logic - if (gettype) - { - jQuery('#jform_pagination').closest('.control-group').show(); - // add required attribute to pagination field - if (jform_vvvvwacvww_required) - { - updateFieldRequired('pagination',0); - jQuery('#jform_pagination').prop('required','required'); - jQuery('#jform_pagination').attr('aria-required',true); - jQuery('#jform_pagination').addClass('required'); - jform_vvvvwacvww_required = false; - } - } - else - { - jQuery('#jform_pagination').closest('.control-group').hide(); - // remove required attribute from pagination field - if (!jform_vvvvwacvww_required) - { - updateFieldRequired('pagination',1); - jQuery('#jform_pagination').removeAttr('required'); - jQuery('#jform_pagination').removeAttr('aria-required'); - jQuery('#jform_pagination').removeClass('required'); - jform_vvvvwacvww_required = true; - } - } -} - -// the vvvvwac Some function -function gettype_vvvvwac_SomeFunc(gettype_vvvvwac) -{ - // set the function logic - if (gettype_vvvvwac == 2) - { - return true; - } - return false; -} - // the vvvvwad function function vvvvwad(gettype_vvvvwad) { @@ -1195,28 +1043,68 @@ function vvvvwad(gettype_vvvvwad) // 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_vvvvwadvwx_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); + // add required attribute to add_php_after_getitems field + if (jform_vvvvwadvwt_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_vvvvwadvwx_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_vvvvwadvwt_required = false; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); + // add required attribute to add_php_before_getitems field + if (jform_vvvvwadvwu_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_vvvvwadvwu_required = false; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); + // add required attribute to add_php_getlistquery field + if (jform_vvvvwadvwv_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_vvvvwadvwv_required = false; } } else { - jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); - // remove required attribute from add_php_router_parse field - if (!jform_vvvvwadvwx_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); + // remove required attribute from add_php_after_getitems field + if (!jform_vvvvwadvwt_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_vvvvwadvwx_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_vvvvwadvwt_required = true; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); + // remove required attribute from add_php_before_getitems field + if (!jform_vvvvwadvwu_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_vvvvwadvwu_required = true; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); + // remove required attribute from add_php_getlistquery field + if (!jform_vvvvwadvwv_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_vvvvwadvwv_required = true; } } } @@ -1225,7 +1113,7 @@ function vvvvwad(gettype_vvvvwad) function gettype_vvvvwad_SomeFunc(gettype_vvvvwad) { // set the function logic - if (gettype_vvvvwad == 1 || gettype_vvvvwad == 2) + if (gettype_vvvvwad == 2 || gettype_vvvvwad == 4) { return true; } @@ -1233,7 +1121,7 @@ function gettype_vvvvwad_SomeFunc(gettype_vvvvwad) } // the vvvvwae function -function vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae) +function vvvvwae(gettype_vvvvwae) { if (isSet(gettype_vvvvwae) && gettype_vvvvwae.constructor !== Array) { @@ -1247,44 +1135,32 @@ function vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae) } var gettype = gettype_vvvvwae.some(gettype_vvvvwae_SomeFunc); - if (isSet(add_php_router_parse_vvvvwae) && add_php_router_parse_vvvvwae.constructor !== Array) - { - var temp_vvvvwae = add_php_router_parse_vvvvwae; - var add_php_router_parse_vvvvwae = []; - add_php_router_parse_vvvvwae.push(temp_vvvvwae); - } - else if (!isSet(add_php_router_parse_vvvvwae)) - { - var add_php_router_parse_vvvvwae = []; - } - var add_php_router_parse = add_php_router_parse_vvvvwae.some(add_php_router_parse_vvvvwae_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_vvvvwaevwy_required) + jQuery('#jform_pagination').closest('.control-group').show(); + // add required attribute to pagination field + if (jform_vvvvwaevww_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_vvvvwaevwy_required = false; + updateFieldRequired('pagination',0); + jQuery('#jform_pagination').prop('required','required'); + jQuery('#jform_pagination').attr('aria-required',true); + jQuery('#jform_pagination').addClass('required'); + jform_vvvvwaevww_required = false; } } else { - jQuery('#jform_php_router_parse').closest('.control-group').hide(); - // remove required attribute from php_router_parse field - if (!jform_vvvvwaevwy_required) + jQuery('#jform_pagination').closest('.control-group').hide(); + // remove required attribute from pagination field + if (!jform_vvvvwaevww_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_vvvvwaevwy_required = true; + updateFieldRequired('pagination',1); + jQuery('#jform_pagination').removeAttr('required'); + jQuery('#jform_pagination').removeAttr('aria-required'); + jQuery('#jform_pagination').removeClass('required'); + jform_vvvvwaevww_required = true; } } } @@ -1293,18 +1169,63 @@ function vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae) function gettype_vvvvwae_SomeFunc(gettype_vvvvwae) { // set the function logic - if (gettype_vvvvwae == 1 || gettype_vvvvwae == 2) + if (gettype_vvvvwae == 2) { return true; } return false; } -// the vvvvwae Some function -function add_php_router_parse_vvvvwae_SomeFunc(add_php_router_parse_vvvvwae) +// the vvvvwaf function +function vvvvwaf(gettype_vvvvwaf) +{ + if (isSet(gettype_vvvvwaf) && gettype_vvvvwaf.constructor !== Array) + { + var temp_vvvvwaf = gettype_vvvvwaf; + var gettype_vvvvwaf = []; + gettype_vvvvwaf.push(temp_vvvvwaf); + } + else if (!isSet(gettype_vvvvwaf)) + { + var gettype_vvvvwaf = []; + } + var gettype = gettype_vvvvwaf.some(gettype_vvvvwaf_SomeFunc); + + + // 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_vvvvwafvwx_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_vvvvwafvwx_required = false; + } + } + else + { + jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); + // remove required attribute from add_php_router_parse field + if (!jform_vvvvwafvwx_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_vvvvwafvwx_required = true; + } + } +} + +// the vvvvwaf Some function +function gettype_vvvvwaf_SomeFunc(gettype_vvvvwaf) { // set the function logic - if (add_php_router_parse_vvvvwae == 1) + if (gettype_vvvvwaf == 1 || gettype_vvvvwaf == 2) { return true; } @@ -1312,7 +1233,7 @@ function add_php_router_parse_vvvvwae_SomeFunc(add_php_router_parse_vvvvwae) } // the vvvvwag function -function vvvvwag(gettype_vvvvwag) +function vvvvwag(gettype_vvvvwag,add_php_router_parse_vvvvwag) { if (isSet(gettype_vvvvwag) && gettype_vvvvwag.constructor !== Array) { @@ -1326,6 +1247,85 @@ function vvvvwag(gettype_vvvvwag) } var gettype = gettype_vvvvwag.some(gettype_vvvvwag_SomeFunc); + if (isSet(add_php_router_parse_vvvvwag) && add_php_router_parse_vvvvwag.constructor !== Array) + { + var temp_vvvvwag = add_php_router_parse_vvvvwag; + var add_php_router_parse_vvvvwag = []; + add_php_router_parse_vvvvwag.push(temp_vvvvwag); + } + else if (!isSet(add_php_router_parse_vvvvwag)) + { + var add_php_router_parse_vvvvwag = []; + } + var add_php_router_parse = add_php_router_parse_vvvvwag.some(add_php_router_parse_vvvvwag_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_vvvvwagvwy_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_vvvvwagvwy_required = false; + } + } + else + { + jQuery('#jform_php_router_parse').closest('.control-group').hide(); + // remove required attribute from php_router_parse field + if (!jform_vvvvwagvwy_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_vvvvwagvwy_required = true; + } + } +} + +// the vvvvwag Some function +function gettype_vvvvwag_SomeFunc(gettype_vvvvwag) +{ + // set the function logic + if (gettype_vvvvwag == 1 || gettype_vvvvwag == 2) + { + return true; + } + return false; +} + +// the vvvvwag Some function +function add_php_router_parse_vvvvwag_SomeFunc(add_php_router_parse_vvvvwag) +{ + // set the function logic + if (add_php_router_parse_vvvvwag == 1) + { + return true; + } + return false; +} + +// the vvvvwai function +function vvvvwai(gettype_vvvvwai) +{ + if (isSet(gettype_vvvvwai) && gettype_vvvvwai.constructor !== Array) + { + var temp_vvvvwai = gettype_vvvvwai; + var gettype_vvvvwai = []; + gettype_vvvvwai.push(temp_vvvvwai); + } + else if (!isSet(gettype_vvvvwai)) + { + var gettype_vvvvwai = []; + } + var gettype = gettype_vvvvwai.some(gettype_vvvvwai_SomeFunc); + // set this function logic if (gettype) @@ -1338,11 +1338,11 @@ function vvvvwag(gettype_vvvvwag) } } -// the vvvvwag Some function -function gettype_vvvvwag_SomeFunc(gettype_vvvvwag) +// the vvvvwai Some function +function gettype_vvvvwai_SomeFunc(gettype_vvvvwai) { // set the function logic - if (gettype_vvvvwag == 1) + if (gettype_vvvvwai == 1) { return true; } diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 9593549a9..9aa9a6970 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -9,57 +9,57 @@ */ // Some Global Values -jform_vvvvwatvxf_required = false; -jform_vvvvwauvxg_required = false; -jform_vvvvwavvxh_required = false; -jform_vvvvwawvxi_required = false; +jform_vvvvwaxvxh_required = false; +jform_vvvvwayvxi_required = false; +jform_vvvvwazvxj_required = false; +jform_vvvvwbavxk_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwat = jQuery("#jform_datalenght").val(); - vvvvwat(datalenght_vvvvwat); + var datalenght_vvvvwax = jQuery("#jform_datalenght").val(); + vvvvwax(datalenght_vvvvwax); - var datadefault_vvvvwau = jQuery("#jform_datadefault").val(); - vvvvwau(datadefault_vvvvwau); + var datadefault_vvvvway = jQuery("#jform_datadefault").val(); + vvvvway(datadefault_vvvvway); - var datatype_vvvvwav = jQuery("#jform_datatype").val(); - vvvvwav(datatype_vvvvwav); + var datatype_vvvvwaz = jQuery("#jform_datatype").val(); + vvvvwaz(datatype_vvvvwaz); - var datatype_vvvvwaw = jQuery("#jform_datatype").val(); - vvvvwaw(datatype_vvvvwaw); + var datatype_vvvvwba = jQuery("#jform_datatype").val(); + vvvvwba(datatype_vvvvwba); - var store_vvvvwax = jQuery("#jform_store").val(); - var datatype_vvvvwax = jQuery("#jform_datatype").val(); - vvvvwax(store_vvvvwax,datatype_vvvvwax); + var store_vvvvwbb = jQuery("#jform_store").val(); + var datatype_vvvvwbb = jQuery("#jform_datatype").val(); + vvvvwbb(store_vvvvwbb,datatype_vvvvwbb); - var add_css_view_vvvvwaz = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwaz(add_css_view_vvvvwaz); + var add_css_view_vvvvwbd = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwbd(add_css_view_vvvvwbd); - var add_css_views_vvvvwba = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwba(add_css_views_vvvvwba); + var add_css_views_vvvvwbe = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwbe(add_css_views_vvvvwbe); - var add_javascript_view_footer_vvvvwbb = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwbb(add_javascript_view_footer_vvvvwbb); + var add_javascript_view_footer_vvvvwbf = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwbf(add_javascript_view_footer_vvvvwbf); - var add_javascript_views_footer_vvvvwbc = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwbc(add_javascript_views_footer_vvvvwbc); + var add_javascript_views_footer_vvvvwbg = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwbg(add_javascript_views_footer_vvvvwbg); }); -// the vvvvwat function -function vvvvwat(datalenght_vvvvwat) +// the vvvvwax function +function vvvvwax(datalenght_vvvvwax) { - if (isSet(datalenght_vvvvwat) && datalenght_vvvvwat.constructor !== Array) + if (isSet(datalenght_vvvvwax) && datalenght_vvvvwax.constructor !== Array) { - var temp_vvvvwat = datalenght_vvvvwat; - var datalenght_vvvvwat = []; - datalenght_vvvvwat.push(temp_vvvvwat); + var temp_vvvvwax = datalenght_vvvvwax; + var datalenght_vvvvwax = []; + datalenght_vvvvwax.push(temp_vvvvwax); } - else if (!isSet(datalenght_vvvvwat)) + else if (!isSet(datalenght_vvvvwax)) { - var datalenght_vvvvwat = []; + var datalenght_vvvvwax = []; } - var datalenght = datalenght_vvvvwat.some(datalenght_vvvvwat_SomeFunc); + var datalenght = datalenght_vvvvwax.some(datalenght_vvvvwax_SomeFunc); // set this function logic @@ -67,55 +67,55 @@ function vvvvwat(datalenght_vvvvwat) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwatvxf_required) + if (jform_vvvvwaxvxh_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_vvvvwatvxf_required = false; + jform_vvvvwaxvxh_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwatvxf_required) + if (!jform_vvvvwaxvxh_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_vvvvwatvxf_required = true; + jform_vvvvwaxvxh_required = true; } } } -// the vvvvwat Some function -function datalenght_vvvvwat_SomeFunc(datalenght_vvvvwat) +// the vvvvwax Some function +function datalenght_vvvvwax_SomeFunc(datalenght_vvvvwax) { // set the function logic - if (datalenght_vvvvwat == 'Other') + if (datalenght_vvvvwax == 'Other') { return true; } return false; } -// the vvvvwau function -function vvvvwau(datadefault_vvvvwau) +// the vvvvway function +function vvvvway(datadefault_vvvvway) { - if (isSet(datadefault_vvvvwau) && datadefault_vvvvwau.constructor !== Array) + if (isSet(datadefault_vvvvway) && datadefault_vvvvway.constructor !== Array) { - var temp_vvvvwau = datadefault_vvvvwau; - var datadefault_vvvvwau = []; - datadefault_vvvvwau.push(temp_vvvvwau); + var temp_vvvvway = datadefault_vvvvway; + var datadefault_vvvvway = []; + datadefault_vvvvway.push(temp_vvvvway); } - else if (!isSet(datadefault_vvvvwau)) + else if (!isSet(datadefault_vvvvway)) { - var datadefault_vvvvwau = []; + var datadefault_vvvvway = []; } - var datadefault = datadefault_vvvvwau.some(datadefault_vvvvwau_SomeFunc); + var datadefault = datadefault_vvvvway.some(datadefault_vvvvway_SomeFunc); // set this function logic @@ -123,55 +123,55 @@ function vvvvwau(datadefault_vvvvwau) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field - if (jform_vvvvwauvxg_required) + if (jform_vvvvwayvxi_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_vvvvwauvxg_required = false; + jform_vvvvwayvxi_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field - if (!jform_vvvvwauvxg_required) + if (!jform_vvvvwayvxi_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_vvvvwauvxg_required = true; + jform_vvvvwayvxi_required = true; } } } -// the vvvvwau Some function -function datadefault_vvvvwau_SomeFunc(datadefault_vvvvwau) +// the vvvvway Some function +function datadefault_vvvvway_SomeFunc(datadefault_vvvvway) { // set the function logic - if (datadefault_vvvvwau == 'Other') + if (datadefault_vvvvway == 'Other') { return true; } return false; } -// the vvvvwav function -function vvvvwav(datatype_vvvvwav) +// the vvvvwaz function +function vvvvwaz(datatype_vvvvwaz) { - if (isSet(datatype_vvvvwav) && datatype_vvvvwav.constructor !== Array) + if (isSet(datatype_vvvvwaz) && datatype_vvvvwaz.constructor !== Array) { - var temp_vvvvwav = datatype_vvvvwav; - var datatype_vvvvwav = []; - datatype_vvvvwav.push(temp_vvvvwav); + var temp_vvvvwaz = datatype_vvvvwaz; + var datatype_vvvvwaz = []; + datatype_vvvvwaz.push(temp_vvvvwaz); } - else if (!isSet(datatype_vvvvwav)) + else if (!isSet(datatype_vvvvwaz)) { - var datatype_vvvvwav = []; + var datatype_vvvvwaz = []; } - var datatype = datatype_vvvvwav.some(datatype_vvvvwav_SomeFunc); + var datatype = datatype_vvvvwaz.some(datatype_vvvvwaz_SomeFunc); // set this function logic @@ -181,13 +181,13 @@ function vvvvwav(datatype_vvvvwav) jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field - if (jform_vvvvwavvxh_required) + if (jform_vvvvwazvxj_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvwavvxh_required = false; + jform_vvvvwazvxj_required = false; } } else @@ -196,42 +196,42 @@ function vvvvwav(datatype_vvvvwav) jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field - if (!jform_vvvvwavvxh_required) + if (!jform_vvvvwazvxj_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwavvxh_required = true; + jform_vvvvwazvxj_required = true; } } } -// the vvvvwav Some function -function datatype_vvvvwav_SomeFunc(datatype_vvvvwav) +// the vvvvwaz Some function +function datatype_vvvvwaz_SomeFunc(datatype_vvvvwaz) { // set the function logic - if (datatype_vvvvwav == 'CHAR' || datatype_vvvvwav == 'VARCHAR' || datatype_vvvvwav == 'DATETIME' || datatype_vvvvwav == 'DATE' || datatype_vvvvwav == 'TIME' || datatype_vvvvwav == 'INT' || datatype_vvvvwav == 'TINYINT' || datatype_vvvvwav == 'BIGINT' || datatype_vvvvwav == 'FLOAT' || datatype_vvvvwav == 'DECIMAL' || datatype_vvvvwav == 'DOUBLE') + if (datatype_vvvvwaz == 'CHAR' || datatype_vvvvwaz == 'VARCHAR' || datatype_vvvvwaz == 'DATETIME' || datatype_vvvvwaz == 'DATE' || datatype_vvvvwaz == 'TIME' || datatype_vvvvwaz == 'INT' || datatype_vvvvwaz == 'TINYINT' || datatype_vvvvwaz == 'BIGINT' || datatype_vvvvwaz == 'FLOAT' || datatype_vvvvwaz == 'DECIMAL' || datatype_vvvvwaz == 'DOUBLE') { return true; } return false; } -// the vvvvwaw function -function vvvvwaw(datatype_vvvvwaw) +// the vvvvwba function +function vvvvwba(datatype_vvvvwba) { - if (isSet(datatype_vvvvwaw) && datatype_vvvvwaw.constructor !== Array) + if (isSet(datatype_vvvvwba) && datatype_vvvvwba.constructor !== Array) { - var temp_vvvvwaw = datatype_vvvvwaw; - var datatype_vvvvwaw = []; - datatype_vvvvwaw.push(temp_vvvvwaw); + var temp_vvvvwba = datatype_vvvvwba; + var datatype_vvvvwba = []; + datatype_vvvvwba.push(temp_vvvvwba); } - else if (!isSet(datatype_vvvvwaw)) + else if (!isSet(datatype_vvvvwba)) { - var datatype_vvvvwaw = []; + var datatype_vvvvwba = []; } - var datatype = datatype_vvvvwaw.some(datatype_vvvvwaw_SomeFunc); + var datatype = datatype_vvvvwba.some(datatype_vvvvwba_SomeFunc); // set this function logic @@ -239,67 +239,67 @@ function vvvvwaw(datatype_vvvvwaw) { jQuery('#jform_store').closest('.control-group').show(); // add required attribute to store field - if (jform_vvvvwawvxi_required) + if (jform_vvvvwbavxk_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); - jform_vvvvwawvxi_required = false; + jform_vvvvwbavxk_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); // remove required attribute from store field - if (!jform_vvvvwawvxi_required) + if (!jform_vvvvwbavxk_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); - jform_vvvvwawvxi_required = true; + jform_vvvvwbavxk_required = true; } } } -// the vvvvwaw Some function -function datatype_vvvvwaw_SomeFunc(datatype_vvvvwaw) +// the vvvvwba Some function +function datatype_vvvvwba_SomeFunc(datatype_vvvvwba) { // set the function logic - if (datatype_vvvvwaw == 'CHAR' || datatype_vvvvwaw == 'VARCHAR' || datatype_vvvvwaw == 'TEXT' || datatype_vvvvwaw == 'MEDIUMTEXT' || datatype_vvvvwaw == 'LONGTEXT' || datatype_vvvvwaw == 'BLOB' || datatype_vvvvwaw == 'TINYBLOB' || datatype_vvvvwaw == 'MEDIUMBLOB' || datatype_vvvvwaw == 'LONGBLOB') + if (datatype_vvvvwba == 'CHAR' || datatype_vvvvwba == 'VARCHAR' || datatype_vvvvwba == 'TEXT' || datatype_vvvvwba == 'MEDIUMTEXT' || datatype_vvvvwba == 'LONGTEXT' || datatype_vvvvwba == 'BLOB' || datatype_vvvvwba == 'TINYBLOB' || datatype_vvvvwba == 'MEDIUMBLOB' || datatype_vvvvwba == 'LONGBLOB') { return true; } return false; } -// the vvvvwax function -function vvvvwax(store_vvvvwax,datatype_vvvvwax) +// the vvvvwbb function +function vvvvwbb(store_vvvvwbb,datatype_vvvvwbb) { - if (isSet(store_vvvvwax) && store_vvvvwax.constructor !== Array) + if (isSet(store_vvvvwbb) && store_vvvvwbb.constructor !== Array) { - var temp_vvvvwax = store_vvvvwax; - var store_vvvvwax = []; - store_vvvvwax.push(temp_vvvvwax); + var temp_vvvvwbb = store_vvvvwbb; + var store_vvvvwbb = []; + store_vvvvwbb.push(temp_vvvvwbb); } - else if (!isSet(store_vvvvwax)) + else if (!isSet(store_vvvvwbb)) { - var store_vvvvwax = []; + var store_vvvvwbb = []; } - var store = store_vvvvwax.some(store_vvvvwax_SomeFunc); + var store = store_vvvvwbb.some(store_vvvvwbb_SomeFunc); - if (isSet(datatype_vvvvwax) && datatype_vvvvwax.constructor !== Array) + if (isSet(datatype_vvvvwbb) && datatype_vvvvwbb.constructor !== Array) { - var temp_vvvvwax = datatype_vvvvwax; - var datatype_vvvvwax = []; - datatype_vvvvwax.push(temp_vvvvwax); + var temp_vvvvwbb = datatype_vvvvwbb; + var datatype_vvvvwbb = []; + datatype_vvvvwbb.push(temp_vvvvwbb); } - else if (!isSet(datatype_vvvvwax)) + else if (!isSet(datatype_vvvvwbb)) { - var datatype_vvvvwax = []; + var datatype_vvvvwbb = []; } - var datatype = datatype_vvvvwax.some(datatype_vvvvwax_SomeFunc); + var datatype = datatype_vvvvwbb.some(datatype_vvvvwbb_SomeFunc); // set this function logic @@ -313,33 +313,33 @@ function vvvvwax(store_vvvvwax,datatype_vvvvwax) } } -// the vvvvwax Some function -function store_vvvvwax_SomeFunc(store_vvvvwax) +// the vvvvwbb Some function +function store_vvvvwbb_SomeFunc(store_vvvvwbb) { // set the function logic - if (store_vvvvwax == 4) + if (store_vvvvwbb == 4) { return true; } return false; } -// the vvvvwax Some function -function datatype_vvvvwax_SomeFunc(datatype_vvvvwax) +// the vvvvwbb Some function +function datatype_vvvvwbb_SomeFunc(datatype_vvvvwbb) { // set the function logic - if (datatype_vvvvwax == 'CHAR' || datatype_vvvvwax == 'VARCHAR' || datatype_vvvvwax == 'TEXT' || datatype_vvvvwax == 'MEDIUMTEXT' || datatype_vvvvwax == 'LONGTEXT' || datatype_vvvvwax == 'BLOB' || datatype_vvvvwax == 'TINYBLOB' || datatype_vvvvwax == 'MEDIUMBLOB' || datatype_vvvvwax == 'LONGBLOB') + if (datatype_vvvvwbb == 'CHAR' || datatype_vvvvwbb == 'VARCHAR' || datatype_vvvvwbb == 'TEXT' || datatype_vvvvwbb == 'MEDIUMTEXT' || datatype_vvvvwbb == 'LONGTEXT' || datatype_vvvvwbb == 'BLOB' || datatype_vvvvwbb == 'TINYBLOB' || datatype_vvvvwbb == 'MEDIUMBLOB' || datatype_vvvvwbb == 'LONGBLOB') { return true; } return false; } -// the vvvvwaz function -function vvvvwaz(add_css_view_vvvvwaz) +// the vvvvwbd function +function vvvvwbd(add_css_view_vvvvwbd) { // set the function logic - if (add_css_view_vvvvwaz == 1) + if (add_css_view_vvvvwbd == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -349,11 +349,11 @@ function vvvvwaz(add_css_view_vvvvwaz) } } -// the vvvvwba function -function vvvvwba(add_css_views_vvvvwba) +// the vvvvwbe function +function vvvvwbe(add_css_views_vvvvwbe) { // set the function logic - if (add_css_views_vvvvwba == 1) + if (add_css_views_vvvvwbe == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -363,11 +363,11 @@ function vvvvwba(add_css_views_vvvvwba) } } -// the vvvvwbb function -function vvvvwbb(add_javascript_view_footer_vvvvwbb) +// the vvvvwbf function +function vvvvwbf(add_javascript_view_footer_vvvvwbf) { // set the function logic - if (add_javascript_view_footer_vvvvwbb == 1) + if (add_javascript_view_footer_vvvvwbf == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -377,11 +377,11 @@ function vvvvwbb(add_javascript_view_footer_vvvvwbb) } } -// the vvvvwbc function -function vvvvwbc(add_javascript_views_footer_vvvvwbc) +// the vvvvwbg function +function vvvvwbg(add_javascript_views_footer_vvvvwbg) { // set the function logic - if (add_javascript_views_footer_vvvvwbc == 1) + if (add_javascript_views_footer_vvvvwbg == 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 6769d90f8..27bb8c29a 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,228 +9,70 @@ */ // Some Global Values -jform_vvvvwbdvxj_required = false; -jform_vvvvwbfvxk_required = false; jform_vvvvwbhvxl_required = false; -jform_vvvvwbivxm_required = false; -jform_vvvvwbjvxn_required = false; -jform_vvvvwbovxo_required = false; -jform_vvvvwbovxp_required = false; +jform_vvvvwbjvxm_required = false; +jform_vvvvwblvxn_required = false; +jform_vvvvwbmvxo_required = false; +jform_vvvvwbnvxp_required = false; +jform_vvvvwbsvxq_required = false; +jform_vvvvwbsvxr_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwbd = jQuery("#jform_datalenght").val(); - var has_defaults_vvvvwbd = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbd(datalenght_vvvvwbd,has_defaults_vvvvwbd); - - var datadefault_vvvvwbf = jQuery("#jform_datadefault").val(); - var has_defaults_vvvvwbf = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbf(datadefault_vvvvwbf,has_defaults_vvvvwbf); - - var datatype_vvvvwbh = jQuery("#jform_datatype").val(); + var datalenght_vvvvwbh = jQuery("#jform_datalenght").val(); var has_defaults_vvvvwbh = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh); + vvvvwbh(datalenght_vvvvwbh,has_defaults_vvvvwbh); - var has_defaults_vvvvwbi = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var datatype_vvvvwbi = jQuery("#jform_datatype").val(); - vvvvwbi(has_defaults_vvvvwbi,datatype_vvvvwbi); - - var datatype_vvvvwbj = jQuery("#jform_datatype").val(); + var datadefault_vvvvwbj = jQuery("#jform_datadefault").val(); var has_defaults_vvvvwbj = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbj(datatype_vvvvwbj,has_defaults_vvvvwbj); + vvvvwbj(datadefault_vvvvwbj,has_defaults_vvvvwbj); - var store_vvvvwbl = jQuery("#jform_store").val(); var datatype_vvvvwbl = jQuery("#jform_datatype").val(); var has_defaults_vvvvwbl = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbl(store_vvvvwbl,datatype_vvvvwbl,has_defaults_vvvvwbl); + vvvvwbl(datatype_vvvvwbl,has_defaults_vvvvwbl); - var datatype_vvvvwbm = jQuery("#jform_datatype").val(); - var store_vvvvwbm = jQuery("#jform_store").val(); var has_defaults_vvvvwbm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbm(datatype_vvvvwbm,store_vvvvwbm,has_defaults_vvvvwbm); + var datatype_vvvvwbm = jQuery("#jform_datatype").val(); + vvvvwbm(has_defaults_vvvvwbm,datatype_vvvvwbm); - var has_defaults_vvvvwbn = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var store_vvvvwbn = jQuery("#jform_store").val(); var datatype_vvvvwbn = jQuery("#jform_datatype").val(); - vvvvwbn(has_defaults_vvvvwbn,store_vvvvwbn,datatype_vvvvwbn); + var has_defaults_vvvvwbn = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbn(datatype_vvvvwbn,has_defaults_vvvvwbn); - var has_defaults_vvvvwbo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbo(has_defaults_vvvvwbo); + var store_vvvvwbp = jQuery("#jform_store").val(); + var datatype_vvvvwbp = jQuery("#jform_datatype").val(); + var has_defaults_vvvvwbp = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbp(store_vvvvwbp,datatype_vvvvwbp,has_defaults_vvvvwbp); + + var datatype_vvvvwbq = jQuery("#jform_datatype").val(); + var store_vvvvwbq = jQuery("#jform_store").val(); + var has_defaults_vvvvwbq = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbq(datatype_vvvvwbq,store_vvvvwbq,has_defaults_vvvvwbq); + + var has_defaults_vvvvwbr = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + var store_vvvvwbr = jQuery("#jform_store").val(); + var datatype_vvvvwbr = jQuery("#jform_datatype").val(); + vvvvwbr(has_defaults_vvvvwbr,store_vvvvwbr,datatype_vvvvwbr); + + var has_defaults_vvvvwbs = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbs(has_defaults_vvvvwbs); }); -// the vvvvwbd function -function vvvvwbd(datalenght_vvvvwbd,has_defaults_vvvvwbd) -{ - if (isSet(datalenght_vvvvwbd) && datalenght_vvvvwbd.constructor !== Array) - { - var temp_vvvvwbd = datalenght_vvvvwbd; - var datalenght_vvvvwbd = []; - datalenght_vvvvwbd.push(temp_vvvvwbd); - } - else if (!isSet(datalenght_vvvvwbd)) - { - var datalenght_vvvvwbd = []; - } - var datalenght = datalenght_vvvvwbd.some(datalenght_vvvvwbd_SomeFunc); - - if (isSet(has_defaults_vvvvwbd) && has_defaults_vvvvwbd.constructor !== Array) - { - var temp_vvvvwbd = has_defaults_vvvvwbd; - var has_defaults_vvvvwbd = []; - has_defaults_vvvvwbd.push(temp_vvvvwbd); - } - else if (!isSet(has_defaults_vvvvwbd)) - { - var has_defaults_vvvvwbd = []; - } - var has_defaults = has_defaults_vvvvwbd.some(has_defaults_vvvvwbd_SomeFunc); - - - // set this function logic - if (datalenght && has_defaults) - { - jQuery('#jform_datalenght_other').closest('.control-group').show(); - // add required attribute to datalenght_other field - if (jform_vvvvwbdvxj_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_vvvvwbdvxj_required = false; - } - } - else - { - jQuery('#jform_datalenght_other').closest('.control-group').hide(); - // remove required attribute from datalenght_other field - if (!jform_vvvvwbdvxj_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_vvvvwbdvxj_required = true; - } - } -} - -// the vvvvwbd Some function -function datalenght_vvvvwbd_SomeFunc(datalenght_vvvvwbd) -{ - // set the function logic - if (datalenght_vvvvwbd == 'Other') - { - return true; - } - return false; -} - -// the vvvvwbd Some function -function has_defaults_vvvvwbd_SomeFunc(has_defaults_vvvvwbd) -{ - // set the function logic - if (has_defaults_vvvvwbd == 1) - { - return true; - } - return false; -} - -// the vvvvwbf function -function vvvvwbf(datadefault_vvvvwbf,has_defaults_vvvvwbf) -{ - if (isSet(datadefault_vvvvwbf) && datadefault_vvvvwbf.constructor !== Array) - { - var temp_vvvvwbf = datadefault_vvvvwbf; - var datadefault_vvvvwbf = []; - datadefault_vvvvwbf.push(temp_vvvvwbf); - } - else if (!isSet(datadefault_vvvvwbf)) - { - var datadefault_vvvvwbf = []; - } - var datadefault = datadefault_vvvvwbf.some(datadefault_vvvvwbf_SomeFunc); - - if (isSet(has_defaults_vvvvwbf) && has_defaults_vvvvwbf.constructor !== Array) - { - var temp_vvvvwbf = has_defaults_vvvvwbf; - var has_defaults_vvvvwbf = []; - has_defaults_vvvvwbf.push(temp_vvvvwbf); - } - else if (!isSet(has_defaults_vvvvwbf)) - { - var has_defaults_vvvvwbf = []; - } - var has_defaults = has_defaults_vvvvwbf.some(has_defaults_vvvvwbf_SomeFunc); - - - // set this function logic - if (datadefault && has_defaults) - { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwbfvxk_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_vvvvwbfvxk_required = false; - } - } - else - { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwbfvxk_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_vvvvwbfvxk_required = true; - } - } -} - -// the vvvvwbf Some function -function datadefault_vvvvwbf_SomeFunc(datadefault_vvvvwbf) -{ - // set the function logic - if (datadefault_vvvvwbf == 'Other') - { - return true; - } - return false; -} - -// the vvvvwbf Some function -function has_defaults_vvvvwbf_SomeFunc(has_defaults_vvvvwbf) -{ - // set the function logic - if (has_defaults_vvvvwbf == 1) - { - return true; - } - return false; -} - // the vvvvwbh function -function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) +function vvvvwbh(datalenght_vvvvwbh,has_defaults_vvvvwbh) { - if (isSet(datatype_vvvvwbh) && datatype_vvvvwbh.constructor !== Array) + if (isSet(datalenght_vvvvwbh) && datalenght_vvvvwbh.constructor !== Array) { - var temp_vvvvwbh = datatype_vvvvwbh; - var datatype_vvvvwbh = []; - datatype_vvvvwbh.push(temp_vvvvwbh); + var temp_vvvvwbh = datalenght_vvvvwbh; + var datalenght_vvvvwbh = []; + datalenght_vvvvwbh.push(temp_vvvvwbh); } - else if (!isSet(datatype_vvvvwbh)) + else if (!isSet(datalenght_vvvvwbh)) { - var datatype_vvvvwbh = []; + var datalenght_vvvvwbh = []; } - var datatype = datatype_vvvvwbh.some(datatype_vvvvwbh_SomeFunc); + var datalenght = datalenght_vvvvwbh.some(datalenght_vvvvwbh_SomeFunc); if (isSet(has_defaults_vvvvwbh) && has_defaults_vvvvwbh.constructor !== Array) { @@ -246,43 +88,39 @@ function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) // set this function logic - if (datatype && has_defaults) + if (datalenght && 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 + jQuery('#jform_datalenght_other').closest('.control-group').show(); + // add required attribute to datalenght_other field if (jform_vvvvwbhvxl_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('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_vvvvwbhvxl_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 + jQuery('#jform_datalenght_other').closest('.control-group').hide(); + // remove required attribute from datalenght_other field if (!jform_vvvvwbhvxl_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('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_vvvvwbhvxl_required = true; } } } // the vvvvwbh Some function -function datatype_vvvvwbh_SomeFunc(datatype_vvvvwbh) +function datalenght_vvvvwbh_SomeFunc(datalenght_vvvvwbh) { // set the function logic - if (datatype_vvvvwbh == 'CHAR' || datatype_vvvvwbh == 'VARCHAR' || datatype_vvvvwbh == 'DATETIME' || datatype_vvvvwbh == 'DATE' || datatype_vvvvwbh == 'TIME' || datatype_vvvvwbh == 'INT' || datatype_vvvvwbh == 'TINYINT' || datatype_vvvvwbh == 'BIGINT' || datatype_vvvvwbh == 'FLOAT' || datatype_vvvvwbh == 'DECIMAL' || datatype_vvvvwbh == 'DOUBLE') + if (datalenght_vvvvwbh == 'Other') { return true; } @@ -300,103 +138,20 @@ function has_defaults_vvvvwbh_SomeFunc(has_defaults_vvvvwbh) return false; } -// the vvvvwbi function -function vvvvwbi(has_defaults_vvvvwbi,datatype_vvvvwbi) -{ - if (isSet(has_defaults_vvvvwbi) && has_defaults_vvvvwbi.constructor !== Array) - { - var temp_vvvvwbi = has_defaults_vvvvwbi; - var has_defaults_vvvvwbi = []; - has_defaults_vvvvwbi.push(temp_vvvvwbi); - } - else if (!isSet(has_defaults_vvvvwbi)) - { - var has_defaults_vvvvwbi = []; - } - var has_defaults = has_defaults_vvvvwbi.some(has_defaults_vvvvwbi_SomeFunc); - - if (isSet(datatype_vvvvwbi) && datatype_vvvvwbi.constructor !== Array) - { - var temp_vvvvwbi = datatype_vvvvwbi; - var datatype_vvvvwbi = []; - datatype_vvvvwbi.push(temp_vvvvwbi); - } - else if (!isSet(datatype_vvvvwbi)) - { - var datatype_vvvvwbi = []; - } - var datatype = datatype_vvvvwbi.some(datatype_vvvvwbi_SomeFunc); - - - // set this function logic - if (has_defaults && datatype) - { - 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_vvvvwbivxm_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbivxm_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_vvvvwbivxm_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbivxm_required = true; - } - } -} - -// the vvvvwbi Some function -function has_defaults_vvvvwbi_SomeFunc(has_defaults_vvvvwbi) -{ - // set the function logic - if (has_defaults_vvvvwbi == 1) - { - return true; - } - return false; -} - -// the vvvvwbi Some function -function datatype_vvvvwbi_SomeFunc(datatype_vvvvwbi) -{ - // set the function logic - if (datatype_vvvvwbi == 'CHAR' || datatype_vvvvwbi == 'VARCHAR' || datatype_vvvvwbi == 'DATETIME' || datatype_vvvvwbi == 'DATE' || datatype_vvvvwbi == 'TIME' || datatype_vvvvwbi == 'INT' || datatype_vvvvwbi == 'TINYINT' || datatype_vvvvwbi == 'BIGINT' || datatype_vvvvwbi == 'FLOAT' || datatype_vvvvwbi == 'DECIMAL' || datatype_vvvvwbi == 'DOUBLE') - { - return true; - } - return false; -} - // the vvvvwbj function -function vvvvwbj(datatype_vvvvwbj,has_defaults_vvvvwbj) +function vvvvwbj(datadefault_vvvvwbj,has_defaults_vvvvwbj) { - if (isSet(datatype_vvvvwbj) && datatype_vvvvwbj.constructor !== Array) + if (isSet(datadefault_vvvvwbj) && datadefault_vvvvwbj.constructor !== Array) { - var temp_vvvvwbj = datatype_vvvvwbj; - var datatype_vvvvwbj = []; - datatype_vvvvwbj.push(temp_vvvvwbj); + var temp_vvvvwbj = datadefault_vvvvwbj; + var datadefault_vvvvwbj = []; + datadefault_vvvvwbj.push(temp_vvvvwbj); } - else if (!isSet(datatype_vvvvwbj)) + else if (!isSet(datadefault_vvvvwbj)) { - var datatype_vvvvwbj = []; + var datadefault_vvvvwbj = []; } - var datatype = datatype_vvvvwbj.some(datatype_vvvvwbj_SomeFunc); + var datadefault = datadefault_vvvvwbj.some(datadefault_vvvvwbj_SomeFunc); if (isSet(has_defaults_vvvvwbj) && has_defaults_vvvvwbj.constructor !== Array) { @@ -412,39 +167,39 @@ function vvvvwbj(datatype_vvvvwbj,has_defaults_vvvvwbj) // set this function logic - if (datatype && has_defaults) + if (datadefault && has_defaults) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwbjvxn_required) + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field + if (jform_vvvvwbjvxm_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwbjvxn_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_vvvvwbjvxm_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwbjvxn_required) + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field + if (!jform_vvvvwbjvxm_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwbjvxn_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_vvvvwbjvxm_required = true; } } } // the vvvvwbj Some function -function datatype_vvvvwbj_SomeFunc(datatype_vvvvwbj) +function datadefault_vvvvwbj_SomeFunc(datadefault_vvvvwbj) { // set the function logic - if (datatype_vvvvwbj == 'CHAR' || datatype_vvvvwbj == 'VARCHAR' || datatype_vvvvwbj == 'TEXT' || datatype_vvvvwbj == 'MEDIUMTEXT' || datatype_vvvvwbj == 'LONGTEXT' || datatype_vvvvwbj == 'BLOB' || datatype_vvvvwbj == 'TINYBLOB' || datatype_vvvvwbj == 'MEDIUMBLOB' || datatype_vvvvwbj == 'LONGBLOB') + if (datadefault_vvvvwbj == 'Other') { return true; } @@ -463,20 +218,8 @@ function has_defaults_vvvvwbj_SomeFunc(has_defaults_vvvvwbj) } // the vvvvwbl function -function vvvvwbl(store_vvvvwbl,datatype_vvvvwbl,has_defaults_vvvvwbl) +function vvvvwbl(datatype_vvvvwbl,has_defaults_vvvvwbl) { - if (isSet(store_vvvvwbl) && store_vvvvwbl.constructor !== Array) - { - var temp_vvvvwbl = store_vvvvwbl; - var store_vvvvwbl = []; - store_vvvvwbl.push(temp_vvvvwbl); - } - else if (!isSet(store_vvvvwbl)) - { - var store_vvvvwbl = []; - } - var store = store_vvvvwbl.some(store_vvvvwbl_SomeFunc); - if (isSet(datatype_vvvvwbl) && datatype_vvvvwbl.constructor !== Array) { var temp_vvvvwbl = datatype_vvvvwbl; @@ -503,32 +246,43 @@ function vvvvwbl(store_vvvvwbl,datatype_vvvvwbl,has_defaults_vvvvwbl) // set this function logic - if (store && datatype && has_defaults) + if (datatype && has_defaults) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + 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_vvvvwblvxn_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwblvxn_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + 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_vvvvwblvxn_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwblvxn_required = true; + } } } -// the vvvvwbl Some function -function store_vvvvwbl_SomeFunc(store_vvvvwbl) -{ - // set the function logic - if (store_vvvvwbl == 4) - { - return true; - } - return false; -} - // the vvvvwbl Some function function datatype_vvvvwbl_SomeFunc(datatype_vvvvwbl) { // set the function logic - if (datatype_vvvvwbl == 'CHAR' || datatype_vvvvwbl == 'VARCHAR' || datatype_vvvvwbl == 'TEXT' || datatype_vvvvwbl == 'MEDIUMTEXT' || datatype_vvvvwbl == 'LONGTEXT' || datatype_vvvvwbl == 'BLOB' || datatype_vvvvwbl == 'TINYBLOB' || datatype_vvvvwbl == 'MEDIUMBLOB' || datatype_vvvvwbl == 'LONGBLOB') + if (datatype_vvvvwbl == 'CHAR' || datatype_vvvvwbl == 'VARCHAR' || datatype_vvvvwbl == 'DATETIME' || datatype_vvvvwbl == 'DATE' || datatype_vvvvwbl == 'TIME' || datatype_vvvvwbl == 'INT' || datatype_vvvvwbl == 'TINYINT' || datatype_vvvvwbl == 'BIGINT' || datatype_vvvvwbl == 'FLOAT' || datatype_vvvvwbl == 'DECIMAL' || datatype_vvvvwbl == 'DOUBLE') { return true; } @@ -547,32 +301,8 @@ function has_defaults_vvvvwbl_SomeFunc(has_defaults_vvvvwbl) } // the vvvvwbm function -function vvvvwbm(datatype_vvvvwbm,store_vvvvwbm,has_defaults_vvvvwbm) +function vvvvwbm(has_defaults_vvvvwbm,datatype_vvvvwbm) { - if (isSet(datatype_vvvvwbm) && datatype_vvvvwbm.constructor !== Array) - { - var temp_vvvvwbm = datatype_vvvvwbm; - var datatype_vvvvwbm = []; - datatype_vvvvwbm.push(temp_vvvvwbm); - } - else if (!isSet(datatype_vvvvwbm)) - { - var datatype_vvvvwbm = []; - } - var datatype = datatype_vvvvwbm.some(datatype_vvvvwbm_SomeFunc); - - if (isSet(store_vvvvwbm) && store_vvvvwbm.constructor !== Array) - { - var temp_vvvvwbm = store_vvvvwbm; - var store_vvvvwbm = []; - store_vvvvwbm.push(temp_vvvvwbm); - } - else if (!isSet(store_vvvvwbm)) - { - var store_vvvvwbm = []; - } - var store = store_vvvvwbm.some(store_vvvvwbm_SomeFunc); - if (isSet(has_defaults_vvvvwbm) && has_defaults_vvvvwbm.constructor !== Array) { var temp_vvvvwbm = has_defaults_vvvvwbm; @@ -585,40 +315,52 @@ function vvvvwbm(datatype_vvvvwbm,store_vvvvwbm,has_defaults_vvvvwbm) } var has_defaults = has_defaults_vvvvwbm.some(has_defaults_vvvvwbm_SomeFunc); + if (isSet(datatype_vvvvwbm) && datatype_vvvvwbm.constructor !== Array) + { + var temp_vvvvwbm = datatype_vvvvwbm; + var datatype_vvvvwbm = []; + datatype_vvvvwbm.push(temp_vvvvwbm); + } + else if (!isSet(datatype_vvvvwbm)) + { + var datatype_vvvvwbm = []; + } + var datatype = datatype_vvvvwbm.some(datatype_vvvvwbm_SomeFunc); + // set this function logic - if (datatype && store && has_defaults) + if (has_defaults && datatype) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + 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_vvvvwbmvxo_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwbmvxo_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + 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_vvvvwbmvxo_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwbmvxo_required = true; + } } } -// the vvvvwbm Some function -function datatype_vvvvwbm_SomeFunc(datatype_vvvvwbm) -{ - // set the function logic - if (datatype_vvvvwbm == 'CHAR' || datatype_vvvvwbm == 'VARCHAR' || datatype_vvvvwbm == 'TEXT' || datatype_vvvvwbm == 'MEDIUMTEXT' || datatype_vvvvwbm == 'LONGTEXT' || datatype_vvvvwbm == 'BLOB' || datatype_vvvvwbm == 'TINYBLOB' || datatype_vvvvwbm == 'MEDIUMBLOB' || datatype_vvvvwbm == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwbm Some function -function store_vvvvwbm_SomeFunc(store_vvvvwbm) -{ - // set the function logic - if (store_vvvvwbm == 4) - { - return true; - } - return false; -} - // the vvvvwbm Some function function has_defaults_vvvvwbm_SomeFunc(has_defaults_vvvvwbm) { @@ -630,33 +372,20 @@ function has_defaults_vvvvwbm_SomeFunc(has_defaults_vvvvwbm) return false; } -// the vvvvwbn function -function vvvvwbn(has_defaults_vvvvwbn,store_vvvvwbn,datatype_vvvvwbn) +// the vvvvwbm Some function +function datatype_vvvvwbm_SomeFunc(datatype_vvvvwbm) { - if (isSet(has_defaults_vvvvwbn) && has_defaults_vvvvwbn.constructor !== Array) + // set the function logic + if (datatype_vvvvwbm == 'CHAR' || datatype_vvvvwbm == 'VARCHAR' || datatype_vvvvwbm == 'DATETIME' || datatype_vvvvwbm == 'DATE' || datatype_vvvvwbm == 'TIME' || datatype_vvvvwbm == 'INT' || datatype_vvvvwbm == 'TINYINT' || datatype_vvvvwbm == 'BIGINT' || datatype_vvvvwbm == 'FLOAT' || datatype_vvvvwbm == 'DECIMAL' || datatype_vvvvwbm == 'DOUBLE') { - var temp_vvvvwbn = has_defaults_vvvvwbn; - var has_defaults_vvvvwbn = []; - has_defaults_vvvvwbn.push(temp_vvvvwbn); + return true; } - else if (!isSet(has_defaults_vvvvwbn)) - { - var has_defaults_vvvvwbn = []; - } - var has_defaults = has_defaults_vvvvwbn.some(has_defaults_vvvvwbn_SomeFunc); - - if (isSet(store_vvvvwbn) && store_vvvvwbn.constructor !== Array) - { - var temp_vvvvwbn = store_vvvvwbn; - var store_vvvvwbn = []; - store_vvvvwbn.push(temp_vvvvwbn); - } - else if (!isSet(store_vvvvwbn)) - { - var store_vvvvwbn = []; - } - var store = store_vvvvwbn.some(store_vvvvwbn_SomeFunc); + return false; +} +// the vvvvwbn function +function vvvvwbn(datatype_vvvvwbn,has_defaults_vvvvwbn) +{ if (isSet(datatype_vvvvwbn) && datatype_vvvvwbn.constructor !== Array) { var temp_vvvvwbn = datatype_vvvvwbn; @@ -669,40 +398,48 @@ function vvvvwbn(has_defaults_vvvvwbn,store_vvvvwbn,datatype_vvvvwbn) } var datatype = datatype_vvvvwbn.some(datatype_vvvvwbn_SomeFunc); + if (isSet(has_defaults_vvvvwbn) && has_defaults_vvvvwbn.constructor !== Array) + { + var temp_vvvvwbn = has_defaults_vvvvwbn; + var has_defaults_vvvvwbn = []; + has_defaults_vvvvwbn.push(temp_vvvvwbn); + } + else if (!isSet(has_defaults_vvvvwbn)) + { + var has_defaults_vvvvwbn = []; + } + var has_defaults = has_defaults_vvvvwbn.some(has_defaults_vvvvwbn_SomeFunc); + // set this function logic - if (has_defaults && store && datatype) + 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_vvvvwbnvxp_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwbnvxp_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_vvvvwbnvxp_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwbnvxp_required = true; + } } } -// the vvvvwbn Some function -function has_defaults_vvvvwbn_SomeFunc(has_defaults_vvvvwbn) -{ - // set the function logic - if (has_defaults_vvvvwbn == 1) - { - return true; - } - return false; -} - -// the vvvvwbn Some function -function store_vvvvwbn_SomeFunc(store_vvvvwbn) -{ - // set the function logic - if (store_vvvvwbn == 4) - { - return true; - } - return false; -} - // the vvvvwbn Some function function datatype_vvvvwbn_SomeFunc(datatype_vvvvwbn) { @@ -714,54 +451,317 @@ function datatype_vvvvwbn_SomeFunc(datatype_vvvvwbn) return false; } -// the vvvvwbo function -function vvvvwbo(has_defaults_vvvvwbo) +// the vvvvwbn Some function +function has_defaults_vvvvwbn_SomeFunc(has_defaults_vvvvwbn) { // set the function logic - if (has_defaults_vvvvwbo == 1) + if (has_defaults_vvvvwbn == 1) + { + return true; + } + return false; +} + +// the vvvvwbp function +function vvvvwbp(store_vvvvwbp,datatype_vvvvwbp,has_defaults_vvvvwbp) +{ + if (isSet(store_vvvvwbp) && store_vvvvwbp.constructor !== Array) + { + var temp_vvvvwbp = store_vvvvwbp; + var store_vvvvwbp = []; + store_vvvvwbp.push(temp_vvvvwbp); + } + else if (!isSet(store_vvvvwbp)) + { + var store_vvvvwbp = []; + } + var store = store_vvvvwbp.some(store_vvvvwbp_SomeFunc); + + if (isSet(datatype_vvvvwbp) && datatype_vvvvwbp.constructor !== Array) + { + var temp_vvvvwbp = datatype_vvvvwbp; + var datatype_vvvvwbp = []; + datatype_vvvvwbp.push(temp_vvvvwbp); + } + else if (!isSet(datatype_vvvvwbp)) + { + var datatype_vvvvwbp = []; + } + var datatype = datatype_vvvvwbp.some(datatype_vvvvwbp_SomeFunc); + + if (isSet(has_defaults_vvvvwbp) && has_defaults_vvvvwbp.constructor !== Array) + { + var temp_vvvvwbp = has_defaults_vvvvwbp; + var has_defaults_vvvvwbp = []; + has_defaults_vvvvwbp.push(temp_vvvvwbp); + } + else if (!isSet(has_defaults_vvvvwbp)) + { + var has_defaults_vvvvwbp = []; + } + var has_defaults = has_defaults_vvvvwbp.some(has_defaults_vvvvwbp_SomeFunc); + + + // set this function logic + if (store && datatype && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbp Some function +function store_vvvvwbp_SomeFunc(store_vvvvwbp) +{ + // set the function logic + if (store_vvvvwbp == 4) + { + return true; + } + return false; +} + +// the vvvvwbp Some function +function datatype_vvvvwbp_SomeFunc(datatype_vvvvwbp) +{ + // set the function logic + if (datatype_vvvvwbp == 'CHAR' || datatype_vvvvwbp == 'VARCHAR' || datatype_vvvvwbp == 'TEXT' || datatype_vvvvwbp == 'MEDIUMTEXT' || datatype_vvvvwbp == 'LONGTEXT' || datatype_vvvvwbp == 'BLOB' || datatype_vvvvwbp == 'TINYBLOB' || datatype_vvvvwbp == 'MEDIUMBLOB' || datatype_vvvvwbp == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbp Some function +function has_defaults_vvvvwbp_SomeFunc(has_defaults_vvvvwbp) +{ + // set the function logic + if (has_defaults_vvvvwbp == 1) + { + return true; + } + return false; +} + +// the vvvvwbq function +function vvvvwbq(datatype_vvvvwbq,store_vvvvwbq,has_defaults_vvvvwbq) +{ + if (isSet(datatype_vvvvwbq) && datatype_vvvvwbq.constructor !== Array) + { + var temp_vvvvwbq = datatype_vvvvwbq; + var datatype_vvvvwbq = []; + datatype_vvvvwbq.push(temp_vvvvwbq); + } + else if (!isSet(datatype_vvvvwbq)) + { + var datatype_vvvvwbq = []; + } + var datatype = datatype_vvvvwbq.some(datatype_vvvvwbq_SomeFunc); + + if (isSet(store_vvvvwbq) && store_vvvvwbq.constructor !== Array) + { + var temp_vvvvwbq = store_vvvvwbq; + var store_vvvvwbq = []; + store_vvvvwbq.push(temp_vvvvwbq); + } + else if (!isSet(store_vvvvwbq)) + { + var store_vvvvwbq = []; + } + var store = store_vvvvwbq.some(store_vvvvwbq_SomeFunc); + + if (isSet(has_defaults_vvvvwbq) && has_defaults_vvvvwbq.constructor !== Array) + { + var temp_vvvvwbq = has_defaults_vvvvwbq; + var has_defaults_vvvvwbq = []; + has_defaults_vvvvwbq.push(temp_vvvvwbq); + } + else if (!isSet(has_defaults_vvvvwbq)) + { + var has_defaults_vvvvwbq = []; + } + var has_defaults = has_defaults_vvvvwbq.some(has_defaults_vvvvwbq_SomeFunc); + + + // set this function logic + if (datatype && store && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbq Some function +function datatype_vvvvwbq_SomeFunc(datatype_vvvvwbq) +{ + // set the function logic + if (datatype_vvvvwbq == 'CHAR' || datatype_vvvvwbq == 'VARCHAR' || datatype_vvvvwbq == 'TEXT' || datatype_vvvvwbq == 'MEDIUMTEXT' || datatype_vvvvwbq == 'LONGTEXT' || datatype_vvvvwbq == 'BLOB' || datatype_vvvvwbq == 'TINYBLOB' || datatype_vvvvwbq == 'MEDIUMBLOB' || datatype_vvvvwbq == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbq Some function +function store_vvvvwbq_SomeFunc(store_vvvvwbq) +{ + // set the function logic + if (store_vvvvwbq == 4) + { + return true; + } + return false; +} + +// the vvvvwbq Some function +function has_defaults_vvvvwbq_SomeFunc(has_defaults_vvvvwbq) +{ + // set the function logic + if (has_defaults_vvvvwbq == 1) + { + return true; + } + return false; +} + +// the vvvvwbr function +function vvvvwbr(has_defaults_vvvvwbr,store_vvvvwbr,datatype_vvvvwbr) +{ + if (isSet(has_defaults_vvvvwbr) && has_defaults_vvvvwbr.constructor !== Array) + { + var temp_vvvvwbr = has_defaults_vvvvwbr; + var has_defaults_vvvvwbr = []; + has_defaults_vvvvwbr.push(temp_vvvvwbr); + } + else if (!isSet(has_defaults_vvvvwbr)) + { + var has_defaults_vvvvwbr = []; + } + var has_defaults = has_defaults_vvvvwbr.some(has_defaults_vvvvwbr_SomeFunc); + + if (isSet(store_vvvvwbr) && store_vvvvwbr.constructor !== Array) + { + var temp_vvvvwbr = store_vvvvwbr; + var store_vvvvwbr = []; + store_vvvvwbr.push(temp_vvvvwbr); + } + else if (!isSet(store_vvvvwbr)) + { + var store_vvvvwbr = []; + } + var store = store_vvvvwbr.some(store_vvvvwbr_SomeFunc); + + if (isSet(datatype_vvvvwbr) && datatype_vvvvwbr.constructor !== Array) + { + var temp_vvvvwbr = datatype_vvvvwbr; + var datatype_vvvvwbr = []; + datatype_vvvvwbr.push(temp_vvvvwbr); + } + else if (!isSet(datatype_vvvvwbr)) + { + var datatype_vvvvwbr = []; + } + var datatype = datatype_vvvvwbr.some(datatype_vvvvwbr_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 vvvvwbr Some function +function has_defaults_vvvvwbr_SomeFunc(has_defaults_vvvvwbr) +{ + // set the function logic + if (has_defaults_vvvvwbr == 1) + { + return true; + } + return false; +} + +// the vvvvwbr Some function +function store_vvvvwbr_SomeFunc(store_vvvvwbr) +{ + // set the function logic + if (store_vvvvwbr == 4) + { + return true; + } + return false; +} + +// the vvvvwbr Some function +function datatype_vvvvwbr_SomeFunc(datatype_vvvvwbr) +{ + // set the function logic + if (datatype_vvvvwbr == 'CHAR' || datatype_vvvvwbr == 'VARCHAR' || datatype_vvvvwbr == 'TEXT' || datatype_vvvvwbr == 'MEDIUMTEXT' || datatype_vvvvwbr == 'LONGTEXT' || datatype_vvvvwbr == 'BLOB' || datatype_vvvvwbr == 'TINYBLOB' || datatype_vvvvwbr == 'MEDIUMBLOB' || datatype_vvvvwbr == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbs function +function vvvvwbs(has_defaults_vvvvwbs) +{ + // set the function logic + if (has_defaults_vvvvwbs == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwbovxo_required) + if (jform_vvvvwbsvxq_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwbovxo_required = false; + jform_vvvvwbsvxq_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwbovxp_required) + if (jform_vvvvwbsvxr_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_vvvvwbovxp_required = false; + jform_vvvvwbsvxr_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwbovxo_required) + if (!jform_vvvvwbsvxq_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwbovxo_required = true; + jform_vvvvwbsvxq_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwbovxp_required) + if (!jform_vvvvwbsvxr_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_vvvvwbovxp_required = true; + jform_vvvvwbsvxr_required = true; } } } diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 6937a7a24..70dc34927 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,112 +9,112 @@ */ // Some Global Values -jform_vvvvwbzvyb_required = false; -jform_vvvvwcavyc_required = false; -jform_vvvvwcbvyd_required = false; -jform_vvvvwccvye_required = false; -jform_vvvvwcevyf_required = false; +jform_vvvvwcdvyd_required = false; +jform_vvvvwcevye_required = false; +jform_vvvvwcfvyf_required = false; +jform_vvvvwcgvyg_required = false; +jform_vvvvwcivyh_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwbz = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwbz(location_vvvvwbz); + var location_vvvvwcd = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwcd(location_vvvvwcd); - var location_vvvvwca = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwca(location_vvvvwca); + var location_vvvvwce = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwce(location_vvvvwce); - var type_vvvvwcb = jQuery("#jform_type").val(); - vvvvwcb(type_vvvvwcb); + var type_vvvvwcf = jQuery("#jform_type").val(); + vvvvwcf(type_vvvvwcf); - var type_vvvvwcc = jQuery("#jform_type").val(); - vvvvwcc(type_vvvvwcc); + var type_vvvvwcg = jQuery("#jform_type").val(); + vvvvwcg(type_vvvvwcg); - var type_vvvvwcd = jQuery("#jform_type").val(); - vvvvwcd(type_vvvvwcd); + var type_vvvvwch = jQuery("#jform_type").val(); + vvvvwch(type_vvvvwch); - var target_vvvvwce = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwce(target_vvvvwce); + var target_vvvvwci = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwci(target_vvvvwci); }); -// the vvvvwbz function -function vvvvwbz(location_vvvvwbz) +// the vvvvwcd function +function vvvvwcd(location_vvvvwcd) { // set the function logic - if (location_vvvvwbz == 1) + if (location_vvvvwcd == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwbzvyb_required) + if (jform_vvvvwcdvyd_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_vvvvwbzvyb_required = false; + jform_vvvvwcdvyd_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwbzvyb_required) + if (!jform_vvvvwcdvyd_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_vvvvwbzvyb_required = true; + jform_vvvvwcdvyd_required = true; } } } -// the vvvvwca function -function vvvvwca(location_vvvvwca) +// the vvvvwce function +function vvvvwce(location_vvvvwce) { // set the function logic - if (location_vvvvwca == 2) + if (location_vvvvwce == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwcavyc_required) + if (jform_vvvvwcevye_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_vvvvwcavyc_required = false; + jform_vvvvwcevye_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwcavyc_required) + if (!jform_vvvvwcevye_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_vvvvwcavyc_required = true; + jform_vvvvwcevye_required = true; } } } -// the vvvvwcb function -function vvvvwcb(type_vvvvwcb) +// the vvvvwcf function +function vvvvwcf(type_vvvvwcf) { - if (isSet(type_vvvvwcb) && type_vvvvwcb.constructor !== Array) + if (isSet(type_vvvvwcf) && type_vvvvwcf.constructor !== Array) { - var temp_vvvvwcb = type_vvvvwcb; - var type_vvvvwcb = []; - type_vvvvwcb.push(temp_vvvvwcb); + var temp_vvvvwcf = type_vvvvwcf; + var type_vvvvwcf = []; + type_vvvvwcf.push(temp_vvvvwcf); } - else if (!isSet(type_vvvvwcb)) + else if (!isSet(type_vvvvwcf)) { - var type_vvvvwcb = []; + var type_vvvvwcf = []; } - var type = type_vvvvwcb.some(type_vvvvwcb_SomeFunc); + var type = type_vvvvwcf.some(type_vvvvwcf_SomeFunc); // set this function logic @@ -122,55 +122,55 @@ function vvvvwcb(type_vvvvwcb) { jQuery('#jform_url').closest('.control-group').show(); // add required attribute to url field - if (jform_vvvvwcbvyd_required) + if (jform_vvvvwcfvyf_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwcbvyd_required = false; + jform_vvvvwcfvyf_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); // remove required attribute from url field - if (!jform_vvvvwcbvyd_required) + if (!jform_vvvvwcfvyf_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwcbvyd_required = true; + jform_vvvvwcfvyf_required = true; } } } -// the vvvvwcb Some function -function type_vvvvwcb_SomeFunc(type_vvvvwcb) +// the vvvvwcf Some function +function type_vvvvwcf_SomeFunc(type_vvvvwcf) { // set the function logic - if (type_vvvvwcb == 3) + if (type_vvvvwcf == 3) { return true; } return false; } -// the vvvvwcc function -function vvvvwcc(type_vvvvwcc) +// the vvvvwcg function +function vvvvwcg(type_vvvvwcg) { - if (isSet(type_vvvvwcc) && type_vvvvwcc.constructor !== Array) + if (isSet(type_vvvvwcg) && type_vvvvwcg.constructor !== Array) { - var temp_vvvvwcc = type_vvvvwcc; - var type_vvvvwcc = []; - type_vvvvwcc.push(temp_vvvvwcc); + var temp_vvvvwcg = type_vvvvwcg; + var type_vvvvwcg = []; + type_vvvvwcg.push(temp_vvvvwcg); } - else if (!isSet(type_vvvvwcc)) + else if (!isSet(type_vvvvwcg)) { - var type_vvvvwcc = []; + var type_vvvvwcg = []; } - var type = type_vvvvwcc.some(type_vvvvwcc_SomeFunc); + var type = type_vvvvwcg.some(type_vvvvwcg_SomeFunc); // set this function logic @@ -178,55 +178,55 @@ function vvvvwcc(type_vvvvwcc) { jQuery('#jform_article').closest('.control-group').show(); // add required attribute to article field - if (jform_vvvvwccvye_required) + if (jform_vvvvwcgvyg_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwccvye_required = false; + jform_vvvvwcgvyg_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); // remove required attribute from article field - if (!jform_vvvvwccvye_required) + if (!jform_vvvvwcgvyg_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwccvye_required = true; + jform_vvvvwcgvyg_required = true; } } } -// the vvvvwcc Some function -function type_vvvvwcc_SomeFunc(type_vvvvwcc) +// the vvvvwcg Some function +function type_vvvvwcg_SomeFunc(type_vvvvwcg) { // set the function logic - if (type_vvvvwcc == 1) + if (type_vvvvwcg == 1) { return true; } return false; } -// the vvvvwcd function -function vvvvwcd(type_vvvvwcd) +// the vvvvwch function +function vvvvwch(type_vvvvwch) { - if (isSet(type_vvvvwcd) && type_vvvvwcd.constructor !== Array) + if (isSet(type_vvvvwch) && type_vvvvwch.constructor !== Array) { - var temp_vvvvwcd = type_vvvvwcd; - var type_vvvvwcd = []; - type_vvvvwcd.push(temp_vvvvwcd); + var temp_vvvvwch = type_vvvvwch; + var type_vvvvwch = []; + type_vvvvwch.push(temp_vvvvwch); } - else if (!isSet(type_vvvvwcd)) + else if (!isSet(type_vvvvwch)) { - var type_vvvvwcd = []; + var type_vvvvwch = []; } - var type = type_vvvvwcd.some(type_vvvvwcd_SomeFunc); + var type = type_vvvvwch.some(type_vvvvwch_SomeFunc); // set this function logic @@ -240,45 +240,45 @@ function vvvvwcd(type_vvvvwcd) } } -// the vvvvwcd Some function -function type_vvvvwcd_SomeFunc(type_vvvvwcd) +// the vvvvwch Some function +function type_vvvvwch_SomeFunc(type_vvvvwch) { // set the function logic - if (type_vvvvwcd == 2) + if (type_vvvvwch == 2) { return true; } return false; } -// the vvvvwce function -function vvvvwce(target_vvvvwce) +// the vvvvwci function +function vvvvwci(target_vvvvwci) { // set the function logic - if (target_vvvvwce == 1) + if (target_vvvvwci == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwcevyf_required) + if (jform_vvvvwcivyh_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwcevyf_required = false; + jform_vvvvwcivyh_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwcevyf_required) + if (!jform_vvvvwcivyh_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwcevyf_required = true; + jform_vvvvwcivyh_required = true; } } } diff --git a/admin/models/forms/joomla_plugin.js b/admin/models/forms/joomla_plugin.js new file mode 100644 index 000000000..fe93ad56b --- /dev/null +++ b/admin/models/forms/joomla_plugin.js @@ -0,0 +1,491 @@ +/** + * @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 + */ + +// Initial Script +jQuery(document).ready(function() +{ + var class_extends_vvvvvxb = jQuery("#jform_class_extends").val(); + var joomla_plugin_group_vvvvvxb = jQuery("#jform_joomla_plugin_group").val(); + vvvvvxb(class_extends_vvvvvxb,joomla_plugin_group_vvvvvxb); + + var joomla_plugin_group_vvvvvxc = jQuery("#jform_joomla_plugin_group").val(); + var class_extends_vvvvvxc = jQuery("#jform_class_extends").val(); + vvvvvxc(joomla_plugin_group_vvvvvxc,class_extends_vvvvvxc); +}); + +// the vvvvvxb function +function vvvvvxb(class_extends_vvvvvxb,joomla_plugin_group_vvvvvxb) +{ + if (isSet(class_extends_vvvvvxb) && class_extends_vvvvvxb.constructor !== Array) + { + var temp_vvvvvxb = class_extends_vvvvvxb; + var class_extends_vvvvvxb = []; + class_extends_vvvvvxb.push(temp_vvvvvxb); + } + else if (!isSet(class_extends_vvvvvxb)) + { + var class_extends_vvvvvxb = []; + } + var class_extends = class_extends_vvvvvxb.some(class_extends_vvvvvxb_SomeFunc); + + if (isSet(joomla_plugin_group_vvvvvxb) && joomla_plugin_group_vvvvvxb.constructor !== Array) + { + var temp_vvvvvxb = joomla_plugin_group_vvvvvxb; + var joomla_plugin_group_vvvvvxb = []; + joomla_plugin_group_vvvvvxb.push(temp_vvvvvxb); + } + else if (!isSet(joomla_plugin_group_vvvvvxb)) + { + var joomla_plugin_group_vvvvvxb = []; + } + var joomla_plugin_group = joomla_plugin_group_vvvvvxb.some(joomla_plugin_group_vvvvvxb_SomeFunc); + + + // set this function logic + if (class_extends && joomla_plugin_group) + { + jQuery('#jform_main_class_code-lbl').closest('.control-group').show(); + jQuery('#jform_method_selection-lbl').closest('.control-group').show(); + jQuery('#jform_property_selection-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_main_class_code-lbl').closest('.control-group').hide(); + jQuery('#jform_method_selection-lbl').closest('.control-group').hide(); + jQuery('#jform_property_selection-lbl').closest('.control-group').hide(); + } +} + +// the vvvvvxb Some function +function class_extends_vvvvvxb_SomeFunc(class_extends_vvvvvxb) +{ + // set the function logic + if (isSet(class_extends_vvvvvxb)) + { + return true; + } + return false; +} + +// the vvvvvxb Some function +function joomla_plugin_group_vvvvvxb_SomeFunc(joomla_plugin_group_vvvvvxb) +{ + // set the function logic + if (isSet(joomla_plugin_group_vvvvvxb)) + { + return true; + } + return false; +} + +// the vvvvvxc function +function vvvvvxc(joomla_plugin_group_vvvvvxc,class_extends_vvvvvxc) +{ + if (isSet(joomla_plugin_group_vvvvvxc) && joomla_plugin_group_vvvvvxc.constructor !== Array) + { + var temp_vvvvvxc = joomla_plugin_group_vvvvvxc; + var joomla_plugin_group_vvvvvxc = []; + joomla_plugin_group_vvvvvxc.push(temp_vvvvvxc); + } + else if (!isSet(joomla_plugin_group_vvvvvxc)) + { + var joomla_plugin_group_vvvvvxc = []; + } + var joomla_plugin_group = joomla_plugin_group_vvvvvxc.some(joomla_plugin_group_vvvvvxc_SomeFunc); + + if (isSet(class_extends_vvvvvxc) && class_extends_vvvvvxc.constructor !== Array) + { + var temp_vvvvvxc = class_extends_vvvvvxc; + var class_extends_vvvvvxc = []; + class_extends_vvvvvxc.push(temp_vvvvvxc); + } + else if (!isSet(class_extends_vvvvvxc)) + { + var class_extends_vvvvvxc = []; + } + var class_extends = class_extends_vvvvvxc.some(class_extends_vvvvvxc_SomeFunc); + + + // set this function logic + if (joomla_plugin_group && class_extends) + { + jQuery('#jform_main_class_code-lbl').closest('.control-group').show(); + jQuery('#jform_method_selection-lbl').closest('.control-group').show(); + jQuery('#jform_property_selection-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_main_class_code-lbl').closest('.control-group').hide(); + jQuery('#jform_method_selection-lbl').closest('.control-group').hide(); + jQuery('#jform_property_selection-lbl').closest('.control-group').hide(); + } +} + +// the vvvvvxc Some function +function joomla_plugin_group_vvvvvxc_SomeFunc(joomla_plugin_group_vvvvvxc) +{ + // set the function logic + if (isSet(joomla_plugin_group_vvvvvxc)) + { + return true; + } + return false; +} + +// the vvvvvxc Some function +function class_extends_vvvvvxc_SomeFunc(class_extends_vvvvvxc) +{ + // set the function logic + if (isSet(class_extends_vvvvvxc)) + { + return true; + } + return false; +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} + + +jQuery(document).ready(function() +{ + // load the active array values + buildSelectionArray('property'); + buildSelectionArray('method'); + // set joomla_plugin_group Array + selectionArray['joomla_plugin_group'] = {}; + jQuery("#jform_joomla_plugin_group option").each(function() { + var key = jQuery(this).val(); + var text = jQuery(this).text(); + selectionArray['joomla_plugin_group'][key] = text; + }); + // load the active selection array values + getClassCodeIds('joomla_plugin_group', 'jform_class_extends', false); + getClassCodeIds('property', 'jform_joomla_plugin_group', false); + getClassCodeIds('method', 'jform_joomla_plugin_group', false); + // load the used in div + // jQuery('#usedin').show(); + // check and load all the customcode edit buttons + // setTimeout(getEditCustomCodeButtons, 300); + + rowWatcher(); +}); + +function getClassStuff_server(id, type, callingName){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax."+callingName+"&format=json&raw=true"); + if(token.length > 0 && id > 0 && type.length > 0){ + var request = token+'=1&type=' + type + '&id=' + id; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + +function getClassCodeIds(type, target_field, reset_all){ + // now get the value + var value = jQuery('#'+target_field).val(); + // now get the code + getClassStuff_server(value, type, 'getClassCodeIds').done(function(result) { + if(result){ + // reset the selection + selectionActiveArray[type] = {}; + // update the active array + jQuery.each( result, function(i, prop) { + selectionActiveArray[type][prop] = selectionArray[type][prop]; + }); + // update the active field selection + updateActiveFieldSelection(type, reset_all); + } + }); +} + +function updateActiveFieldSelection(type, reset_all){ + // update the selection options + if ('joomla_plugin_group' === type) { + // get value if not going to reset all + if (!reset_all){ + // get the active values + var activeValue = jQuery("#jform_"+type+" option:selected").val(); + var activeText = jQuery("#jform_"+type+" option:selected").text(); + // clear the options out + jQuery("#jform_"+type).find('option').remove().end(); + // add the active selection back (must be what is available) + jQuery("#jform_"+type).append(''); + // now add the lists back + jQuery.each( selectionActiveArray[type], function(aValue, aText ) { + if (activeValue !== aValue) { + jQuery("#jform_"+type).append(''); + } + }); + jQuery("#jform_"+type).val(activeValue); + } else { + // clear the options out + jQuery("#jform_"+type).find('option').remove().end(); + // now add the lists back + jQuery.each( selectionActiveArray[type], function(aValue, aText ) { + jQuery("#jform_"+type).append(''); + }); + jQuery("#jform_"+type).val(''); + } + jQuery("#jform_"+type).trigger('liszt:updated'); + // reset all when global update is made + if (reset_all) { + resetAll('method'); + resetAll('property'); + } + } else { + selectionDynamicUpdate(type); + // reset all when global update is made + if (reset_all) { + resetAll(type); + } + } +} + +function resetAll(type) { + var i; + for (i = 0; i < 10; i++) { + // build ID + var id_check = 'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type; + // first check if Id is on page as that not the same as the one currently calling + if (jQuery("#"+id_check).length) { + if (i == 0) { + jQuery('#'+id_check).val(''); + jQuery('#'+id_check).trigger('liszt:updated'); + } else { + // remove the row + jQuery('#'+id_check).closest('tr').remove(); + } + } + } + Joomla.editors.instances['jform_main_class_code'].setValue(''); +} + +function getClassCode(field, type){ + // get the ID + var id = jQuery(field).attr('id'); + // now get the value + var value = jQuery('#' + id).val(); + if (propertyIsSet(value, id, type)) { + // reset the selection + jQuery('#'+id).val(''); + jQuery('#'+id).trigger("liszt:updated"); + // give out a notice + jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'}); + } else { + // set the active removed value + selectedIdRemoved[type] = value; + // do a dynamic update (to remove what was already used) + selectionDynamicUpdate(type); + // now get the code + getClassStuff_server(value, type, 'getClassCode').done(function(result) { + if(result){ + if (Joomla.editors.instances.hasOwnProperty("jform_main_class_code")) { + var old_result = Joomla.editors.instances['jform_main_class_code'].getValue(); + if (old_result.length > 0) { + // make sure not to load the same string twice + if (old_result.indexOf(result) !== -1) { + // reset the selection + jQuery('#'+id).val(''); + jQuery('#'+id).trigger("liszt:updated"); + // give out a notice + jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'}); + } else { + Joomla.editors.instances['jform_main_class_code'].setValue(old_result + "\n\n" + result); + } + } else { + Joomla.editors.instances['jform_main_class_code'].setValue(result); + } + } else { + var old_result = jQuery('textarea#jform_main_class_code').val(); + if (old_result.length > 0) { + // make sure not to load the same string twice + if (old_result.indexOf(result) !== -1) { + // reset the selection + jQuery('#'+id).val(''); + jQuery('#'+id).trigger("liszt:updated"); + // give out a notice + jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'}); + } else { + jQuery('textarea#jform_main_class_code').val(old_result + "\n\n" + result); + } + } else { + jQuery('textarea#jform_main_class_code').val(result); + } + } + } + }); + } +} + +// set selection the options +selectionArray = {'property':{},'method':{}}; +selectionActiveArray = {'property':{},'method':{}}; +selectedIdRemoved = {'property':'not','method':'not'}; +justonce = {'property':1,'method':1}; + +function buildSelectionArray(type) { + var i; + for (i = 0; i < 10; i++) { + // build ID + var id_check = 'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type; + // first check if Id is on page as that not the same as the one currently calling + if (justonce[type] == 1 && jQuery("#"+id_check).length) { + // set buckets + jQuery("#"+id_check+" option").each(function() { + var key = jQuery(this).val(); + var text = jQuery(this).text(); + selectionArray[type][key] = text; + }); + justonce[type]++; + } + } +} + +function selectionDynamicUpdate(type) { + selectionAvailable = {}; + selectionSelectedArray = {}; + selectionTrackerArray = {}; + var i; + for (i = 0; i < 70; i++) { // for now this is the number of field we should check + // build ID + var id_check = 'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type; + // first check if Id is on page as that not the same as the one currently calling + if (jQuery("#"+id_check).length && selectedIdRemoved[type] !== id_check) { + // build the selected array + var key = jQuery("#"+id_check+" option:selected").val(); + var text = jQuery("#"+id_check+" option:selected").text(); + selectionSelectedArray[key] = text; + // keep track of the value set + selectionTrackerArray[id_check] = key; + // clear the options out + jQuery("#"+id_check).find('option').remove().end(); + } + } + // trigger chosen on the list fields + // jQuery('.'+type+'_selection_list').chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":Joomla.JText._("COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS"),"placeholder_text_single":Joomla.JText._("COM_COMPONENTBUILDER_SELECT_A_PROPERTY"),"no_results_text":Joomla.JText._("COM_COMPONENTBUILDER_NO_RESULTS_MATCH")}); + // now build the list to keep + jQuery.each( selectionActiveArray[type], function( prop, name ) { + if (!selectionSelectedArray.hasOwnProperty(prop)) { + selectionAvailable[prop] = name; + } + }); + // now add the lists back + jQuery.each( selectionTrackerArray, function( tId, tKey ) { + if (jQuery('#'+tId).length) { + jQuery('#'+tId).append(''); + jQuery.each( selectionAvailable, function( aKey, aValue ) { + jQuery('#'+tId).append(''); + }); + jQuery('#'+tId).val(tKey); + jQuery('#'+tId).trigger('liszt:updated'); + } + }); +} + +function rowWatcher() { + jQuery(document).on('subform-row-remove', function(event, row){ + // we first chck if this is a method call + var valid_call = jQuery(row.innerHTML).find('.method_selection_list').attr('id'); + var type_call = 'method'; + if (!isSet(valid_call)){ + // now lets see if this is a property call + var valid_call = jQuery(row.innerHTML).find('.property_selection_list').attr('id'); + var type_call = 'property'; + } + // so lets update selection if call valid + if (isSet(valid_call)){ + selectedIdRemoved[type_call] = valid_call; + selectionDynamicUpdate(type_call); + } + }); + jQuery(document).on('subform-row-add', function(event, row){ + // we first chck if this is a method call + var valid_call = jQuery(row.innerHTML).find('.method_selection_list').attr('id'); + var type_call = 'method'; + if (!isSet(valid_call)){ + // now lets see if this is a property call + var valid_call = jQuery(row.innerHTML).find('.property_selection_list').attr('id'); + var type_call = 'property'; + } + // so lets update selection if call valid + if (isSet(valid_call)){ + selectedIdRemoved[type_call] = 'not'; + selectionDynamicUpdate(type_call); + } + }); +} + +function propertyIsSet(prop, id, type) { + var i; + for (i = 0; i < 70; i++) { // for now this is the number of field we should check + // build ID + var id_check = 'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type; + // first check if Id is on page as that not the same as the one currently calling + if (jQuery("#"+id_check).length && id_check != id) { + // get the property value + var tmp = jQuery("#"+id_check+" option:selected").val(); + // now validate + if (tmp === prop) { + return true; + } + } + } + return false; +} + +function getEditCustomCodeButtons_server(id){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod); + if(token.length > 0 && id > 0){ + var request = token+'=1&id='+id+'&return_here='+return_here; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + +function getEditCustomCodeButtons(){ + // get the id + id = jQuery("#jform_id").val(); + getEditCustomCodeButtons_server(id).done(function(result) { + if(isObject(result)){ + jQuery.each(result, function( field, buttons ) { + jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery.each(buttons, function( name, button ) { + jQuery(".control-customcode-buttons-"+field).append(button); + }); + }); + } + }) +} + +// check object is not empty +function isObject(obj) { + for(var prop in obj) { + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; +} diff --git a/admin/models/forms/joomla_plugin.xml b/admin/models/forms/joomla_plugin.xml new file mode 100644 index 000000000..a4734482b --- /dev/null +++ b/admin/models/forms/joomla_plugin.xml @@ -0,0 +1,260 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/joomla_plugin_group.js b/admin/models/forms/joomla_plugin_group.js new file mode 100644 index 000000000..406de38ba --- /dev/null +++ b/admin/models/forms/joomla_plugin_group.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_group.xml b/admin/models/forms/joomla_plugin_group.xml new file mode 100644 index 000000000..2612c8858 --- /dev/null +++ b/admin/models/forms/joomla_plugin_group.xml @@ -0,0 +1,138 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index 1996b5f44..f676d5719 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_vvvvvzf = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvzf(add_php_view_vvvvvzf); + var add_php_view_vvvvvzh = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvzh(add_php_view_vvvvvzh); }); -// the vvvvvzf function -function vvvvvzf(add_php_view_vvvvvzf) +// the vvvvvzh function +function vvvvvzh(add_php_view_vvvvvzh) { // set the function logic - if (add_php_view_vvvvvzf == 1) + if (add_php_view_vvvvvzh == 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 7007280d1..653d0d802 100644 --- a/admin/models/forms/library.js +++ b/admin/models/forms/library.js @@ -9,24 +9,12 @@ */ // Some Global Values -jform_vvvvwamvxd_required = false; -jform_vvvvwasvxe_required = false; +jform_vvvvwaqvxf_required = false; +jform_vvvvwawvxg_required = false; // Initial Script jQuery(document).ready(function() { - var how_vvvvwal = jQuery("#jform_how").val(); - vvvvwal(how_vvvvwal); - - var how_vvvvwam = jQuery("#jform_how").val(); - vvvvwam(how_vvvvwam); - - var how_vvvvwan = jQuery("#jform_how").val(); - vvvvwan(how_vvvvwan); - - var how_vvvvwao = jQuery("#jform_how").val(); - vvvvwao(how_vvvvwao); - var how_vvvvwap = jQuery("#jform_how").val(); vvvvwap(how_vvvvwap); @@ -36,180 +24,22 @@ jQuery(document).ready(function() var how_vvvvwar = jQuery("#jform_how").val(); vvvvwar(how_vvvvwar); - var type_vvvvwas = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvwas(type_vvvvwas); + var how_vvvvwas = jQuery("#jform_how").val(); + vvvvwas(how_vvvvwas); + + var how_vvvvwat = jQuery("#jform_how").val(); + vvvvwat(how_vvvvwat); + + var how_vvvvwau = jQuery("#jform_how").val(); + vvvvwau(how_vvvvwau); + + var how_vvvvwav = jQuery("#jform_how").val(); + vvvvwav(how_vvvvwav); + + var type_vvvvwaw = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwaw(type_vvvvwaw); }); -// the vvvvwal function -function vvvvwal(how_vvvvwal) -{ - if (isSet(how_vvvvwal) && how_vvvvwal.constructor !== Array) - { - var temp_vvvvwal = how_vvvvwal; - var how_vvvvwal = []; - how_vvvvwal.push(temp_vvvvwal); - } - else if (!isSet(how_vvvvwal)) - { - var how_vvvvwal = []; - } - var how = how_vvvvwal.some(how_vvvvwal_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 vvvvwal Some function -function how_vvvvwal_SomeFunc(how_vvvvwal) -{ - // set the function logic - if (how_vvvvwal == 2) - { - return true; - } - return false; -} - -// the vvvvwam function -function vvvvwam(how_vvvvwam) -{ - if (isSet(how_vvvvwam) && how_vvvvwam.constructor !== Array) - { - var temp_vvvvwam = how_vvvvwam; - var how_vvvvwam = []; - how_vvvvwam.push(temp_vvvvwam); - } - else if (!isSet(how_vvvvwam)) - { - var how_vvvvwam = []; - } - var how = how_vvvvwam.some(how_vvvvwam_SomeFunc); - - - // set this function logic - if (how) - { - jQuery('#jform_php_setdocument').closest('.control-group').show(); - // add required attribute to php_setdocument field - if (jform_vvvvwamvxd_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_vvvvwamvxd_required = false; - } - } - else - { - jQuery('#jform_php_setdocument').closest('.control-group').hide(); - // remove required attribute from php_setdocument field - if (!jform_vvvvwamvxd_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_vvvvwamvxd_required = true; - } - } -} - -// the vvvvwam Some function -function how_vvvvwam_SomeFunc(how_vvvvwam) -{ - // set the function logic - if (how_vvvvwam == 3) - { - return true; - } - return false; -} - -// the vvvvwan function -function vvvvwan(how_vvvvwan) -{ - if (isSet(how_vvvvwan) && how_vvvvwan.constructor !== Array) - { - var temp_vvvvwan = how_vvvvwan; - var how_vvvvwan = []; - how_vvvvwan.push(temp_vvvvwan); - } - else if (!isSet(how_vvvvwan)) - { - var how_vvvvwan = []; - } - var how = how_vvvvwan.some(how_vvvvwan_SomeFunc); - - - // set this function logic - if (how) - { - jQuery('.note_display_library_config').closest('.control-group').show(); - } - else - { - jQuery('.note_display_library_config').closest('.control-group').hide(); - } -} - -// the vvvvwan Some function -function how_vvvvwan_SomeFunc(how_vvvvwan) -{ - // set the function logic - if (how_vvvvwan == 2 || how_vvvvwan == 3) - { - return true; - } - return false; -} - -// the vvvvwao function -function vvvvwao(how_vvvvwao) -{ - if (isSet(how_vvvvwao) && how_vvvvwao.constructor !== Array) - { - var temp_vvvvwao = how_vvvvwao; - var how_vvvvwao = []; - how_vvvvwao.push(temp_vvvvwao); - } - else if (!isSet(how_vvvvwao)) - { - var how_vvvvwao = []; - } - var how = how_vvvvwao.some(how_vvvvwao_SomeFunc); - - - // set this function logic - if (how) - { - jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); - } - else - { - jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); - } -} - -// the vvvvwao Some function -function how_vvvvwao_SomeFunc(how_vvvvwao) -{ - // set the function logic - if (how_vvvvwao == 1 || how_vvvvwao == 2 || how_vvvvwao == 3) - { - return true; - } - return false; -} - // the vvvvwap function function vvvvwap(how_vvvvwap) { @@ -229,15 +59,11 @@ function vvvvwap(how_vvvvwap) // 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('#jform_addconditions-lbl').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('#jform_addconditions-lbl').closest('.control-group').hide(); } } @@ -245,7 +71,7 @@ function vvvvwap(how_vvvvwap) function how_vvvvwap_SomeFunc(how_vvvvwap) { // set the function logic - if (how_vvvvwap == 0) + if (how_vvvvwap == 2) { return true; } @@ -271,13 +97,29 @@ function vvvvwaq(how_vvvvwaq) // 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('#jform_php_setdocument').closest('.control-group').show(); + // add required attribute to php_setdocument field + if (jform_vvvvwaqvxf_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_vvvvwaqvxf_required = false; + } } else { - jQuery('.note_yes_behaviour_one').closest('.control-group').hide(); - jQuery('.note_yes_behaviour_two').closest('.control-group').hide(); + jQuery('#jform_php_setdocument').closest('.control-group').hide(); + // remove required attribute from php_setdocument field + if (!jform_vvvvwaqvxf_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_vvvvwaqvxf_required = true; + } } } @@ -285,7 +127,7 @@ function vvvvwaq(how_vvvvwaq) function how_vvvvwaq_SomeFunc(how_vvvvwaq) { // set the function logic - if (how_vvvvwaq == 1) + if (how_vvvvwaq == 3) { return true; } @@ -308,6 +150,164 @@ function vvvvwar(how_vvvvwar) var how = how_vvvvwar.some(how_vvvvwar_SomeFunc); + // set this function logic + if (how) + { + jQuery('.note_display_library_config').closest('.control-group').show(); + } + else + { + jQuery('.note_display_library_config').closest('.control-group').hide(); + } +} + +// the vvvvwar Some function +function how_vvvvwar_SomeFunc(how_vvvvwar) +{ + // set the function logic + if (how_vvvvwar == 2 || how_vvvvwar == 3) + { + return true; + } + return false; +} + +// the vvvvwas function +function vvvvwas(how_vvvvwas) +{ + if (isSet(how_vvvvwas) && how_vvvvwas.constructor !== Array) + { + var temp_vvvvwas = how_vvvvwas; + var how_vvvvwas = []; + how_vvvvwas.push(temp_vvvvwas); + } + else if (!isSet(how_vvvvwas)) + { + var how_vvvvwas = []; + } + var how = how_vvvvwas.some(how_vvvvwas_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); + } + else + { + jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); + } +} + +// the vvvvwas Some function +function how_vvvvwas_SomeFunc(how_vvvvwas) +{ + // set the function logic + if (how_vvvvwas == 1 || how_vvvvwas == 2 || how_vvvvwas == 3) + { + return true; + } + return false; +} + +// the vvvvwat function +function vvvvwat(how_vvvvwat) +{ + if (isSet(how_vvvvwat) && how_vvvvwat.constructor !== Array) + { + var temp_vvvvwat = how_vvvvwat; + var how_vvvvwat = []; + how_vvvvwat.push(temp_vvvvwat); + } + else if (!isSet(how_vvvvwat)) + { + var how_vvvvwat = []; + } + var how = how_vvvvwat.some(how_vvvvwat_SomeFunc); + + + // 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(); + } + 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(); + } +} + +// the vvvvwat Some function +function how_vvvvwat_SomeFunc(how_vvvvwat) +{ + // set the function logic + if (how_vvvvwat == 0) + { + return true; + } + return false; +} + +// the vvvvwau function +function vvvvwau(how_vvvvwau) +{ + if (isSet(how_vvvvwau) && how_vvvvwau.constructor !== Array) + { + var temp_vvvvwau = how_vvvvwau; + var how_vvvvwau = []; + how_vvvvwau.push(temp_vvvvwau); + } + else if (!isSet(how_vvvvwau)) + { + var how_vvvvwau = []; + } + var how = how_vvvvwau.some(how_vvvvwau_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 vvvvwau Some function +function how_vvvvwau_SomeFunc(how_vvvvwau) +{ + // set the function logic + if (how_vvvvwau == 1) + { + return true; + } + return false; +} + +// the vvvvwav function +function vvvvwav(how_vvvvwav) +{ + if (isSet(how_vvvvwav) && how_vvvvwav.constructor !== Array) + { + var temp_vvvvwav = how_vvvvwav; + var how_vvvvwav = []; + how_vvvvwav.push(temp_vvvvwav); + } + else if (!isSet(how_vvvvwav)) + { + var how_vvvvwav = []; + } + var how = how_vvvvwav.some(how_vvvvwav_SomeFunc); + + // set this function logic if (how) { @@ -323,45 +323,45 @@ function vvvvwar(how_vvvvwar) } } -// the vvvvwar Some function -function how_vvvvwar_SomeFunc(how_vvvvwar) +// the vvvvwav Some function +function how_vvvvwav_SomeFunc(how_vvvvwav) { // set the function logic - if (how_vvvvwar == 4) + if (how_vvvvwav == 4) { return true; } return false; } -// the vvvvwas function -function vvvvwas(type_vvvvwas) +// the vvvvwaw function +function vvvvwaw(type_vvvvwaw) { // set the function logic - if (type_vvvvwas == 2) + if (type_vvvvwaw == 2) { jQuery('#jform_libraries').closest('.control-group').show(); // add required attribute to libraries field - if (jform_vvvvwasvxe_required) + if (jform_vvvvwawvxg_required) { updateFieldRequired('libraries',0); jQuery('#jform_libraries').prop('required','required'); jQuery('#jform_libraries').attr('aria-required',true); jQuery('#jform_libraries').addClass('required'); - jform_vvvvwasvxe_required = false; + jform_vvvvwawvxg_required = false; } } else { jQuery('#jform_libraries').closest('.control-group').hide(); // remove required attribute from libraries field - if (!jform_vvvvwasvxe_required) + if (!jform_vvvvwawvxg_required) { updateFieldRequired('libraries',1); jQuery('#jform_libraries').removeAttr('required'); jQuery('#jform_libraries').removeAttr('aria-required'); jQuery('#jform_libraries').removeClass('required'); - jform_vvvvwasvxe_required = true; + jform_vvvvwawvxg_required = true; } } } diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index 6483e214f..a85edeee0 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -9,32 +9,24 @@ */ // Some Global Values -jform_vvvvwbpvxr_required = false; -jform_vvvvwbpvxs_required = false; -jform_vvvvwbpvxt_required = false; -jform_vvvvwbpvxu_required = false; -jform_vvvvwbpvxv_required = false; -jform_vvvvwbqvxw_required = false; -jform_vvvvwbrvxx_required = false; -jform_vvvvwbtvxy_required = false; +jform_vvvvwbtvxt_required = false; +jform_vvvvwbtvxu_required = false; +jform_vvvvwbtvxv_required = false; +jform_vvvvwbtvxw_required = false; +jform_vvvvwbtvxx_required = false; +jform_vvvvwbuvxy_required = false; jform_vvvvwbvvxz_required = false; +jform_vvvvwbxvya_required = false; +jform_vvvvwbzvyb_required = false; // Initial Script jQuery(document).ready(function() { - var protocol_vvvvwbp = jQuery("#jform_protocol").val(); - vvvvwbp(protocol_vvvvwbp); - - var protocol_vvvvwbq = jQuery("#jform_protocol").val(); - vvvvwbq(protocol_vvvvwbq); - - var protocol_vvvvwbr = jQuery("#jform_protocol").val(); - var authentication_vvvvwbr = jQuery("#jform_authentication").val(); - vvvvwbr(protocol_vvvvwbr,authentication_vvvvwbr); - var protocol_vvvvwbt = jQuery("#jform_protocol").val(); - var authentication_vvvvwbt = jQuery("#jform_authentication").val(); - vvvvwbt(protocol_vvvvwbt,authentication_vvvvwbt); + vvvvwbt(protocol_vvvvwbt); + + var protocol_vvvvwbu = jQuery("#jform_protocol").val(); + vvvvwbu(protocol_vvvvwbu); var protocol_vvvvwbv = jQuery("#jform_protocol").val(); var authentication_vvvvwbv = jQuery("#jform_authentication").val(); @@ -43,285 +35,18 @@ jQuery(document).ready(function() var protocol_vvvvwbx = jQuery("#jform_protocol").val(); var authentication_vvvvwbx = jQuery("#jform_authentication").val(); vvvvwbx(protocol_vvvvwbx,authentication_vvvvwbx); + + var protocol_vvvvwbz = jQuery("#jform_protocol").val(); + var authentication_vvvvwbz = jQuery("#jform_authentication").val(); + vvvvwbz(protocol_vvvvwbz,authentication_vvvvwbz); + + var protocol_vvvvwcb = jQuery("#jform_protocol").val(); + var authentication_vvvvwcb = jQuery("#jform_authentication").val(); + vvvvwcb(protocol_vvvvwcb,authentication_vvvvwcb); }); -// the vvvvwbp function -function vvvvwbp(protocol_vvvvwbp) -{ - if (isSet(protocol_vvvvwbp) && protocol_vvvvwbp.constructor !== Array) - { - var temp_vvvvwbp = protocol_vvvvwbp; - var protocol_vvvvwbp = []; - protocol_vvvvwbp.push(temp_vvvvwbp); - } - else if (!isSet(protocol_vvvvwbp)) - { - var protocol_vvvvwbp = []; - } - var protocol = protocol_vvvvwbp.some(protocol_vvvvwbp_SomeFunc); - - - // set this function logic - if (protocol) - { - jQuery('#jform_authentication').closest('.control-group').show(); - // add required attribute to authentication field - if (jform_vvvvwbpvxr_required) - { - updateFieldRequired('authentication',0); - jQuery('#jform_authentication').prop('required','required'); - jQuery('#jform_authentication').attr('aria-required',true); - jQuery('#jform_authentication').addClass('required'); - jform_vvvvwbpvxr_required = false; - } - jQuery('#jform_host').closest('.control-group').show(); - // add required attribute to host field - if (jform_vvvvwbpvxs_required) - { - updateFieldRequired('host',0); - jQuery('#jform_host').prop('required','required'); - jQuery('#jform_host').attr('aria-required',true); - jQuery('#jform_host').addClass('required'); - jform_vvvvwbpvxs_required = false; - } - jQuery('#jform_port').closest('.control-group').show(); - // add required attribute to port field - if (jform_vvvvwbpvxt_required) - { - updateFieldRequired('port',0); - jQuery('#jform_port').prop('required','required'); - jQuery('#jform_port').attr('aria-required',true); - jQuery('#jform_port').addClass('required'); - jform_vvvvwbpvxt_required = false; - } - jQuery('#jform_path').closest('.control-group').show(); - // add required attribute to path field - if (jform_vvvvwbpvxu_required) - { - updateFieldRequired('path',0); - jQuery('#jform_path').prop('required','required'); - jQuery('#jform_path').attr('aria-required',true); - jQuery('#jform_path').addClass('required'); - jform_vvvvwbpvxu_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_vvvvwbpvxv_required) - { - updateFieldRequired('username',0); - jQuery('#jform_username').prop('required','required'); - jQuery('#jform_username').attr('aria-required',true); - jQuery('#jform_username').addClass('required'); - jform_vvvvwbpvxv_required = false; - } - } - else - { - jQuery('#jform_authentication').closest('.control-group').hide(); - // remove required attribute from authentication field - if (!jform_vvvvwbpvxr_required) - { - updateFieldRequired('authentication',1); - jQuery('#jform_authentication').removeAttr('required'); - jQuery('#jform_authentication').removeAttr('aria-required'); - jQuery('#jform_authentication').removeClass('required'); - jform_vvvvwbpvxr_required = true; - } - jQuery('#jform_host').closest('.control-group').hide(); - // remove required attribute from host field - if (!jform_vvvvwbpvxs_required) - { - updateFieldRequired('host',1); - jQuery('#jform_host').removeAttr('required'); - jQuery('#jform_host').removeAttr('aria-required'); - jQuery('#jform_host').removeClass('required'); - jform_vvvvwbpvxs_required = true; - } - jQuery('#jform_port').closest('.control-group').hide(); - // remove required attribute from port field - if (!jform_vvvvwbpvxt_required) - { - updateFieldRequired('port',1); - jQuery('#jform_port').removeAttr('required'); - jQuery('#jform_port').removeAttr('aria-required'); - jQuery('#jform_port').removeClass('required'); - jform_vvvvwbpvxt_required = true; - } - jQuery('#jform_path').closest('.control-group').hide(); - // remove required attribute from path field - if (!jform_vvvvwbpvxu_required) - { - updateFieldRequired('path',1); - jQuery('#jform_path').removeAttr('required'); - jQuery('#jform_path').removeAttr('aria-required'); - jQuery('#jform_path').removeClass('required'); - jform_vvvvwbpvxu_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_vvvvwbpvxv_required) - { - updateFieldRequired('username',1); - jQuery('#jform_username').removeAttr('required'); - jQuery('#jform_username').removeAttr('aria-required'); - jQuery('#jform_username').removeClass('required'); - jform_vvvvwbpvxv_required = true; - } - } -} - -// the vvvvwbp Some function -function protocol_vvvvwbp_SomeFunc(protocol_vvvvwbp) -{ - // set the function logic - if (protocol_vvvvwbp == 2) - { - return true; - } - return false; -} - -// the vvvvwbq function -function vvvvwbq(protocol_vvvvwbq) -{ - if (isSet(protocol_vvvvwbq) && protocol_vvvvwbq.constructor !== Array) - { - var temp_vvvvwbq = protocol_vvvvwbq; - var protocol_vvvvwbq = []; - protocol_vvvvwbq.push(temp_vvvvwbq); - } - else if (!isSet(protocol_vvvvwbq)) - { - var protocol_vvvvwbq = []; - } - var protocol = protocol_vvvvwbq.some(protocol_vvvvwbq_SomeFunc); - - - // 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_vvvvwbqvxw_required) - { - updateFieldRequired('signature',0); - jQuery('#jform_signature').prop('required','required'); - jQuery('#jform_signature').attr('aria-required',true); - jQuery('#jform_signature').addClass('required'); - jform_vvvvwbqvxw_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_vvvvwbqvxw_required) - { - updateFieldRequired('signature',1); - jQuery('#jform_signature').removeAttr('required'); - jQuery('#jform_signature').removeAttr('aria-required'); - jQuery('#jform_signature').removeClass('required'); - jform_vvvvwbqvxw_required = true; - } - } -} - -// the vvvvwbq Some function -function protocol_vvvvwbq_SomeFunc(protocol_vvvvwbq) -{ - // set the function logic - if (protocol_vvvvwbq == 1) - { - return true; - } - return false; -} - -// the vvvvwbr function -function vvvvwbr(protocol_vvvvwbr,authentication_vvvvwbr) -{ - if (isSet(protocol_vvvvwbr) && protocol_vvvvwbr.constructor !== Array) - { - var temp_vvvvwbr = protocol_vvvvwbr; - var protocol_vvvvwbr = []; - protocol_vvvvwbr.push(temp_vvvvwbr); - } - else if (!isSet(protocol_vvvvwbr)) - { - var protocol_vvvvwbr = []; - } - var protocol = protocol_vvvvwbr.some(protocol_vvvvwbr_SomeFunc); - - if (isSet(authentication_vvvvwbr) && authentication_vvvvwbr.constructor !== Array) - { - var temp_vvvvwbr = authentication_vvvvwbr; - var authentication_vvvvwbr = []; - authentication_vvvvwbr.push(temp_vvvvwbr); - } - else if (!isSet(authentication_vvvvwbr)) - { - var authentication_vvvvwbr = []; - } - var authentication = authentication_vvvvwbr.some(authentication_vvvvwbr_SomeFunc); - - - // set this function logic - if (protocol && authentication) - { - jQuery('#jform_password').closest('.control-group').show(); - // add required attribute to password field - if (jform_vvvvwbrvxx_required) - { - updateFieldRequired('password',0); - jQuery('#jform_password').prop('required','required'); - jQuery('#jform_password').attr('aria-required',true); - jQuery('#jform_password').addClass('required'); - jform_vvvvwbrvxx_required = false; - } - } - else - { - jQuery('#jform_password').closest('.control-group').hide(); - // remove required attribute from password field - if (!jform_vvvvwbrvxx_required) - { - updateFieldRequired('password',1); - jQuery('#jform_password').removeAttr('required'); - jQuery('#jform_password').removeAttr('aria-required'); - jQuery('#jform_password').removeClass('required'); - jform_vvvvwbrvxx_required = true; - } - } -} - -// the vvvvwbr Some function -function protocol_vvvvwbr_SomeFunc(protocol_vvvvwbr) -{ - // set the function logic - if (protocol_vvvvwbr == 2) - { - return true; - } - return false; -} - -// the vvvvwbr Some function -function authentication_vvvvwbr_SomeFunc(authentication_vvvvwbr) -{ - // set the function logic - if (authentication_vvvvwbr == 1 || authentication_vvvvwbr == 3 || authentication_vvvvwbr == 5) - { - return true; - } - return false; -} - // the vvvvwbt function -function vvvvwbt(protocol_vvvvwbt,authentication_vvvvwbt) +function vvvvwbt(protocol_vvvvwbt) { if (isSet(protocol_vvvvwbt) && protocol_vvvvwbt.constructor !== Array) { @@ -335,44 +60,114 @@ function vvvvwbt(protocol_vvvvwbt,authentication_vvvvwbt) } var protocol = protocol_vvvvwbt.some(protocol_vvvvwbt_SomeFunc); - if (isSet(authentication_vvvvwbt) && authentication_vvvvwbt.constructor !== Array) - { - var temp_vvvvwbt = authentication_vvvvwbt; - var authentication_vvvvwbt = []; - authentication_vvvvwbt.push(temp_vvvvwbt); - } - else if (!isSet(authentication_vvvvwbt)) - { - var authentication_vvvvwbt = []; - } - var authentication = authentication_vvvvwbt.some(authentication_vvvvwbt_SomeFunc); - // set this function logic - if (protocol && authentication) + if (protocol) { - jQuery('#jform_private').closest('.control-group').show(); - // add required attribute to private field - if (jform_vvvvwbtvxy_required) + jQuery('#jform_authentication').closest('.control-group').show(); + // add required attribute to authentication field + if (jform_vvvvwbtvxt_required) { - updateFieldRequired('private',0); - jQuery('#jform_private').prop('required','required'); - jQuery('#jform_private').attr('aria-required',true); - jQuery('#jform_private').addClass('required'); - jform_vvvvwbtvxy_required = false; + updateFieldRequired('authentication',0); + jQuery('#jform_authentication').prop('required','required'); + jQuery('#jform_authentication').attr('aria-required',true); + jQuery('#jform_authentication').addClass('required'); + jform_vvvvwbtvxt_required = false; + } + jQuery('#jform_host').closest('.control-group').show(); + // add required attribute to host field + if (jform_vvvvwbtvxu_required) + { + updateFieldRequired('host',0); + jQuery('#jform_host').prop('required','required'); + jQuery('#jform_host').attr('aria-required',true); + jQuery('#jform_host').addClass('required'); + jform_vvvvwbtvxu_required = false; + } + jQuery('#jform_port').closest('.control-group').show(); + // add required attribute to port field + if (jform_vvvvwbtvxv_required) + { + updateFieldRequired('port',0); + jQuery('#jform_port').prop('required','required'); + jQuery('#jform_port').attr('aria-required',true); + jQuery('#jform_port').addClass('required'); + jform_vvvvwbtvxv_required = false; + } + jQuery('#jform_path').closest('.control-group').show(); + // add required attribute to path field + if (jform_vvvvwbtvxw_required) + { + updateFieldRequired('path',0); + jQuery('#jform_path').prop('required','required'); + jQuery('#jform_path').attr('aria-required',true); + jQuery('#jform_path').addClass('required'); + jform_vvvvwbtvxw_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_vvvvwbtvxx_required) + { + updateFieldRequired('username',0); + jQuery('#jform_username').prop('required','required'); + jQuery('#jform_username').attr('aria-required',true); + jQuery('#jform_username').addClass('required'); + jform_vvvvwbtvxx_required = false; } } else { - jQuery('#jform_private').closest('.control-group').hide(); - // remove required attribute from private field - if (!jform_vvvvwbtvxy_required) + jQuery('#jform_authentication').closest('.control-group').hide(); + // remove required attribute from authentication field + if (!jform_vvvvwbtvxt_required) { - updateFieldRequired('private',1); - jQuery('#jform_private').removeAttr('required'); - jQuery('#jform_private').removeAttr('aria-required'); - jQuery('#jform_private').removeClass('required'); - jform_vvvvwbtvxy_required = true; + updateFieldRequired('authentication',1); + jQuery('#jform_authentication').removeAttr('required'); + jQuery('#jform_authentication').removeAttr('aria-required'); + jQuery('#jform_authentication').removeClass('required'); + jform_vvvvwbtvxt_required = true; + } + jQuery('#jform_host').closest('.control-group').hide(); + // remove required attribute from host field + if (!jform_vvvvwbtvxu_required) + { + updateFieldRequired('host',1); + jQuery('#jform_host').removeAttr('required'); + jQuery('#jform_host').removeAttr('aria-required'); + jQuery('#jform_host').removeClass('required'); + jform_vvvvwbtvxu_required = true; + } + jQuery('#jform_port').closest('.control-group').hide(); + // remove required attribute from port field + if (!jform_vvvvwbtvxv_required) + { + updateFieldRequired('port',1); + jQuery('#jform_port').removeAttr('required'); + jQuery('#jform_port').removeAttr('aria-required'); + jQuery('#jform_port').removeClass('required'); + jform_vvvvwbtvxv_required = true; + } + jQuery('#jform_path').closest('.control-group').hide(); + // remove required attribute from path field + if (!jform_vvvvwbtvxw_required) + { + updateFieldRequired('path',1); + jQuery('#jform_path').removeAttr('required'); + jQuery('#jform_path').removeAttr('aria-required'); + jQuery('#jform_path').removeClass('required'); + jform_vvvvwbtvxw_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_vvvvwbtvxx_required) + { + updateFieldRequired('username',1); + jQuery('#jform_username').removeAttr('required'); + jQuery('#jform_username').removeAttr('aria-required'); + jQuery('#jform_username').removeClass('required'); + jform_vvvvwbtvxx_required = true; } } } @@ -388,11 +183,58 @@ function protocol_vvvvwbt_SomeFunc(protocol_vvvvwbt) return false; } -// the vvvvwbt Some function -function authentication_vvvvwbt_SomeFunc(authentication_vvvvwbt) +// the vvvvwbu function +function vvvvwbu(protocol_vvvvwbu) +{ + if (isSet(protocol_vvvvwbu) && protocol_vvvvwbu.constructor !== Array) + { + var temp_vvvvwbu = protocol_vvvvwbu; + var protocol_vvvvwbu = []; + protocol_vvvvwbu.push(temp_vvvvwbu); + } + else if (!isSet(protocol_vvvvwbu)) + { + var protocol_vvvvwbu = []; + } + var protocol = protocol_vvvvwbu.some(protocol_vvvvwbu_SomeFunc); + + + // 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_vvvvwbuvxy_required) + { + updateFieldRequired('signature',0); + jQuery('#jform_signature').prop('required','required'); + jQuery('#jform_signature').attr('aria-required',true); + jQuery('#jform_signature').addClass('required'); + jform_vvvvwbuvxy_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_vvvvwbuvxy_required) + { + updateFieldRequired('signature',1); + jQuery('#jform_signature').removeAttr('required'); + jQuery('#jform_signature').removeAttr('aria-required'); + jQuery('#jform_signature').removeClass('required'); + jform_vvvvwbuvxy_required = true; + } + } +} + +// the vvvvwbu Some function +function protocol_vvvvwbu_SomeFunc(protocol_vvvvwbu) { // set the function logic - if (authentication_vvvvwbt == 2 || authentication_vvvvwbt == 3) + if (protocol_vvvvwbu == 1) { return true; } @@ -430,27 +272,27 @@ function vvvvwbv(protocol_vvvvwbv,authentication_vvvvwbv) // set this function logic if (protocol && authentication) { - jQuery('#jform_private_key').closest('.control-group').show(); - // add required attribute to private_key field + jQuery('#jform_password').closest('.control-group').show(); + // add required attribute to password field if (jform_vvvvwbvvxz_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'); + updateFieldRequired('password',0); + jQuery('#jform_password').prop('required','required'); + jQuery('#jform_password').attr('aria-required',true); + jQuery('#jform_password').addClass('required'); jform_vvvvwbvvxz_required = false; } } else { - jQuery('#jform_private_key').closest('.control-group').hide(); - // remove required attribute from private_key field + jQuery('#jform_password').closest('.control-group').hide(); + // remove required attribute from password field if (!jform_vvvvwbvvxz_required) { - updateFieldRequired('private_key',1); - jQuery('#jform_private_key').removeAttr('required'); - jQuery('#jform_private_key').removeAttr('aria-required'); - jQuery('#jform_private_key').removeClass('required'); + updateFieldRequired('password',1); + jQuery('#jform_password').removeAttr('required'); + jQuery('#jform_password').removeAttr('aria-required'); + jQuery('#jform_password').removeClass('required'); jform_vvvvwbvvxz_required = true; } } @@ -471,7 +313,7 @@ function protocol_vvvvwbv_SomeFunc(protocol_vvvvwbv) function authentication_vvvvwbv_SomeFunc(authentication_vvvvwbv) { // set the function logic - if (authentication_vvvvwbv == 4 || authentication_vvvvwbv == 5) + if (authentication_vvvvwbv == 1 || authentication_vvvvwbv == 3 || authentication_vvvvwbv == 5) { return true; } @@ -509,11 +351,29 @@ function vvvvwbx(protocol_vvvvwbx,authentication_vvvvwbx) // set this function logic if (protocol && authentication) { - jQuery('#jform_secret').closest('.control-group').show(); + jQuery('#jform_private').closest('.control-group').show(); + // add required attribute to private field + if (jform_vvvvwbxvya_required) + { + updateFieldRequired('private',0); + jQuery('#jform_private').prop('required','required'); + jQuery('#jform_private').attr('aria-required',true); + jQuery('#jform_private').addClass('required'); + jform_vvvvwbxvya_required = false; + } } else { - jQuery('#jform_secret').closest('.control-group').hide(); + jQuery('#jform_private').closest('.control-group').hide(); + // remove required attribute from private field + if (!jform_vvvvwbxvya_required) + { + updateFieldRequired('private',1); + jQuery('#jform_private').removeAttr('required'); + jQuery('#jform_private').removeAttr('aria-required'); + jQuery('#jform_private').removeClass('required'); + jform_vvvvwbxvya_required = true; + } } } @@ -532,7 +392,147 @@ function protocol_vvvvwbx_SomeFunc(protocol_vvvvwbx) function authentication_vvvvwbx_SomeFunc(authentication_vvvvwbx) { // set the function logic - if (authentication_vvvvwbx == 2 || authentication_vvvvwbx == 3 || authentication_vvvvwbx == 4 || authentication_vvvvwbx == 5) + if (authentication_vvvvwbx == 2 || authentication_vvvvwbx == 3) + { + return true; + } + return false; +} + +// the vvvvwbz function +function vvvvwbz(protocol_vvvvwbz,authentication_vvvvwbz) +{ + if (isSet(protocol_vvvvwbz) && protocol_vvvvwbz.constructor !== Array) + { + var temp_vvvvwbz = protocol_vvvvwbz; + var protocol_vvvvwbz = []; + protocol_vvvvwbz.push(temp_vvvvwbz); + } + else if (!isSet(protocol_vvvvwbz)) + { + var protocol_vvvvwbz = []; + } + var protocol = protocol_vvvvwbz.some(protocol_vvvvwbz_SomeFunc); + + if (isSet(authentication_vvvvwbz) && authentication_vvvvwbz.constructor !== Array) + { + var temp_vvvvwbz = authentication_vvvvwbz; + var authentication_vvvvwbz = []; + authentication_vvvvwbz.push(temp_vvvvwbz); + } + else if (!isSet(authentication_vvvvwbz)) + { + var authentication_vvvvwbz = []; + } + var authentication = authentication_vvvvwbz.some(authentication_vvvvwbz_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_private_key').closest('.control-group').show(); + // add required attribute to private_key field + if (jform_vvvvwbzvyb_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_vvvvwbzvyb_required = false; + } + } + else + { + jQuery('#jform_private_key').closest('.control-group').hide(); + // remove required attribute from private_key field + if (!jform_vvvvwbzvyb_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_vvvvwbzvyb_required = true; + } + } +} + +// the vvvvwbz Some function +function protocol_vvvvwbz_SomeFunc(protocol_vvvvwbz) +{ + // set the function logic + if (protocol_vvvvwbz == 2) + { + return true; + } + return false; +} + +// the vvvvwbz Some function +function authentication_vvvvwbz_SomeFunc(authentication_vvvvwbz) +{ + // set the function logic + if (authentication_vvvvwbz == 4 || authentication_vvvvwbz == 5) + { + return true; + } + return false; +} + +// the vvvvwcb function +function vvvvwcb(protocol_vvvvwcb,authentication_vvvvwcb) +{ + if (isSet(protocol_vvvvwcb) && protocol_vvvvwcb.constructor !== Array) + { + var temp_vvvvwcb = protocol_vvvvwcb; + var protocol_vvvvwcb = []; + protocol_vvvvwcb.push(temp_vvvvwcb); + } + else if (!isSet(protocol_vvvvwcb)) + { + var protocol_vvvvwcb = []; + } + var protocol = protocol_vvvvwcb.some(protocol_vvvvwcb_SomeFunc); + + if (isSet(authentication_vvvvwcb) && authentication_vvvvwcb.constructor !== Array) + { + var temp_vvvvwcb = authentication_vvvvwcb; + var authentication_vvvvwcb = []; + authentication_vvvvwcb.push(temp_vvvvwcb); + } + else if (!isSet(authentication_vvvvwcb)) + { + var authentication_vvvvwcb = []; + } + var authentication = authentication_vvvvwcb.some(authentication_vvvvwcb_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_secret').closest('.control-group').show(); + } + else + { + jQuery('#jform_secret').closest('.control-group').hide(); + } +} + +// the vvvvwcb Some function +function protocol_vvvvwcb_SomeFunc(protocol_vvvvwcb) +{ + // set the function logic + if (protocol_vvvvwcb == 2) + { + return true; + } + return false; +} + +// the vvvvwcb Some function +function authentication_vvvvwcb_SomeFunc(authentication_vvvvwcb) +{ + // set the function logic + if (authentication_vvvvwcb == 2 || authentication_vvvvwcb == 3 || authentication_vvvvwcb == 4 || authentication_vvvvwcb == 5) { return true; } diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index 4cacc0c55..b80ccbaf8 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_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyt(add_php_view_vvvvvyt); + var add_php_view_vvvvvyv = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvyv(add_php_view_vvvvvyv); - var add_php_jview_display_vvvvvyu = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvyu(add_php_jview_display_vvvvvyu); + var add_php_jview_display_vvvvvyw = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvyw(add_php_jview_display_vvvvvyw); - var add_php_jview_vvvvvyv = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvyv(add_php_jview_vvvvvyv); + var add_php_jview_vvvvvyx = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvyx(add_php_jview_vvvvvyx); - var add_php_document_vvvvvyw = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvyw(add_php_document_vvvvvyw); + var add_php_document_vvvvvyy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyy(add_php_document_vvvvvyy); - var add_css_document_vvvvvyx = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvyx(add_css_document_vvvvvyx); + var add_css_document_vvvvvyz = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvyz(add_css_document_vvvvvyz); - var add_javascript_file_vvvvvyy = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); - vvvvvyy(add_javascript_file_vvvvvyy); + var add_javascript_file_vvvvvza = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); + vvvvvza(add_javascript_file_vvvvvza); - var add_js_document_vvvvvyz = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvyz(add_js_document_vvvvvyz); + var add_js_document_vvvvvzb = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvzb(add_js_document_vvvvvzb); - var add_css_vvvvvza = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvza(add_css_vvvvvza); + var add_css_vvvvvzc = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvzc(add_css_vvvvvzc); - var add_php_ajax_vvvvvzb = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvzb(add_php_ajax_vvvvvzb); + var add_php_ajax_vvvvvzd = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvzd(add_php_ajax_vvvvvzd); - var add_custom_button_vvvvvzc = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvzc(add_custom_button_vvvvvzc); + var add_custom_button_vvvvvze = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvze(add_custom_button_vvvvvze); - var button_position_vvvvvzd = jQuery("#jform_button_position").val(); - vvvvvzd(button_position_vvvvvzd); + var button_position_vvvvvzf = jQuery("#jform_button_position").val(); + vvvvvzf(button_position_vvvvvzf); }); -// the vvvvvyt function -function vvvvvyt(add_php_view_vvvvvyt) +// the vvvvvyv function +function vvvvvyv(add_php_view_vvvvvyv) { // set the function logic - if (add_php_view_vvvvvyt == 1) + if (add_php_view_vvvvvyv == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } @@ -59,11 +59,11 @@ function vvvvvyt(add_php_view_vvvvvyt) } } -// the vvvvvyu function -function vvvvvyu(add_php_jview_display_vvvvvyu) +// the vvvvvyw function +function vvvvvyw(add_php_jview_display_vvvvvyw) { // set the function logic - if (add_php_jview_display_vvvvvyu == 1) + if (add_php_jview_display_vvvvvyw == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } @@ -73,11 +73,11 @@ function vvvvvyu(add_php_jview_display_vvvvvyu) } } -// the vvvvvyv function -function vvvvvyv(add_php_jview_vvvvvyv) +// the vvvvvyx function +function vvvvvyx(add_php_jview_vvvvvyx) { // set the function logic - if (add_php_jview_vvvvvyv == 1) + if (add_php_jview_vvvvvyx == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } @@ -87,11 +87,11 @@ function vvvvvyv(add_php_jview_vvvvvyv) } } -// the vvvvvyw function -function vvvvvyw(add_php_document_vvvvvyw) +// the vvvvvyy function +function vvvvvyy(add_php_document_vvvvvyy) { // set the function logic - if (add_php_document_vvvvvyw == 1) + if (add_php_document_vvvvvyy == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -101,11 +101,11 @@ function vvvvvyw(add_php_document_vvvvvyw) } } -// the vvvvvyx function -function vvvvvyx(add_css_document_vvvvvyx) +// the vvvvvyz function +function vvvvvyz(add_css_document_vvvvvyz) { // set the function logic - if (add_css_document_vvvvvyx == 1) + if (add_css_document_vvvvvyz == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } @@ -115,11 +115,11 @@ function vvvvvyx(add_css_document_vvvvvyx) } } -// the vvvvvyy function -function vvvvvyy(add_javascript_file_vvvvvyy) +// the vvvvvza function +function vvvvvza(add_javascript_file_vvvvvza) { // set the function logic - if (add_javascript_file_vvvvvyy == 1) + if (add_javascript_file_vvvvvza == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } @@ -129,11 +129,11 @@ function vvvvvyy(add_javascript_file_vvvvvyy) } } -// the vvvvvyz function -function vvvvvyz(add_js_document_vvvvvyz) +// the vvvvvzb function +function vvvvvzb(add_js_document_vvvvvzb) { // set the function logic - if (add_js_document_vvvvvyz == 1) + if (add_js_document_vvvvvzb == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } @@ -143,11 +143,11 @@ function vvvvvyz(add_js_document_vvvvvyz) } } -// the vvvvvza function -function vvvvvza(add_css_vvvvvza) +// the vvvvvzc function +function vvvvvzc(add_css_vvvvvzc) { // set the function logic - if (add_css_vvvvvza == 1) + if (add_css_vvvvvzc == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } @@ -157,11 +157,11 @@ function vvvvvza(add_css_vvvvvza) } } -// the vvvvvzb function -function vvvvvzb(add_php_ajax_vvvvvzb) +// the vvvvvzd function +function vvvvvzd(add_php_ajax_vvvvvzd) { // set the function logic - if (add_php_ajax_vvvvvzb == 1) + if (add_php_ajax_vvvvvzd == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); @@ -173,11 +173,11 @@ function vvvvvzb(add_php_ajax_vvvvvzb) } } -// the vvvvvzc function -function vvvvvzc(add_custom_button_vvvvvzc) +// the vvvvvze function +function vvvvvze(add_custom_button_vvvvvze) { // set the function logic - if (add_custom_button_vvvvvzc == 1) + if (add_custom_button_vvvvvze == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); @@ -191,20 +191,20 @@ function vvvvvzc(add_custom_button_vvvvvzc) } } -// the vvvvvzd function -function vvvvvzd(button_position_vvvvvzd) +// the vvvvvzf function +function vvvvvzf(button_position_vvvvvzf) { - if (isSet(button_position_vvvvvzd) && button_position_vvvvvzd.constructor !== Array) + if (isSet(button_position_vvvvvzf) && button_position_vvvvvzf.constructor !== Array) { - var temp_vvvvvzd = button_position_vvvvvzd; - var button_position_vvvvvzd = []; - button_position_vvvvvzd.push(temp_vvvvvzd); + var temp_vvvvvzf = button_position_vvvvvzf; + var button_position_vvvvvzf = []; + button_position_vvvvvzf.push(temp_vvvvvzf); } - else if (!isSet(button_position_vvvvvzd)) + else if (!isSet(button_position_vvvvvzf)) { - var button_position_vvvvvzd = []; + var button_position_vvvvvzf = []; } - var button_position = button_position_vvvvvzd.some(button_position_vvvvvzd_SomeFunc); + var button_position = button_position_vvvvvzf.some(button_position_vvvvvzf_SomeFunc); // set this function logic @@ -218,11 +218,11 @@ function vvvvvzd(button_position_vvvvvzd) } } -// the vvvvvzd Some function -function button_position_vvvvvzd_SomeFunc(button_position_vvvvvzd) +// the vvvvvzf Some function +function button_position_vvvvvzf_SomeFunc(button_position_vvvvvzf) { // set the function logic - if (button_position_vvvvvzd == 5) + if (button_position_vvvvvzf == 5) { return true; } diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index 34290a7bb..863bc2eb5 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_vvvvvze = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvze(add_php_view_vvvvvze); + var add_php_view_vvvvvzg = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvzg(add_php_view_vvvvvzg); }); -// the vvvvvze function -function vvvvvze(add_php_view_vvvvvze) +// the vvvvvzg function +function vvvvvzg(add_php_view_vvvvvzg) { // set the function logic - if (add_php_view_vvvvvze == 1) + if (add_php_view_vvvvvzg == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } diff --git a/admin/models/forms/validation_rule.js b/admin/models/forms/validation_rule.js index 56bf6de28..fbd901818 100644 --- a/admin/models/forms/validation_rule.js +++ b/admin/models/forms/validation_rule.js @@ -32,16 +32,16 @@ jQuery(document).ready(function() }); function getExistingValidationRuleCode_server(rulefilename){ - var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json"); + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json&raw=true"); if(token.length > 0 && rulefilename.length > 0){ var request = token+'=1&name='+rulefilename; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } @@ -84,16 +84,16 @@ function checkRuleName(ruleName) { } // check Function Name function checkRuleName_server(ruleName, ide){ - var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json"); + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json&raw=true"); if(token.length > 0){ var request = token+'=1&name='+ruleName+'&id='+ide; } return jQuery.ajax({ - type: 'POST', + type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php new file mode 100644 index 000000000..c9df4330b --- /dev/null +++ b/admin/models/joomla_plugin.php @@ -0,0 +1,1007 @@ + + * @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 Model + */ +class ComponentbuilderModelJoomla_plugin extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'note_beta_stage', + 'note_plugin' + ), + 'right' => array( + 'property_selection', + 'method_selection' + ), + 'fullwidth' => array( + 'main_class_code' + ), + 'above' => array( + 'name', + 'class_extends', + 'joomla_plugin_group' + ) + ), + 'configparams' => array( + 'fullwidth' => array( + 'fields' + ) + ) + ); + + /** + * @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'; + + /** + * 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', $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); + } + + /** + * get VDM session key + * + * @return string the session key + * + */ + public function getVDM() + { + return $this->vastDevMod; + } + + + /** + * 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->main_class_code)) + { + // base64 Decode main_class_code. + $item->main_class_code = base64_decode($item->main_class_code); + } + + if (!empty($item->fields)) + { + // Convert the fields field to an array. + $fields = new Registry; + $fields->loadString($item->fields); + $item->fields = $fields->toArray(); + } + + if (!empty($item->method_selection)) + { + // Convert the method_selection field to an array. + $method_selection = new Registry; + $method_selection->loadString($item->method_selection); + $item->method_selection = $method_selection->toArray(); + } + + if (!empty($item->property_selection)) + { + // Convert the property_selection field to an array. + $property_selection = new Registry; + $property_selection->loadString($item->property_selection); + $item->property_selection = $property_selection->toArray(); + } + + + if (empty($item->id)) + { + $id = 0; + } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + // set the vast development method key + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id); + ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod); + // set a return value if found + $jinput = JFactory::getApplication()->input; + $return = $jinput->get('return', null, 'base64'); + ComponentbuilderHelper::set($this->vastDevMod . '__return', $return); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.joomla_plugin'); + } + } + + 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', 'joomla_plugin', $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.edit.state', 'com_componentbuilder.joomla_plugin.' . (int) $id)) + || ($id == 0 && !$user->authorise('joomla_plugin.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.edit.created_by', 'com_componentbuilder.joomla_plugin.' . (int) $id)) + || ($id == 0 && !$user->authorise('joomla_plugin.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.edit.created', 'com_componentbuilder.joomla_plugin.' . (int) $id)) + || ($id == 0 && !$user->authorise('joomla_plugin.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); + } + } + + // update all editors to use this components global editor + $global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); + // now get all the editor fields + $editors = $form->getXml()->xpath("//field[@type='editor']"); + // check if we found any + if (ComponentbuilderHelper::checkArray($editors)) + { + foreach ($editors as $editor) + { + // get the field names + $name = (string) $editor['name']; + // set the field editor value (with none as fallback) + $form->setFieldAttribute($name, 'editor', $global_editor . '|none'); + } + } + + 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.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.delete', 'com_componentbuilder.joomla_plugin.' . (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.edit.state', 'com_componentbuilder.joomla_plugin.' . (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.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.edit', 'com_componentbuilder.joomla_plugin.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('joomla_plugin.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')); + $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.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'); + $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'); + } + + if (!$this->canDo->get('joomla_plugin.create') && !$this->canDo->get('joomla_plugin.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.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.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->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } + + // 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'); + } + + if (!$this->canDo->get('joomla_plugin.edit') && !$this->canDo->get('joomla_plugin.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.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.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; + } + + // make sure the name is safe to be used as a function name + $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); + + // Set the fields items to data. + if (isset($data['fields']) && is_array($data['fields'])) + { + $fields = new JRegistry; + $fields->loadArray($data['fields']); + $data['fields'] = (string) $fields; + } + elseif (!isset($data['fields'])) + { + // Set the empty fields to data + $data['fields'] = ''; + } + + // Set the method_selection items to data. + if (isset($data['method_selection']) && is_array($data['method_selection'])) + { + $method_selection = new JRegistry; + $method_selection->loadArray($data['method_selection']); + $data['method_selection'] = (string) $method_selection; + } + elseif (!isset($data['method_selection'])) + { + // Set the empty method_selection to data + $data['method_selection'] = ''; + } + + // Set the property_selection items to data. + if (isset($data['property_selection']) && is_array($data['property_selection'])) + { + $property_selection = new JRegistry; + $property_selection->loadArray($data['property_selection']); + $data['property_selection'] = (string) $property_selection; + } + elseif (!isset($data['property_selection'])) + { + // Set the empty property_selection to data + $data['property_selection'] = ''; + } + + // 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 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_plugin_group.php b/admin/models/joomla_plugin_group.php new file mode 100644 index 000000000..a7b8a40f7 --- /dev/null +++ b/admin/models/joomla_plugin_group.php @@ -0,0 +1,859 @@ + + * @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_group Model + */ +class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name' + ), + 'right' => array( + 'class_extends' + ) + ) + ); + + /** + * @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_group'; + + /** + * 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_group', $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->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.joomla_plugin_group'); + } + } + + 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_group', 'joomla_plugin_group', $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('core.edit.state', 'com_componentbuilder.joomla_plugin_group.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.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 (!$user->authorise('core.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 (!$user->authorise('core.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_group.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('core.delete', 'com_componentbuilder.joomla_plugin_group.' . (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('core.edit.state', 'com_componentbuilder.joomla_plugin_group.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return parent::canEditState($record); + } + + /** + * 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. + + return JFactory::getUser()->authorise('core.edit', 'com_componentbuilder.joomla_plugin_group.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + } + + /** + * 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_group')); + $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_group.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_group'); + $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_group'); + } + + if (!$this->canDo->get('core.create') || !$this->canDo->get('core.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('core.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('core.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->name) && !is_numeric($this->table->name)) + { + $this->table->name = $this->generateUniqe('name',$this->table->name); + } + + // 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_group'); + } + + if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.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('core.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('core.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; + } + + // make sure the name is safe to be used as a function name + $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); + + // 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_plugin_groups.php b/admin/models/joomla_plugin_groups.php new file mode 100644 index 000000000..8ca72875d --- /dev/null +++ b/admin/models/joomla_plugin_groups.php @@ -0,0 +1,250 @@ + + * @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_groups Model + */ +class ComponentbuilderModelJoomla_plugin_groups 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', + 'a.name','name', + 'a.class_extends','class_extends' + ); + } + + 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; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); + $this->setState('filter.class_extends', $class_extends); + + $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(); + + // 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_group', 'a')); + + // From the componentbuilder_class_extends table. + $query->select($db->quoteName('g.name','class_extends_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_class_extends', 'g') . ' ON (' . $db->quoteName('a.class_extends') . ' = ' . $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 . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.class_extends LIKE '.$search.' OR g.name LIKE '.$search.')'); + } + } + + // Filter by class_extends. + if ($class_extends = $this->getState('filter.class_extends')) + { + $query->where('a.class_extends = ' . $db->quote($db->escape($class_extends))); + } + + // 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'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.class_extends'); + + 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_group')); + $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_group'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php new file mode 100644 index 000000000..01f4819a7 --- /dev/null +++ b/admin/models/joomla_plugins.php @@ -0,0 +1,571 @@ + + * @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 Model + */ +class ComponentbuilderModelJoomla_plugins 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', + 'a.name','name', + 'a.class_extends','class_extends', + 'a.joomla_plugin_group','joomla_plugin_group' + ); + } + + parent::__construct($config); + } + + + /** + * get Boilerplate + * + * @return boolean + */ + public function getBoilerplate() + { + // get boilerplate repo root details + if (($result = ComponentbuilderHelper::getFileContents(ComponentbuilderHelper::$bolerplateAPI)) !== false && ComponentbuilderHelper::checkJson($result)) + { + $result = json_decode($result); + // check if we have a three + if (isset($result->tree) && ComponentbuilderHelper::checkArray($result->tree)) + { + $found = array_values(array_filter( + $result->tree, + function($tree) { + if (isset($tree->path) && $tree->path === 'plugins') + { + return true; + } + return false; + } + )); + // make sure we have the correct boilerplate + if (ComponentbuilderHelper::checkArray($found) && count($found) == 1 && method_exists(__CLASS__, 'getPluginsBoilerplate')) + { + // get the plugins boilerplate + return $this->getPluginsBoilerplate($found[0]->url); + } + } + } + return false; + } + + /** + * get Plugin Boilerplate + * + * @return boolean true on success + * + */ + protected function getPluginsBoilerplate($url) + { + // get boilerplate root for plugins + if (($result = ComponentbuilderHelper::getFileContents($url)) !== false && ComponentbuilderHelper::checkJson($result)) + { + $result = json_decode($result); + // check if we have a tree + if (isset($result->tree) && ComponentbuilderHelper::checkArray($result->tree)) + { + // get the app object + $app = JFactory::getApplication(); + // set the table names + $tables = array(); + $tables['e'] = 'class_extends'; + $tables['g'] = 'joomla_plugin_group'; + $tables['m'] = 'class_method'; + $tables['p'] = 'class_property'; + // load the needed models + $models = array(); + $models['e'] = ComponentbuilderHelper::getModel($tables['e']); + $models['g'] = ComponentbuilderHelper::getModel($tables['g']); + $models['p'] = ComponentbuilderHelper::getModel($tables['p']); + $models['m'] = ComponentbuilderHelper::getModel($tables['m']); + // get the needed data of each plugin group + $groups = array_map( + function($tree) use(&$app, &$models, &$tables){ + if (($fooClass = ComponentbuilderHelper::getFileContents(ComponentbuilderHelper::$bolerplatePath . '/plugins/' . $tree->path . '/foo.php')) !== false && ComponentbuilderHelper::checkString($fooClass)) + { + // extract the boilerplate class extends and check if already set + if (($classExtends = ComponentbuilderHelper::extractBoilerplateClassExtends($fooClass, 'plugins')) !== false && + ($classExtendsID = ComponentbuilderHelper::getVar('class_extends', $classExtends, 'name', 'id')) === false) + { + // load the extends class name + $class = array('id' => 0, 'published' => 1, 'version' => 1, 'name' => $classExtends); + // extract the boilerplate class header + $class['head'] = ComponentbuilderHelper::extractBoilerplateClassHeader($fooClass, $classExtends, 'plugins'); + // extract the boilerplate class comment + $class['comment'] = ComponentbuilderHelper::extractBoilerplateClassComment($fooClass, $classExtends, 'plugins'); + // set the extension type + $class['extension_type'] = 'plugins'; + // store the class + $this->storePluginBoilerplate($tables['e'], $models['e'], $class, $app); + // work around + $classExtendsID = ComponentbuilderHelper::getVar('class_extends', $classExtends, 'name', 'id'); + } + // set plugin group if not already set + if (($pluginGroupID = ComponentbuilderHelper::getVar('joomla_plugin_group', $tree->path, 'name', 'id')) === false) + { + // load the plugin group name + $pluginGroup = array('id' => 0, 'published' => 1, 'version' => 1, 'name' => $tree->path, 'class_extends' => $classExtendsID); + // store the group + $this->storePluginBoilerplate($tables['g'], $models['g'], $pluginGroup, $app); + // work around + $pluginGroupID = ComponentbuilderHelper::getVar('joomla_plugin_group', $tree->path, 'name', 'id'); + } + // extract the boilerplate class property and methods + if (($classProperiesMethods = ComponentbuilderHelper::extractBoilerplateClassPropertiesMethods($fooClass, $classExtends, 'plugins', $pluginGroupID)) !== false) + { + // create the properties found (TODO just create for now but we could later add a force update) + if (isset($classProperiesMethods['property']) && ComponentbuilderHelper::checkArray($classProperiesMethods['property'])) + { + foreach ($classProperiesMethods['property'] as $_property) + { + // does not exist, so create + if ($_property['id'] == 0) + { + // store the property + $this->storePluginBoilerplate($tables['p'], $models['p'], $_property, $app); + } + } + } + // create the method found (TODO just create for now but we could later add a force update) + if (isset($classProperiesMethods['method']) && ComponentbuilderHelper::checkArray($classProperiesMethods['method'])) + { + foreach ($classProperiesMethods['method'] as $_method) + { + // does not exist, so create + if ($_method['id'] == 0) + { + // store the method + $this->storePluginBoilerplate($tables['m'], $models['m'], $_method, $app); + } + } + } + } + } + }, + $result->tree + ); + } + } + } + + /** + * store Plugin Boilerplate + * + * @return boolean true on success + * + */ + protected function storePluginBoilerplate(&$table, &$method, &$boilerplate, &$app) + { + // Sometimes the form needs some posted data, such as for plugins and modules. + $form = $method->getForm($boilerplate, false); + if (!$form) + { + $app->enqueueMessage($method->getError(), 'error'); + return false; + } + // Send an object which can be modified through the plugin event + $objData = (object) $boilerplate; + $app->triggerEvent( + 'onContentNormaliseRequestData', + array('com_componentbuilder.' . $table, $objData, $form) + ); + $boilerplate = (array) $objData; + // Test whether the data is valid. + $validData = $method->validate($form, $boilerplate); + // Check for validation errors. + if ($validData === false) + { + // Get the validation messages. + $errors = $method->getErrors(); + // Push up to three validation messages out to the user. + for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) + { + if ($errors[$i] instanceof \Exception) + { + $app->enqueueMessage($errors[$i]->getMessage(), 'warning'); + } + else + { + $app->enqueueMessage($errors[$i], 'warning'); + } + } + return false; + } + // Attempt to save the data. + if (!$method->save($validData)) + { + $app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BOILERPLATE_PLUGIN_S_DATA_COULD_NOT_BE_SAVED', $table), 'error'); + return false; + } + return true; + } + + /** + * 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; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); + $this->setState('filter.class_extends', $class_extends); + + $joomla_plugin_group = $this->getUserStateFromRequest($this->context . '.filter.joomla_plugin_group', 'filter_joomla_plugin_group'); + $this->setState('filter.joomla_plugin_group', $joomla_plugin_group); + + $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.access', 'com_componentbuilder.joomla_plugin.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_plugin.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', 'a')); + + // From the componentbuilder_class_extends table. + $query->select($db->quoteName('g.name','class_extends_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_class_extends', 'g') . ' ON (' . $db->quoteName('a.class_extends') . ' = ' . $db->quoteName('g.id') . ')'); + + // From the componentbuilder_joomla_plugin_group table. + $query->select($db->quoteName('h.name','joomla_plugin_group_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin_group', 'h') . ' ON (' . $db->quoteName('a.joomla_plugin_group') . ' = ' . $db->quoteName('h.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 . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.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.')'); + } + } + + // Filter by Name. + if ($name = $this->getState('filter.name')) + { + $query->where('a.name = ' . $db->quote($db->escape($name))); + } + // Filter by class_extends. + if ($class_extends = $this->getState('filter.class_extends')) + { + $query->where('a.class_extends = ' . $db->quote($db->escape($class_extends))); + } + // Filter by joomla_plugin_group. + if ($joomla_plugin_group = $this->getState('filter.joomla_plugin_group')) + { + $query->where('a.joomla_plugin_group = ' . $db->quote($db->escape($joomla_plugin_group))); + } + + // 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 list export data. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExportData($pks) + { + // setup the query + if (ComponentbuilderHelper::checkArray($pks)) + { + // Set a value to know this is exporting method. + $_export = true; + // 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_joomla_plugin table + $query->from($db->quoteName('#__componentbuilder_joomla_plugin', 'a')); + $query->where('a.id IN (' . implode(',',$pks) . ')'); + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + $access = (JFactory::getUser()->authorise('joomla_plugin.access', 'com_componentbuilder.joomla_plugin.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_plugin.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + // decode main_class_code + $item->main_class_code = base64_decode($item->main_class_code); + // unset the values we don't want exported. + unset($item->asset_id); + unset($item->checked_out); + unset($item->checked_out_time); + } + } + // Add headers to items array. + $headers = $this->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + array_unshift($items,$headers); + } + return $items; + } + } + return false; + } + + /** + * Method to get header. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExImPortHeaders() + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__componentbuilder_joomla_plugin"); + if (ComponentbuilderHelper::checkArray($columns)) + { + // remove the headers you don't import/export. + unset($columns['asset_id']); + unset($columns['checked_out']); + unset($columns['checked_out_time']); + $headers = new stdClass(); + foreach ($columns as $column => $type) + { + $headers->{$column} = $column; + } + return $headers; + } + return false; + } + + /** + * 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'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.class_extends'); + $id .= ':' . $this->getState('filter.joomla_plugin_group'); + + 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')); + $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'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/server.php b/admin/models/server.php index c526099f1..fe78c987f 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -189,7 +189,7 @@ class ComponentbuilderModelServer extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyalinked_components() + public function getVyclinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/models/validation_rule.php b/admin/models/validation_rule.php index 5ac0ca8b3..0f39411b2 100644 --- a/admin/models/validation_rule.php +++ b/admin/models/validation_rule.php @@ -74,10 +74,17 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 6ad006031..af0592031 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -141,6 +141,39 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( KEY `idx_adduikit` (`adduikit`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `class_extends` INT(11) NOT NULL DEFAULT 0, + `fields` TEXT NOT NULL, + `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, + `main_class_code` MEDIUMTEXT NOT NULL, + `method_selection` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `property_selection` 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_name` (`name`), + KEY `idx_class_extends` (`class_extends`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', @@ -624,6 +657,71 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_code` ( KEY `idx_from_line` (`from_line`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_property` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `comment` TEXT NOT NULL, + `default` VARCHAR(255) NOT NULL DEFAULT '', + `extension_type` VARCHAR(64) NOT NULL DEFAULT '', + `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `visibility` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`), + KEY `idx_visibility` (`visibility`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_method` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `arguments` TEXT NOT NULL, + `code` MEDIUMTEXT NOT NULL, + `comment` TEXT NOT NULL, + `extension_type` VARCHAR(64) NOT NULL DEFAULT '', + `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `visibility` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`), + KEY `idx_visibility` (`visibility`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + CREATE TABLE IF NOT EXISTS `#__componentbuilder_placeholder` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', @@ -1432,6 +1530,61 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( KEY `idx_library` (`library`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_extends` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `comment` TEXT NOT NULL, + `extension_type` VARCHAR(64) NOT NULL DEFAULT '', + `head` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_group` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `class_extends` INT(11) NOT NULL DEFAULT 0, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`), + KEY `idx_class_extends` (`class_extends`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + -- -- Dumping data for table `#__componentbuilder_joomla_component` -- diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index 6dbe36b9e..294a05896 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -1,4 +1,5 @@ DROP TABLE IF EXISTS `#__componentbuilder_joomla_component`; +DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin`; DROP TABLE IF EXISTS `#__componentbuilder_admin_view`; DROP TABLE IF EXISTS `#__componentbuilder_custom_admin_view`; DROP TABLE IF EXISTS `#__componentbuilder_site_view`; @@ -6,6 +7,8 @@ DROP TABLE IF EXISTS `#__componentbuilder_template`; DROP TABLE IF EXISTS `#__componentbuilder_layout`; DROP TABLE IF EXISTS `#__componentbuilder_dynamic_get`; DROP TABLE IF EXISTS `#__componentbuilder_custom_code`; +DROP TABLE IF EXISTS `#__componentbuilder_class_property`; +DROP TABLE IF EXISTS `#__componentbuilder_class_method`; DROP TABLE IF EXISTS `#__componentbuilder_placeholder`; DROP TABLE IF EXISTS `#__componentbuilder_library`; DROP TABLE IF EXISTS `#__componentbuilder_snippet`; @@ -33,4 +36,6 @@ DROP TABLE IF EXISTS `#__componentbuilder_component_placeholders`; DROP TABLE IF EXISTS `#__componentbuilder_snippet_type`; 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_external_code`; diff --git a/admin/sql/updates/mysql/2.9.21.sql b/admin/sql/updates/mysql/2.9.21.sql new file mode 100644 index 000000000..bbb847f84 --- /dev/null +++ b/admin/sql/updates/mysql/2.9.21.sql @@ -0,0 +1,59 @@ +CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `class_extends` INT(11) NOT NULL DEFAULT 0, + `fields` TEXT NOT NULL, + `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, + `main_class_code` MEDIUMTEXT NOT NULL, + `method_selection` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `property_selection` 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_name` (`name`), + KEY `idx_class_extends` (`class_extends`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_group` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `class_extends` INT(11) NOT NULL DEFAULT 0, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`), + KEY `idx_class_extends` (`class_extends`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/admin/sql/updates/mysql/2.9.31.sql b/admin/sql/updates/mysql/2.9.31.sql new file mode 100644 index 000000000..c4c444e5c --- /dev/null +++ b/admin/sql/updates/mysql/2.9.31.sql @@ -0,0 +1,92 @@ +CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_property` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `comment` TEXT NOT NULL, + `default` VARCHAR(255) NOT NULL DEFAULT '', + `extension_type` VARCHAR(64) NOT NULL DEFAULT '', + `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `visibility` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`), + KEY `idx_visibility` (`visibility`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_method` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `arguments` TEXT NOT NULL, + `code` MEDIUMTEXT NOT NULL, + `comment` TEXT NOT NULL, + `extension_type` VARCHAR(64) NOT NULL DEFAULT '', + `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `visibility` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`), + KEY `idx_visibility` (`visibility`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_extends` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `comment` TEXT NOT NULL, + `extension_type` VARCHAR(64) NOT NULL DEFAULT '', + `head` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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_name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/admin/tables/class_extends.php b/admin/tables/class_extends.php new file mode 100644 index 000000000..90b312ccc --- /dev/null +++ b/admin/tables/class_extends.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; + +/** + * Class_extendings Table class + */ +class ComponentbuilderTableClass_extends 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_class_extends', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.class_extends')); + } + + 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 Class_extends 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 class_extends. A class_extends 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('class_extends', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_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('class_extends', '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.class_extends.'.$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.class_extends.'.(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/tables/class_method.php b/admin/tables/class_method.php new file mode 100644 index 000000000..72e836850 --- /dev/null +++ b/admin/tables/class_method.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; + +/** + * Class_methods Table class + */ +class ComponentbuilderTableClass_method 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_class_method', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.class_method')); + } + + 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 Class_method 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 class_method. A class_method 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('class_method', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_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('class_method', '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.class_method.'.$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.class_method.'.(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/tables/class_property.php b/admin/tables/class_property.php new file mode 100644 index 000000000..6aaf9b3e6 --- /dev/null +++ b/admin/tables/class_property.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; + +/** + * Class_properties Table class + */ +class ComponentbuilderTableClass_property 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_class_property', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.class_property')); + } + + 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 Class_property 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 class_property. A class_property 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('class_property', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_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('class_property', '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.class_property.'.$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.class_property.'.(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/tables/joomla_plugin.php b/admin/tables/joomla_plugin.php new file mode 100644 index 000000000..9003ccf6a --- /dev/null +++ b/admin/tables/joomla_plugin.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 Table class + */ +class ComponentbuilderTableJoomla_plugin 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', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.joomla_plugin')); + } + + 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 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. A joomla_plugin 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', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_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', '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.'.$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.'.(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/tables/joomla_plugin_group.php b/admin/tables/joomla_plugin_group.php new file mode 100644 index 000000000..e9995623f --- /dev/null +++ b/admin/tables/joomla_plugin_group.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_plugin_groups Table class + */ +class ComponentbuilderTableJoomla_plugin_group 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_group', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.joomla_plugin_group')); + } + + 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_group 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_group. A joomla_plugin_group 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_group', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_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_group', '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_group.'.$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_group.'.(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 16f4ebaea..9d8c1b4d6 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -208,442 +208,408 @@ $componentParams = $this->params; // will be removed just use $this->params inst +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/class_extendings/tmpl/default_batch_body.php b/admin/views/class_extendings/tmpl/default_batch_body.php new file mode 100644 index 000000000..ac5af986b --- /dev/null +++ b/admin/views/class_extendings/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/class_extendings/tmpl/default_batch_footer.php b/admin/views/class_extendings/tmpl/default_batch_footer.php new file mode 100644 index 000000000..05d4c2fd3 --- /dev/null +++ b/admin/views/class_extendings/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/class_extendings/tmpl/default_body.php b/admin/views/class_extendings/tmpl/default_body.php new file mode 100644 index 000000000..1f0a5343e --- /dev/null +++ b/admin/views/class_extendings/tmpl/default_body.php @@ -0,0 +1,97 @@ + + * @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=class_extendings&task=class_extends.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('class_extends',$item,'class_extendings'); + ?> + + + get('class_extends.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('class_extends.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('class_extends.edit')): ?> + escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'class_extendings.', $canCheckin); ?> + + + escape($item->name); ?> + +
+ + + extension_type); ?> + + + get('class_extends.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'class_extendings.', true, 'cb'); ?> + + published, $i, 'class_extendings.', false, 'cb'); ?> + + + published, $i, 'class_extendings.', true, 'cb'); ?> + + + published, $i, 'class_extendings.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/class_extendings/tmpl/default_foot.php b/admin/views/class_extendings/tmpl/default_foot.php new file mode 100644 index 000000000..5d5ceb4bf --- /dev/null +++ b/admin/views/class_extendings/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/class_extendings/tmpl/default_head.php b/admin/views/class_extendings/tmpl/default_head.php new file mode 100644 index 000000000..6dd2ebea1 --- /dev/null +++ b/admin/views/class_extendings/tmpl/default_head.php @@ -0,0 +1,50 @@ + + * @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/class_extendings/tmpl/default_toolbar.php b/admin/views/class_extendings/tmpl/default_toolbar.php new file mode 100644 index 000000000..d1859740b --- /dev/null +++ b/admin/views/class_extendings/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/class_extendings/tmpl/index.html b/admin/views/class_extendings/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_extendings/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_extendings/view.html.php b/admin/views/class_extendings/view.html.php new file mode 100644 index 000000000..8b29a0412 --- /dev/null +++ b/admin/views/class_extendings/view.html.php @@ -0,0 +1,294 @@ + + * @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 Class_extendings + */ +class ComponentbuilderViewClass_extendings extends JViewLegacy +{ + /** + * Class_extendings view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('class_extendings'); + } + + // 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('class_extends'); + $this->canEdit = $this->canDo->get('class_extends.edit'); + $this->canState = $this->canDo->get('class_extends.edit.state'); + $this->canCreate = $this->canDo->get('class_extends.create'); + $this->canDelete = $this->canDo->get('class_extends.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_CLASS_EXTENDINGS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=class_extendings'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('class_extends.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('class_extends.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('class_extendings.publish'); + JToolBarHelper::unpublishList('class_extendings.unpublish'); + JToolBarHelper::archiveList('class_extendings.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('class_extendings.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('', 'class_extendings.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('class_extendings.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('class_extendings'); + 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') + ); + } + + // Set Extension Type Selection + $this->extension_typeOptions = $this->getTheExtension_typeSelections(); + // We do some sanitation for Extension Type filter + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && + isset($this->extension_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) + { + unset($this->extension_typeOptions[0]); + } + // Only load Extension Type filter if it has values + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions)) + { + // Extension Type Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL').' -', + 'filter_extension_type', + JHtml::_('select.options', $this->extension_typeOptions, 'value', 'text', $this->state->get('filter.extension_type')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Extension Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL').' -', + 'batch[extension_type]', + JHtml::_('select.options', $this->extension_typeOptions, '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_CLASS_EXTENDINGS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_extendings.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.name' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_LABEL'), + 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } + + protected function getTheExtension_typeSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('extension_type')); + $query->from($db->quoteName('#__componentbuilder_class_extends')); + $query->order($db->quoteName('extension_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $extension_type) + { + // Translate the extension_type selection + $text = $model->selectionTranslation($extension_type,'extension_type'); + // Now add the extension_type and its text to the options array + $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/views/class_extends/submitbutton.js b/admin/views/class_extends/submitbutton.js new file mode 100644 index 000000000..4072e12b8 --- /dev/null +++ b/admin/views/class_extends/submitbutton.js @@ -0,0 +1,25 @@ +/** + * @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 + */ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var action = task.split('.'); + if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){ + Joomla.submitform(task, document.getElementById("adminForm")); + return true; + } else { + alert(Joomla.JText._('class_extends, some values are not acceptable.','Some values are unacceptable')); + return false; + } + } +} \ No newline at end of file diff --git a/admin/views/class_extends/tmpl/edit.php b/admin/views/class_extends/tmpl/edit.php new file mode 100644 index 000000000..014a9f912 --- /dev/null +++ b/admin/views/class_extends/tmpl/edit.php @@ -0,0 +1,111 @@ + + * @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'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = $this->params; // will be removed just use $this->params instead +?> + + diff --git a/admin/views/class_extends/tmpl/index.html b/admin/views/class_extends/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_extends/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_extends/view.html.php b/admin/views/class_extends/view.html.php new file mode 100644 index 000000000..99b47c24e --- /dev/null +++ b/admin/views/class_extends/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'); + +/** + * Class_extends View class + */ +class ComponentbuilderViewClass_extends 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('class_extends', $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_CLASS_EXTENDS_NEW' : 'COM_COMPONENTBUILDER_CLASS_EXTENDS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('class_extends.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('class_extends.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('class_extends.edit')) + { + // We can save the record. + JToolBarHelper::save('class_extends.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('class_extends.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('class_extends.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('class_extends.create')) + { + JToolBarHelper::apply('class_extends.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('class_extends.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('class_extends.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('class_extends.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('class_extends.edit')) + { + // We can save the new record + JToolBarHelper::apply('class_extends.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('class_extends.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('class_extends.create')) + { + JToolBarHelper::custom('class_extends.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('class_extends.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('class_extends.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.class_extends', $this->item->id); + } + if ($this->canDo->get('class_extends.create')) + { + JToolBarHelper::custom('class_extends.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('class_extends.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('class_extends'); + 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_CLASS_EXTENDS_NEW' : 'COM_COMPONENTBUILDER_CLASS_EXTENDS_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_extends.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/class_extends/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/class_method/submitbutton.js b/admin/views/class_method/submitbutton.js new file mode 100644 index 000000000..bd292201b --- /dev/null +++ b/admin/views/class_method/submitbutton.js @@ -0,0 +1,25 @@ +/** + * @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 + */ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var action = task.split('.'); + if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){ + Joomla.submitform(task, document.getElementById("adminForm")); + return true; + } else { + alert(Joomla.JText._('class_method, some values are not acceptable.','Some values are unacceptable')); + return false; + } + } +} \ No newline at end of file diff --git a/admin/views/class_method/tmpl/edit.php b/admin/views/class_method/tmpl/edit.php new file mode 100644 index 000000000..051258709 --- /dev/null +++ b/admin/views/class_method/tmpl/edit.php @@ -0,0 +1,130 @@ + + * @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'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = $this->params; // will be removed just use $this->params instead +?> + + + + diff --git a/admin/views/class_method/tmpl/index.html b/admin/views/class_method/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_method/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_method/view.html.php b/admin/views/class_method/view.html.php new file mode 100644 index 000000000..b453d9379 --- /dev/null +++ b/admin/views/class_method/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'); + +/** + * Class_method View class + */ +class ComponentbuilderViewClass_method 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('class_method', $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_CLASS_METHOD_NEW' : 'COM_COMPONENTBUILDER_CLASS_METHOD_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('class_method.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('class_method.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('class_method.edit')) + { + // We can save the record. + JToolBarHelper::save('class_method.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('class_method.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('class_method.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('class_method.create')) + { + JToolBarHelper::apply('class_method.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('class_method.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('class_method.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('class_method.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('class_method.edit')) + { + // We can save the new record + JToolBarHelper::apply('class_method.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('class_method.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('class_method.create')) + { + JToolBarHelper::custom('class_method.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('class_method.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('class_method.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.class_method', $this->item->id); + } + if ($this->canDo->get('class_method.create')) + { + JToolBarHelper::custom('class_method.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('class_method.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('class_method'); + 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_CLASS_METHOD_NEW' : 'COM_COMPONENTBUILDER_CLASS_METHOD_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_method.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/class_method/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/class_methods/index.html b/admin/views/class_methods/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_methods/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_methods/tmpl/default.php b/admin/views/class_methods/tmpl/default.php new file mode 100644 index 000000000..e5feb483a --- /dev/null +++ b/admin/views/class_methods/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=class_methods.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'class_methodList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/class_methods/tmpl/default_batch_body.php b/admin/views/class_methods/tmpl/default_batch_body.php new file mode 100644 index 000000000..859550295 --- /dev/null +++ b/admin/views/class_methods/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/class_methods/tmpl/default_batch_footer.php b/admin/views/class_methods/tmpl/default_batch_footer.php new file mode 100644 index 000000000..aa7259bc5 --- /dev/null +++ b/admin/views/class_methods/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/class_methods/tmpl/default_body.php b/admin/views/class_methods/tmpl/default_body.php new file mode 100644 index 000000000..b3b54501f --- /dev/null +++ b/admin/views/class_methods/tmpl/default_body.php @@ -0,0 +1,108 @@ + + * @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=class_methods&task=class_method.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('class_method',$item,'class_methods'); + ?> + + + get('class_method.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('class_method.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('class_method.edit')): ?> + escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'class_methods.', $canCheckin); ?> + + + escape($item->name); ?> + +
+ + + visibility); ?> + + +
joomla_plugin_group) && ComponentbuilderHelper::checkString($item->joomla_plugin_group)): ?> + + extension_type); ?> : + escape($item->joomla_plugin_group_name); ?> + + + extension_type); ?> + +
+ + + get('class_method.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'class_methods.', true, 'cb'); ?> + + published, $i, 'class_methods.', false, 'cb'); ?> + + + published, $i, 'class_methods.', true, 'cb'); ?> + + + published, $i, 'class_methods.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/class_methods/tmpl/default_foot.php b/admin/views/class_methods/tmpl/default_foot.php new file mode 100644 index 000000000..ac9d333a7 --- /dev/null +++ b/admin/views/class_methods/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/class_methods/tmpl/default_head.php b/admin/views/class_methods/tmpl/default_head.php new file mode 100644 index 000000000..79573ae7c --- /dev/null +++ b/admin/views/class_methods/tmpl/default_head.php @@ -0,0 +1,53 @@ + + * @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/class_methods/tmpl/default_toolbar.php b/admin/views/class_methods/tmpl/default_toolbar.php new file mode 100644 index 000000000..b615a0921 --- /dev/null +++ b/admin/views/class_methods/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/class_methods/tmpl/index.html b/admin/views/class_methods/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_methods/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_methods/view.html.php b/admin/views/class_methods/view.html.php new file mode 100644 index 000000000..cb52d7e35 --- /dev/null +++ b/admin/views/class_methods/view.html.php @@ -0,0 +1,371 @@ + + * @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 Class_methods + */ +class ComponentbuilderViewClass_methods extends JViewLegacy +{ + /** + * Class_methods view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('class_methods'); + } + + // 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('class_method'); + $this->canEdit = $this->canDo->get('class_method.edit'); + $this->canState = $this->canDo->get('class_method.edit.state'); + $this->canCreate = $this->canDo->get('class_method.create'); + $this->canDelete = $this->canDo->get('class_method.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_CLASS_METHODS'), 'cube'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=class_methods'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('class_method.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('class_method.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('class_methods.publish'); + JToolBarHelper::unpublishList('class_methods.unpublish'); + JToolBarHelper::archiveList('class_methods.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('class_methods.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('', 'class_methods.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('class_methods.trash'); + } + + if ($this->canDo->get('core.export') && $this->canDo->get('class_method.export')) + { + JToolBarHelper::custom('class_methods.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); + } + } + + if ($this->canDo->get('core.import') && $this->canDo->get('class_method.import')) + { + JToolBarHelper::custom('class_methods.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false); + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('class_methods'); + 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') + ); + } + + // Set Visibility Selection + $this->visibilityOptions = $this->getTheVisibilitySelections(); + // We do some sanitation for Visibility filter + if (ComponentbuilderHelper::checkArray($this->visibilityOptions) && + isset($this->visibilityOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->visibilityOptions[0]->value)) + { + unset($this->visibilityOptions[0]); + } + // Only load Visibility filter if it has values + if (ComponentbuilderHelper::checkArray($this->visibilityOptions)) + { + // Visibility Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL').' -', + 'filter_visibility', + JHtml::_('select.options', $this->visibilityOptions, 'value', 'text', $this->state->get('filter.visibility')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Visibility Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL').' -', + 'batch[visibility]', + JHtml::_('select.options', $this->visibilityOptions, 'value', 'text') + ); + } + } + + // Set Extension Type Selection + $this->extension_typeOptions = $this->getTheExtension_typeSelections(); + // We do some sanitation for Extension Type filter + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && + isset($this->extension_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) + { + unset($this->extension_typeOptions[0]); + } + // Only load Extension Type filter if it has values + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions)) + { + // Extension Type Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL').' -', + 'filter_extension_type', + JHtml::_('select.options', $this->extension_typeOptions, 'value', 'text', $this->state->get('filter.extension_type')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Extension Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL').' -', + 'batch[extension_type]', + JHtml::_('select.options', $this->extension_typeOptions, '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_CLASS_METHODS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_methods.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.name' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_NAME_LABEL'), + 'a.visibility' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL'), + 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } + + protected function getTheVisibilitySelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('visibility')); + $query->from($db->quoteName('#__componentbuilder_class_method')); + $query->order($db->quoteName('visibility') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $visibility) + { + // Translate the visibility selection + $text = $model->selectionTranslation($visibility,'visibility'); + // Now add the visibility and its text to the options array + $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); + } + return $_filter; + } + return false; + } + + protected function getTheExtension_typeSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('extension_type')); + $query->from($db->quoteName('#__componentbuilder_class_method')); + $query->order($db->quoteName('extension_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $extension_type) + { + // Translate the extension_type selection + $text = $model->selectionTranslation($extension_type,'extension_type'); + // Now add the extension_type and its text to the options array + $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/views/class_properties/index.html b/admin/views/class_properties/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_properties/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_properties/tmpl/default.php b/admin/views/class_properties/tmpl/default.php new file mode 100644 index 000000000..292fd7243 --- /dev/null +++ b/admin/views/class_properties/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=class_properties.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'class_propertyList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/class_properties/tmpl/default_batch_body.php b/admin/views/class_properties/tmpl/default_batch_body.php new file mode 100644 index 000000000..79e5c3af1 --- /dev/null +++ b/admin/views/class_properties/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/class_properties/tmpl/default_batch_footer.php b/admin/views/class_properties/tmpl/default_batch_footer.php new file mode 100644 index 000000000..da14e979f --- /dev/null +++ b/admin/views/class_properties/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/class_properties/tmpl/default_body.php b/admin/views/class_properties/tmpl/default_body.php new file mode 100644 index 000000000..4e892684d --- /dev/null +++ b/admin/views/class_properties/tmpl/default_body.php @@ -0,0 +1,108 @@ + + * @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=class_properties&task=class_property.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('class_property',$item,'class_properties'); + ?> + + + get('class_property.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('class_property.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('class_property.edit')): ?> + escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'class_properties.', $canCheckin); ?> + + + escape($item->name); ?> + +
+ + + visibility); ?> + + +
joomla_plugin_group) && ComponentbuilderHelper::checkString($item->joomla_plugin_group)): ?> + + extension_type); ?> : + escape($item->joomla_plugin_group_name); ?> + + + extension_type); ?> + +
+ + + get('class_property.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'class_properties.', true, 'cb'); ?> + + published, $i, 'class_properties.', false, 'cb'); ?> + + + published, $i, 'class_properties.', true, 'cb'); ?> + + + published, $i, 'class_properties.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/class_properties/tmpl/default_foot.php b/admin/views/class_properties/tmpl/default_foot.php new file mode 100644 index 000000000..ac9d333a7 --- /dev/null +++ b/admin/views/class_properties/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/class_properties/tmpl/default_head.php b/admin/views/class_properties/tmpl/default_head.php new file mode 100644 index 000000000..4d064445a --- /dev/null +++ b/admin/views/class_properties/tmpl/default_head.php @@ -0,0 +1,53 @@ + + * @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/class_properties/tmpl/default_toolbar.php b/admin/views/class_properties/tmpl/default_toolbar.php new file mode 100644 index 000000000..ad3652bcb --- /dev/null +++ b/admin/views/class_properties/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/class_properties/tmpl/index.html b/admin/views/class_properties/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_properties/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_properties/view.html.php b/admin/views/class_properties/view.html.php new file mode 100644 index 000000000..e7c55ac70 --- /dev/null +++ b/admin/views/class_properties/view.html.php @@ -0,0 +1,371 @@ + + * @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 Class_properties + */ +class ComponentbuilderViewClass_properties extends JViewLegacy +{ + /** + * Class_properties view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('class_properties'); + } + + // 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('class_property'); + $this->canEdit = $this->canDo->get('class_property.edit'); + $this->canState = $this->canDo->get('class_property.edit.state'); + $this->canCreate = $this->canDo->get('class_property.create'); + $this->canDelete = $this->canDo->get('class_property.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_CLASS_PROPERTIES'), 'cube'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=class_properties'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('class_property.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('class_property.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('class_properties.publish'); + JToolBarHelper::unpublishList('class_properties.unpublish'); + JToolBarHelper::archiveList('class_properties.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('class_properties.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('', 'class_properties.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('class_properties.trash'); + } + + if ($this->canDo->get('core.export') && $this->canDo->get('class_property.export')) + { + JToolBarHelper::custom('class_properties.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); + } + } + + if ($this->canDo->get('core.import') && $this->canDo->get('class_property.import')) + { + JToolBarHelper::custom('class_properties.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false); + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('class_properties'); + 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') + ); + } + + // Set Visibility Selection + $this->visibilityOptions = $this->getTheVisibilitySelections(); + // We do some sanitation for Visibility filter + if (ComponentbuilderHelper::checkArray($this->visibilityOptions) && + isset($this->visibilityOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->visibilityOptions[0]->value)) + { + unset($this->visibilityOptions[0]); + } + // Only load Visibility filter if it has values + if (ComponentbuilderHelper::checkArray($this->visibilityOptions)) + { + // Visibility Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL').' -', + 'filter_visibility', + JHtml::_('select.options', $this->visibilityOptions, 'value', 'text', $this->state->get('filter.visibility')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Visibility Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL').' -', + 'batch[visibility]', + JHtml::_('select.options', $this->visibilityOptions, 'value', 'text') + ); + } + } + + // Set Extension Type Selection + $this->extension_typeOptions = $this->getTheExtension_typeSelections(); + // We do some sanitation for Extension Type filter + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && + isset($this->extension_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) + { + unset($this->extension_typeOptions[0]); + } + // Only load Extension Type filter if it has values + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions)) + { + // Extension Type Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL').' -', + 'filter_extension_type', + JHtml::_('select.options', $this->extension_typeOptions, 'value', 'text', $this->state->get('filter.extension_type')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Extension Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL').' -', + 'batch[extension_type]', + JHtml::_('select.options', $this->extension_typeOptions, '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_CLASS_PROPERTIES')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_properties.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.name' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_LABEL'), + 'a.visibility' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL'), + 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } + + protected function getTheVisibilitySelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('visibility')); + $query->from($db->quoteName('#__componentbuilder_class_property')); + $query->order($db->quoteName('visibility') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $visibility) + { + // Translate the visibility selection + $text = $model->selectionTranslation($visibility,'visibility'); + // Now add the visibility and its text to the options array + $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); + } + return $_filter; + } + return false; + } + + protected function getTheExtension_typeSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('extension_type')); + $query->from($db->quoteName('#__componentbuilder_class_property')); + $query->order($db->quoteName('extension_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $extension_type) + { + // Translate the extension_type selection + $text = $model->selectionTranslation($extension_type,'extension_type'); + // Now add the extension_type and its text to the options array + $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/views/class_property/submitbutton.js b/admin/views/class_property/submitbutton.js new file mode 100644 index 000000000..29ce1c823 --- /dev/null +++ b/admin/views/class_property/submitbutton.js @@ -0,0 +1,25 @@ +/** + * @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 + */ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var action = task.split('.'); + if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){ + Joomla.submitform(task, document.getElementById("adminForm")); + return true; + } else { + alert(Joomla.JText._('class_property, some values are not acceptable.','Some values are unacceptable')); + return false; + } + } +} \ No newline at end of file diff --git a/admin/views/class_property/tmpl/edit.php b/admin/views/class_property/tmpl/edit.php new file mode 100644 index 000000000..ed0619465 --- /dev/null +++ b/admin/views/class_property/tmpl/edit.php @@ -0,0 +1,125 @@ + + * @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'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = $this->params; // will be removed just use $this->params instead +?> + + + + diff --git a/admin/views/class_property/tmpl/index.html b/admin/views/class_property/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/class_property/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/class_property/view.html.php b/admin/views/class_property/view.html.php new file mode 100644 index 000000000..7e6685019 --- /dev/null +++ b/admin/views/class_property/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'); + +/** + * Class_property View class + */ +class ComponentbuilderViewClass_property 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('class_property', $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_CLASS_PROPERTY_NEW' : 'COM_COMPONENTBUILDER_CLASS_PROPERTY_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('class_property.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('class_property.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('class_property.edit')) + { + // We can save the record. + JToolBarHelper::save('class_property.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('class_property.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('class_property.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('class_property.create')) + { + JToolBarHelper::apply('class_property.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('class_property.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('class_property.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('class_property.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('class_property.edit')) + { + // We can save the new record + JToolBarHelper::apply('class_property.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('class_property.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('class_property.create')) + { + JToolBarHelper::custom('class_property.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('class_property.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('class_property.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.class_property', $this->item->id); + } + if ($this->canDo->get('class_property.create')) + { + JToolBarHelper::custom('class_property.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('class_property.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('class_property'); + 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_CLASS_PROPERTY_NEW' : 'COM_COMPONENTBUILDER_CLASS_PROPERTY_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_property.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/class_property/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index 7c857a543..63530be3a 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -163,153 +163,153 @@ $componentParams = $this->params; // will be removed just use $this->params inst + + + diff --git a/admin/views/joomla_plugin/tmpl/index.html b/admin/views/joomla_plugin/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugin/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugin/view.html.php b/admin/views/joomla_plugin/view.html.php new file mode 100644 index 000000000..60187bdf2 --- /dev/null +++ b/admin/views/joomla_plugin/view.html.php @@ -0,0 +1,216 @@ + + * @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 View class + */ +class ComponentbuilderViewJoomla_plugin 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', $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_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('joomla_plugin.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('joomla_plugin.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('joomla_plugin.edit')) + { + // We can save the record. + JToolBarHelper::save('joomla_plugin.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('joomla_plugin.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('joomla_plugin.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('joomla_plugin.create')) + { + JToolBarHelper::apply('joomla_plugin.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('joomla_plugin.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('joomla_plugin.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('joomla_plugin.edit')) + { + // We can save the new record + JToolBarHelper::apply('joomla_plugin.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin.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.create')) + { + JToolBarHelper::custom('joomla_plugin.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('joomla_plugin.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('joomla_plugin.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.joomla_plugin', $this->item->id); + } + if ($this->canDo->get('joomla_plugin.create')) + { + JToolBarHelper::custom('joomla_plugin.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('joomla_plugin.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugin'); + 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_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugin.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // Add Ajax Token + $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); + $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/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + // add var key + $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); + // add return_here + $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) JUri::getInstance())) . "';"); + // set some lang + JText::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'); + JText::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS'); + JText::script('COM_COMPONENTBUILDER_NO_RESULTS_MATCH'); + JText::script('COM_COMPONENTBUILDER_SELECT_A_PROPERTY'); + JText::script('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND'); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/joomla_plugin_group/submitbutton.js b/admin/views/joomla_plugin_group/submitbutton.js new file mode 100644 index 000000000..416ac7411 --- /dev/null +++ b/admin/views/joomla_plugin_group/submitbutton.js @@ -0,0 +1,25 @@ +/** + * @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 + */ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var action = task.split('.'); + if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){ + Joomla.submitform(task, document.getElementById("adminForm")); + return true; + } else { + alert(Joomla.JText._('joomla_plugin_group, some values are not acceptable.','Some values are unacceptable')); + return false; + } + } +} \ No newline at end of file diff --git a/admin/views/joomla_plugin_group/tmpl/edit.php b/admin/views/joomla_plugin_group/tmpl/edit.php new file mode 100644 index 000000000..dfc96bcc4 --- /dev/null +++ b/admin/views/joomla_plugin_group/tmpl/edit.php @@ -0,0 +1,106 @@ + + * @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'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = $this->params; // will be removed just use $this->params instead +?> + + diff --git a/admin/views/joomla_plugin_group/tmpl/index.html b/admin/views/joomla_plugin_group/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugin_group/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugin_group/view.html.php b/admin/views/joomla_plugin_group/view.html.php new file mode 100644 index 000000000..31900844b --- /dev/null +++ b/admin/views/joomla_plugin_group/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_group View class + */ +class ComponentbuilderViewJoomla_plugin_group 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_group', $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_GROUP_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('core.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('joomla_plugin_group.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('core.edit')) + { + // We can save the record. + JToolBarHelper::save('joomla_plugin_group.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('joomla_plugin_group.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('joomla_plugin_group.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('core.create')) + { + JToolBarHelper::apply('joomla_plugin_group.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin_group.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('joomla_plugin_group.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('joomla_plugin_group.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('core.edit')) + { + // We can save the new record + JToolBarHelper::apply('joomla_plugin_group.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin_group.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('core.create')) + { + JToolBarHelper::custom('joomla_plugin_group.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('joomla_plugin_group.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('core.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.joomla_plugin_group', $this->item->id); + } + if ($this->canDo->get('core.create')) + { + JToolBarHelper::custom('joomla_plugin_group.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('joomla_plugin_group.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugin_group'); + 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_GROUP_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugin_group.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_group/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_plugin_groups/index.html b/admin/views/joomla_plugin_groups/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugin_groups/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/tmpl/default.php b/admin/views/joomla_plugin_groups/tmpl/default.php new file mode 100644 index 000000000..740225e17 --- /dev/null +++ b/admin/views/joomla_plugin_groups/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_plugin_groups.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'joomla_plugin_groupList', '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_PLUGIN_GROUPS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/tmpl/default_batch_body.php b/admin/views/joomla_plugin_groups/tmpl/default_batch_body.php new file mode 100644 index 000000000..04c57dde2 --- /dev/null +++ b/admin/views/joomla_plugin_groups/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_plugin_groups/tmpl/default_batch_footer.php b/admin/views/joomla_plugin_groups/tmpl/default_batch_footer.php new file mode 100644 index 000000000..600af95e2 --- /dev/null +++ b/admin/views/joomla_plugin_groups/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_plugin_groups/tmpl/default_body.php b/admin/views/joomla_plugin_groups/tmpl/default_body.php new file mode 100644 index 000000000..e0d516589 --- /dev/null +++ b/admin/views/joomla_plugin_groups/tmpl/default_body.php @@ -0,0 +1,103 @@ + + * @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_plugin_groups&task=joomla_plugin_group.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_group',$item,'joomla_plugin_groups'); + ?> + + + get('core.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('core.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('core.edit')): ?> + escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'joomla_plugin_groups.', $canCheckin); ?> + + + escape($item->name); ?> + +
+ + +
+ user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int)$item->class_extends)): ?> + escape($item->class_extends_name); ?> + + escape($item->class_extends_name); ?> + +
+ + + get('core.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'joomla_plugin_groups.', true, 'cb'); ?> + + published, $i, 'joomla_plugin_groups.', false, 'cb'); ?> + + + published, $i, 'joomla_plugin_groups.', true, 'cb'); ?> + + + published, $i, 'joomla_plugin_groups.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/tmpl/default_foot.php b/admin/views/joomla_plugin_groups/tmpl/default_foot.php new file mode 100644 index 000000000..5d5ceb4bf --- /dev/null +++ b/admin/views/joomla_plugin_groups/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_plugin_groups/tmpl/default_head.php b/admin/views/joomla_plugin_groups/tmpl/default_head.php new file mode 100644 index 000000000..c1ed60a09 --- /dev/null +++ b/admin/views/joomla_plugin_groups/tmpl/default_head.php @@ -0,0 +1,50 @@ + + * @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/tmpl/default_toolbar.php b/admin/views/joomla_plugin_groups/tmpl/default_toolbar.php new file mode 100644 index 000000000..bcb6a01a6 --- /dev/null +++ b/admin/views/joomla_plugin_groups/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_plugin_groups/tmpl/index.html b/admin/views/joomla_plugin_groups/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugin_groups/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/view.html.php b/admin/views/joomla_plugin_groups/view.html.php new file mode 100644 index 000000000..bccfce0ba --- /dev/null +++ b/admin/views/joomla_plugin_groups/view.html.php @@ -0,0 +1,258 @@ + + * @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_plugin_groups + */ +class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy +{ + /** + * Joomla_plugin_groups view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('joomla_plugin_groups'); + } + + // 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_group'); + $this->canEdit = $this->canDo->get('core.edit'); + $this->canState = $this->canDo->get('core.edit.state'); + $this->canCreate = $this->canDo->get('core.create'); + $this->canDelete = $this->canDo->get('core.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_PLUGIN_GROUPS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=joomla_plugin_groups'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('joomla_plugin_group.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('joomla_plugin_group.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('joomla_plugin_groups.publish'); + JToolBarHelper::unpublishList('joomla_plugin_groups.unpublish'); + JToolBarHelper::archiveList('joomla_plugin_groups.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('joomla_plugin_groups.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_plugin_groups.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('joomla_plugin_groups.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugin_groups'); + 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') + ); + } + + // Set Class Extends Name Selection + $this->class_extendsNameOptions = JFormHelper::loadFieldType('Classextends')->options; + // We do some sanitation for Class Extends Name filter + if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions) && + isset($this->class_extendsNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->class_extendsNameOptions[0]->value)) + { + unset($this->class_extendsNameOptions[0]); + } + // Only load Class Extends Name filter if it has values + if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions)) + { + // Class Extends Name Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL').' -', + 'filter_class_extends', + JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text', $this->state->get('filter.class_extends')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Class Extends Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL').' -', + 'batch[class_extends]', + JHtml::_('select.options', $this->class_extendsNameOptions, '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_PLUGIN_GROUPS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugin_groups.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.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_LABEL'), + 'g.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/joomla_plugins/index.html b/admin/views/joomla_plugins/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugins/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugins/tmpl/default.php b/admin/views/joomla_plugins/tmpl/default.php new file mode 100644 index 000000000..02db0d9c7 --- /dev/null +++ b/admin/views/joomla_plugins/tmpl/default.php @@ -0,0 +1,108 @@ + + * @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.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'joomla_pluginList', '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_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins/tmpl/default_batch_body.php b/admin/views/joomla_plugins/tmpl/default_batch_body.php new file mode 100644 index 000000000..9943660cc --- /dev/null +++ b/admin/views/joomla_plugins/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/tmpl/default_batch_footer.php b/admin/views/joomla_plugins/tmpl/default_batch_footer.php new file mode 100644 index 000000000..b7dd697fb --- /dev/null +++ b/admin/views/joomla_plugins/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/tmpl/default_body.php b/admin/views/joomla_plugins/tmpl/default_body.php new file mode 100644 index 000000000..965b19fa2 --- /dev/null +++ b/admin/views/joomla_plugins/tmpl/default_body.php @@ -0,0 +1,112 @@ + + * @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&task=joomla_plugin.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',$item,'joomla_plugins'); + ?> + + + get('joomla_plugin.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('joomla_plugin.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('joomla_plugin.edit')): ?> + escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'joomla_plugins.', $canCheckin); ?> + + + escape($item->name); ?> + +
+ + +
+ user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int)$item->class_extends)): ?> + escape($item->class_extends_name); ?> + + escape($item->class_extends_name); ?> + +
+ + +
+ user->authorise('core.edit', 'com_componentbuilder.joomla_plugin_group.' . (int)$item->joomla_plugin_group)): ?> + escape($item->joomla_plugin_group_name); ?> + + escape($item->joomla_plugin_group_name); ?> + +
+ + + get('joomla_plugin.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'joomla_plugins.', true, 'cb'); ?> + + published, $i, 'joomla_plugins.', false, 'cb'); ?> + + + published, $i, 'joomla_plugins.', true, 'cb'); ?> + + + published, $i, 'joomla_plugins.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins/tmpl/default_foot.php b/admin/views/joomla_plugins/tmpl/default_foot.php new file mode 100644 index 000000000..ac9d333a7 --- /dev/null +++ b/admin/views/joomla_plugins/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/tmpl/default_head.php b/admin/views/joomla_plugins/tmpl/default_head.php new file mode 100644 index 000000000..ede0e26b7 --- /dev/null +++ b/admin/views/joomla_plugins/tmpl/default_head.php @@ -0,0 +1,53 @@ + + * @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/joomla_plugins/tmpl/default_toolbar.php b/admin/views/joomla_plugins/tmpl/default_toolbar.php new file mode 100644 index 000000000..89614dc35 --- /dev/null +++ b/admin/views/joomla_plugins/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/tmpl/index.html b/admin/views/joomla_plugins/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugins/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php new file mode 100644 index 000000000..ddf8a599f --- /dev/null +++ b/admin/views/joomla_plugins/view.html.php @@ -0,0 +1,371 @@ + + * @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 + */ +class ComponentbuilderViewJoomla_plugins extends JViewLegacy +{ + /** + * Joomla_plugins view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('joomla_plugins'); + } + + // 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'); + $this->canEdit = $this->canDo->get('joomla_plugin.edit'); + $this->canState = $this->canDo->get('joomla_plugin.edit.state'); + $this->canCreate = $this->canDo->get('joomla_plugin.create'); + $this->canDelete = $this->canDo->get('joomla_plugin.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'), 'power-cord'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=joomla_plugins'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('joomla_plugin.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('joomla_plugin.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('joomla_plugins.publish'); + JToolBarHelper::unpublishList('joomla_plugins.unpublish'); + JToolBarHelper::archiveList('joomla_plugins.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('joomla_plugins.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.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('joomla_plugins.trash'); + } + + if ($this->canDo->get('core.export') && $this->canDo->get('joomla_plugin.export')) + { + JToolBarHelper::custom('joomla_plugins.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); + } + } + if ($this->user->authorise('joomla_plugin.run_expansion', 'com_componentbuilder')) + { + // add Run Expansion button. + JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + } + if ($this->user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder')) + { + // add Get Boilerplate button. + JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false); + } + + if ($this->canDo->get('core.import') && $this->canDo->get('joomla_plugin.import')) + { + JToolBarHelper::custom('joomla_plugins.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false); + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugins'); + 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') + ); + } + + // Set Name Selection + $this->nameOptions = $this->getTheNameSelections(); + // We do some sanitation for Name filter + if (ComponentbuilderHelper::checkArray($this->nameOptions) && + isset($this->nameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->nameOptions[0]->value)) + { + unset($this->nameOptions[0]); + } + // Only load Name filter if it has values + if (ComponentbuilderHelper::checkArray($this->nameOptions)) + { + // Name Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_LABEL').' -', + 'filter_name', + JHtml::_('select.options', $this->nameOptions, 'value', 'text', $this->state->get('filter.name')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_LABEL').' -', + 'batch[name]', + JHtml::_('select.options', $this->nameOptions, 'value', 'text') + ); + } + } + + // Set Class Extends Name Selection + $this->class_extendsNameOptions = JFormHelper::loadFieldType('Classextends')->options; + // We do some sanitation for Class Extends Name filter + if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions) && + isset($this->class_extendsNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->class_extendsNameOptions[0]->value)) + { + unset($this->class_extendsNameOptions[0]); + } + // Only load Class Extends Name filter if it has values + if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions)) + { + // Class Extends Name Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL').' -', + 'filter_class_extends', + JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text', $this->state->get('filter.class_extends')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Class Extends Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL').' -', + 'batch[class_extends]', + JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text') + ); + } + } + + // Set Joomla Plugin Group Name Selection + $this->joomla_plugin_groupNameOptions = JFormHelper::loadFieldType('Joomlaplugingroups')->options; + // We do some sanitation for Joomla Plugin Group Name filter + if (ComponentbuilderHelper::checkArray($this->joomla_plugin_groupNameOptions) && + isset($this->joomla_plugin_groupNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->joomla_plugin_groupNameOptions[0]->value)) + { + unset($this->joomla_plugin_groupNameOptions[0]); + } + // Only load Joomla Plugin Group Name filter if it has values + if (ComponentbuilderHelper::checkArray($this->joomla_plugin_groupNameOptions)) + { + // Joomla Plugin Group Name Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL').' -', + 'filter_joomla_plugin_group', + JHtml::_('select.options', $this->joomla_plugin_groupNameOptions, 'value', 'text', $this->state->get('filter.joomla_plugin_group')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Joomla Plugin Group Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL').' -', + 'batch[joomla_plugin_group]', + JHtml::_('select.options', $this->joomla_plugin_groupNameOptions, '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')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugins.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.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_LABEL'), + 'g.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL'), + 'h.name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } + + protected function getTheNameSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('name')); + $query->from($db->quoteName('#__componentbuilder_joomla_plugin')); + $query->order($db->quoteName('name') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + $results = array_unique($results); + $_filter = array(); + foreach ($results as $name) + { + // Now add the name and its text to the options array + $_filter[] = JHtml::_('select.option', $name, $name); + } + return $_filter; + } + return false; + } +} diff --git a/admin/views/layout/tmpl/edit.php b/admin/views/layout/tmpl/edit.php index f064a2642..4c78af24b 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 diff --git a/admin/views/server/view.html.php b/admin/views/server/view.html.php index a6e4ef3a8..df0b969bf 100644 --- a/admin/views/server/view.html.php +++ b/admin/views/server/view.html.php @@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy } // Get Linked view data - $this->vyalinked_components = $this->get('Vyalinked_components'); + $this->vyclinked_components = $this->get('Vyclinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/admin/views/site_view/tmpl/edit.php b/admin/views/site_view/tmpl/edit.php index df756a40c..6db7f903e 100644 --- a/admin/views/site_view/tmpl/edit.php +++ b/admin/views/site_view/tmpl/edit.php @@ -166,168 +166,168 @@ $componentParams = $this->params; // will be removed just use $this->params inst diff --git a/admin/views/class_extends/view.html.php b/admin/views/class_extends/view.html.php index 99b47c24e..8d4ae267c 100644 --- a/admin/views/class_extends/view.html.php +++ b/admin/views/class_extends/view.html.php @@ -187,9 +187,24 @@ class ComponentbuilderViewClass_extends extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_EXTENDS_NEW' : 'COM_COMPONENTBUILDER_CLASS_EXTENDS_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_extends.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_extends.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // Add Ajax Token + $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $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/class_extends/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_extends/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + // add var key + $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); + // add return_here + $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) JUri::getInstance())) . "';"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/class_method/tmpl/edit.php b/admin/views/class_method/tmpl/edit.php index 051258709..2a52b768e 100644 --- a/admin/views/class_method/tmpl/edit.php +++ b/admin/views/class_method/tmpl/edit.php @@ -127,4 +127,23 @@ jQuery('#adminForm').on('change', '#jform_extension_type',function (e) }); + + + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/class_method/view.html.php b/admin/views/class_method/view.html.php index b453d9379..9f5575570 100644 --- a/admin/views/class_method/view.html.php +++ b/admin/views/class_method/view.html.php @@ -187,9 +187,24 @@ class ComponentbuilderViewClass_method extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_METHOD_NEW' : 'COM_COMPONENTBUILDER_CLASS_METHOD_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_method.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_method.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // Add Ajax Token + $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $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/class_method/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_method/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + // add var key + $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); + // add return_here + $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) JUri::getInstance())) . "';"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/class_property/tmpl/edit.php b/admin/views/class_property/tmpl/edit.php index ed0619465..0798138f5 100644 --- a/admin/views/class_property/tmpl/edit.php +++ b/admin/views/class_property/tmpl/edit.php @@ -122,4 +122,23 @@ jQuery('#adminForm').on('change', '#jform_extension_type',function (e) }); + + + + +function JRouter(link) { +isSite()) + { + echo 'var url = "'.JURI::root().'";'; + } + else + { + echo 'var url = "";'; + } +?> + return url+link; +} diff --git a/admin/views/class_property/view.html.php b/admin/views/class_property/view.html.php index 7e6685019..028dd240d 100644 --- a/admin/views/class_property/view.html.php +++ b/admin/views/class_property/view.html.php @@ -187,9 +187,24 @@ class ComponentbuilderViewClass_property extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_PROPERTY_NEW' : 'COM_COMPONENTBUILDER_CLASS_PROPERTY_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_property.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/class_property.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // Add Ajax Token + $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $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/class_property/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_property/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + // add var key + $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); + // add return_here + $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) JUri::getInstance())) . "';"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/joomla_plugin/tmpl/edit.php b/admin/views/joomla_plugin/tmpl/edit.php index efed6df68..17dd589a6 100644 --- a/admin/views/joomla_plugin/tmpl/edit.php +++ b/admin/views/joomla_plugin/tmpl/edit.php @@ -220,5 +220,18 @@ function JRouter(link) { } ?> return url+link; -} +} + +// nice little dot trick :) +jQuery(document).ready( function($) { + var x=0; + setInterval(function() { + var dots = ""; + x++; + for (var y=0; y < x%8; y++) { + dots+="."; + } + $(".loading-dots").text(dots); + } , 500); +}); diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index ddf8a599f..03adcfa78 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -144,6 +144,16 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy // add Get Boilerplate button. JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false); } + if ($this->user->authorise('joomla_plugin.methods', 'com_componentbuilder')) + { + // add Methods button. + JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla', '', 'COM_COMPONENTBUILDER_METHODS', false); + } + if ($this->user->authorise('joomla_plugin.properties', 'com_componentbuilder')) + { + // add Properties button. + JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla', '', 'COM_COMPONENTBUILDER_PROPERTIES', false); + } if ($this->canDo->get('core.import') && $this->canDo->get('joomla_plugin.import')) { diff --git a/componentbuilder.xml b/componentbuilder.xml index c05ade941..8cbec8119 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 15th July, 2019 + 16th July, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1 From fcd5846c5ab6d15bfa760c13f0f4f74ae010be2b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 17 Jul 2019 01:53:34 +0200 Subject: [PATCH 05/13] Update the phpseclib via composer. --- README.md | 2 +- admin/README.txt | 2 +- admin/models/forms/admin_view.xml | 2 +- admin/models/server.php | 16 +- componentbuilder.xml | 2 +- .../vdm_io/vendor/composer/ClassLoader.php | 4 +- .../vendor/composer/autoload_classmap.php | 24 -- .../vendor/composer/autoload_static.php | 28 --- .../vdm_io/vendor/composer/installed.json | 12 +- .../vdm_io/vendor/phpseclib/phpseclib/LICENSE | 5 +- .../vendor/phpseclib/phpseclib/README.md | 19 +- .../vendor/phpseclib/phpseclib/appveyor.yml | 27 ++ .../phpseclib/phpseclib/Crypt/Base.php | 128 +++++++++- .../phpseclib/phpseclib/Crypt/Hash.php | 121 ++++++--- .../phpseclib/phpseclib/Crypt/RSA.php | 206 +++++++++++++--- .../phpseclib/phpseclib/File/ASN1.php | 164 +++++++++---- .../phpseclib/phpseclib/File/X509.php | 207 +++++++++++++++- .../phpseclib/phpseclib/Math/BigInteger.php | 54 ++-- .../phpseclib/phpseclib/phpseclib/Net/SCP.php | 5 + .../phpseclib/phpseclib/Net/SFTP.php | 80 ++++-- .../phpseclib/phpseclib/Net/SSH2.php | 232 +++++++++++++++--- .../phpseclib/phpseclib/System/SSH/Agent.php | 28 ++- .../phpseclib/System/SSH/Agent/Identity.php | 80 +++++- 23 files changed, 1174 insertions(+), 274 deletions(-) create mode 100644 libraries/vdm_io/vendor/phpseclib/phpseclib/appveyor.yml diff --git a/README.md b/README.md index ef5584734..cc9ec7981 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ 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*: 16th July, 2019 ++ *Last Build*: 17th July, 2019 + *Version*: 2.9.32 + *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/README.txt b/admin/README.txt index ef5584734..cc9ec7981 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -146,7 +146,7 @@ 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*: 16th July, 2019 ++ *Last Build*: 17th July, 2019 + *Version*: 2.9.32 + *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/admin_view.xml b/admin/models/forms/admin_view.xml index 4b9621508..41b154bc2 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -1094,7 +1094,7 @@ readonly="false" disabled="false" required="true" - filter="WORD" + filter="STRING" message="COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_HINT" /> diff --git a/admin/models/server.php b/admin/models/server.php index fe78c987f..4438ef7bc 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -179,7 +179,7 @@ class ComponentbuilderModelServer extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.server'); } } - $this->sales_serverorupdate_servervvvw = $item->id; + $this->sales_serverupdate_servervvvw = $item->id; return $item; } @@ -203,19 +203,19 @@ class ComponentbuilderModelServer extends JModelAdmin // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - // Filter by sales_serverorupdate_servervvvw global. - $sales_serverorupdate_servervvvw = $this->sales_serverorupdate_servervvvw; - if (is_numeric($sales_serverorupdate_servervvvw )) + // Filter by sales_serverupdate_servervvvw global. + $sales_serverupdate_servervvvw = $this->sales_serverupdate_servervvvw; + if (is_numeric($sales_serverupdate_servervvvw )) { - $query->where('a.sales_serverORupdate_server = ' . (int) $sales_serverorupdate_servervvvw ); + $query->where('a.sales_server = ' . (int) $sales_serverupdate_servervvvw . ' OR a.update_server = ' . (int) $sales_serverupdate_servervvvw, ' OR'); } - elseif (is_string($sales_serverorupdate_servervvvw)) + elseif (is_string($sales_serverupdate_servervvvw)) { - $query->where('a.sales_serverORupdate_server = ' . $db->quote($sales_serverorupdate_servervvvw)); + $query->where('a.sales_server = ' . $db->quote($sales_serverupdate_servervvvw) . ' OR a.update_server = ' . $db->quote($sales_serverupdate_servervvvw), ' OR'); } else { - $query->where('a.sales_serverORupdate_server = -5'); + $query->where('a.update_server = -5'); } // Join over the asset groups. diff --git a/componentbuilder.xml b/componentbuilder.xml index 8cbec8119..e36b8ef4c 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 16th July, 2019 + 17th July, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/libraries/vdm_io/vendor/composer/ClassLoader.php b/libraries/vdm_io/vendor/composer/ClassLoader.php index dc02dfb11..fce8549f0 100644 --- a/libraries/vdm_io/vendor/composer/ClassLoader.php +++ b/libraries/vdm_io/vendor/composer/ClassLoader.php @@ -279,7 +279,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** @@ -377,7 +377,7 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; + $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { diff --git a/libraries/vdm_io/vendor/composer/autoload_classmap.php b/libraries/vdm_io/vendor/composer/autoload_classmap.php index 2f4700ebd..7a91153b0 100644 --- a/libraries/vdm_io/vendor/composer/autoload_classmap.php +++ b/libraries/vdm_io/vendor/composer/autoload_classmap.php @@ -6,28 +6,4 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'phpseclib\\Crypt\\AES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/AES.php', - 'phpseclib\\Crypt\\Base' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Base.php', - 'phpseclib\\Crypt\\Blowfish' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php', - 'phpseclib\\Crypt\\DES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/DES.php', - 'phpseclib\\Crypt\\Hash' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Hash.php', - 'phpseclib\\Crypt\\RC2' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/RC2.php', - 'phpseclib\\Crypt\\RC4' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/RC4.php', - 'phpseclib\\Crypt\\RSA' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/RSA.php', - 'phpseclib\\Crypt\\Random' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Random.php', - 'phpseclib\\Crypt\\Rijndael' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php', - 'phpseclib\\Crypt\\TripleDES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php', - 'phpseclib\\Crypt\\Twofish' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php', - 'phpseclib\\File\\ANSI' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/ANSI.php', - 'phpseclib\\File\\ASN1' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/ASN1.php', - 'phpseclib\\File\\ASN1\\Element' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php', - 'phpseclib\\File\\X509' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/X509.php', - 'phpseclib\\Math\\BigInteger' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Math/BigInteger.php', - 'phpseclib\\Net\\SCP' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SCP.php', - 'phpseclib\\Net\\SFTP' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SFTP.php', - 'phpseclib\\Net\\SFTP\\Stream' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php', - 'phpseclib\\Net\\SSH1' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SSH1.php', - 'phpseclib\\Net\\SSH2' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SSH2.php', - 'phpseclib\\System\\SSH\\Agent' => $vendorDir . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php', - 'phpseclib\\System\\SSH\\Agent\\Identity' => $vendorDir . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php', ); diff --git a/libraries/vdm_io/vendor/composer/autoload_static.php b/libraries/vdm_io/vendor/composer/autoload_static.php index ea6b0d7d3..09b862a0c 100644 --- a/libraries/vdm_io/vendor/composer/autoload_static.php +++ b/libraries/vdm_io/vendor/composer/autoload_static.php @@ -24,39 +24,11 @@ class ComposerStaticInit10d22a526bd476954b93748a871e7ad4 ), ); - public static $classMap = array ( - 'phpseclib\\Crypt\\AES' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/AES.php', - 'phpseclib\\Crypt\\Base' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Base.php', - 'phpseclib\\Crypt\\Blowfish' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php', - 'phpseclib\\Crypt\\DES' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/DES.php', - 'phpseclib\\Crypt\\Hash' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Hash.php', - 'phpseclib\\Crypt\\RC2' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/RC2.php', - 'phpseclib\\Crypt\\RC4' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/RC4.php', - 'phpseclib\\Crypt\\RSA' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/RSA.php', - 'phpseclib\\Crypt\\Random' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Random.php', - 'phpseclib\\Crypt\\Rijndael' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php', - 'phpseclib\\Crypt\\TripleDES' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php', - 'phpseclib\\Crypt\\Twofish' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php', - 'phpseclib\\File\\ANSI' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/ANSI.php', - 'phpseclib\\File\\ASN1' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/ASN1.php', - 'phpseclib\\File\\ASN1\\Element' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php', - 'phpseclib\\File\\X509' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/X509.php', - 'phpseclib\\Math\\BigInteger' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Math/BigInteger.php', - 'phpseclib\\Net\\SCP' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SCP.php', - 'phpseclib\\Net\\SFTP' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SFTP.php', - 'phpseclib\\Net\\SFTP\\Stream' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php', - 'phpseclib\\Net\\SSH1' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SSH1.php', - 'phpseclib\\Net\\SSH2' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SSH2.php', - 'phpseclib\\System\\SSH\\Agent' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php', - 'phpseclib\\System\\SSH\\Agent\\Identity' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php', - ); - public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInit10d22a526bd476954b93748a871e7ad4::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit10d22a526bd476954b93748a871e7ad4::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit10d22a526bd476954b93748a871e7ad4::$classMap; }, null, ClassLoader::class); } diff --git a/libraries/vdm_io/vendor/composer/installed.json b/libraries/vdm_io/vendor/composer/installed.json index 4ce92974f..d7857e90e 100644 --- a/libraries/vdm_io/vendor/composer/installed.json +++ b/libraries/vdm_io/vendor/composer/installed.json @@ -1,17 +1,17 @@ [ { "name": "phpseclib/phpseclib", - "version": "2.0.10", - "version_normalized": "2.0.10.0", + "version": "2.0.21", + "version_normalized": "2.0.21.0", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "d305b780829ea4252ed9400b3f5937c2c99b51d4" + "reference": "9f1287e68b3f283339a9f98f67515dd619e5bf9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d305b780829ea4252ed9400b3f5937c2c99b51d4", - "reference": "d305b780829ea4252ed9400b3f5937c2c99b51d4", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/9f1287e68b3f283339a9f98f67515dd619e5bf9d", + "reference": "9f1287e68b3f283339a9f98f67515dd619e5bf9d", "shasum": "" }, "require": { @@ -29,7 +29,7 @@ "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." }, - "time": "2018-02-19T04:29:13+00:00", + "time": "2019-07-12T12:53:49+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/LICENSE b/libraries/vdm_io/vendor/phpseclib/phpseclib/LICENSE index a8ec8ebd4..e7214ebbe 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/LICENSE +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/LICENSE @@ -1,5 +1,4 @@ -Copyright 2007-2016 TerraFrost and other contributors -http://phpseclib.sourceforge.net/ +Copyright (c) 2011-2019 TerraFrost and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -18,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/README.md b/libraries/vdm_io/vendor/phpseclib/phpseclib/README.md index 94402bee0..a9e7ebdab 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/README.md +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/README.md @@ -2,6 +2,14 @@ [![Build Status](https://travis-ci.org/phpseclib/phpseclib.svg?branch=2.0)](https://travis-ci.org/phpseclib/phpseclib) +## Supporting phpseclib + +- [Become a backer or sponsor on Patreon](https://www.patreon.com/phpseclib) +- [One-time donation via PayPal or crypto-currencies](http://sourceforge.net/donate/index.php?group_id=198487) +- [Subscribe to Tidelift](https://tidelift.com/subscription/pkg/packagist-phpseclib-phpseclib?utm_source=packagist-phpseclib-phpseclib&utm_medium=referral&utm_campaign=readme) + +## Introduction + MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 @@ -24,19 +32,24 @@ AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 ### 2.0 +* Long term support (LTS) release * Modernized version of 1.0 * Minimum PHP version: 5.3.3 * PSR-4 autoloading with namespace rooted at `\phpseclib` -* Install via Composer: `composer require phpseclib/phpseclib ~2.0` +* Install via Composer: `composer require phpseclib/phpseclib:~2.0` ### 1.0 * Long term support (LTS) release * PHP4 compatible * Composer compatible (PSR-0 autoloading) -* Install using Composer: `composer require phpseclib/phpseclib ~1.0` +* Install using Composer: `composer require phpseclib/phpseclib:~1.0` * Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm) -* [Download 1.0.10 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.10.zip/download) +* [Download 1.0.16 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.16.zip/download) + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. ## Support diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/appveyor.yml b/libraries/vdm_io/vendor/phpseclib/phpseclib/appveyor.yml new file mode 100644 index 000000000..210a90347 --- /dev/null +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/appveyor.yml @@ -0,0 +1,27 @@ +build: false +shallow_clone: false +platform: + - x86 + - x64 +clone_folder: C:\projects\phpseclib + +install: + - cinst -y OpenSSL.Light + - SET PATH=C:\Program Files\OpenSSL;%PATH% + - sc config wuauserv start= auto + - net start wuauserv + - cinst -y php --version 5.6.30 + - cd c:\tools\php56 + - copy php.ini-production php.ini + - echo date.timezone="UTC" >> php.ini + - echo extension_dir=ext >> php.ini + - echo extension=php_openssl.dll >> php.ini + - echo extension=php_gmp.dll >> php.ini + - cd C:\projects\phpseclib + - SET PATH=C:\tools\php56;%PATH% + - php.exe -r "readfile('http://getcomposer.org/installer');" | php.exe + - php.exe composer.phar install --prefer-source --no-interaction + +test_script: + - cd C:\projects\phpseclib + - vendor\bin\phpunit.bat tests/Windows32Test.php \ No newline at end of file diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php index 54a8997ed..03b176e7b 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php @@ -76,6 +76,10 @@ abstract class Base * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29 */ const MODE_CFB = 3; + /** + * Encrypt / decrypt using the Cipher Feedback mode (8bit) + */ + const MODE_CFB8 = 38; /** * Encrypt / decrypt using the Output Feedback mode. * @@ -479,6 +483,7 @@ abstract class Base break; case self::MODE_CTR: case self::MODE_CFB: + case self::MODE_CFB8: case self::MODE_OFB: case self::MODE_STREAM: $this->mode = $mode; @@ -644,10 +649,10 @@ abstract class Base case !function_exists('hash_algos'): case !in_array($hash, hash_algos()): $i = 1; + $hmac = new Hash(); + $hmac->setHash($hash); + $hmac->setKey($password); while (strlen($key) < $dkLen) { - $hmac = new Hash(); - $hmac->setHash($hash); - $hmac->setKey($password); $f = $u = $hmac->hash($salt . pack('N', $i++)); for ($j = 2; $j <= $count; ++$j) { $u = $hmac->hash($u); @@ -702,7 +707,7 @@ abstract class Base case self::MODE_STREAM: return openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options); case self::MODE_ECB: - $result = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options); + $result = @openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options); return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result; case self::MODE_CBC: $result = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->encryptIV); @@ -762,6 +767,16 @@ abstract class Base $iv = substr($ciphertext, -$this->block_size); } + return $ciphertext; + case self::MODE_CFB8: + $ciphertext = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->encryptIV); + if ($this->continuousBuffer) { + if (($len = strlen($ciphertext)) >= $this->block_size) { + $this->encryptIV = substr($ciphertext, -$this->block_size); + } else { + $this->encryptIV = substr($this->encryptIV, $len - $this->block_size) . substr($ciphertext, -$len); + } + } return $ciphertext; case self::MODE_OFB: return $this->_openssl_ofb_process($plaintext, $this->encryptIV, $this->enbuffer); @@ -942,6 +957,24 @@ abstract class Base $pos = $len; } break; + case self::MODE_CFB8: + $ciphertext = ''; + $len = strlen($plaintext); + $iv = $this->encryptIV; + + for ($i = 0; $i < $len; ++$i) { + $ciphertext .= ($c = $plaintext[$i] ^ $this->_encryptBlock($iv)); + $iv = substr($iv, 1) . $c; + } + + if ($this->continuousBuffer) { + if ($len >= $block_size) { + $this->encryptIV = substr($ciphertext, -$block_size); + } else { + $this->encryptIV = substr($this->encryptIV, $len - $block_size) . substr($ciphertext, -$len); + } + } + break; case self::MODE_OFB: $xor = $this->encryptIV; if (strlen($buffer['xor'])) { @@ -1007,14 +1040,14 @@ abstract class Base break; case self::MODE_ECB: if (!defined('OPENSSL_RAW_DATA')) { - $ciphertext.= openssl_encrypt('', $this->cipher_name_openssl_ecb, $this->key, true); + $ciphertext.= @openssl_encrypt('', $this->cipher_name_openssl_ecb, $this->key, true); } $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options); break; case self::MODE_CBC: if (!defined('OPENSSL_RAW_DATA')) { $padding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->block_size); - $ciphertext.= substr(openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true), 0, $this->block_size); + $ciphertext.= substr(@openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true), 0, $this->block_size); $offset = 2 * $this->block_size; } else { $offset = $this->block_size; @@ -1072,6 +1105,16 @@ abstract class Base $iv = substr($ciphertext, -$this->block_size); } break; + case self::MODE_CFB8: + $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->decryptIV); + if ($this->continuousBuffer) { + if (($len = strlen($ciphertext)) >= $this->block_size) { + $this->decryptIV = substr($ciphertext, -$this->block_size); + } else { + $this->decryptIV = substr($this->decryptIV, $len - $this->block_size) . substr($ciphertext, -$len); + } + } + break; case self::MODE_OFB: $plaintext = $this->_openssl_ofb_process($ciphertext, $this->decryptIV, $this->debuffer); } @@ -1235,6 +1278,24 @@ abstract class Base $pos = $len; } break; + case self::MODE_CFB8: + $plaintext = ''; + $len = strlen($ciphertext); + $iv = $this->decryptIV; + + for ($i = 0; $i < $len; ++$i) { + $plaintext .= $ciphertext[$i] ^ $this->_encryptBlock($iv); + $iv = substr($iv, 1) . $ciphertext[$i]; + } + + if ($this->continuousBuffer) { + if ($len >= $block_size) { + $this->decryptIV = substr($ciphertext, -$block_size); + } else { + $this->decryptIV = substr($this->decryptIV, $len - $block_size) . substr($ciphertext, -$len); + } + } + break; case self::MODE_OFB: $xor = $this->decryptIV; if (strlen($buffer['xor'])) { @@ -1297,7 +1358,7 @@ abstract class Base for ($i = 0; $i < strlen($plaintext); $i+=$block_size) { $block = substr($plaintext, $i, $block_size); if (strlen($block) > strlen($buffer['ciphertext'])) { - $result = openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options); + $result = @openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options); $result = !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result; $buffer['ciphertext'].= $result; } @@ -1308,7 +1369,7 @@ abstract class Base } else { for ($i = 0; $i < strlen($plaintext); $i+=$block_size) { $block = substr($plaintext, $i, $block_size); - $otp = openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options); + $otp = @openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options); $otp = !defined('OPENSSL_RAW_DATA') ? substr($otp, 0, -$this->block_size) : $otp; $this->_increment_str($xor); $ciphertext.= $block ^ $otp; @@ -1352,7 +1413,7 @@ abstract class Base } if ($this->continuousBuffer) { if (!defined('OPENSSL_RAW_DATA')) { - $encryptIV.= openssl_encrypt('', $this->cipher_name_openssl_ecb, $key, $this->openssl_options); + $encryptIV.= @openssl_encrypt('', $this->cipher_name_openssl_ecb, $key, $this->openssl_options); } $encryptIV = openssl_decrypt($encryptIV, $this->cipher_name_openssl_ecb, $key, $this->openssl_options); if ($overflow) { @@ -1435,6 +1496,8 @@ abstract class Base return 'ctr'; case self::MODE_CFB: return 'cfb'; + case self::MODE_CFB8: + return 'cfb8'; case self::MODE_OFB: return 'ofb'; } @@ -1788,6 +1851,7 @@ abstract class Base self::MODE_ECB => MCRYPT_MODE_ECB, self::MODE_CBC => MCRYPT_MODE_CBC, self::MODE_CFB => 'ncfb', + self::MODE_CFB8 => MCRYPT_MODE_CFB, self::MODE_OFB => MCRYPT_MODE_NOFB, self::MODE_STREAM => MCRYPT_MODE_STREAM, ); @@ -2359,6 +2423,52 @@ abstract class Base $_pos = $_len; } + return $_plaintext; + '; + break; + case self::MODE_CFB8: + $encrypt = $init_encrypt . ' + $_ciphertext = ""; + $_len = strlen($_text); + $_iv = $self->encryptIV; + + for ($_i = 0; $_i < $_len; ++$_i) { + $in = $_iv; + '.$encrypt_block.' + $_ciphertext .= ($_c = $_text[$_i] ^ $in); + $_iv = substr($_iv, 1) . $_c; + } + + if ($self->continuousBuffer) { + if ($_len >= '.$block_size.') { + $self->encryptIV = substr($_ciphertext, -'.$block_size.'); + } else { + $self->encryptIV = substr($self->encryptIV, $_len - '.$block_size.') . substr($_ciphertext, -$_len); + } + } + + return $_ciphertext; + '; + $decrypt = $init_encrypt . ' + $_plaintext = ""; + $_len = strlen($_text); + $_iv = $self->decryptIV; + + for ($_i = 0; $_i < $_len; ++$_i) { + $in = $_iv; + '.$encrypt_block.' + $_plaintext .= $_text[$_i] ^ $in; + $_iv = substr($_iv, 1) . $_text[$_i]; + } + + if ($self->continuousBuffer) { + if ($_len >= '.$block_size.') { + $self->decryptIV = substr($_text, -'.$block_size.'); + } else { + $self->decryptIV = substr($self->decryptIV, $_len - '.$block_size.') . substr($_text, -$_len); + } + } + return $_plaintext; '; break; diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php index 6ae01329e..a61668209 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php @@ -112,6 +112,15 @@ class Hash */ var $key = false; + /** + * Computed Key + * + * @see self::_computeKey() + * @var string + * @access private + */ + var $computedKey = false; + /** * Outer XOR (Internal HMAC) * @@ -130,6 +139,15 @@ class Hash */ var $ipad; + /** + * Engine + * + * @see self::setHash() + * @var string + * @access private + */ + var $engine; + /** * Default Constructor. * @@ -166,6 +184,43 @@ class Hash function setKey($key = false) { $this->key = $key; + $this->_computeKey(); + } + + /** + * Pre-compute the key used by the HMAC + * + * Quoting http://tools.ietf.org/html/rfc2104#section-2, "Applications that use keys longer than B bytes + * will first hash the key using H and then use the resultant L byte string as the actual key to HMAC." + * + * As documented in https://www.reddit.com/r/PHP/comments/9nct2l/symfonypolyfill_hash_pbkdf2_correct_fix_for/ + * when doing an HMAC multiple times it's faster to compute the hash once instead of computing it during + * every call + * + * @access private + */ + function _computeKey() + { + if ($this->key === false) { + $this->computedKey = false; + return; + } + + if (strlen($this->key) <= $this->b) { + $this->computedKey = $this->key; + return; + } + + switch ($this->engine) { + case self::MODE_MHASH: + $this->computedKey = mhash($this->hash, $this->key); + break; + case self::MODE_HASH: + $this->computedKey = hash($this->hash, $this->key, true); + break; + case self::MODE_INTERNAL: + $this->computedKey = call_user_func($this->hash, $this->key); + } } /** @@ -216,19 +271,38 @@ class Hash } switch ($hash) { + case 'md2-96': case 'md2': - $mode = CRYPT_HASH_MODE == self::MODE_HASH && in_array('md2', hash_algos()) ? + $this->b = 16; + case 'md5-96': + case 'sha1-96': + case 'sha224-96': + case 'sha256-96': + case 'md2': + case 'md5': + case 'sha1': + case 'sha224': + case 'sha256': + $this->b = 64; + break; + default: + $this->b = 128; + } + + switch ($hash) { + case 'md2': + $this->engine = CRYPT_HASH_MODE == self::MODE_HASH && in_array('md2', hash_algos()) ? self::MODE_HASH : self::MODE_INTERNAL; break; case 'sha384': case 'sha512': - $mode = CRYPT_HASH_MODE == self::MODE_MHASH ? self::MODE_INTERNAL : CRYPT_HASH_MODE; + $this->engine = CRYPT_HASH_MODE == self::MODE_MHASH ? self::MODE_INTERNAL : CRYPT_HASH_MODE; break; default: - $mode = CRYPT_HASH_MODE; + $this->engine = CRYPT_HASH_MODE; } - switch ($mode) { + switch ($this->engine) { case self::MODE_MHASH: switch ($hash) { case 'md5': @@ -241,6 +315,7 @@ class Hash default: $this->hash = MHASH_SHA1; } + $this->_computeKey(self::MODE_MHASH); return; case self::MODE_HASH: switch ($hash) { @@ -257,35 +332,33 @@ class Hash default: $this->hash = 'sha1'; } + $this->_computeKey(self::MODE_HASH); return; } switch ($hash) { case 'md2': - $this->b = 16; $this->hash = array($this, '_md2'); break; case 'md5': - $this->b = 64; $this->hash = array($this, '_md5'); break; case 'sha256': - $this->b = 64; $this->hash = array($this, '_sha256'); break; case 'sha384': case 'sha512': - $this->b = 128; $this->hash = array($this, '_sha512'); break; case 'sha1': default: - $this->b = 64; $this->hash = array($this, '_sha1'); } $this->ipad = str_repeat(chr(0x36), $this->b); $this->opad = str_repeat(chr(0x5C), $this->b); + + $this->_computeKey(self::MODE_INTERNAL); } /** @@ -297,33 +370,25 @@ class Hash */ function hash($text) { - $mode = is_array($this->hash) ? self::MODE_INTERNAL : CRYPT_HASH_MODE; - if (!empty($this->key) || is_string($this->key)) { - switch ($mode) { + switch ($this->engine) { case self::MODE_MHASH: - $output = mhash($this->hash, $text, $this->key); + $output = mhash($this->hash, $text, $this->computedKey); break; case self::MODE_HASH: - $output = hash_hmac($this->hash, $text, $this->key, true); + $output = hash_hmac($this->hash, $text, $this->computedKey, true); break; case self::MODE_INTERNAL: - /* "Applications that use keys longer than B bytes will first hash the key using H and then use the - resultant L byte string as the actual key to HMAC." - - -- http://tools.ietf.org/html/rfc2104#section-2 */ - $key = strlen($this->key) > $this->b ? call_user_func($this->hash, $this->key) : $this->key; - - $key = str_pad($key, $this->b, chr(0)); // step 1 - $temp = $this->ipad ^ $key; // step 2 - $temp .= $text; // step 3 - $temp = call_user_func($this->hash, $temp); // step 4 - $output = $this->opad ^ $key; // step 5 - $output.= $temp; // step 6 - $output = call_user_func($this->hash, $output); // step 7 + $key = str_pad($this->computedKey, $this->b, chr(0)); // step 1 + $temp = $this->ipad ^ $key; // step 2 + $temp .= $text; // step 3 + $temp = call_user_func($this->hash, $temp); // step 4 + $output = $this->opad ^ $key; // step 5 + $output.= $temp; // step 6 + $output = call_user_func($this->hash, $output); // step 7 } } else { - switch ($mode) { + switch ($this->engine) { case self::MODE_MHASH: $output = mhash($this->hash, $text); break; diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php index cd116b56d..d2c6c7cbe 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php @@ -182,6 +182,10 @@ class RSA * PKCS#8 formatted private key */ const PRIVATE_FORMAT_PKCS8 = 8; + /** + * OpenSSH formatted private key + */ + const PRIVATE_FORMAT_OPENSSH = 9; /**#@-*/ /**#@+ @@ -468,23 +472,27 @@ class RSA break; case extension_loaded('openssl') && file_exists($this->configFile): // some versions of XAMPP have mismatched versions of OpenSSL which causes it not to work - ob_start(); - @phpinfo(); - $content = ob_get_contents(); - ob_end_clean(); - - preg_match_all('#OpenSSL (Header|Library) Version(.*)#im', $content, $matches); - $versions = array(); - if (!empty($matches[1])) { - for ($i = 0; $i < count($matches[1]); $i++) { - $fullVersion = trim(str_replace('=>', '', strip_tags($matches[2][$i]))); - // Remove letter part in OpenSSL version - if (!preg_match('/(\d+\.\d+\.\d+)/i', $fullVersion, $m)) { - $versions[$matches[1][$i]] = $fullVersion; - } else { - $versions[$matches[1][$i]] = $m[0]; + // avoid generating errors (even with suppression) when phpinfo() is disabled (common in production systems) + if (strpos(ini_get('disable_functions'), 'phpinfo') === false) { + ob_start(); + @phpinfo(); + $content = ob_get_contents(); + ob_end_clean(); + + preg_match_all('#OpenSSL (Header|Library) Version(.*)#im', $content, $matches); + + if (!empty($matches[1])) { + for ($i = 0; $i < count($matches[1]); $i++) { + $fullVersion = trim(str_replace('=>', '', strip_tags($matches[2][$i]))); + + // Remove letter part in OpenSSL version + if (!preg_match('/(\d+\.\d+\.\d+)/i', $fullVersion, $m)) { + $versions[$matches[1][$i]] = $fullVersion; + } else { + $versions[$matches[1][$i]] = $m[0]; + } } } } @@ -816,6 +824,58 @@ class RSA $key.= 'Private-MAC: ' . bin2hex($hash->hash($source)) . "\r\n"; return $key; + case self::PRIVATE_FORMAT_OPENSSH: + if ($num_primes != 2) { + return false; + } + $publicKey = pack('Na*Na*Na*', strlen('ssh-rsa'), 'ssh-rsa', strlen($raw['publicExponent']), $raw['publicExponent'], strlen($raw['modulus']), $raw['modulus']); + $privateKey = pack( + 'Na*Na*Na*Na*Na*Na*Na*', + strlen('ssh-rsa'), + 'ssh-rsa', + strlen($raw['modulus']), + $raw['modulus'], + strlen($raw['publicExponent']), + $raw['publicExponent'], + strlen($raw['privateExponent']), + $raw['privateExponent'], + strlen($raw['coefficient']), + $raw['coefficient'], + strlen($raw['prime1']), + $raw['prime1'], + strlen($raw['prime2']), + $raw['prime2'] + ); + $checkint = Random::string(4); + $paddedKey = pack( + 'a*Na*', + $checkint . $checkint . $privateKey, + strlen($this->comment), + $this->comment + ); + $paddingLength = (7 * strlen($paddedKey)) % 8; + for ($i = 1; $i <= $paddingLength; $i++) { + $paddedKey.= chr($i); + } + $key = pack( + 'Na*Na*Na*NNa*Na*', + strlen('none'), + 'none', + strlen('none'), + 'none', + 0, + '', + 1, + strlen($publicKey), + $publicKey, + strlen($paddedKey), + $paddedKey + ); + $key = "openssh-key-v1\0$key"; + + return "-----BEGIN OPENSSH PRIVATE KEY-----\r\n" . + chunk_split(base64_encode($key), 70) . + "-----END OPENSSH PRIVATE KEY-----"; default: // eg. self::PRIVATE_FORMAT_PKCS1 $components = array(); foreach ($raw as $name => $value) { @@ -1016,9 +1076,9 @@ class RSA * @access private * @see self::_convertPublicKey() * @see self::_convertPrivateKey() - * @param string $key + * @param string|array $key * @param int $type - * @return array + * @return array|bool */ function _parseKey($key, $type) { @@ -1329,9 +1389,14 @@ class RSA xml_set_character_data_handler($xml, '_data_handler'); // add to account for "dangling" tags like ... that are sometimes added if (!xml_parse($xml, '' . $key . '')) { + xml_parser_free($xml); + unset($xml); return false; } + xml_parser_free($xml); + unset($xml); + return isset($this->components['modulus']) && isset($this->components['publicExponent']) ? $this->components : false; // from PuTTY's SSHPUBK.C case self::PRIVATE_FORMAT_PUTTY: @@ -1403,6 +1468,75 @@ class RSA } $components['coefficients'] = array(2 => new BigInteger($this->_string_shift($private, $length), -256)); + return $components; + case self::PRIVATE_FORMAT_OPENSSH: + $components = array(); + $decoded = $this->_extractBER($key); + $magic = $this->_string_shift($decoded, 15); + if ($magic !== "openssh-key-v1\0") { + return false; + } + $options = $this->_string_shift($decoded, 24); + // \0\0\0\4none = ciphername + // \0\0\0\4none = kdfname + // \0\0\0\0 = kdfoptions + // \0\0\0\1 = numkeys + if ($options != "\0\0\0\4none\0\0\0\4none\0\0\0\0\0\0\0\1") { + return false; + } + extract(unpack('Nlength', $this->_string_shift($decoded, 4))); + if (strlen($decoded) < $length) { + return false; + } + $publicKey = $this->_string_shift($decoded, $length); + extract(unpack('Nlength', $this->_string_shift($decoded, 4))); + if (strlen($decoded) < $length) { + return false; + } + $paddedKey = $this->_string_shift($decoded, $length); + + if ($this->_string_shift($publicKey, 11) !== "\0\0\0\7ssh-rsa") { + return false; + } + + $checkint1 = $this->_string_shift($paddedKey, 4); + $checkint2 = $this->_string_shift($paddedKey, 4); + if (strlen($checkint1) != 4 || $checkint1 !== $checkint2) { + return false; + } + + if ($this->_string_shift($paddedKey, 11) !== "\0\0\0\7ssh-rsa") { + return false; + } + + $values = array( + &$components['modulus'], + &$components['publicExponent'], + &$components['privateExponent'], + &$components['coefficients'][2], + &$components['primes'][1], + &$components['primes'][2] + ); + + foreach ($values as &$value) { + extract(unpack('Nlength', $this->_string_shift($paddedKey, 4))); + if (strlen($paddedKey) < $length) { + return false; + } + $value = new BigInteger($this->_string_shift($paddedKey, $length), -256); + } + + extract(unpack('Nlength', $this->_string_shift($paddedKey, 4))); + if (strlen($paddedKey) < $length) { + return false; + } + $components['comment'] = $this->_string_shift($decoded, $length); + + $temp = $components['primes'][1]->subtract($this->one); + $components['exponents'] = array(1 => $components['publicExponent']->modInverse($temp)); + $temp = $components['primes'][2]->subtract($this->one); + $components['exponents'][] = $components['publicExponent']->modInverse($temp); + return $components; } } @@ -1501,8 +1635,9 @@ class RSA * Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed) * * @access public - * @param string $key - * @param int $type optional + * @param string|RSA|array $key + * @param bool|int $type optional + * @return bool */ function loadKey($key, $type = false) { @@ -1559,7 +1694,8 @@ class RSA self::PRIVATE_FORMAT_PKCS1, self::PRIVATE_FORMAT_XML, self::PRIVATE_FORMAT_PUTTY, - self::PUBLIC_FORMAT_OPENSSH + self::PUBLIC_FORMAT_OPENSSH, + self::PRIVATE_FORMAT_OPENSSH ); foreach ($types as $type) { $components = $this->_parseKey($key, $type); @@ -2207,16 +2343,21 @@ class RSA */ function _equals($x, $y) { + if (function_exists('hash_equals')) { + return hash_equals($x, $y); + } + if (strlen($x) != strlen($y)) { return false; } - $result = 0; + $result = "\0"; + $x^= $y; for ($i = 0; $i < strlen($x); $i++) { - $result |= ord($x[$i]) ^ ord($y[$i]); + $result|= $x[$i]; } - return $result == 0; + return $result === "\0"; } /** @@ -2423,19 +2564,26 @@ class RSA $db = $maskedDB ^ $dbMask; $lHash2 = substr($db, 0, $this->hLen); $m = substr($db, $this->hLen); - if (!$this->_equals($lHash, $lHash2)) { - user_error('Decryption error'); - return false; + $hashesMatch = $this->_equals($lHash, $lHash2); + $leadingZeros = 1; + $patternMatch = 0; + $offset = 0; + for ($i = 0; $i < strlen($m); $i++) { + $patternMatch|= $leadingZeros & ($m[$i] === "\1"); + $leadingZeros&= $m[$i] === "\0"; + $offset+= $patternMatch ? 0 : 1; } - $m = ltrim($m, chr(0)); - if (ord($m[0]) != 1) { + + // we do & instead of && to avoid https://en.wikipedia.org/wiki/Short-circuit_evaluation + // to protect against timing attacks + if (!$hashesMatch & !$patternMatch) { user_error('Decryption error'); return false; } // Output the message M - return substr($m, 1); + return substr($m, $offset + 1); } /** diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php index 1da046e82..3aaa30900 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php @@ -244,9 +244,10 @@ class ASN1 $tag = 0; // process septets (since the eighth bit is ignored, it's not an octet) do { - $loop = ord($encoded[0]) >> 7; + $temp = ord($encoded[$encoded_pos++]); + $loop = $temp >> 7; $tag <<= 7; - $tag |= ord($encoded[$encoded_pos++]) & 0x7F; + $tag |= $temp & 0x7F; $start++; } while ($loop); } @@ -308,6 +309,9 @@ class ASN1 $remainingLength = $length; while ($remainingLength > 0) { $temp = $this->_decode_ber($content, $start, $content_pos); + if ($temp === false) { + break; + } $length = $temp['length']; // end-of-content octets - see paragraph 8.1.5 if (substr($content, $content_pos + $length, 2) == "\0\0") { @@ -359,6 +363,9 @@ class ASN1 $current['content'] = substr($content, $content_pos); } else { $temp = $this->_decode_ber($content, $start, $content_pos); + if ($temp === false) { + return false; + } $length-= (strlen($content) - $content_pos); $last = count($temp) - 1; for ($i = 0; $i < $last; $i++) { @@ -383,6 +390,9 @@ class ASN1 $length = 0; while (substr($content, $content_pos, 2) != "\0\0") { $temp = $this->_decode_ber($content, $length + $start, $content_pos); + if ($temp === false) { + return false; + } $content_pos += $temp['length']; // all subtags should be octet strings //if ($temp['type'] != self::TYPE_OCTET_STRING) { @@ -415,30 +425,16 @@ class ASN1 break 2; } $temp = $this->_decode_ber($content, $start + $offset, $content_pos); + if ($temp === false) { + return false; + } $content_pos += $temp['length']; $current['content'][] = $temp; $offset+= $temp['length']; } break; case self::TYPE_OBJECT_IDENTIFIER: - $temp = ord($content[$content_pos++]); - $current['content'] = sprintf('%d.%d', floor($temp / 40), $temp % 40); - $valuen = 0; - // process septets - $content_len = strlen($content); - while ($content_pos < $content_len) { - $temp = ord($content[$content_pos++]); - $valuen <<= 7; - $valuen |= $temp & 0x7F; - if (~$temp & 0x80) { - $current['content'].= ".$valuen"; - $valuen = 0; - } - } - // the eighth bit of the last byte should not be 1 - //if ($temp >> 7) { - // return false; - //} + $current['content'] = $this->_decodeOID(substr($content, $content_pos)); break; /* Each character string type shall be encoded as if it had been declared: [UNIVERSAL x] IMPLICIT OCTET STRING @@ -582,7 +578,7 @@ class ASN1 $childClass = $tempClass = self::CLASS_UNIVERSAL; $constant = null; if (isset($temp['constant'])) { - $tempClass = isset($temp['class']) ? $temp['class'] : self::CLASS_CONTEXT_SPECIFIC; + $tempClass = $temp['type']; } if (isset($child['class'])) { $childClass = $child['class']; @@ -645,7 +641,7 @@ class ASN1 $temp = $decoded['content'][$i]; $tempClass = self::CLASS_UNIVERSAL; if (isset($temp['constant'])) { - $tempClass = isset($temp['class']) ? $temp['class'] : self::CLASS_CONTEXT_SPECIFIC; + $tempClass = $temp['type']; } foreach ($mapping['children'] as $key => $child) { @@ -1001,27 +997,7 @@ class ASN1 $value = base64_decode($source); break; case self::TYPE_OBJECT_IDENTIFIER: - $oid = preg_match('#(?:\d+\.)+#', $source) ? $source : array_search($source, $this->oids); - if ($oid === false) { - user_error('Invalid OID'); - return false; - } - $value = ''; - $parts = explode('.', $oid); - $value = chr(40 * $parts[0] + $parts[1]); - for ($i = 2; $i < count($parts); $i++) { - $temp = ''; - if (!$parts[$i]) { - $temp = "\0"; - } else { - while ($parts[$i]) { - $temp = chr(0x80 | ($parts[$i] & 0x7F)) . $temp; - $parts[$i] >>= 7; - } - $temp[strlen($temp) - 1] = $temp[strlen($temp) - 1] & chr(0x7F); - } - $value.= $temp; - } + $value = $this->_encodeOID($source); break; case self::TYPE_ANY: $loc = $this->location; @@ -1120,6 +1096,108 @@ class ASN1 return pack('Ca*', 0x80 | strlen($temp), $temp); } + /** + * BER-decode the OID + * + * Called by _decode_ber() + * + * @access private + * @param string $content + * @return string + */ + function _decodeOID($content) + { + static $eighty; + if (!$eighty) { + $eighty = new BigInteger(80); + } + + $oid = array(); + $pos = 0; + $len = strlen($content); + $n = new BigInteger(); + while ($pos < $len) { + $temp = ord($content[$pos++]); + $n = $n->bitwise_leftShift(7); + $n = $n->bitwise_or(new BigInteger($temp & 0x7F)); + if (~$temp & 0x80) { + $oid[] = $n; + $n = new BigInteger(); + } + } + $part1 = array_shift($oid); + $first = floor(ord($content[0]) / 40); + /* + "This packing of the first two object identifier components recognizes that only three values are allocated from the root + node, and at most 39 subsequent values from nodes reached by X = 0 and X = 1." + + -- https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#page=22 + */ + if ($first <= 2) { // ie. 0 <= ord($content[0]) < 120 (0x78) + array_unshift($oid, ord($content[0]) % 40); + array_unshift($oid, $first); + } else { + array_unshift($oid, $part1->subtract($eighty)); + array_unshift($oid, 2); + } + + return implode('.', $oid); + } + + /** + * DER-encode the OID + * + * Called by _encode_der() + * + * @access private + * @param string $content + * @return string + */ + function _encodeOID($source) + { + static $mask, $zero, $forty; + if (!$mask) { + $mask = new BigInteger(0x7F); + $zero = new BigInteger(); + $forty = new BigInteger(40); + } + + $oid = preg_match('#(?:\d+\.)+#', $source) ? $source : array_search($source, $this->oids); + if ($oid === false) { + user_error('Invalid OID'); + return false; + } + $parts = explode('.', $oid); + $part1 = array_shift($parts); + $part2 = array_shift($parts); + + $first = new BigInteger($part1); + $first = $first->multiply($forty); + $first = $first->add(new BigInteger($part2)); + + array_unshift($parts, $first->toString()); + + $value = ''; + foreach ($parts as $part) { + if (!$part) { + $temp = "\0"; + } else { + $temp = ''; + $part = new BigInteger($part); + while (!$part->equals($zero)) { + $submask = $part->bitwise_and($mask); + $submask->setPrecision(8); + $temp = (chr(0x80) | $submask->toBytes()) . $temp; + $part = $part->bitwise_rightShift(7); + } + $temp[strlen($temp) - 1] = $temp[strlen($temp) - 1] & chr(0x7F); + } + $value.= $temp; + } + + return $value; + } + /** * BER-decode the time * diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/X509.php index 67317db23..4ebafa171 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/X509.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/File/X509.php @@ -305,6 +305,22 @@ class X509 */ var $challenge; + /** + * Recursion Limit + * + * @var int + * @access private + */ + static $recur_limit = 5; + + /** + * URL fetch flag + * + * @var bool + * @access private + */ + static $disable_url_fetch = false; + /** * Default Constructor. * @@ -1912,6 +1928,9 @@ class X509 // "Certificate Transparency" // https://tools.ietf.org/html/rfc6962 case '1.3.6.1.4.1.11129.2.4.2': + // "Qualified Certificate statements" + // https://tools.ietf.org/html/rfc3739#section-3.2.6 + case '1.3.6.1.5.5.7.1.3': return true; // CSR attributes @@ -2076,7 +2095,7 @@ class X509 * * If $date isn't defined it is assumed to be the current date. * - * @param int $date optional + * @param \DateTime|string $date optional * @access public */ function validateDate($date = null) @@ -2086,7 +2105,7 @@ class X509 } if (!isset($date)) { - $date = new DateTime($date, new DateTimeZone(@date_default_timezone_get())); + $date = new DateTime(null, new DateTimeZone(@date_default_timezone_get())); } $notBefore = $this->currentCert['tbsCertificate']['validity']['notBefore']; @@ -2095,15 +2114,133 @@ class X509 $notAfter = $this->currentCert['tbsCertificate']['validity']['notAfter']; $notAfter = isset($notAfter['generalTime']) ? $notAfter['generalTime'] : $notAfter['utcTime']; + if (is_string($date)) { + $date = new DateTime($date, new DateTimeZone(@date_default_timezone_get())); + } + + $notBefore = new DateTime($notBefore, new DateTimeZone(@date_default_timezone_get())); + $notAfter = new DateTime($notAfter, new DateTimeZone(@date_default_timezone_get())); + switch (true) { - case $date < new DateTime($notBefore, new DateTimeZone(@date_default_timezone_get())): - case $date > new DateTime($notAfter, new DateTimeZone(@date_default_timezone_get())): + case $date < $notBefore: + case $date > $notAfter: return false; } return true; } + /** + * Fetches a URL + * + * @param string $url + * @access private + * @return bool|string + */ + static function _fetchURL($url) + { + if (self::$disable_url_fetch) { + return false; + } + + $parts = parse_url($url); + $data = ''; + switch ($parts['scheme']) { + case 'http': + $fsock = @fsockopen($parts['host'], isset($parts['port']) ? $parts['port'] : 80); + if (!$fsock) { + return false; + } + fputs($fsock, "GET $parts[path] HTTP/1.0\r\n"); + fputs($fsock, "Host: $parts[host]\r\n\r\n"); + $line = fgets($fsock, 1024); + if (strlen($line) < 3) { + return false; + } + preg_match('#HTTP/1.\d (\d{3})#', $line, $temp); + if ($temp[1] != '200') { + return false; + } + + // skip the rest of the headers in the http response + while (!feof($fsock) && fgets($fsock, 1024) != "\r\n") { + } + + while (!feof($fsock)) { + $data.= fread($fsock, 1024); + } + + break; + //case 'ftp': + //case 'ldap': + //default: + } + + return $data; + } + + /** + * Validates an intermediate cert as identified via authority info access extension + * + * See https://tools.ietf.org/html/rfc4325 for more info + * + * @param bool $caonly + * @param int $count + * @access private + * @return bool + */ + function _testForIntermediate($caonly, $count) + { + $opts = $this->getExtension('id-pe-authorityInfoAccess'); + if (!is_array($opts)) { + return false; + } + foreach ($opts as $opt) { + if ($opt['accessMethod'] == 'id-ad-caIssuers') { + // accessLocation is a GeneralName. GeneralName fields support stuff like email addresses, IP addresses, LDAP, + // etc, but we're only supporting URI's. URI's and LDAP are the only thing https://tools.ietf.org/html/rfc4325 + // discusses + if (isset($opt['accessLocation']['uniformResourceIdentifier'])) { + $url = $opt['accessLocation']['uniformResourceIdentifier']; + break; + } + } + } + + if (!isset($url)) { + return false; + } + + $cert = static::_fetchURL($url); + if (!is_string($cert)) { + return false; + } + + $parent = new static(); + $parent->CAs = $this->CAs; + /* + "Conforming applications that support HTTP or FTP for accessing + certificates MUST be able to accept .cer files and SHOULD be able + to accept .p7c files." -- https://tools.ietf.org/html/rfc4325 + + A .p7c file is 'a "certs-only" CMS message as specified in RFC 2797" + + These are currently unsupported + */ + if (!is_array($parent->loadX509($cert))) { + return false; + } + + if (!$parent->_validateSignatureCountable($caonly, ++$count)) { + return false; + } + + $this->CAs[] = $parent->currentCert; + //$this->loadCA($cert); + + return true; + } + /** * Validate a signature * @@ -2120,11 +2257,30 @@ class X509 * @return mixed */ function validateSignature($caonly = true) + { + return $this->_validateSignatureCountable($caonly, 0); + } + + /** + * Validate a signature + * + * Performs said validation whilst keeping track of how many times validation method is called + * + * @param bool $caonly + * @param int $count + * @access private + * @return mixed + */ + function _validateSignatureCountable($caonly, $count) { if (!is_array($this->currentCert) || !isset($this->signatureSubject)) { return null; } + if ($count == self::$recur_limit) { + return false; + } + /* TODO: "emailAddress attribute values are not case-sensitive (e.g., "subscriber@example.com" is the same as "SUBSCRIBER@EXAMPLE.COM")." -- http://tools.ietf.org/html/rfc5280#section-4.1.2.6 @@ -2170,10 +2326,10 @@ class X509 } } if (count($this->CAs) == $i && $caonly) { - return false; + return $this->_testForIntermediate($caonly, $count) && $this->validateSignature($caonly); } } elseif (!isset($signingCert) || $caonly) { - return false; + return $this->_testForIntermediate($caonly, $count) && $this->validateSignature($caonly); } return $this->_validateSignature( $signingCert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']['algorithm'], @@ -2280,6 +2436,41 @@ class X509 return true; } + /** + * Sets the recursion limit + * + * When validating a signature it may be necessary to download intermediate certs from URI's. + * An intermediate cert that linked to itself would result in an infinite loop so to prevent + * that we set a recursion limit. A negative number means that there is no recursion limit. + * + * @param int $count + * @access public + */ + static function setRecurLimit($count) + { + self::$recur_limit = $count; + } + + /** + * Prevents URIs from being automatically retrieved + * + * @access public + */ + static function disableURLFetch() + { + self::$disable_url_fetch = true; + } + + /** + * Allows URIs to be automatically retrieved + * + * @access public + */ + static function enableURLFetch() + { + self::$disable_url_fetch = false; + } + /** * Reformat public keys * @@ -2739,7 +2930,7 @@ class X509 } $output.= $desc . '=' . $value; $result[$desc] = isset($result[$desc]) ? - array_merge((array) $dn[$prop], array($value)) : + array_merge((array) $result[$desc], array($value)) : $value; $start = false; } @@ -3447,7 +3638,7 @@ class X509 'tbsCertificate' => array( 'version' => 'v3', - 'serialNumber' => $serialNumber, // $this->setserialNumber() + 'serialNumber' => $serialNumber, // $this->setSerialNumber() 'signature' => array('algorithm' => $signatureAlgorithm), 'issuer' => false, // this is going to be overwritten later 'validity' => array( diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php index 2aa39a50a..fe1f43c58 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php @@ -45,7 +45,6 @@ * @author Jim Wigginton * @copyright 2006 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @link http://pear.php.net/package/Math_BigInteger */ namespace phpseclib\Math; @@ -266,23 +265,27 @@ class BigInteger if (extension_loaded('openssl') && !defined('MATH_BIGINTEGER_OPENSSL_DISABLE') && !defined('MATH_BIGINTEGER_OPENSSL_ENABLED')) { // some versions of XAMPP have mismatched versions of OpenSSL which causes it not to work - ob_start(); - @phpinfo(); - $content = ob_get_contents(); - ob_end_clean(); - - preg_match_all('#OpenSSL (Header|Library) Version(.*)#im', $content, $matches); - $versions = array(); - if (!empty($matches[1])) { - for ($i = 0; $i < count($matches[1]); $i++) { - $fullVersion = trim(str_replace('=>', '', strip_tags($matches[2][$i]))); - // Remove letter part in OpenSSL version - if (!preg_match('/(\d+\.\d+\.\d+)/i', $fullVersion, $m)) { - $versions[$matches[1][$i]] = $fullVersion; - } else { - $versions[$matches[1][$i]] = $m[0]; + // avoid generating errors (even with suppression) when phpinfo() is disabled (common in production systems) + if (strpos(ini_get('disable_functions'), 'phpinfo') === false) { + ob_start(); + @phpinfo(); + $content = ob_get_contents(); + ob_end_clean(); + + preg_match_all('#OpenSSL (Header|Library) Version(.*)#im', $content, $matches); + + if (!empty($matches[1])) { + for ($i = 0; $i < count($matches[1]); $i++) { + $fullVersion = trim(str_replace('=>', '', strip_tags($matches[2][$i]))); + + // Remove letter part in OpenSSL version + if (!preg_match('/(\d+\.\d+\.\d+)/i', $fullVersion, $m)) { + $versions[$matches[1][$i]] = $fullVersion; + } else { + $versions[$matches[1][$i]] = $m[0]; + } } } } @@ -442,6 +445,9 @@ class BigInteger // (?<=^|-)0*: find any 0's that are preceded by the start of the string or by a - (ie. octals) // [^-0-9].*: find any non-numeric characters and then any characters that follow that $x = preg_replace('#(?add(new static(1)) : $this->copy(); $bytes = $temp->toBytes(); - if (empty($bytes)) { // eg. if the number we're trying to convert is -1 + if (!strlen($bytes)) { // eg. if the number we're trying to convert is -1 $bytes = chr(0); } @@ -1555,7 +1561,9 @@ class BigInteger $temp_value = array($quotient_value[$q_index]); $temp = $temp->multiply($y); $temp_value = &$temp->value; - $temp_value = array_merge($adjust, $temp_value); + if (count($temp_value)) { + $temp_value = array_merge($adjust, $temp_value); + } $x = $x->subtract($temp); @@ -2688,7 +2696,14 @@ class BigInteger { switch (MATH_BIGINTEGER_MODE) { case self::MODE_GMP: - return gmp_cmp($this->value, $y->value); + $r = gmp_cmp($this->value, $y->value); + if ($r < -1) { + $r = -1; + } + if ($r > 1) { + $r = 1; + } + return $r; case self::MODE_BCMATH: return bccomp($this->value, $y->value, 0); } @@ -3569,6 +3584,7 @@ class BigInteger $value = &$result->value; if (!count($value)) { + $result->is_negative = false; return $result; } diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php index f95bce6df..cf13496cd 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php @@ -144,6 +144,11 @@ class SCP return false; } + if (empty($remote_file)) { + user_error('remote_file cannot be blank', E_USER_NOTICE); + return false; + } + if (!$this->ssh->exec('scp -t ' . escapeshellarg($remote_file), false)) { // -t = to return false; } diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php index 8825f30cf..a248c2581 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php @@ -109,11 +109,11 @@ class SFTP extends SSH2 * The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support * concurrent actions, so it's somewhat academic, here. * - * @var int + * @var boolean * @see self::_send_sftp_packet() * @access private */ - var $request_id = false; + var $use_request_id = false; /** * The Packet Type @@ -250,6 +250,15 @@ class SFTP extends SSH2 */ var $canonicalize_paths = true; + /** + * Request Buffers + * + * @see self::_get_sftp_packet() + * @var array + * @access private + */ + var $requestBuffer = array(); + /** * Default Constructor. * @@ -519,7 +528,7 @@ class SFTP extends SSH2 } */ - $this->request_id = 1; + $this->use_request_id = true; /* A Note on SFTPv4/5/6 support: @@ -833,6 +842,7 @@ class SFTP extends SSH2 } if (is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $value)))) { $temp = $this->_nlist_helper($dir . '/' . $value, true, $relativeDir . $value . '/'); + $temp = is_array($temp) ? $temp : array(); $result = array_merge($result, $temp); } else { $result[] = $relativeDir . $value; @@ -864,7 +874,17 @@ class SFTP extends SSH2 unset($files[$key]); continue; } - if ($key != '.' && $key != '..' && is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $key)))) { + $is_directory = false; + if ($key != '.' && $key != '..') { + if ($this->use_stat_cache) { + $is_directory = is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $key))); + } else { + $stat = $this->lstat($dir . '/' . $key); + $is_directory = $stat && $stat['type'] === NET_SFTP_TYPE_DIRECTORY; + } + } + + if ($is_directory) { $depth++; $files[$key] = $this->rawlist($dir . '/' . $key, true); $depth--; @@ -2128,10 +2148,11 @@ class SFTP extends SSH2 * @param string $local_file * @param int $offset * @param int $length + * @param callable|null $progressCallback * @return mixed * @access public */ - function get($remote_file, $local_file = false, $offset = 0, $length = -1) + function get($remote_file, $local_file = false, $offset = 0, $length = -1, $progressCallback = null) { if (!($this->bitmap & SSH2::MASK_LOGIN)) { return false; @@ -2189,7 +2210,7 @@ class SFTP extends SSH2 $packet_size = $length > 0 ? min($this->max_sftp_packet, $length - $read) : $this->max_sftp_packet; $packet = pack('Na*N3', strlen($handle), $handle, $tempoffset / 4294967296, $tempoffset, $packet_size); - if (!$this->_send_sftp_packet(NET_SFTP_READ, $packet)) { + if (!$this->_send_sftp_packet(NET_SFTP_READ, $packet, $i)) { if ($fclose_check) { fclose($fp); } @@ -2197,6 +2218,9 @@ class SFTP extends SSH2 } $packet = null; $read+= $packet_size; + if (is_callable($progressCallback)) { + call_user_func($progressCallback, $read); + } $i++; } @@ -2204,15 +2228,17 @@ class SFTP extends SSH2 break; } + $packets_sent = $i - 1; + $clear_responses = false; while ($i > 0) { $i--; if ($clear_responses) { - $this->_get_sftp_packet(); + $this->_get_sftp_packet($packets_sent - $i); continue; } else { - $response = $this->_get_sftp_packet(); + $response = $this->_get_sftp_packet($packets_sent - $i); } switch ($this->packet_type) { @@ -2921,10 +2947,10 @@ class SFTP extends SSH2 * @return bool * @access private */ - function _send_sftp_packet($type, $data) + function _send_sftp_packet($type, $data, $request_id = 1) { - $packet = $this->request_id !== false ? - pack('NCNa*', strlen($data) + 5, $type, $this->request_id, $data) : + $packet = $this->use_request_id ? + pack('NCNa*', strlen($data) + 5, $type, $request_id, $data) : pack('NCa*', strlen($data) + 1, $type, $data); $start = strtok(microtime(), ' ') + strtok(''); // http://php.net/microtime#61838 @@ -2962,9 +2988,18 @@ class SFTP extends SSH2 * @return string * @access private */ - function _get_sftp_packet() + function _get_sftp_packet($request_id = null) { - $this->curTimeout = false; + if (isset($request_id) && isset($this->requestBuffer[$request_id])) { + $this->packet_type = $this->requestBuffer[$request_id]['packet_type']; + $temp = $this->requestBuffer[$request_id]['packet']; + unset($this->requestBuffer[$request_id]); + return $temp; + } + + // in SSH2.php the timeout is cumulative per function call. eg. exec() will + // timeout after 10s. but for SFTP.php it's cumulative per packet + $this->curTimeout = $this->timeout; $start = strtok(microtime(), ' ') + strtok(''); // http://php.net/microtime#61838 @@ -2985,6 +3020,13 @@ class SFTP extends SSH2 $tempLength = $length; $tempLength-= strlen($this->packet_buffer); + + // 256 * 1024 is what SFTP_MAX_MSG_LENGTH is set to in OpenSSH's sftp-common.h + if ($tempLength > 256 * 1024) { + user_error('Invalid SFTP packet size'); + return false; + } + // SFTP packet type and data payload while ($tempLength > 0) { $temp = $this->_get_channel_packet(self::CHANNEL, true); @@ -3001,8 +3043,8 @@ class SFTP extends SSH2 $this->packet_type = ord($this->_string_shift($this->packet_buffer)); - if ($this->request_id !== false) { - $this->_string_shift($this->packet_buffer, 4); // remove the request id + if ($this->use_request_id) { + extract(unpack('Npacket_id', $this->_string_shift($this->packet_buffer, 4))); // remove the request id $length-= 5; // account for the request id and the packet type } else { $length-= 1; // account for the packet type @@ -3025,6 +3067,14 @@ class SFTP extends SSH2 } } + if (isset($request_id) && $this->use_request_id && $packet_id != $request_id) { + $this->requestBuffer[$packet_id] = array( + 'packet_type' => $this->packet_type, + 'packet' => $packet + ); + return $this->_get_sftp_packet($request_id); + } + return $packet; } diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php index cdb7cb39e..817fa165e 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php @@ -104,6 +104,7 @@ class SSH2 const CHANNEL_SHELL = 2; const CHANNEL_SUBSYSTEM = 3; const CHANNEL_AGENT_FORWARD = 4; + const CHANNEL_KEEP_ALIVE = 5; /**#@-*/ /**#@+ @@ -145,7 +146,10 @@ class SSH2 */ const READ_REGEX = 2; /** - * Returns when a string matching the regular expression $expect is found + * Returns whenever a data packet is received. + * + * Some data packets may only contain a single character so it may be necessary + * to call read() multiple times when using this option */ const READ_NEXT = 3; /**#@-*/ @@ -918,6 +922,22 @@ class SSH2 */ var $binary_packet_buffer = false; + /** + * Preferred Signature Format + * + * @var string|false + * @access private + */ + var $preferred_signature_format = false; + + /** + * Authentication Credentials + * + * @var array + * @access private + */ + var $auth = array(); + /** * Default Constructor. * @@ -1124,11 +1144,12 @@ class SSH2 } $elapsed = microtime(true) - $start; - $this->curTimeout-= $elapsed; - - if ($this->curTimeout <= 0) { - $this->is_timeout = true; - return false; + if ($this->curTimeout) { + $this->curTimeout-= $elapsed; + if ($this->curTimeout < 0) { + $this->is_timeout = true; + return false; + } } } @@ -1193,6 +1214,7 @@ class SSH2 } if (feof($this->fsock)) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -1206,7 +1228,7 @@ class SSH2 $this->server_identifier = trim($temp, "\r\n"); if (strlen($extra)) { - $this->errors[] = utf8_decode($data); + $this->errors[] = $data; } if (version_compare($matches[3], '1.99', '<')) { @@ -1221,6 +1243,7 @@ class SSH2 if (!$this->send_kex_first) { $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -1309,6 +1332,8 @@ class SSH2 } $server_host_key_algorithms = array( + 'rsa-sha2-256', // RFC 8332 + 'rsa-sha2-512', // RFC 8332 'ssh-rsa', // RECOMMENDED sign Raw RSA Key 'ssh-dss' // REQUIRED sign Raw DSS Key ); @@ -1459,6 +1484,7 @@ class SSH2 $kexinit_payload_server = $this->_get_binary_packet(); if ($kexinit_payload_server === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -1595,6 +1621,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -1687,12 +1714,14 @@ class SSH2 $data = pack('CNa*', $clientKexInitMessage, strlen($eBytes), $eBytes); if (!$this->_send_binary_packet($data)) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -1782,9 +1811,25 @@ class SSH2 return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); } - if ($public_key_format != $server_host_key_algorithm || $this->signature_format != $server_host_key_algorithm) { - user_error('Server Host Key Algorithm Mismatch'); - return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); + switch ($server_host_key_algorithm) { + case 'ssh-dss': + $expected_key_format = 'ssh-dss'; + break; + //case 'rsa-sha2-256': + //case 'rsa-sha2-512': + //case 'ssh-rsa': + default: + $expected_key_format = 'ssh-rsa'; + } + + if ($public_key_format != $expected_key_format || $this->signature_format != $server_host_key_algorithm) { + switch (true) { + case $this->signature_format == $server_host_key_algorithm: + case $server_host_key_algorithm != 'rsa-sha2-256' && $server_host_key_algorithm != 'rsa-sha2-512': + case $this->signature_format != 'ssh-rsa': + user_error('Server Host Key Algorithm Mismatch'); + return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); + } } $packet = pack( @@ -1799,6 +1844,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -1820,7 +1866,7 @@ class SSH2 $this->encrypt = $this->_encryption_algorithm_to_crypt_instance($encrypt); if ($this->encrypt) { if ($this->crypto_engine) { - $this->encrypt->setEngine($this->crypto_engine); + $this->encrypt->setPreferredEngine($this->crypto_engine); } if ($this->encrypt->block_size) { $this->encrypt_block_size = $this->encrypt->block_size; @@ -1844,7 +1890,7 @@ class SSH2 $this->decrypt = $this->_encryption_algorithm_to_crypt_instance($decrypt); if ($this->decrypt) { if ($this->crypto_engine) { - $this->decrypt->setEngine($this->crypto_engine); + $this->decrypt->setPreferredEngine($this->crypto_engine); } if ($this->decrypt->block_size) { $this->decrypt_block_size = $this->decrypt->block_size; @@ -2095,6 +2141,7 @@ class SSH2 function login($username) { $args = func_get_args(); + $this->auth[] = $args; return call_user_func_array(array(&$this, '_login'), $args); } @@ -2166,6 +2213,7 @@ class SSH2 } return $this->_login_helper($username, $password); } + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2218,6 +2266,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2276,6 +2325,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2294,7 +2344,7 @@ class SSH2 return false; } extract(unpack('Nlength', $this->_string_shift($response, 4))); - $this->errors[] = 'SSH_MSG_USERAUTH_PASSWD_CHANGEREQ: ' . utf8_decode($this->_string_shift($response, $length)); + $this->errors[] = 'SSH_MSG_USERAUTH_PASSWD_CHANGEREQ: ' . $this->_string_shift($response, $length); return $this->_disconnect(NET_SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER); case NET_SSH2_MSG_USERAUTH_FAILURE: // can we use keyboard-interactive authentication? if not then either the login is bad or the server employees @@ -2376,6 +2426,7 @@ class SSH2 } else { $orig = $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2545,6 +2596,21 @@ class SSH2 $publickey['n'] ); + switch ($this->signature_format) { + case 'rsa-sha2-512': + $hash = 'sha512'; + $signatureType = 'rsa-sha2-512'; + break; + case 'rsa-sha2-256': + $hash = 'sha256'; + $signatureType = 'rsa-sha2-256'; + break; + //case 'ssh-rsa': + default: + $hash = 'sha1'; + $signatureType = 'ssh-rsa'; + } + $part1 = pack( 'CNa*Na*Na*', NET_SSH2_MSG_USERAUTH_REQUEST, @@ -2555,7 +2621,7 @@ class SSH2 strlen('publickey'), 'publickey' ); - $part2 = pack('Na*Na*', strlen('ssh-rsa'), 'ssh-rsa', strlen($publickey), $publickey); + $part2 = pack('Na*Na*', strlen($signatureType), $signatureType, strlen($publickey), $publickey); $packet = $part1 . chr(0) . $part2; if (!$this->_send_binary_packet($packet)) { @@ -2564,6 +2630,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2595,8 +2662,9 @@ class SSH2 $packet = $part1 . chr(1) . $part2; $privatekey->setSignatureMode(RSA::SIGNATURE_PKCS1); + $privatekey->setHash($hash); $signature = $privatekey->sign(pack('Na*a*', strlen($this->session_id), $this->session_id, $packet)); - $signature = pack('Na*Na*', strlen('ssh-rsa'), 'ssh-rsa', strlen($signature), $signature); + $signature = pack('Na*Na*', strlen($signatureType), $signatureType, strlen($signature), $signature); $packet.= pack('Na*', strlen($signature), $signature); if (!$this->_send_binary_packet($packet)) { @@ -2605,6 +2673,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2731,6 +2800,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -2870,6 +2940,7 @@ class SSH2 $response = $this->_get_binary_packet(); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -3184,6 +3255,66 @@ class SSH2 return (bool) ($this->bitmap & self::MASK_LOGIN); } + /** + * Pings a server connection, or tries to reconnect if the connection has gone down + * + * Inspired by http://php.net/manual/en/mysqli.ping.php + * + * @return bool + * @access public + */ + function ping() + { + if (!$this->isAuthenticated()) { + return false; + } + + $this->window_size_server_to_client[self::CHANNEL_KEEP_ALIVE] = $this->window_size; + $packet_size = 0x4000; + $packet = pack( + 'CNa*N3', + NET_SSH2_MSG_CHANNEL_OPEN, + strlen('session'), + 'session', + self::CHANNEL_KEEP_ALIVE, + $this->window_size_server_to_client[self::CHANNEL_KEEP_ALIVE], + $packet_size + ); + + if (!@$this->_send_binary_packet($packet)) { + return $this->_reconnect(); + } + + $this->channel_status[self::CHANNEL_KEEP_ALIVE] = NET_SSH2_MSG_CHANNEL_OPEN; + + $response = @$this->_get_channel_packet(self::CHANNEL_KEEP_ALIVE); + if ($response !== false) { + $this->_close_channel(self::CHANNEL_KEEP_ALIVE); + return true; + } + + return $this->_reconnect(); + } + + /** + * In situ reconnect method + * + * @return boolean + * @access private + */ + function _reconnect() + { + $this->_reset_connection(NET_SSH2_DISCONNECT_CONNECTION_LOST); + $this->retry_connect = true; + if (!$this->_connect()) { + return false; + } + foreach ($this->auth as $auth) { + $result = call_user_func_array(array(&$this, 'login'), $auth); + } + return $result; + } + /** * Resets a connection for re-use * @@ -3214,8 +3345,8 @@ class SSH2 function _get_binary_packet($skip_channel_filter = false) { if (!is_resource($this->fsock) || feof($this->fsock)) { - user_error('Connection closed prematurely'); $this->bitmap = 0; + user_error('Connection closed prematurely'); return false; } @@ -3258,8 +3389,8 @@ class SSH2 while ($remaining_length > 0) { $temp = stream_get_contents($this->fsock, $remaining_length); if ($temp === false || feof($this->fsock)) { - user_error('Error reading from socket'); $this->bitmap = 0; + user_error('Error reading from socket'); return false; } $buffer.= $temp; @@ -3277,8 +3408,8 @@ class SSH2 if ($this->hmac_check !== false) { $hmac = stream_get_contents($this->fsock, $this->hmac_size); if ($hmac === false || strlen($hmac) != $this->hmac_size) { - user_error('Error reading socket'); $this->bitmap = 0; + user_error('Error reading socket'); return false; } elseif ($hmac != $this->hmac_check->hash(pack('NNCa*', $this->get_seq_no, $packet_length, $padding_length, $payload . $padding))) { user_error('Invalid HMAC'); @@ -3322,7 +3453,7 @@ class SSH2 return false; } extract(unpack('Nreason_code/Nlength', $this->_string_shift($payload, 8))); - $this->errors[] = 'SSH_MSG_DISCONNECT: ' . $this->disconnect_reasons[$reason_code] . "\r\n" . utf8_decode($this->_string_shift($payload, $length)); + $this->errors[] = 'SSH_MSG_DISCONNECT: ' . $this->disconnect_reasons[$reason_code] . "\r\n" . $this->_string_shift($payload, $length); $this->bitmap = 0; return false; case NET_SSH2_MSG_IGNORE: @@ -3334,7 +3465,7 @@ class SSH2 return false; } extract(unpack('Nlength', $this->_string_shift($payload, 4))); - $this->errors[] = 'SSH_MSG_DEBUG: ' . utf8_decode($this->_string_shift($payload, $length)); + $this->errors[] = 'SSH_MSG_DEBUG: ' . $this->_string_shift($payload, $length); $payload = $this->_get_binary_packet($skip_channel_filter); break; case NET_SSH2_MSG_UNIMPLEMENTED: @@ -3357,7 +3488,7 @@ class SSH2 return false; } extract(unpack('Nlength', $this->_string_shift($payload, 4))); - $this->banner_message = utf8_decode($this->_string_shift($payload, $length)); + $this->banner_message = $this->_string_shift($payload, $length); $payload = $this->_get_binary_packet(); } @@ -3561,7 +3692,12 @@ class SSH2 $response = $this->binary_packet_buffer; $this->binary_packet_buffer = false; } else { - if ($this->curTimeout) { + $read = array($this->fsock); + $write = $except = null; + + if (!$this->curTimeout) { + @stream_select($read, $write, $except, null); + } else { if ($this->curTimeout < 0) { $this->is_timeout = true; return true; @@ -3576,6 +3712,9 @@ class SSH2 // on windows this returns a "Warning: Invalid CRT parameters detected" error if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) { $this->is_timeout = true; + if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) { + $this->_close_channel($client_channel); + } return true; } $elapsed = microtime(true) - $start; @@ -3584,6 +3723,7 @@ class SSH2 $response = $this->_get_binary_packet(true); if ($response === false) { + $this->bitmap = 0; user_error('Connection closed by server'); return false; } @@ -3592,10 +3732,6 @@ class SSH2 if ($client_channel == -1 && $response === true) { return true; } - if (!strlen($response)) { - return ''; - } - if (!strlen($response)) { return false; } @@ -3626,7 +3762,7 @@ class SSH2 switch ($type) { case NET_SSH2_MSG_CHANNEL_EXTENDED_DATA: /* - if ($client_channel == NET_SSH2_CHANNEL_EXEC) { + if ($client_channel == self::CHANNEL_EXEC) { $this->_send_channel_packet($client_channel, chr(0)); } */ @@ -3818,8 +3954,8 @@ class SSH2 function _send_binary_packet($data, $logged = null) { if (!is_resource($this->fsock) || feof($this->fsock)) { - user_error('Connection closed prematurely'); $this->bitmap = 0; + user_error('Connection closed prematurely'); return false; } @@ -4480,6 +4616,8 @@ class SSH2 break; case 'ssh-rsa': + case 'rsa-sha2-256': + case 'rsa-sha2-512': if (strlen($server_public_host_key) < 4) { return false; } @@ -4502,8 +4640,21 @@ class SSH2 $signature = $this->_string_shift($signature, $temp['length']); $rsa = new RSA(); + switch ($this->signature_format) { + case 'rsa-sha2-512': + $hash = 'sha512'; + break; + case 'rsa-sha2-256': + $hash = 'sha256'; + break; + //case 'ssh-rsa': + default: + $hash = 'sha1'; + } + $rsa->setHash($hash); $rsa->setSignatureMode(RSA::SIGNATURE_PKCS1); $rsa->loadKey(array('e' => $e, 'n' => $n), RSA::PUBLIC_FORMAT_RAW); + if (!$rsa->verify($this->exchange_hash, $signature)) { user_error('Bad server signature'); return $this->_disconnect(NET_SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE); @@ -4530,7 +4681,30 @@ class SSH2 $s = $s->modPow($e, $n); $s = $s->toBytes(); - $h = pack('N4H*', 0x00302130, 0x0906052B, 0x0E03021A, 0x05000414, sha1($this->exchange_hash)); + switch ($this->signature_format) { + case 'rsa-sha2-512': + $hash = 'sha512'; + break; + case 'rsa-sha2-256': + $hash = 'sha256'; + break; + //case 'ssh-rsa': + default: + $hash = 'sha1'; + } + $hashObj = new Hash($hash); + switch ($this->signature_format) { + case 'rsa-sha2-512': + $h = pack('N5a*', 0x00305130, 0x0D060960, 0x86480165, 0x03040203, 0x05000440, $hashObj->hash($this->exchange_hash)); + break; + case 'rsa-sha2-256': + $h = pack('N5a*', 0x00303130, 0x0D060960, 0x86480165, 0x03040201, 0x05000420, $hashObj->hash($this->exchange_hash)); + break; + //case 'ssh-rsa': + default: + $hash = 'sha1'; + $h = pack('N4a*', 0x00302130, 0x0906052B, 0x0E03021A, 0x05000414, $hashObj->hash($this->exchange_hash)); + } $h = chr(0x01) . str_repeat(chr(0xFF), $nLength - 2 - strlen($h)) . $h; if ($s != $h) { diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php index a4ff0549d..99dcecfe6 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php @@ -43,7 +43,7 @@ use phpseclib\System\SSH\Agent\Identity; * * @package SSH\Agent * @author Jim Wigginton - * @access internal + * @access public */ class Agent { @@ -117,18 +117,20 @@ class Agent * @return \phpseclib\System\SSH\Agent * @access public */ - function __construct() + function __construct($address = null) { - switch (true) { - case isset($_SERVER['SSH_AUTH_SOCK']): - $address = $_SERVER['SSH_AUTH_SOCK']; - break; - case isset($_ENV['SSH_AUTH_SOCK']): - $address = $_ENV['SSH_AUTH_SOCK']; - break; - default: - user_error('SSH_AUTH_SOCK not found'); - return false; + if (!$address) { + switch (true) { + case isset($_SERVER['SSH_AUTH_SOCK']): + $address = $_SERVER['SSH_AUTH_SOCK']; + break; + case isset($_ENV['SSH_AUTH_SOCK']): + $address = $_ENV['SSH_AUTH_SOCK']; + break; + default: + user_error('SSH_AUTH_SOCK not found'); + return false; + } } $this->fsock = fsockopen('unix://' . $address, 0, $errno, $errstr); @@ -155,12 +157,14 @@ class Agent $packet = pack('NC', 1, self::SSH_AGENTC_REQUEST_IDENTITIES); if (strlen($packet) != fputs($this->fsock, $packet)) { user_error('Connection closed while requesting identities'); + return array(); } $length = current(unpack('N', fread($this->fsock, 4))); $type = ord(fread($this->fsock, 1)); if ($type != self::SSH_AGENT_IDENTITIES_ANSWER) { user_error('Unable to request identities'); + return array(); } $identities = array(); diff --git a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php index b8cc6cded..b4649046a 100644 --- a/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php +++ b/libraries/vdm_io/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php @@ -32,6 +32,17 @@ use phpseclib\System\SSH\Agent; */ class Identity { + /**@+ + * Signature Flags + * + * See https://tools.ietf.org/html/draft-miller-ssh-agent-00#section-5.3 + * + * @access private + */ + const SSH_AGENT_RSA2_256 = 2; + const SSH_AGENT_RSA2_512 = 4; + /**#@-*/ + /** * Key Object * @@ -59,6 +70,16 @@ class Identity */ var $fsock; + /** + * Signature flags + * + * @var int + * @access private + * @see self::sign() + * @see self::setHash() + */ + var $flags = 0; + /** * Default Constructor. * @@ -126,6 +147,31 @@ class Identity { } + /** + * Set Hash + * + * ssh-agent doesn't support using hashes for RSA other than SHA1 + * + * @param string $hash + * @access public + */ + function setHash($hash) + { + $this->flags = 0; + switch ($hash) { + case 'sha1': + break; + case 'sha256': + $this->flags = self::SSH_AGENT_RSA2_256; + break; + case 'sha512': + $this->flags = self::SSH_AGENT_RSA2_512; + break; + default: + user_error('The only supported hashes for RSA are sha1, sha256 and sha512'); + } + } + /** * Create a signature * @@ -138,7 +184,7 @@ class Identity function sign($message) { // the last parameter (currently 0) is for flags and ssh-agent only defines one flag (for ssh-dss): SSH_AGENT_OLD_SIGNATURE - $packet = pack('CNa*Na*N', Agent::SSH_AGENTC_SIGN_REQUEST, strlen($this->key_blob), $this->key_blob, strlen($message), $message, 0); + $packet = pack('CNa*Na*N', Agent::SSH_AGENTC_SIGN_REQUEST, strlen($this->key_blob), $this->key_blob, strlen($message), $message, $this->flags); $packet = pack('Na*', strlen($packet), $packet); if (strlen($packet) != fputs($this->fsock, $packet)) { user_error('Connection closed during signing'); @@ -151,8 +197,34 @@ class Identity } $signature_blob = fread($this->fsock, $length - 1); - // the only other signature format defined - ssh-dss - is the same length as ssh-rsa - // the + 12 is for the other various SSH added length fields - return substr($signature_blob, strlen('ssh-rsa') + 12); + $length = current(unpack('N', $this->_string_shift($signature_blob, 4))); + if ($length != strlen($signature_blob)) { + user_error('Malformed signature blob'); + } + $length = current(unpack('N', $this->_string_shift($signature_blob, 4))); + if ($length > strlen($signature_blob) + 4) { + user_error('Malformed signature blob'); + } + $type = $this->_string_shift($signature_blob, $length); + $this->_string_shift($signature_blob, 4); + + return $signature_blob; + } + + /** + * String Shift + * + * Inspired by array_shift + * + * @param string $string + * @param int $index + * @return string + * @access private + */ + function _string_shift(&$string, $index = 1) + { + $substr = substr($string, 0, $index); + $string = substr($string, $index); + return $substr; } } -- 2.40.1 From a5ae94b93a387e795bcef2920c33105b3d6ca7bd Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 17 Jul 2019 04:36:05 +0200 Subject: [PATCH 06/13] Linked the new plugin area to Joomla components. gh-436 --- README.md | 12 +- admin/README.txt | 12 +- admin/access.xml | 21 + admin/assets/css/component_plugins.css | 13 + admin/assets/css/components_plugins.css | 13 + admin/controller.php | 1 + admin/controllers/component_plugins.php | 321 +++++++ admin/controllers/components_plugins.php | 43 + .../en-GB/en-GB.com_componentbuilder.ini | 72 ++ .../en-GB/en-GB.com_componentbuilder.sys.ini | 20 + admin/layouts/component_plugins/index.html | 1 + .../component_plugins/plugins_above.php | 44 + .../component_plugins/plugins_fullwidth.php | 45 + .../layouts/component_plugins/publishing.php | 45 + .../layouts/component_plugins/publlshing.php | 47 + .../server/linked_components_fullwidth.php | 7 +- admin/models/component_plugins.php | 881 ++++++++++++++++++ admin/models/componentbuilder.php | 3 + admin/models/components_plugins.php | 237 +++++ admin/models/fields/joomlaplugins.php | 74 ++ admin/models/forms/component_plugins.js | 11 + admin/models/forms/component_plugins.xml | 150 +++ admin/sql/install.mysql.utf8.sql | 26 + admin/sql/uninstall.mysql.utf8.sql | 1 + admin/sql/updates/mysql/2.9.32.sql | 25 + admin/tables/component_plugins.php | 321 +++++++ admin/views/component_plugins/submitbutton.js | 25 + admin/views/component_plugins/tmpl/edit.php | 122 +++ admin/views/component_plugins/tmpl/index.html | 1 + admin/views/component_plugins/view.html.php | 195 ++++ admin/views/components_plugins/index.html | 1 + .../views/components_plugins/tmpl/default.php | 85 ++ .../tmpl/default_batch_body.php | 18 + .../tmpl/default_batch_footer.php | 23 + .../components_plugins/tmpl/default_body.php | 94 ++ .../components_plugins/tmpl/default_foot.php | 18 + .../components_plugins/tmpl/default_head.php | 47 + .../tmpl/default_toolbar.php | 45 + .../views/components_plugins/tmpl/index.html | 1 + admin/views/components_plugins/view.html.php | 226 +++++ .../joomla_components/tmpl/default_body.php | 7 +- componentbuilder.xml | 4 +- componentbuilder_update_server.xml | 21 +- script.php | 129 ++- 44 files changed, 3489 insertions(+), 19 deletions(-) create mode 100644 admin/assets/css/component_plugins.css create mode 100644 admin/assets/css/components_plugins.css create mode 100644 admin/controllers/component_plugins.php create mode 100644 admin/controllers/components_plugins.php create mode 100644 admin/layouts/component_plugins/index.html create mode 100644 admin/layouts/component_plugins/plugins_above.php create mode 100644 admin/layouts/component_plugins/plugins_fullwidth.php create mode 100644 admin/layouts/component_plugins/publishing.php create mode 100644 admin/layouts/component_plugins/publlshing.php create mode 100644 admin/models/component_plugins.php create mode 100644 admin/models/components_plugins.php create mode 100644 admin/models/fields/joomlaplugins.php create mode 100644 admin/models/forms/component_plugins.js create mode 100644 admin/models/forms/component_plugins.xml create mode 100644 admin/sql/updates/mysql/2.9.32.sql create mode 100644 admin/tables/component_plugins.php create mode 100644 admin/views/component_plugins/submitbutton.js create mode 100644 admin/views/component_plugins/tmpl/edit.php create mode 100644 admin/views/component_plugins/tmpl/index.html create mode 100644 admin/views/component_plugins/view.html.php create mode 100644 admin/views/components_plugins/index.html create mode 100644 admin/views/components_plugins/tmpl/default.php create mode 100644 admin/views/components_plugins/tmpl/default_batch_body.php create mode 100644 admin/views/components_plugins/tmpl/default_batch_footer.php create mode 100644 admin/views/components_plugins/tmpl/default_body.php create mode 100644 admin/views/components_plugins/tmpl/default_foot.php create mode 100644 admin/views/components_plugins/tmpl/default_head.php create mode 100644 admin/views/components_plugins/tmpl/default_toolbar.php create mode 100644 admin/views/components_plugins/tmpl/index.html create mode 100644 admin/views/components_plugins/view.html.php diff --git a/README.md b/README.md index cc9ec7981..815c07b8c 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.32) 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.33) 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) @@ -147,13 +147,13 @@ TODO + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 + *Last Build*: 17th July, 2019 -+ *Version*: 2.9.32 ++ *Version*: 2.9.33 + *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*: **232852** -+ *Field count*: **1222** -+ *File count*: **1497** -+ *Folder count*: **229** ++ *Line count*: **236366** ++ *Field count*: **1235** ++ *File count*: **1527** ++ *Folder count*: **233** > 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 cc9ec7981..815c07b8c 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.32) 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.33) 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) @@ -147,13 +147,13 @@ TODO + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 + *Last Build*: 17th July, 2019 -+ *Version*: 2.9.32 ++ *Version*: 2.9.33 + *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*: **232852** -+ *Field count*: **1222** -+ *File count*: **1497** -+ *Folder count*: **229** ++ *Line count*: **236366** ++ *Field count*: **1235** ++ *File count*: **1527** ++ *Folder count*: **233** > 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 b5333cb38..46d82d317 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -191,6 +191,16 @@ + + + + + + + + + + @@ -831,6 +841,17 @@
+
+ + + + + + + + + +
diff --git a/admin/assets/css/component_plugins.css b/admin/assets/css/component_plugins.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/component_plugins.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/assets/css/components_plugins.css b/admin/assets/css/components_plugins.css new file mode 100644 index 000000000..3d7b98b8f --- /dev/null +++ b/admin/assets/css/components_plugins.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/controller.php b/admin/controller.php index df9e9fdbf..4b959669b 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -125,6 +125,7 @@ class ComponentbuilderController extends JControllerLegacy 'component_dashboard' => 'components_dashboard', 'component_files_folders' => 'components_files_folders', 'component_placeholders' => 'components_placeholders', + 'component_plugins' => 'components_plugins', 'snippet_type' => 'snippet_types', 'library_config' => 'libraries_config', 'library_files_folders_urls' => 'libraries_files_folders_urls', diff --git a/admin/controllers/component_plugins.php b/admin/controllers/component_plugins.php new file mode 100644 index 000000000..7e96456e4 --- /dev/null +++ b/admin/controllers/component_plugins.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'); + +/** + * Component_plugins Controller + */ +class ComponentbuilderControllerComponent_plugins 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 = 'Components_plugins'; // 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('component_plugins.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_plugins.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('component_plugins.access', 'com_componentbuilder.component_plugins.' . (int) $recordId) && $user->authorise('component_plugins.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_plugins.edit', 'com_componentbuilder.component_plugins.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_plugins.edit.own', 'com_componentbuilder.component_plugins.' . $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('component_plugins.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_plugins.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('Component_plugins', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_plugins' . $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()) + { + return; + } + +} diff --git a/admin/controllers/components_plugins.php b/admin/controllers/components_plugins.php new file mode 100644 index 000000000..12caea7bd --- /dev/null +++ b/admin/controllers/components_plugins.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'); + +/** + * Components_plugins Controller + */ +class ComponentbuilderControllerComponents_plugins extends JControllerAdmin +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_PLUGINS'; + + /** + * 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 = 'Component_plugins', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } +} diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 764bb5a38..9eb70baf7 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -2065,6 +2065,46 @@ COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_N_ITEMS_UNFEATURED="%s Components P COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_N_ITEMS_UNFEATURED_1="%s Component Placeholders unfeatured." COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_N_ITEMS_UNPUBLISHED="%s Components Placeholders unpublished." COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_N_ITEMS_UNPUBLISHED_1="%s Component Placeholders unpublished." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS="Components Plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS="Components Plugins Access" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS_DESC="Allows the users in this group to access access components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_OPTIONS="Batch process the selected Components Plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_TIP="All changes will be applied to all selected Components Plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE="Components Plugins Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE="Components Plugins Create" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE_DESC="Allows the users in this group to create create components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE="Components Plugins Delete" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE_DESC="Allows the users in this group to delete delete components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT="Components Plugins Edit" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY="Components Plugins Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE="Components Plugins Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_DESC="Allows the users in this group to edit the component plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN="Components Plugins Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components plugins created by them" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE="Components Plugins Edit State" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION="Components Plugins Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_ARCHIVED="%s Components Plugins archived." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_ARCHIVED_1="%s Component Plugins archived." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_CHECKED_IN_0="No Component Plugins successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_CHECKED_IN_1="%d Component Plugins successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_CHECKED_IN_MORE="%d Components Plugins successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_DELETED="%s Components Plugins deleted." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_DELETED_1="%s Component Plugins deleted." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_FEATURED="%s Components Plugins featured." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_FEATURED_1="%s Component Plugins featured." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_PUBLISHED="%s Components Plugins published." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_PUBLISHED_1="%s Component Plugins published." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_TRASHED="%s Components Plugins trashed." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_TRASHED_1="%s Component Plugins trashed." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_UNFEATURED="%s Components Plugins unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_UNFEATURED_1="%s Component Plugins unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_UNPUBLISHED="%s Components Plugins unpublished." +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_N_ITEMS_UNPUBLISHED_1="%s Component Plugins unpublished." COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS="Components Site Views" COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS="Components Site Views Access" COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access components site views" @@ -2987,6 +3027,37 @@ COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VALUE_LABEL="Set String Value" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VALUE_MESSAGE="Error! Please add some set target value here." COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VERSION_DESC="A count of the number of times this Component Placeholders has been revised." COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS="Component Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS="Addjoomla Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS_DESCRIPTION="Setup the Joomla plugins for this component." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS_LABEL="Joomla Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CREATED_BY_DESC="The user that created this Component Plugins." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CREATED_DATE_DESC="The date this Component Plugins was created." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_EDIT="Editing the Component Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ERROR_UNIQUE_ALIAS="Another Component Plugins has the same alias." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_BY_DESC="The last user that modified this Component Plugins." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_DATE_DESC="The date this Component Plugins was modified." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NEW="A New Component Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_ON_JOOMLA_PLUGINS_DESCRIPTION="Do not add the same Joomla plugins twice it will not work." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_ON_JOOMLA_PLUGINS_LABEL="Setting Joomla Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_PLUGIN="Plugin" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_PLUGINS="Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_PLUGIN_LABEL="Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Plugins to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_VERSION_DESC="A count of the number of times this Component Plugins has been revised." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS="Component Site Views" COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION="Select if this view
should use access." COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_LABEL="Add Access" @@ -7860,6 +7931,7 @@ COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD="The component dashboard" COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS="The component files & folders" COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks" COM_COMPONENTBUILDER_THE_COMPONENT_PLACEHOLDERS="The component placeholders" +COM_COMPONENTBUILDER_THE_COMPONENT_PLUGINS="The component plugins" COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views" COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates" COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL="The Component with all linked admin views, fields linked to admin views, custom admin views, site views, templates and layouts were cloned successful!" 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 c5b48bd18..23b8a8222 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -351,6 +351,26 @@ COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE="Components Placeholders COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component placeholders" COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION="Components Placeholders Edit Version" COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components placeholders" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS="Components Plugins Access" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS_DESC="Allows the users in this group to access access components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE="Components Plugins Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE="Components Plugins Create" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE_DESC="Allows the users in this group to create create components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE="Components Plugins Delete" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE_DESC="Allows the users in this group to delete delete components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT="Components Plugins Edit" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY="Components Plugins Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE="Components Plugins Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_DESC="Allows the users in this group to edit the component plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN="Components Plugins Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components plugins created by them" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE="Components Plugins Edit State" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component plugins" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION="Components Plugins Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components plugins" COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS="Components Site Views Access" COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access components site views" COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE="Components Site Views Batch Use" diff --git a/admin/layouts/component_plugins/index.html b/admin/layouts/component_plugins/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_plugins/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_plugins/plugins_above.php b/admin/layouts/component_plugins/plugins_above.php new file mode 100644 index 000000000..0da7e528d --- /dev/null +++ b/admin/layouts/component_plugins/plugins_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_component' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/component_plugins/plugins_fullwidth.php b/admin/layouts/component_plugins/plugins_fullwidth.php new file mode 100644 index 000000000..c08bbb95d --- /dev/null +++ b/admin/layouts/component_plugins/plugins_fullwidth.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( + 'note_on_joomla_plugins', + 'addjoomla_plugins' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/component_plugins/publishing.php b/admin/layouts/component_plugins/publishing.php new file mode 100644 index 000000000..68e3657ce --- /dev/null +++ b/admin/layouts/component_plugins/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/component_plugins/publlshing.php b/admin/layouts/component_plugins/publlshing.php new file mode 100644 index 000000000..a7ff8580c --- /dev/null +++ b/admin/layouts/component_plugins/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/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index a2678ba90..92b0fcb31 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -146,7 +146,12 @@ else 'view' => 'component_dashboard', 'views' => 'components_dashboard', 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD'), - 'icon' => 'dashboard') + 'icon' => 'dashboard'), + array( + 'view' => 'component_plugins', + 'views' => 'components_plugins', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_PLUGINS'), + 'icon' => 'power-cord') ); } ?> diff --git a/admin/models/component_plugins.php b/admin/models/component_plugins.php new file mode 100644 index 000000000..e2f2f116f --- /dev/null +++ b/admin/models/component_plugins.php @@ -0,0 +1,881 @@ + + * @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 Component_plugins Model + */ +class ComponentbuilderModelComponent_plugins extends JModelAdmin +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'plugins' => array( + 'fullwidth' => array( + 'note_on_joomla_plugins', + 'addjoomla_plugins' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + + /** + * @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.component_plugins'; + + /** + * 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 = 'component_plugins', $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->addjoomla_plugins)) + { + // Convert the addjoomla_plugins field to an array. + $addjoomla_plugins = new Registry; + $addjoomla_plugins->loadString($item->addjoomla_plugins); + $item->addjoomla_plugins = $addjoomla_plugins->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_plugins'); + } + } + + 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.component_plugins', 'component_plugins', $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('component_plugins.edit.state', 'com_componentbuilder.component_plugins.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_plugins.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('component_plugins.edit.created_by', 'com_componentbuilder.component_plugins.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_plugins.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('component_plugins.edit.created', 'com_componentbuilder.component_plugins.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_plugins.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/component_plugins.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('component_plugins.delete', 'com_componentbuilder.component_plugins.' . (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('component_plugins.edit.state', 'com_componentbuilder.component_plugins.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_plugins.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('component_plugins.edit', 'com_componentbuilder.component_plugins.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_plugins.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_component_plugins')); + $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.component_plugins.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('component_plugins'); + $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('component_plugins'); + } + + if (!$this->canDo->get('component_plugins.create') && !$this->canDo->get('component_plugins.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('component_plugins.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('component_plugins.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_component) && !is_numeric($this->table->joomla_component)) + { + $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + } + + // 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('component_plugins'); + } + + if (!$this->canDo->get('component_plugins.edit') && !$this->canDo->get('component_plugins.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('component_plugins.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('component_plugins.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 addjoomla_plugins items to data. + if (isset($data['addjoomla_plugins']) && is_array($data['addjoomla_plugins'])) + { + $addjoomla_plugins = new JRegistry; + $addjoomla_plugins->loadArray($data['addjoomla_plugins']); + $data['addjoomla_plugins'] = (string) $addjoomla_plugins; + } + elseif (!isset($data['addjoomla_plugins'])) + { + // Set the empty addjoomla_plugins to data + $data['addjoomla_plugins'] = ''; + } + + // 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/componentbuilder.php b/admin/models/componentbuilder.php index d727bbf87..33a6a4115 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -177,6 +177,9 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'component_placeholders.create' => 'component_placeholders.create', 'components_placeholders.access' => 'component_placeholders.access', 'component_placeholders.access' => 'component_placeholders.access', + 'component_plugins.create' => 'component_plugins.create', + 'components_plugins.access' => 'component_plugins.access', + 'component_plugins.access' => 'component_plugins.access', 'snippet_type.create' => 'snippet_type.create', 'snippet_types.access' => 'snippet_type.access', 'snippet_type.access' => 'snippet_type.access', diff --git a/admin/models/components_plugins.php b/admin/models/components_plugins.php new file mode 100644 index 000000000..60ab04568 --- /dev/null +++ b/admin/models/components_plugins.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'); + +/** + * Components_plugins Model + */ +class ComponentbuilderModelComponents_plugins 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('component_plugins.access', 'com_componentbuilder.component_plugins.' . (int) $item->id) && JFactory::getUser()->authorise('component_plugins.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_component_plugins', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $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_component_plugins')); + $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_component_plugins'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/fields/joomlaplugins.php b/admin/models/fields/joomlaplugins.php new file mode 100644 index 000000000..09b7a41c9 --- /dev/null +++ b/admin/models/fields/joomlaplugins.php @@ -0,0 +1,74 @@ + + * @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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Joomlaplugins Form Field class for the Componentbuilder component + */ +class JFormFieldJoomlaplugins extends JFormFieldList +{ + /** + * The joomlaplugins field type. + * + * @var string + */ + public $type = 'joomlaplugins'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name','b.name','c.name'),array('id','plugin_name','class_extends_name','joomla_plugin_group_name'))); + $query->from($db->quoteName('#__componentbuilder_joomla_plugin', 'a')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_class_extends', 'b') . ' ON (' . $db->quoteName('a.class_extends') . ' = ' . $db->quoteName('b.id') . ')'); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin_group', 'c') . ' ON (' . $db->quoteName('a.joomla_plugin_group') . ' = ' . $db->quoteName('c.id') . ')'); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.name ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_joomla_plugin'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select a plugin'); + foreach($items as $item) + { + // set a full class name + $select = 'class Plg' . ucfirst($item->joomla_plugin_group_name) . $item->plugin_name . ' extends ' . $item->class_extends_name; + $options[] = JHtml::_('select.option', $item->id, $select); + } + } + return $options; + } +} diff --git a/admin/models/forms/component_plugins.js b/admin/models/forms/component_plugins.js new file mode 100644 index 000000000..406de38ba --- /dev/null +++ b/admin/models/forms/component_plugins.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/component_plugins.xml b/admin/models/forms/component_plugins.xml new file mode 100644 index 000000000..64feb0324 --- /dev/null +++ b/admin/models/forms/component_plugins.xml @@ -0,0 +1,150 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index af0592031..267554887 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1448,6 +1448,32 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_placeholders` ( KEY `idx_joomla_component` (`joomla_component`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_plugins` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addjoomla_plugins` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `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_component` (`joomla_component`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( `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 294a05896..f2a998ac8 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -33,6 +33,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_component_config`; DROP TABLE IF EXISTS `#__componentbuilder_component_dashboard`; DROP TABLE IF EXISTS `#__componentbuilder_component_files_folders`; DROP TABLE IF EXISTS `#__componentbuilder_component_placeholders`; +DROP TABLE IF EXISTS `#__componentbuilder_component_plugins`; DROP TABLE IF EXISTS `#__componentbuilder_snippet_type`; DROP TABLE IF EXISTS `#__componentbuilder_library_config`; DROP TABLE IF EXISTS `#__componentbuilder_library_files_folders_urls`; diff --git a/admin/sql/updates/mysql/2.9.32.sql b/admin/sql/updates/mysql/2.9.32.sql new file mode 100644 index 000000000..284d641a7 --- /dev/null +++ b/admin/sql/updates/mysql/2.9.32.sql @@ -0,0 +1,25 @@ +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_plugins` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addjoomla_plugins` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `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_component` (`joomla_component`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; diff --git a/admin/tables/component_plugins.php b/admin/tables/component_plugins.php new file mode 100644 index 000000000..f3f183ecb --- /dev/null +++ b/admin/tables/component_plugins.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; + +/** + * Components_plugins Table class + */ +class ComponentbuilderTableComponent_plugins 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_component_plugins', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_plugins')); + } + + 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 Component_plugins 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 component_plugins. A component_plugins 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('component_plugins', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_PLUGINS_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('component_plugins', '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.component_plugins.'.$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.component_plugins.'.(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/component_plugins/submitbutton.js b/admin/views/component_plugins/submitbutton.js new file mode 100644 index 000000000..2fa7c8d05 --- /dev/null +++ b/admin/views/component_plugins/submitbutton.js @@ -0,0 +1,25 @@ +/** + * @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 + */ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var action = task.split('.'); + if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){ + Joomla.submitform(task, document.getElementById("adminForm")); + return true; + } else { + alert(Joomla.JText._('component_plugins, some values are not acceptable.','Some values are unacceptable')); + return false; + } + } +} \ No newline at end of file diff --git a/admin/views/component_plugins/tmpl/edit.php b/admin/views/component_plugins/tmpl/edit.php new file mode 100644 index 000000000..a216bc398 --- /dev/null +++ b/admin/views/component_plugins/tmpl/edit.php @@ -0,0 +1,122 @@ + + * @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'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = $this->params; // will be removed just use $this->params instead +?> + + + + diff --git a/admin/views/component_plugins/tmpl/index.html b/admin/views/component_plugins/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_plugins/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_plugins/view.html.php b/admin/views/component_plugins/view.html.php new file mode 100644 index 000000000..22ab26463 --- /dev/null +++ b/admin/views/component_plugins/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'); + +/** + * Component_plugins View class + */ +class ComponentbuilderViewComponent_plugins 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('component_plugins', $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_COMPONENT_PLUGINS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_PLUGINS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('component_plugins.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_plugins.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_plugins.edit')) + { + // We can save the record. + JToolBarHelper::save('component_plugins.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_plugins.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_plugins.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_plugins.create')) + { + JToolBarHelper::apply('component_plugins.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_plugins.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_plugins.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_plugins.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_plugins.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_plugins.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_plugins.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('component_plugins.create')) + { + JToolBarHelper::custom('component_plugins.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_plugins.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_plugins.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_plugins', $this->item->id); + } + if ($this->canDo->get('component_plugins.create')) + { + JToolBarHelper::custom('component_plugins.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_plugins.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_plugins'); + 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_COMPONENT_PLUGINS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_PLUGINS_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_plugins.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/component_plugins/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/components_plugins/index.html b/admin/views/components_plugins/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_plugins/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_plugins/tmpl/default.php b/admin/views/components_plugins/tmpl/default.php new file mode 100644 index 000000000..fcda40cbe --- /dev/null +++ b/admin/views/components_plugins/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=components_plugins.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_pluginsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_plugins/tmpl/default_batch_body.php b/admin/views/components_plugins/tmpl/default_batch_body.php new file mode 100644 index 000000000..51c9b586d --- /dev/null +++ b/admin/views/components_plugins/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/components_plugins/tmpl/default_batch_footer.php b/admin/views/components_plugins/tmpl/default_batch_footer.php new file mode 100644 index 000000000..d6ebacf1a --- /dev/null +++ b/admin/views/components_plugins/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/components_plugins/tmpl/default_body.php b/admin/views/components_plugins/tmpl/default_body.php new file mode 100644 index 000000000..3ba32fc0b --- /dev/null +++ b/admin/views/components_plugins/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=components_plugins&task=component_plugins.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('component_plugins',$item,'components_plugins'); + ?> + + + get('component_plugins.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_plugins.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('component_plugins.edit')): ?> + escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_plugins.', $canCheckin); ?> + + + escape($item->joomla_component_system_name); ?> + +
+ + + get('component_plugins.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_plugins.', true, 'cb'); ?> + + published, $i, 'components_plugins.', false, 'cb'); ?> + + + published, $i, 'components_plugins.', true, 'cb'); ?> + + + published, $i, 'components_plugins.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_plugins/tmpl/default_foot.php b/admin/views/components_plugins/tmpl/default_foot.php new file mode 100644 index 000000000..d020003b6 --- /dev/null +++ b/admin/views/components_plugins/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/components_plugins/tmpl/default_head.php b/admin/views/components_plugins/tmpl/default_head.php new file mode 100644 index 000000000..6244238d4 --- /dev/null +++ b/admin/views/components_plugins/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/components_plugins/tmpl/default_toolbar.php b/admin/views/components_plugins/tmpl/default_toolbar.php new file mode 100644 index 000000000..feaa464f6 --- /dev/null +++ b/admin/views/components_plugins/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/components_plugins/tmpl/index.html b/admin/views/components_plugins/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_plugins/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_plugins/view.html.php b/admin/views/components_plugins/view.html.php new file mode 100644 index 000000000..e0aa34fab --- /dev/null +++ b/admin/views/components_plugins/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 Components_plugins + */ +class ComponentbuilderViewComponents_plugins extends JViewLegacy +{ + /** + * Components_plugins view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_plugins'); + } + + // 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('component_plugins'); + $this->canEdit = $this->canDo->get('component_plugins.edit'); + $this->canState = $this->canDo->get('component_plugins.edit.state'); + $this->canCreate = $this->canDo->get('component_plugins.create'); + $this->canDelete = $this->canDo->get('component_plugins.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_COMPONENTS_PLUGINS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_plugins'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_plugins.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_plugins.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_plugins.publish'); + JToolBarHelper::unpublishList('components_plugins.unpublish'); + JToolBarHelper::archiveList('components_plugins.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_plugins.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('', 'components_plugins.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_plugins.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_plugins'); + 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_COMPONENTS_PLUGINS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_plugins.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/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index 17eb3fe46..a62feb12c 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -135,7 +135,12 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml 'view' => 'component_dashboard', 'views' => 'components_dashboard', 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD'), - 'icon' => 'dashboard') + 'icon' => 'dashboard'), + array( + 'view' => 'component_plugins', + 'views' => 'components_plugins', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_PLUGINS'), + 'icon' => 'power-cord') ); } ?> diff --git a/componentbuilder.xml b/componentbuilder.xml index e36b8ef4c..517dc18f5 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -7,9 +7,9 @@ http://www.joomlacomponentbuilder.com Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 2.9.32 + 2.9.33 Component Builder (v.2.9.32) +

Component Builder (v.2.9.33)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 8192c7bfb..721f50f28 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -721,7 +721,7 @@ 2.9.31 http://www.joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.32/JCB_v2.9.32.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.33/JCB_v2.9.33.zip stable @@ -738,7 +738,24 @@ 2.9.32 http://www.joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.32/JCB_v2.9.32.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.33/JCB_v2.9.33.zip + + + stable + + Llewellyn van der Merwe + http://www.joomlacomponentbuilder.com + + + + Component Builder + Builds Complex Joomla Components + com_componentbuilder + component + 2.9.33 + http://www.joomlacomponentbuilder.com + + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.33/JCB_v2.9.33.zip stable diff --git a/script.php b/script.php index eaa0e4622..649f7bc9a 100644 --- a/script.php +++ b/script.php @@ -3224,6 +3224,92 @@ class com_componentbuilderInstallerScript } } + // Create a new query object. + $query = $db->getQuery(true); + // Select id from content type table + $query->select($db->quoteName('type_id')); + $query->from($db->quoteName('#__content_types')); + // Where Component_plugins alias is found + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.component_plugins') ); + $db->setQuery($query); + // Execute query to see if alias is found + $db->execute(); + $component_plugins_found = $db->getNumRows(); + // Now check if there were any rows + if ($component_plugins_found) + { + // Since there are load the needed component_plugins type ids + $component_plugins_ids = $db->loadColumn(); + // Remove Component_plugins from the content type table + $component_plugins_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.component_plugins') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__content_types')); + $query->where($component_plugins_condition); + $db->setQuery($query); + // Execute the query to remove Component_plugins items + $component_plugins_done = $db->execute(); + if ($component_plugins_done) + { + // If succesfully remove Component_plugins add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.component_plugins) type alias was removed from the #__content_type table')); + } + + // Remove Component_plugins items from the contentitem tag map table + $component_plugins_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.component_plugins') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__contentitem_tag_map')); + $query->where($component_plugins_condition); + $db->setQuery($query); + // Execute the query to remove Component_plugins items + $component_plugins_done = $db->execute(); + if ($component_plugins_done) + { + // If succesfully remove Component_plugins add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.component_plugins) type alias was removed from the #__contentitem_tag_map table')); + } + + // Remove Component_plugins items from the ucm content table + $component_plugins_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.component_plugins') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_content')); + $query->where($component_plugins_condition); + $db->setQuery($query); + // Execute the query to remove Component_plugins items + $component_plugins_done = $db->execute(); + if ($component_plugins_done) + { + // If succesfully remove Component_plugins add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.component_plugins) type alias was removed from the #__ucm_content table')); + } + + // Make sure that all the Component_plugins items are cleared from DB + foreach ($component_plugins_ids as $component_plugins_id) + { + // Remove Component_plugins items from the ucm base table + $component_plugins_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $component_plugins_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_base')); + $query->where($component_plugins_condition); + $db->setQuery($query); + // Execute the query to remove Component_plugins items + $db->execute(); + + // Remove Component_plugins items from the ucm history table + $component_plugins_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $component_plugins_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_history')); + $query->where($component_plugins_condition); + $db->setQuery($query); + // Execute the query to remove Component_plugins items + $db->execute(); + } + } + // Create a new query object. $query = $db->getQuery(true); // Select id from content type table @@ -4549,6 +4635,18 @@ class com_componentbuilderInstallerScript // Set the object into the content types table. $component_placeholders_Inserted = $db->insertObject('#__content_types', $component_placeholders); + // Create the component_plugins content type object. + $component_plugins = new stdClass(); + $component_plugins->type_title = 'Componentbuilder Component_plugins'; + $component_plugins->type_alias = 'com_componentbuilder.component_plugins'; + $component_plugins->table = '{"special": {"dbtable": "#__componentbuilder_component_plugins","key": "id","type": "Component_plugins","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $component_plugins->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "joomla_component","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"joomla_component":"joomla_component"}}'; + $component_plugins->router = 'ComponentbuilderHelperRoute::getComponent_pluginsRoute'; + $component_plugins->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component_plugins.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","joomla_component"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "joomla_component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; + + // Set the object into the content types table. + $component_plugins_Inserted = $db->insertObject('#__content_types', $component_plugins); + // Create the snippet_type content type object. $snippet_type = new stdClass(); $snippet_type->type_title = 'Componentbuilder Snippet_type'; @@ -5708,6 +5806,35 @@ class com_componentbuilderInstallerScript $component_placeholders_Inserted = $db->insertObject('#__content_types', $component_placeholders); } + // Create the component_plugins content type object. + $component_plugins = new stdClass(); + $component_plugins->type_title = 'Componentbuilder Component_plugins'; + $component_plugins->type_alias = 'com_componentbuilder.component_plugins'; + $component_plugins->table = '{"special": {"dbtable": "#__componentbuilder_component_plugins","key": "id","type": "Component_plugins","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $component_plugins->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "joomla_component","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"joomla_component":"joomla_component"}}'; + $component_plugins->router = 'ComponentbuilderHelperRoute::getComponent_pluginsRoute'; + $component_plugins->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component_plugins.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","joomla_component"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "joomla_component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; + + // Check if component_plugins type is already in content_type DB. + $component_plugins_id = null; + $query = $db->getQuery(true); + $query->select($db->quoteName(array('type_id'))); + $query->from($db->quoteName('#__content_types')); + $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($component_plugins->type_alias)); + $db->setQuery($query); + $db->execute(); + + // Set the object into the content types table. + if ($db->getNumRows()) + { + $component_plugins->type_id = $db->loadResult(); + $component_plugins_Updated = $db->updateObject('#__content_types', $component_plugins, 'type_id'); + } + else + { + $component_plugins_Inserted = $db->insertObject('#__content_types', $component_plugins); + } + // Create the snippet_type content type object. $snippet_type = new stdClass(); $snippet_type->type_title = 'Componentbuilder Snippet_type'; @@ -6061,7 +6188,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.9.32 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.9.33 Was Successful! Let us know if anything is not working as expected.

'; } } -- 2.40.1 From affaeb72f8fdc728e360a5d0bb3a03df82b4707f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 19 Jul 2019 04:17:15 +0200 Subject: [PATCH 07/13] Resolved gh-441 to allow fieldtype name prefixing. Resolved gh-443 to allow Alphanumeric+dot in fieldtype name. Fixed gh-446 to insure that JFormRuleInt validates correctly in the admin field realtions. Improved the new plugin area to also have system name and option to add custom header code. gh-436 --- README.md | 12 +- admin/README.txt | 12 +- admin/access.xml | 2 - .../assets/images/icons/joomla_components.png | Bin 11043 -> 14213 bytes admin/assets/images/icons/joomla_plugins.png | Bin 28509 -> 9985 bytes .../joomla_3/JFormFieldCheckboxes.php | 2 +- admin/compiler/joomla_3/JFormFieldCustom.php | 2 +- admin/compiler/joomla_3/JFormFieldList.php | 2 +- admin/compiler/joomla_3/JFormFieldRadio.php | 2 +- admin/compiler/joomla_3/JFormFieldUser.php | 2 +- admin/config.xml | 14 + admin/controllers/ajax.json.php | 40 + admin/controllers/joomla_plugins.php | 63 - admin/helpers/compiler/a_Get.php | 23 +- admin/helpers/compiler/c_Fields.php | 39 +- admin/helpers/componentbuilder.php | 42 + .../en-GB/en-GB.com_componentbuilder.ini | 23 +- .../en-GB/en-GB.com_componentbuilder.sys.ini | 4 - admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../{details_above.php => code_above.php} | 4 +- ...tails_fullwidth.php => code_fullwidth.php} | 1 + .../{details_left.php => code_left.php} | 4 + .../{details_right.php => code_right.php} | 0 .../server/linked_components_fullwidth.php | 2 +- admin/models/ajax.php | 10 +- admin/models/field.php | 2 +- admin/models/fields/joomlaplugins.php | 7 +- admin/models/fieldtype.php | 12 +- admin/models/forms/admin_view.js | 416 ++--- admin/models/forms/class_extends.xml | 4 +- admin/models/forms/class_method.js | 38 +- admin/models/forms/class_property.js | 38 +- admin/models/forms/custom_admin_view.js | 100 +- admin/models/forms/custom_code.js | 88 +- admin/models/forms/dynamic_get.js | 1538 ++++++++--------- admin/models/forms/field.js | 242 +-- admin/models/forms/fieldtype.js | 844 ++++----- admin/models/forms/help_document.js | 164 +- admin/models/forms/joomla_plugin.js | 405 ++++- admin/models/forms/joomla_plugin.xml | 67 +- admin/models/forms/layout.js | 10 +- admin/models/forms/library.js | 340 ++-- admin/models/forms/server.js | 558 +++--- admin/models/forms/site_view.js | 128 +- admin/models/forms/template.js | 10 +- admin/models/import_joomla_components.php | 22 +- admin/models/joomla_plugin.php | 63 +- admin/models/joomla_plugins.php | 115 +- admin/models/rules/int.php | 31 + admin/models/server.php | 2 +- admin/sql/install.mysql.utf8.sql | 8 +- admin/sql/updates/mysql/2.9.33.sql | 5 + admin/views/admin_view/tmpl/edit.php | 430 ++--- admin/views/class_method/tmpl/edit.php | 10 +- admin/views/class_property/tmpl/edit.php | 10 +- admin/views/custom_admin_view/tmpl/edit.php | 100 +- admin/views/custom_code/tmpl/edit.php | 170 +- admin/views/dynamic_get/tmpl/edit.php | 602 +++---- admin/views/field/tmpl/edit.php | 108 +- admin/views/fieldtype/tmpl/edit.php | 434 ++--- admin/views/fieldtype/view.html.php | 2 +- admin/views/help_document/tmpl/edit.php | 60 +- admin/views/joomla_plugin/tmpl/edit.php | 66 +- admin/views/joomla_plugin/view.html.php | 71 + .../joomla_plugins/tmpl/default_body.php | 4 +- .../joomla_plugins/tmpl/default_head.php | 2 +- admin/views/joomla_plugins/view.html.php | 74 +- admin/views/layout/tmpl/edit.php | 10 +- admin/views/library/tmpl/edit.php | 100 +- admin/views/server/tmpl/edit.php | 206 +-- admin/views/server/view.html.php | 2 +- admin/views/site_view/tmpl/edit.php | 110 +- admin/views/template/tmpl/edit.php | 10 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 23 +- script.php | 12 +- site/helpers/componentbuilder.php | 42 + 77 files changed, 4338 insertions(+), 3890 deletions(-) rename admin/layouts/joomla_plugin/{details_above.php => code_above.php} (94%) rename admin/layouts/joomla_plugin/{details_fullwidth.php => code_fullwidth.php} (97%) rename admin/layouts/joomla_plugin/{details_left.php => code_left.php} (93%) rename admin/layouts/joomla_plugin/{details_right.php => code_right.php} (100%) create mode 100644 admin/sql/updates/mysql/2.9.33.sql diff --git a/README.md b/README.md index 815c07b8c..2f0d14d03 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.33) 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.34) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -146,13 +146,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th July, 2019 -+ *Version*: 2.9.33 ++ *Last Build*: 19th July, 2019 ++ *Version*: 2.9.34 + *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*: **236366** -+ *Field count*: **1235** -+ *File count*: **1527** ++ *Line count*: **236622** ++ *Field count*: **1239** ++ *File count*: **1528** + *Folder count*: **233** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 815c07b8c..2f0d14d03 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.33) 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.34) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -146,13 +146,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th July, 2019 -+ *Version*: 2.9.33 ++ *Last Build*: 19th July, 2019 ++ *Version*: 2.9.34 + *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*: **236366** -+ *Field count*: **1235** -+ *File count*: **1527** ++ *Line count*: **236622** ++ *Field count*: **1239** ++ *File count*: **1528** + *Folder count*: **233** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/access.xml b/admin/access.xml index 46d82d317..f5d11dd7d 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -342,8 +342,6 @@ - - diff --git a/admin/assets/images/icons/joomla_components.png b/admin/assets/images/icons/joomla_components.png index 3917f1e456ca102b58f1e46f4afdc5f587d06650..6f7d100679166ead9a22140487d074edf0da4ca9 100644 GIT binary patch delta 13594 zcmaiZQ&i_)+-|mAQ%%N%$+m5~CflxWwrx)J%Qe}yZBCwS_x|5?F3#0iXJ3ETdOrJN zKl?$kMyNvqAvAa+x3Ydc=?6FoGnXj4FcXIemxM5vI5#u1ummS3H;0%A3!AtECkq>A zvH%1ji7+<{yBHHEi!c{A7c;XsH@5^U7Z*Dl2P-=VE4R2XSF-p29b*1}4mCp<>9KK$ zh=_}DuyJ$#A2<;fQ7#DHe*K#QISIpaZG?qRV^0VaCM2SNyPVUWP9v7@4* zktS0vsMM-g=+h3xDdM=1(kaA<$@0xt;KY?Dr9x}+HbLMLc_4v`#j<7NSJp}UG&|ad z7+6|wl@g5zm5bQZaS2OIlmG=8CX&^Ddq-_=jA5urz0geJDA{-8ACPh)6T}vMe{W_# zN}EF$fdakmePlv>tu*LJF^Jn2K3bYUr)H=bMr4sfw2MnP5*Cn#&Fs|^t>xh{*infr z0)5;G7X;4PE8WA5C!v5Y!!^Jcpj%H1H(VCi%TrukW7m5*%@NyUC~558#i2jw$}=TS zudgRUk5dw0Sw_9%dj$gjgd8SuYekJJx(@0BHvg`Q5_pdv;LZnIWr^lX;oU^?J*c&8 z*s*0#r8C1o*#@?n?YkWO-1O|)CZzQyw@4oBiTJvB@D`J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/ajax.json.php index 3a4830f3b..69a27a482 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -33,6 +33,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getCrowdinDetails', 'ajax'); $this->registerTask('getClassCode', 'ajax'); $this->registerTask('getClassCodeIds', 'ajax'); + $this->registerTask('getClassHeaderCode', 'ajax'); $this->registerTask('tableColumns', 'ajax'); $this->registerTask('fieldSelectOptions', 'ajax'); $this->registerTask('getDynamicScripts', 'ajax'); @@ -381,6 +382,45 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'getClassHeaderCode': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $idValue = $jinput->get('id', NULL, 'INT'); + $typeValue = $jinput->get('type', NULL, 'WORD'); + if($idValue && $typeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getClassHeaderCode($idValue, $typeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'tableColumns': try { diff --git a/admin/controllers/joomla_plugins.php b/admin/controllers/joomla_plugins.php index 2b76de3aa..e648b8ca3 100644 --- a/admin/controllers/joomla_plugins.php +++ b/admin/controllers/joomla_plugins.php @@ -41,69 +41,6 @@ class ComponentbuilderControllerJoomla_plugins extends JControllerAdmin return parent::getModel($name, $prefix, $config); } - public function exportData() - { - // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('joomla_plugin.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) - { - // Get the input - $input = JFactory::getApplication()->input; - $pks = $input->post->get('cid', array(), 'array'); - // Sanitize the input - JArrayHelper::toInteger($pks); - // Get the model - $model = $this->getModel('Joomla_plugins'); - // get the data to export - $data = $model->getExportData($pks); - if (ComponentbuilderHelper::checkArray($data)) - { - // now set the data to the spreadsheet - $date = JFactory::getDate(); - ComponentbuilderHelper::xls($data,'Joomla_plugins_'.$date->format('jS_F_Y'),'Joomla plugins exported ('.$date->format('jS F, Y').')','joomla plugins'); - } - } - // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false), $message, 'error'); - return; - } - - - public function importData() - { - // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('joomla_plugin.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) - { - // Get the import model - $model = $this->getModel('Joomla_plugins'); - // get the headers to import - $headers = $model->getExImPortHeaders(); - if (ComponentbuilderHelper::checkObject($headers)) - { - // Load headers to session. - $session = JFactory::getSession(); - $headers = json_encode($headers); - $session->set('joomla_plugin_VDM_IMPORTHEADERS', $headers); - $session->set('backto_VDM_IMPORT', 'joomla_plugins'); - $session->set('dataType_VDM_IMPORTINTO', 'joomla_plugin'); - // Redirect to import view. - $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_PLUGINS'); - $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message); - return; - } - } - // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false), $message, 'error'); - return; - } - /** * Run the Expansion diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 29186c266..7df3a6695 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2926,11 +2926,11 @@ class Get $field['settings']->type_name = 'Custom'; } // set the type name - $type_name = ComponentbuilderHelper::safeString($field['settings']->type_name); + $type_name = ComponentbuilderHelper::safeTypeName($field['settings']->type_name); // if custom (we must use the xml value) - if ($type_name === 'custom' || $type_name === 'customuser') + if (strtolower($type_name) === 'custom' || strtolower($type_name) === 'customuser') { - $type = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'type="', '"')); + $type = ComponentbuilderHelper::safeTypeName(ComponentbuilderHelper::getBetween($field['settings']->xml, 'type="', '"')); } else { @@ -2942,17 +2942,12 @@ class Get // force the default value if (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) { - $type = ComponentbuilderHelper::safeString($property['example']); - } - // fallback on type name set in name field - elseif (ComponentbuilderHelper::checkString($type_name)) - { - $type = $type_name; + $type = ComponentbuilderHelper::safeTypeName($property['example']); } // fall back on the xml settings (not ideal) else { - $type = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($xml, 'type="', '"')); + $type = ComponentbuilderHelper::safeTypeName(ComponentbuilderHelper::getBetween($field['settings']->xml, 'type="', '"')); } // exit foreach loop break; @@ -2960,11 +2955,15 @@ class Get } } // check if the value is set - if (ComponentbuilderHelper::checkString($type)) + if (isset($type) && ComponentbuilderHelper::checkString($type)) { - // add the value return $type; } + // fallback on type name set in name field (not ideal) + else + { + return $type_name; + } } // fall back to text return 'text'; diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 9e830fecd..c280b4bf0 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -1399,11 +1399,6 @@ class Fields extends Structure // now add to the field set $field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); } - elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain')) - { - // now add to the field set - $field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); - } elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom'])) { // add to custom @@ -1425,6 +1420,11 @@ class Fields extends Structure // set the custom field file $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single); } + else + { + // now add to the field set + $field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); + } } } } @@ -1498,11 +1498,6 @@ class Fields extends Structure // now add to the field set $field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); } - elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain')) - { - // now add to the field set - $field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); - } elseif ($r_typeName === 'subform') { // set nested depth @@ -1542,6 +1537,11 @@ class Fields extends Structure // set the custom field file $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single); } + else + { + // now add to the field set + $field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); + } } } } @@ -2862,6 +2862,22 @@ class Fields extends Structure // make sure it is not already been build or if it is prime if (isset($data['custom']) && isset($data['custom']['extends']) && ((isset($data['custom']['prime_php']) && $data['custom']['prime_php'] == 1) || !isset($this->fileContentDynamic['customfield_' . $data['type']]) || !ComponentbuilderHelper::checkArray($this->fileContentDynamic['customfield_' . $data['type']]))) { + // set J prefix + $jprefix = 'J'; + // check if this field has a dot in field type name + if (strpos($data['type'], '.') !== false) + { + // so we have name spacing in custom field type name + $dotTypeArray = explode('.', $data['type']); + // set the J prefix + if (count($dotTypeArray) > 1) + { + $jprefix = strtoupper(array_shift($dotTypeArray)); + } + // update the type name now + $data['type'] = implode('', $dotTypeArray); + $data['custom']['type'] = $data['type']; + } // set tab and break replacements $tabBreak = array( '\t' => $this->_t(1), @@ -2869,6 +2885,7 @@ class Fields extends Structure ); // set the [[[PLACEHOLDER]]] options $replace = array( + $this->bbb . 'JPREFIX' . $this->ddd => $jprefix, $this->bbb . 'TABLE' . $this->ddd => $data['custom']['table'], $this->bbb . 'ID' . $this->ddd => $data['custom']['id'], $this->bbb . 'TEXT' . $this->ddd => $data['custom']['text'], @@ -2901,6 +2918,8 @@ class Fields extends Structure } // start loading the field type $this->fileContentDynamic['customfield_' . $data['type']] = array(); + // JPREFIX <>> + $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'JPREFIX' . $this->hhh] = $jprefix; // Type <<>> $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'Type' . $this->hhh] = ComponentbuilderHelper::safeString($data['custom']['type'], 'F'); // type <<>> diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index e21f8ffdb..4361b6e63 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -712,6 +712,48 @@ abstract class ComponentbuilderHelper return self::safeString($string); } + /** + * The type builder switch + **/ + protected static $typeNameBuilder = false; + + /** + * Making field type name safe + * + * @input string The you would like to make safe + * + * @returns string on success + **/ + public static function safeTypeName($string) + { + // get global value + if (self::$typeNameBuilder === false) + { + self::$typeNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('type_name_builder', 1); + } + // use the new convention + if (2 == self::$typeNameBuilder) + { + // 0nly continue if we have a string + if (self::checkString($string)) + { + // check that the first character is not a number + if (is_numeric(substr($string, 0, 1))) + { + $string = self::replaceNumbers($string); + } + // remove all and keep only characters and numbers and point (TODO just one point) + $string = trim(preg_replace("/[^A-Za-z0-9\.]/", '', $string)); + // best is to return lower (for all string equality in compiler) + return strtolower($string); + } + // not a string + return ''; + } + // use the default (original behaviour/convention) + return self::safeString($string); + } + /* * Get the Array of Existing Validation Rule Names * diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 9eb70baf7..d52af6caf 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3145,6 +3145,7 @@ COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix" COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric" +COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot" COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call." COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User" COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info" @@ -3508,6 +3509,8 @@ COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle" COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation" COM_COMPONENTBUILDER_CONFIG_TLS="TLS" COM_COMPONENTBUILDER_CONFIG_TRUE="True" +COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION="The default option only uses alphabetical characters and converts all numbers in field names to the English equivalent like 1 becomes one.
Alphanumeric+dot keeps the numbers unconverted unless it is at the beginning of the field name, and allows for a dot (.) to be used in the type name for namespacing." +COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_LABEL="Field Type Name Builder
(in compiler)" COM_COMPONENTBUILDER_CONFIG_UIKIT_DESC="The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/" COM_COMPONENTBUILDER_CONFIG_UIKIT_LABEL="Uikit2 Settings" @@ -5316,7 +5319,6 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDS="Select the file to import da COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDTYPES="Select the file to import data to fieldtypes." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS="Select the file to import data to help_documents." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS="Select the file to import data to joomla_components." -COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_PLUGINS="Select the file to import data to joomla_plugins." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGES="Select the file to import data to languages." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGE_TRANSLATIONS="Select the file to import data to language_translations." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LAYOUTS="Select the file to import data to layouts." @@ -5883,10 +5885,6 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE="Joomla Plugins Edit State" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION="Joomla Plugins Edit Version" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT="Joomla Plugins Export" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT_DESC="Allows the users in this group to export export joomla plugins" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT="Joomla Plugins Import" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT_DESC="Allows the users in this group to import import joomla plugins" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_ARCHIVED="%s Joomla Plugins archived." COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_ARCHIVED_1="%s Joomla Plugin archived." COM_COMPONENTBUILDER_JOOMLA_PLUGINS_N_ITEMS_CHECKED_IN_0="No Joomla Plugin successfully checked in." @@ -5906,8 +5904,12 @@ 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_PLUGIN_ADD_HEAD="Add Head" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_DESCRIPTION="You can add your own custom header script, combined with the default header script that make the extended class work." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_LABEL="Add Custom Class Header" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS="Class Extends" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL="Extends" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CODE="Code" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CONFIGPARAMS="Config/Params" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_BY_DESC="The user that created this Joomla Plugin." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_BY_LABEL="Created By" @@ -5916,7 +5918,6 @@ 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_DETAILS="Details" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT="Editing the Joomla Plugin" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ERROR_UNIQUE_ALIAS="Another Joomla Plugin has the same alias." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELD="Field" @@ -5980,6 +5981,9 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_SAVE_WARNING="Alias already existed so COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_STATUS="Status" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_VERSION_DESC="A count of the number of times this Joomla Plugin Group has been revised." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_HEAD="Head" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_HEAD_DESCRIPTION="The class head, where JLoader, namespace and use is added, so that class being extended will work." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_HEAD_LABEL="Class Head" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ID="Id" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP="Joomla Plugin Group" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group" @@ -6003,6 +6007,7 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_HINT="Name Here" 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.
" @@ -6023,8 +6028,14 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS="Joomla Plugin Ru COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Plugin to customise the alias." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_STATUS="Status" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME="System Name" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_DESCRIPTION="Used only in the system." +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_VERSION_DESC="A count of the number of times this Joomla Plugin has been revised." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_YES="Yes" COM_COMPONENTBUILDER_JUST_GET_ALL_SNIPPETS="Just Get All Snippets" COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History" COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" 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 23b8a8222..42a278414 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -660,10 +660,6 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE="Joomla Plugins Edit State" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION="Joomla Plugins Edit Version" COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT="Joomla Plugins Export" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EXPORT_DESC="Allows the users in this group to export export joomla plugins" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT="Joomla Plugins Import" -COM_COMPONENTBUILDER_JOOMLA_PLUGINS_IMPORT_DESC="Allows the users in this group to import import joomla plugins" 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_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS="Joomla Plugin Get Boilerplate Button Access" diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 2c946f2bf..ad82e0bd2 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vxsfields; +$items = $displayData->vxtfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/joomla_plugin/details_above.php b/admin/layouts/joomla_plugin/code_above.php similarity index 94% rename from admin/layouts/joomla_plugin/details_above.php rename to admin/layouts/joomla_plugin/code_above.php index 8e191208e..0b9969524 100644 --- a/admin/layouts/joomla_plugin/details_above.php +++ b/admin/layouts/joomla_plugin/code_above.php @@ -26,9 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( - 'name', - 'class_extends', - 'joomla_plugin_group' + 'system_name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/joomla_plugin/details_fullwidth.php b/admin/layouts/joomla_plugin/code_fullwidth.php similarity index 97% rename from admin/layouts/joomla_plugin/details_fullwidth.php rename to admin/layouts/joomla_plugin/code_fullwidth.php index 39b8b415a..25d35c80c 100644 --- a/admin/layouts/joomla_plugin/details_fullwidth.php +++ b/admin/layouts/joomla_plugin/code_fullwidth.php @@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'head', 'main_class_code', 'note_linked_to_notice' ); diff --git a/admin/layouts/joomla_plugin/details_left.php b/admin/layouts/joomla_plugin/code_left.php similarity index 93% rename from admin/layouts/joomla_plugin/details_left.php rename to admin/layouts/joomla_plugin/code_left.php index a1a01c5ee..0b949db63 100644 --- a/admin/layouts/joomla_plugin/details_left.php +++ b/admin/layouts/joomla_plugin/code_left.php @@ -27,6 +27,10 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( 'note_beta_stage', + 'name', + 'class_extends', + 'joomla_plugin_group', + 'add_head', 'note_plugin' ); diff --git a/admin/layouts/joomla_plugin/details_right.php b/admin/layouts/joomla_plugin/code_right.php similarity index 100% rename from admin/layouts/joomla_plugin/details_right.php rename to admin/layouts/joomla_plugin/code_right.php diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 92b0fcb31..5cb30c3e3 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyclinked_components; +$items = $displayData->vydlinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 2ef1d3184..68d1351af 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -255,7 +255,6 @@ class ComponentbuilderModelAjax extends JModelList return ComponentbuilderHelper::getClassCode($id, $type); } - public function getClassCodeIds($id, $type) { if ('property' === $type || 'method' === $type) @@ -268,6 +267,15 @@ class ComponentbuilderModelAjax extends JModelList } return false; } + + public function getClassHeaderCode($id, $type) + { + if ('extends' === $type && ($head = ComponentbuilderHelper::getVar('class_' . $type, $id, 'id', 'head')) !== false && ComponentbuilderHelper::checkString($head)) + { + return base64_decode($head); + } + return false; + } // Used in admin_view diff --git a/admin/models/field.php b/admin/models/field.php index 4ee506d06..26463a098 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -1007,7 +1007,7 @@ class ComponentbuilderModelField extends JModelAdmin } break; case 'type': - $property['value'] = ComponentbuilderHelper::safeString($property['value']); + $property['value'] = ComponentbuilderHelper::safeTypeName($property['value']); break; } // load the property diff --git a/admin/models/fields/joomlaplugins.php b/admin/models/fields/joomlaplugins.php index 09b7a41c9..7f626b7d5 100644 --- a/admin/models/fields/joomlaplugins.php +++ b/admin/models/fields/joomlaplugins.php @@ -40,12 +40,12 @@ class JFormFieldJoomlaplugins extends JFormFieldList // Get the databse object. $db = JFactory::getDBO(); $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name','b.name','c.name'),array('id','plugin_name','class_extends_name','joomla_plugin_group_name'))); + $query->select($db->quoteName(array('a.id','a.system_name','a.name','b.name','c.name'),array('id','plugin_system_name','name','class_extends_name','joomla_plugin_group_name'))); $query->from($db->quoteName('#__componentbuilder_joomla_plugin', 'a')); $query->join('LEFT', $db->quoteName('#__componentbuilder_class_extends', 'b') . ' ON (' . $db->quoteName('a.class_extends') . ' = ' . $db->quoteName('b.id') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin_group', 'c') . ' ON (' . $db->quoteName('a.joomla_plugin_group') . ' = ' . $db->quoteName('c.id') . ')'); $query->where($db->quoteName('a.published') . ' >= 1'); - $query->order('a.name ASC'); + $query->order('a.system_name ASC'); // Implement View Level Access (if set in table) if (!$user->authorise('core.options', 'com_componentbuilder')) { @@ -65,8 +65,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList foreach($items as $item) { // set a full class name - $select = 'class Plg' . ucfirst($item->joomla_plugin_group_name) . $item->plugin_name . ' extends ' . $item->class_extends_name; - $options[] = JHtml::_('select.option', $item->id, $select); + $options[] = JHtml::_('select.option', $item->id, '( ' . $item->plugin_system_name . ' ) class Plg' . ucfirst($item->joomla_plugin_group_name) . $item->name . ' extends ' . $item->class_extends_name); } } return $options; diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 04bfa9450..84ebe43eb 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -203,7 +203,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVxsfields() + public function getVxtfields() { // Get the user object. $user = JFactory::getUser(); @@ -285,13 +285,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVxsfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVxtfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVxsfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVxtfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVxsfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVxtfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVxsfields($item->store, 'store'); + $item->store = $this->selectionTranslationVxtfields($item->store, 'store'); } } @@ -305,7 +305,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVxsfields($value,$name) + public function selectionTranslationVxtfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index 14d738498..f251d61ca 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,123 +9,123 @@ */ // Some Global Values -jform_vvvvvydvwd_required = false; -jform_vvvvvyevwe_required = false; -jform_vvvvvyivwf_required = false; -jform_vvvvvyivwg_required = false; -jform_vvvvvyivwh_required = false; -jform_vvvvvyivwi_required = false; -jform_vvvvvyivwj_required = false; -jform_vvvvvyivwk_required = false; -jform_vvvvvyivwl_required = false; +jform_vvvvvygvwe_required = false; +jform_vvvvvyhvwf_required = false; +jform_vvvvvylvwg_required = false; +jform_vvvvvylvwh_required = false; +jform_vvvvvylvwi_required = false; +jform_vvvvvylvwj_required = false; +jform_vvvvvylvwk_required = false; +jform_vvvvvylvwl_required = false; +jform_vvvvvylvwm_required = false; // Initial Script jQuery(document).ready(function() { - var add_css_view_vvvvvxd = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvvxd(add_css_view_vvvvvxd); + var add_css_view_vvvvvxg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvvxg(add_css_view_vvvvvxg); - var add_css_views_vvvvvxe = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvvxe(add_css_views_vvvvvxe); + var add_css_views_vvvvvxh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvvxh(add_css_views_vvvvvxh); - var add_javascript_view_file_vvvvvxf = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); - vvvvvxf(add_javascript_view_file_vvvvvxf); + var add_javascript_view_file_vvvvvxi = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); + vvvvvxi(add_javascript_view_file_vvvvvxi); - var add_javascript_views_file_vvvvvxg = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); - vvvvvxg(add_javascript_views_file_vvvvvxg); + var add_javascript_views_file_vvvvvxj = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); + vvvvvxj(add_javascript_views_file_vvvvvxj); - var add_javascript_view_footer_vvvvvxh = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvvxh(add_javascript_view_footer_vvvvvxh); + var add_javascript_view_footer_vvvvvxk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvvxk(add_javascript_view_footer_vvvvvxk); - var add_javascript_views_footer_vvvvvxi = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvvxi(add_javascript_views_footer_vvvvvxi); + var add_javascript_views_footer_vvvvvxl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvvxl(add_javascript_views_footer_vvvvvxl); - var add_php_ajax_vvvvvxj = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvxj(add_php_ajax_vvvvvxj); + var add_php_ajax_vvvvvxm = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvxm(add_php_ajax_vvvvvxm); - var add_php_getitem_vvvvvxk = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); - vvvvvxk(add_php_getitem_vvvvvxk); + var add_php_getitem_vvvvvxn = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); + vvvvvxn(add_php_getitem_vvvvvxn); - var add_php_getitems_vvvvvxl = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); - vvvvvxl(add_php_getitems_vvvvvxl); + var add_php_getitems_vvvvvxo = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); + vvvvvxo(add_php_getitems_vvvvvxo); - var add_php_getitems_after_all_vvvvvxm = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); - vvvvvxm(add_php_getitems_after_all_vvvvvxm); + var add_php_getitems_after_all_vvvvvxp = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); + vvvvvxp(add_php_getitems_after_all_vvvvvxp); - var add_php_getlistquery_vvvvvxn = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); - vvvvvxn(add_php_getlistquery_vvvvvxn); + var add_php_getlistquery_vvvvvxq = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + vvvvvxq(add_php_getlistquery_vvvvvxq); - var add_php_getform_vvvvvxo = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); - vvvvvxo(add_php_getform_vvvvvxo); + var add_php_getform_vvvvvxr = jQuery("#jform_add_php_getform input[type='radio']:checked").val(); + vvvvvxr(add_php_getform_vvvvvxr); - var add_php_before_save_vvvvvxp = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); - vvvvvxp(add_php_before_save_vvvvvxp); + var add_php_before_save_vvvvvxs = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); + vvvvvxs(add_php_before_save_vvvvvxs); - var add_php_save_vvvvvxq = jQuery("#jform_add_php_save input[type='radio']:checked").val(); - vvvvvxq(add_php_save_vvvvvxq); + var add_php_save_vvvvvxt = jQuery("#jform_add_php_save input[type='radio']:checked").val(); + vvvvvxt(add_php_save_vvvvvxt); - var add_php_postsavehook_vvvvvxr = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); - vvvvvxr(add_php_postsavehook_vvvvvxr); + var add_php_postsavehook_vvvvvxu = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); + vvvvvxu(add_php_postsavehook_vvvvvxu); - var add_php_allowadd_vvvvvxs = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); - vvvvvxs(add_php_allowadd_vvvvvxs); + var add_php_allowadd_vvvvvxv = jQuery("#jform_add_php_allowadd input[type='radio']:checked").val(); + vvvvvxv(add_php_allowadd_vvvvvxv); - var add_php_allowedit_vvvvvxt = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); - vvvvvxt(add_php_allowedit_vvvvvxt); + var add_php_allowedit_vvvvvxw = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); + vvvvvxw(add_php_allowedit_vvvvvxw); - var add_php_before_cancel_vvvvvxu = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); - vvvvvxu(add_php_before_cancel_vvvvvxu); + var add_php_before_cancel_vvvvvxx = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvxx(add_php_before_cancel_vvvvvxx); - var add_php_after_cancel_vvvvvxv = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); - vvvvvxv(add_php_after_cancel_vvvvvxv); + var add_php_after_cancel_vvvvvxy = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); + vvvvvxy(add_php_after_cancel_vvvvvxy); - var add_php_batchcopy_vvvvvxw = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxw(add_php_batchcopy_vvvvvxw); + var add_php_batchcopy_vvvvvxz = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxz(add_php_batchcopy_vvvvvxz); - var add_php_batchmove_vvvvvxx = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxx(add_php_batchmove_vvvvvxx); + var add_php_batchmove_vvvvvya = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvya(add_php_batchmove_vvvvvya); - var add_php_before_publish_vvvvvxy = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxy(add_php_before_publish_vvvvvxy); + var add_php_before_publish_vvvvvyb = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvyb(add_php_before_publish_vvvvvyb); - var add_php_after_publish_vvvvvxz = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxz(add_php_after_publish_vvvvvxz); + var add_php_after_publish_vvvvvyc = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvyc(add_php_after_publish_vvvvvyc); - var add_php_before_delete_vvvvvya = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvya(add_php_before_delete_vvvvvya); + var add_php_before_delete_vvvvvyd = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvyd(add_php_before_delete_vvvvvyd); - var add_php_after_delete_vvvvvyb = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvyb(add_php_after_delete_vvvvvyb); + var add_php_after_delete_vvvvvye = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvye(add_php_after_delete_vvvvvye); - var add_php_document_vvvvvyc = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvyc(add_php_document_vvvvvyc); + var add_php_document_vvvvvyf = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyf(add_php_document_vvvvvyf); - var add_sql_vvvvvyd = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyd(add_sql_vvvvvyd); - - var source_vvvvvye = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvye = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvye(source_vvvvvye,add_sql_vvvvvye); - - var source_vvvvvyg = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvyg = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyg(source_vvvvvyg,add_sql_vvvvvyg); + vvvvvyg(add_sql_vvvvvyg); - var add_custom_import_vvvvvyi = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvyi(add_custom_import_vvvvvyi); + var source_vvvvvyh = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyh = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyh(source_vvvvvyh,add_sql_vvvvvyh); - var add_custom_import_vvvvvyj = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvyj(add_custom_import_vvvvvyj); + var source_vvvvvyj = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyj = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyj(source_vvvvvyj,add_sql_vvvvvyj); - var add_custom_button_vvvvvyk = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyk(add_custom_button_vvvvvyk); + var add_custom_import_vvvvvyl = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyl(add_custom_import_vvvvvyl); + + var add_custom_import_vvvvvym = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvym(add_custom_import_vvvvvym); + + var add_custom_button_vvvvvyn = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyn(add_custom_button_vvvvvyn); }); -// the vvvvvxd function -function vvvvvxd(add_css_view_vvvvvxd) +// the vvvvvxg function +function vvvvvxg(add_css_view_vvvvvxg) { // set the function logic - if (add_css_view_vvvvvxd == 1) + if (add_css_view_vvvvvxg == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -135,11 +135,11 @@ function vvvvvxd(add_css_view_vvvvvxd) } } -// the vvvvvxe function -function vvvvvxe(add_css_views_vvvvvxe) +// the vvvvvxh function +function vvvvvxh(add_css_views_vvvvvxh) { // set the function logic - if (add_css_views_vvvvvxe == 1) + if (add_css_views_vvvvvxh == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -149,11 +149,11 @@ function vvvvvxe(add_css_views_vvvvvxe) } } -// the vvvvvxf function -function vvvvvxf(add_javascript_view_file_vvvvvxf) +// the vvvvvxi function +function vvvvvxi(add_javascript_view_file_vvvvvxi) { // set the function logic - if (add_javascript_view_file_vvvvvxf == 1) + if (add_javascript_view_file_vvvvvxi == 1) { jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show(); } @@ -163,11 +163,11 @@ function vvvvvxf(add_javascript_view_file_vvvvvxf) } } -// the vvvvvxg function -function vvvvvxg(add_javascript_views_file_vvvvvxg) +// the vvvvvxj function +function vvvvvxj(add_javascript_views_file_vvvvvxj) { // set the function logic - if (add_javascript_views_file_vvvvvxg == 1) + if (add_javascript_views_file_vvvvvxj == 1) { jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show(); } @@ -177,11 +177,11 @@ function vvvvvxg(add_javascript_views_file_vvvvvxg) } } -// the vvvvvxh function -function vvvvvxh(add_javascript_view_footer_vvvvvxh) +// the vvvvvxk function +function vvvvvxk(add_javascript_view_footer_vvvvvxk) { // set the function logic - if (add_javascript_view_footer_vvvvvxh == 1) + if (add_javascript_view_footer_vvvvvxk == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -191,11 +191,11 @@ function vvvvvxh(add_javascript_view_footer_vvvvvxh) } } -// the vvvvvxi function -function vvvvvxi(add_javascript_views_footer_vvvvvxi) +// the vvvvvxl function +function vvvvvxl(add_javascript_views_footer_vvvvvxl) { // set the function logic - if (add_javascript_views_footer_vvvvvxi == 1) + if (add_javascript_views_footer_vvvvvxl == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } @@ -205,11 +205,11 @@ function vvvvvxi(add_javascript_views_footer_vvvvvxi) } } -// the vvvvvxj function -function vvvvvxj(add_php_ajax_vvvvvxj) +// the vvvvvxm function +function vvvvvxm(add_php_ajax_vvvvvxm) { // set the function logic - if (add_php_ajax_vvvvvxj == 1) + if (add_php_ajax_vvvvvxm == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); @@ -221,11 +221,11 @@ function vvvvvxj(add_php_ajax_vvvvvxj) } } -// the vvvvvxk function -function vvvvvxk(add_php_getitem_vvvvvxk) +// the vvvvvxn function +function vvvvvxn(add_php_getitem_vvvvvxn) { // set the function logic - if (add_php_getitem_vvvvvxk == 1) + if (add_php_getitem_vvvvvxn == 1) { jQuery('#jform_php_getitem-lbl').closest('.control-group').show(); } @@ -235,11 +235,11 @@ function vvvvvxk(add_php_getitem_vvvvvxk) } } -// the vvvvvxl function -function vvvvvxl(add_php_getitems_vvvvvxl) +// the vvvvvxo function +function vvvvvxo(add_php_getitems_vvvvvxo) { // set the function logic - if (add_php_getitems_vvvvvxl == 1) + if (add_php_getitems_vvvvvxo == 1) { jQuery('#jform_php_getitems-lbl').closest('.control-group').show(); } @@ -249,11 +249,11 @@ function vvvvvxl(add_php_getitems_vvvvvxl) } } -// the vvvvvxm function -function vvvvvxm(add_php_getitems_after_all_vvvvvxm) +// the vvvvvxp function +function vvvvvxp(add_php_getitems_after_all_vvvvvxp) { // set the function logic - if (add_php_getitems_after_all_vvvvvxm == 1) + if (add_php_getitems_after_all_vvvvvxp == 1) { jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show(); } @@ -263,11 +263,11 @@ function vvvvvxm(add_php_getitems_after_all_vvvvvxm) } } -// the vvvvvxn function -function vvvvvxn(add_php_getlistquery_vvvvvxn) +// the vvvvvxq function +function vvvvvxq(add_php_getlistquery_vvvvvxq) { // set the function logic - if (add_php_getlistquery_vvvvvxn == 1) + if (add_php_getlistquery_vvvvvxq == 1) { jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); } @@ -277,11 +277,11 @@ function vvvvvxn(add_php_getlistquery_vvvvvxn) } } -// the vvvvvxo function -function vvvvvxo(add_php_getform_vvvvvxo) +// the vvvvvxr function +function vvvvvxr(add_php_getform_vvvvvxr) { // set the function logic - if (add_php_getform_vvvvvxo == 1) + if (add_php_getform_vvvvvxr == 1) { jQuery('#jform_php_getform-lbl').closest('.control-group').show(); } @@ -291,11 +291,11 @@ function vvvvvxo(add_php_getform_vvvvvxo) } } -// the vvvvvxp function -function vvvvvxp(add_php_before_save_vvvvvxp) +// the vvvvvxs function +function vvvvvxs(add_php_before_save_vvvvvxs) { // set the function logic - if (add_php_before_save_vvvvvxp == 1) + if (add_php_before_save_vvvvvxs == 1) { jQuery('#jform_php_before_save-lbl').closest('.control-group').show(); } @@ -305,11 +305,11 @@ function vvvvvxp(add_php_before_save_vvvvvxp) } } -// the vvvvvxq function -function vvvvvxq(add_php_save_vvvvvxq) +// the vvvvvxt function +function vvvvvxt(add_php_save_vvvvvxt) { // set the function logic - if (add_php_save_vvvvvxq == 1) + if (add_php_save_vvvvvxt == 1) { jQuery('#jform_php_save-lbl').closest('.control-group').show(); } @@ -319,11 +319,11 @@ function vvvvvxq(add_php_save_vvvvvxq) } } -// the vvvvvxr function -function vvvvvxr(add_php_postsavehook_vvvvvxr) +// the vvvvvxu function +function vvvvvxu(add_php_postsavehook_vvvvvxu) { // set the function logic - if (add_php_postsavehook_vvvvvxr == 1) + if (add_php_postsavehook_vvvvvxu == 1) { jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show(); } @@ -333,11 +333,11 @@ function vvvvvxr(add_php_postsavehook_vvvvvxr) } } -// the vvvvvxs function -function vvvvvxs(add_php_allowadd_vvvvvxs) +// the vvvvvxv function +function vvvvvxv(add_php_allowadd_vvvvvxv) { // set the function logic - if (add_php_allowadd_vvvvvxs == 1) + if (add_php_allowadd_vvvvvxv == 1) { jQuery('#jform_php_allowadd-lbl').closest('.control-group').show(); } @@ -347,11 +347,11 @@ function vvvvvxs(add_php_allowadd_vvvvvxs) } } -// the vvvvvxt function -function vvvvvxt(add_php_allowedit_vvvvvxt) +// the vvvvvxw function +function vvvvvxw(add_php_allowedit_vvvvvxw) { // set the function logic - if (add_php_allowedit_vvvvvxt == 1) + if (add_php_allowedit_vvvvvxw == 1) { jQuery('#jform_php_allowedit-lbl').closest('.control-group').show(); } @@ -361,11 +361,11 @@ function vvvvvxt(add_php_allowedit_vvvvvxt) } } -// the vvvvvxu function -function vvvvvxu(add_php_before_cancel_vvvvvxu) +// the vvvvvxx function +function vvvvvxx(add_php_before_cancel_vvvvvxx) { // set the function logic - if (add_php_before_cancel_vvvvvxu == 1) + if (add_php_before_cancel_vvvvvxx == 1) { jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); } @@ -375,11 +375,11 @@ function vvvvvxu(add_php_before_cancel_vvvvvxu) } } -// the vvvvvxv function -function vvvvvxv(add_php_after_cancel_vvvvvxv) +// the vvvvvxy function +function vvvvvxy(add_php_after_cancel_vvvvvxy) { // set the function logic - if (add_php_after_cancel_vvvvvxv == 1) + if (add_php_after_cancel_vvvvvxy == 1) { jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show(); } @@ -389,11 +389,11 @@ function vvvvvxv(add_php_after_cancel_vvvvvxv) } } -// the vvvvvxw function -function vvvvvxw(add_php_batchcopy_vvvvvxw) +// the vvvvvxz function +function vvvvvxz(add_php_batchcopy_vvvvvxz) { // set the function logic - if (add_php_batchcopy_vvvvvxw == 1) + if (add_php_batchcopy_vvvvvxz == 1) { jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); } @@ -403,11 +403,11 @@ function vvvvvxw(add_php_batchcopy_vvvvvxw) } } -// the vvvvvxx function -function vvvvvxx(add_php_batchmove_vvvvvxx) +// the vvvvvya function +function vvvvvya(add_php_batchmove_vvvvvya) { // set the function logic - if (add_php_batchmove_vvvvvxx == 1) + if (add_php_batchmove_vvvvvya == 1) { jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); } @@ -417,11 +417,11 @@ function vvvvvxx(add_php_batchmove_vvvvvxx) } } -// the vvvvvxy function -function vvvvvxy(add_php_before_publish_vvvvvxy) +// the vvvvvyb function +function vvvvvyb(add_php_before_publish_vvvvvyb) { // set the function logic - if (add_php_before_publish_vvvvvxy == 1) + if (add_php_before_publish_vvvvvyb == 1) { jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); } @@ -431,11 +431,11 @@ function vvvvvxy(add_php_before_publish_vvvvvxy) } } -// the vvvvvxz function -function vvvvvxz(add_php_after_publish_vvvvvxz) +// the vvvvvyc function +function vvvvvyc(add_php_after_publish_vvvvvyc) { // set the function logic - if (add_php_after_publish_vvvvvxz == 1) + if (add_php_after_publish_vvvvvyc == 1) { jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); } @@ -445,11 +445,11 @@ function vvvvvxz(add_php_after_publish_vvvvvxz) } } -// the vvvvvya function -function vvvvvya(add_php_before_delete_vvvvvya) +// the vvvvvyd function +function vvvvvyd(add_php_before_delete_vvvvvyd) { // set the function logic - if (add_php_before_delete_vvvvvya == 1) + if (add_php_before_delete_vvvvvyd == 1) { jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); } @@ -459,11 +459,11 @@ function vvvvvya(add_php_before_delete_vvvvvya) } } -// the vvvvvyb function -function vvvvvyb(add_php_after_delete_vvvvvyb) +// the vvvvvye function +function vvvvvye(add_php_after_delete_vvvvvye) { // set the function logic - if (add_php_after_delete_vvvvvyb == 1) + if (add_php_after_delete_vvvvvye == 1) { jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); } @@ -473,11 +473,11 @@ function vvvvvyb(add_php_after_delete_vvvvvyb) } } -// the vvvvvyc function -function vvvvvyc(add_php_document_vvvvvyc) +// the vvvvvyf function +function vvvvvyf(add_php_document_vvvvvyf) { // set the function logic - if (add_php_document_vvvvvyc == 1) + if (add_php_document_vvvvvyf == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -487,75 +487,75 @@ function vvvvvyc(add_php_document_vvvvvyc) } } -// the vvvvvyd function -function vvvvvyd(add_sql_vvvvvyd) +// the vvvvvyg function +function vvvvvyg(add_sql_vvvvvyg) { // set the function logic - if (add_sql_vvvvvyd == 1) + if (add_sql_vvvvvyg == 1) { jQuery('#jform_source').closest('.control-group').show(); // add required attribute to source field - if (jform_vvvvvydvwd_required) + if (jform_vvvvvygvwe_required) { updateFieldRequired('source',0); jQuery('#jform_source').prop('required','required'); jQuery('#jform_source').attr('aria-required',true); jQuery('#jform_source').addClass('required'); - jform_vvvvvydvwd_required = false; + jform_vvvvvygvwe_required = false; } } else { jQuery('#jform_source').closest('.control-group').hide(); // remove required attribute from source field - if (!jform_vvvvvydvwd_required) + if (!jform_vvvvvygvwe_required) { updateFieldRequired('source',1); jQuery('#jform_source').removeAttr('required'); jQuery('#jform_source').removeAttr('aria-required'); jQuery('#jform_source').removeClass('required'); - jform_vvvvvydvwd_required = true; + jform_vvvvvygvwe_required = true; } } } -// the vvvvvye function -function vvvvvye(source_vvvvvye,add_sql_vvvvvye) +// the vvvvvyh function +function vvvvvyh(source_vvvvvyh,add_sql_vvvvvyh) { // set the function logic - if (source_vvvvvye == 2 && add_sql_vvvvvye == 1) + if (source_vvvvvyh == 2 && add_sql_vvvvvyh == 1) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field - if (jform_vvvvvyevwe_required) + if (jform_vvvvvyhvwf_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvyevwe_required = false; + jform_vvvvvyhvwf_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field - if (!jform_vvvvvyevwe_required) + if (!jform_vvvvvyhvwf_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvyevwe_required = true; + jform_vvvvvyhvwf_required = true; } } } -// the vvvvvyg function -function vvvvvyg(source_vvvvvyg,add_sql_vvvvvyg) +// the vvvvvyj function +function vvvvvyj(source_vvvvvyj,add_sql_vvvvvyj) { // set the function logic - if (source_vvvvvyg == 1 && add_sql_vvvvvyg == 1) + if (source_vvvvvyj == 1 && add_sql_vvvvvyj == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -565,165 +565,165 @@ function vvvvvyg(source_vvvvvyg,add_sql_vvvvvyg) } } -// the vvvvvyi function -function vvvvvyi(add_custom_import_vvvvvyi) +// the vvvvvyl function +function vvvvvyl(add_custom_import_vvvvvyl) { // set the function logic - if (add_custom_import_vvvvvyi == 1) + if (add_custom_import_vvvvvyl == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field - if (jform_vvvvvyivwf_required) + if (jform_vvvvvylvwg_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_vvvvvyivwf_required = false; + jform_vvvvvylvwg_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_vvvvvyivwg_required) + if (jform_vvvvvylvwh_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_vvvvvyivwg_required = false; + jform_vvvvvylvwh_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field - if (jform_vvvvvyivwh_required) + if (jform_vvvvvylvwi_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_vvvvvyivwh_required = false; + jform_vvvvvylvwi_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field - if (jform_vvvvvyivwi_required) + if (jform_vvvvvylvwj_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_vvvvvyivwi_required = false; + jform_vvvvvylvwj_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field - if (jform_vvvvvyivwj_required) + if (jform_vvvvvylvwk_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_vvvvvyivwj_required = false; + jform_vvvvvylvwk_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field - if (jform_vvvvvyivwk_required) + if (jform_vvvvvylvwl_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_vvvvvyivwk_required = false; + jform_vvvvvylvwl_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field - if (jform_vvvvvyivwl_required) + if (jform_vvvvvylvwm_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_vvvvvyivwl_required = false; + jform_vvvvvylvwm_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field - if (!jform_vvvvvyivwf_required) + if (!jform_vvvvvylvwg_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_vvvvvyivwf_required = true; + jform_vvvvvylvwg_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_vvvvvyivwg_required) + if (!jform_vvvvvylvwh_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_vvvvvyivwg_required = true; + jform_vvvvvylvwh_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field - if (!jform_vvvvvyivwh_required) + if (!jform_vvvvvylvwi_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_vvvvvyivwh_required = true; + jform_vvvvvylvwi_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field - if (!jform_vvvvvyivwi_required) + if (!jform_vvvvvylvwj_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_vvvvvyivwi_required = true; + jform_vvvvvylvwj_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field - if (!jform_vvvvvyivwj_required) + if (!jform_vvvvvylvwk_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_vvvvvyivwj_required = true; + jform_vvvvvylvwk_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field - if (!jform_vvvvvyivwk_required) + if (!jform_vvvvvylvwl_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_vvvvvyivwk_required = true; + jform_vvvvvylvwl_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field - if (!jform_vvvvvyivwl_required) + if (!jform_vvvvvylvwm_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_vvvvvyivwl_required = true; + jform_vvvvvylvwm_required = true; } } } -// the vvvvvyj function -function vvvvvyj(add_custom_import_vvvvvyj) +// the vvvvvym function +function vvvvvym(add_custom_import_vvvvvym) { // set the function logic - if (add_custom_import_vvvvvyj == 0) + if (add_custom_import_vvvvvym == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -733,11 +733,11 @@ function vvvvvyj(add_custom_import_vvvvvyj) } } -// the vvvvvyk function -function vvvvvyk(add_custom_button_vvvvvyk) +// the vvvvvyn function +function vvvvvyn(add_custom_button_vvvvvyn) { // set the function logic - if (add_custom_button_vvvvvyk == 1) + if (add_custom_button_vvvvvyn == 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_extends.xml b/admin/models/forms/class_extends.xml index 7f418a370..7fa36c691 100644 --- a/admin/models/forms/class_extends.xml +++ b/admin/models/forms/class_extends.xml @@ -127,9 +127,9 @@ label="COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD_LABEL" description="COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD_DESCRIPTION" width="100%" - height="450px" + height="100px" cols="15" - rows="30" + rows="10" buttons="no" syntax="php" editor="codemirror|none" diff --git a/admin/models/forms/class_method.js b/admin/models/forms/class_method.js index 3c23c163e..93c07c6a6 100644 --- a/admin/models/forms/class_method.js +++ b/admin/models/forms/class_method.js @@ -9,29 +9,29 @@ */ // Some Global Values -jform_vvvvwaovxe_required = false; +jform_vvvvwarvxf_required = false; // Initial Script jQuery(document).ready(function() { - var extension_type_vvvvwao = jQuery("#jform_extension_type").val(); - vvvvwao(extension_type_vvvvwao); + var extension_type_vvvvwar = jQuery("#jform_extension_type").val(); + vvvvwar(extension_type_vvvvwar); }); -// the vvvvwao function -function vvvvwao(extension_type_vvvvwao) +// the vvvvwar function +function vvvvwar(extension_type_vvvvwar) { - if (isSet(extension_type_vvvvwao) && extension_type_vvvvwao.constructor !== Array) + if (isSet(extension_type_vvvvwar) && extension_type_vvvvwar.constructor !== Array) { - var temp_vvvvwao = extension_type_vvvvwao; - var extension_type_vvvvwao = []; - extension_type_vvvvwao.push(temp_vvvvwao); + var temp_vvvvwar = extension_type_vvvvwar; + var extension_type_vvvvwar = []; + extension_type_vvvvwar.push(temp_vvvvwar); } - else if (!isSet(extension_type_vvvvwao)) + else if (!isSet(extension_type_vvvvwar)) { - var extension_type_vvvvwao = []; + var extension_type_vvvvwar = []; } - var extension_type = extension_type_vvvvwao.some(extension_type_vvvvwao_SomeFunc); + var extension_type = extension_type_vvvvwar.some(extension_type_vvvvwar_SomeFunc); // set this function logic @@ -39,35 +39,35 @@ function vvvvwao(extension_type_vvvvwao) { jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); // add required attribute to joomla_plugin_group field - if (jform_vvvvwaovxe_required) + if (jform_vvvvwarvxf_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_vvvvwaovxe_required = false; + jform_vvvvwarvxf_required = false; } } else { jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); // remove required attribute from joomla_plugin_group field - if (!jform_vvvvwaovxe_required) + if (!jform_vvvvwarvxf_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_vvvvwaovxe_required = true; + jform_vvvvwarvxf_required = true; } } } -// the vvvvwao Some function -function extension_type_vvvvwao_SomeFunc(extension_type_vvvvwao) +// the vvvvwar Some function +function extension_type_vvvvwar_SomeFunc(extension_type_vvvvwar) { // set the function logic - if (extension_type_vvvvwao == 'plugins' || extension_type_vvvvwao == 'plugin') + if (extension_type_vvvvwar == 'plugins' || extension_type_vvvvwar == 'plugin') { return true; } diff --git a/admin/models/forms/class_property.js b/admin/models/forms/class_property.js index b3f18db20..71cc40a9b 100644 --- a/admin/models/forms/class_property.js +++ b/admin/models/forms/class_property.js @@ -9,29 +9,29 @@ */ // Some Global Values -jform_vvvvwanvxd_required = false; +jform_vvvvwaqvxe_required = false; // Initial Script jQuery(document).ready(function() { - var extension_type_vvvvwan = jQuery("#jform_extension_type").val(); - vvvvwan(extension_type_vvvvwan); + var extension_type_vvvvwaq = jQuery("#jform_extension_type").val(); + vvvvwaq(extension_type_vvvvwaq); }); -// the vvvvwan function -function vvvvwan(extension_type_vvvvwan) +// the vvvvwaq function +function vvvvwaq(extension_type_vvvvwaq) { - if (isSet(extension_type_vvvvwan) && extension_type_vvvvwan.constructor !== Array) + if (isSet(extension_type_vvvvwaq) && extension_type_vvvvwaq.constructor !== Array) { - var temp_vvvvwan = extension_type_vvvvwan; - var extension_type_vvvvwan = []; - extension_type_vvvvwan.push(temp_vvvvwan); + var temp_vvvvwaq = extension_type_vvvvwaq; + var extension_type_vvvvwaq = []; + extension_type_vvvvwaq.push(temp_vvvvwaq); } - else if (!isSet(extension_type_vvvvwan)) + else if (!isSet(extension_type_vvvvwaq)) { - var extension_type_vvvvwan = []; + var extension_type_vvvvwaq = []; } - var extension_type = extension_type_vvvvwan.some(extension_type_vvvvwan_SomeFunc); + var extension_type = extension_type_vvvvwaq.some(extension_type_vvvvwaq_SomeFunc); // set this function logic @@ -39,35 +39,35 @@ function vvvvwan(extension_type_vvvvwan) { jQuery('#jform_joomla_plugin_group').closest('.control-group').show(); // add required attribute to joomla_plugin_group field - if (jform_vvvvwanvxd_required) + if (jform_vvvvwaqvxe_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_vvvvwanvxd_required = false; + jform_vvvvwaqvxe_required = false; } } else { jQuery('#jform_joomla_plugin_group').closest('.control-group').hide(); // remove required attribute from joomla_plugin_group field - if (!jform_vvvvwanvxd_required) + if (!jform_vvvvwaqvxe_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_vvvvwanvxd_required = true; + jform_vvvvwaqvxe_required = true; } } } -// the vvvvwan Some function -function extension_type_vvvvwan_SomeFunc(extension_type_vvvvwan) +// the vvvvwaq Some function +function extension_type_vvvvwaq_SomeFunc(extension_type_vvvvwaq) { // set the function logic - if (extension_type_vvvvwan == 'plugins' || extension_type_vvvvwan == 'plugin') + if (extension_type_vvvvwaq == 'plugins' || extension_type_vvvvwaq == 'plugin') { return true; } diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index e457b475f..ca422ca4e 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_vvvvvyl = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyl(add_php_view_vvvvvyl); + var add_php_view_vvvvvyo = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvyo(add_php_view_vvvvvyo); - var add_php_jview_display_vvvvvym = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvym(add_php_jview_display_vvvvvym); + var add_php_jview_display_vvvvvyp = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvyp(add_php_jview_display_vvvvvyp); - var add_php_jview_vvvvvyn = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvyn(add_php_jview_vvvvvyn); + var add_php_jview_vvvvvyq = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvyq(add_php_jview_vvvvvyq); - var add_php_document_vvvvvyo = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvyo(add_php_document_vvvvvyo); + var add_php_document_vvvvvyr = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyr(add_php_document_vvvvvyr); - var add_css_document_vvvvvyp = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvyp(add_css_document_vvvvvyp); + var add_css_document_vvvvvys = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvys(add_css_document_vvvvvys); - var add_javascript_file_vvvvvyq = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); - vvvvvyq(add_javascript_file_vvvvvyq); + var add_javascript_file_vvvvvyt = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); + vvvvvyt(add_javascript_file_vvvvvyt); - var add_js_document_vvvvvyr = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvyr(add_js_document_vvvvvyr); + var add_js_document_vvvvvyu = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvyu(add_js_document_vvvvvyu); - var add_custom_button_vvvvvys = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvys(add_custom_button_vvvvvys); + var add_custom_button_vvvvvyv = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyv(add_custom_button_vvvvvyv); - var add_css_vvvvvyt = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvyt(add_css_vvvvvyt); + var add_css_vvvvvyw = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvyw(add_css_vvvvvyw); - var add_php_ajax_vvvvvyu = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvyu(add_php_ajax_vvvvvyu); + var add_php_ajax_vvvvvyx = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvyx(add_php_ajax_vvvvvyx); }); -// the vvvvvyl function -function vvvvvyl(add_php_view_vvvvvyl) +// the vvvvvyo function +function vvvvvyo(add_php_view_vvvvvyo) { // set the function logic - if (add_php_view_vvvvvyl == 1) + if (add_php_view_vvvvvyo == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } @@ -56,11 +56,11 @@ function vvvvvyl(add_php_view_vvvvvyl) } } -// the vvvvvym function -function vvvvvym(add_php_jview_display_vvvvvym) +// the vvvvvyp function +function vvvvvyp(add_php_jview_display_vvvvvyp) { // set the function logic - if (add_php_jview_display_vvvvvym == 1) + if (add_php_jview_display_vvvvvyp == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } @@ -70,11 +70,11 @@ function vvvvvym(add_php_jview_display_vvvvvym) } } -// the vvvvvyn function -function vvvvvyn(add_php_jview_vvvvvyn) +// the vvvvvyq function +function vvvvvyq(add_php_jview_vvvvvyq) { // set the function logic - if (add_php_jview_vvvvvyn == 1) + if (add_php_jview_vvvvvyq == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } @@ -84,11 +84,11 @@ function vvvvvyn(add_php_jview_vvvvvyn) } } -// the vvvvvyo function -function vvvvvyo(add_php_document_vvvvvyo) +// the vvvvvyr function +function vvvvvyr(add_php_document_vvvvvyr) { // set the function logic - if (add_php_document_vvvvvyo == 1) + if (add_php_document_vvvvvyr == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -98,11 +98,11 @@ function vvvvvyo(add_php_document_vvvvvyo) } } -// the vvvvvyp function -function vvvvvyp(add_css_document_vvvvvyp) +// the vvvvvys function +function vvvvvys(add_css_document_vvvvvys) { // set the function logic - if (add_css_document_vvvvvyp == 1) + if (add_css_document_vvvvvys == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } @@ -112,11 +112,11 @@ function vvvvvyp(add_css_document_vvvvvyp) } } -// the vvvvvyq function -function vvvvvyq(add_javascript_file_vvvvvyq) +// the vvvvvyt function +function vvvvvyt(add_javascript_file_vvvvvyt) { // set the function logic - if (add_javascript_file_vvvvvyq == 1) + if (add_javascript_file_vvvvvyt == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } @@ -126,11 +126,11 @@ function vvvvvyq(add_javascript_file_vvvvvyq) } } -// the vvvvvyr function -function vvvvvyr(add_js_document_vvvvvyr) +// the vvvvvyu function +function vvvvvyu(add_js_document_vvvvvyu) { // set the function logic - if (add_js_document_vvvvvyr == 1) + if (add_js_document_vvvvvyu == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } @@ -140,11 +140,11 @@ function vvvvvyr(add_js_document_vvvvvyr) } } -// the vvvvvys function -function vvvvvys(add_custom_button_vvvvvys) +// the vvvvvyv function +function vvvvvyv(add_custom_button_vvvvvyv) { // set the function logic - if (add_custom_button_vvvvvys == 1) + if (add_custom_button_vvvvvyv == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); @@ -158,11 +158,11 @@ function vvvvvys(add_custom_button_vvvvvys) } } -// the vvvvvyt function -function vvvvvyt(add_css_vvvvvyt) +// the vvvvvyw function +function vvvvvyw(add_css_vvvvvyw) { // set the function logic - if (add_css_vvvvvyt == 1) + if (add_css_vvvvvyw == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } @@ -172,11 +172,11 @@ function vvvvvyt(add_css_vvvvvyt) } } -// the vvvvvyu function -function vvvvvyu(add_php_ajax_vvvvvyu) +// the vvvvvyx function +function vvvvvyx(add_php_ajax_vvvvvyx) { // set the function logic - if (add_php_ajax_vvvvvyu == 1) + if (add_php_ajax_vvvvvyx == 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 ab700d592..a2c1d6ace 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -9,44 +9,44 @@ */ // Some Global Values -jform_vvvvwajvwz_required = false; -jform_vvvvwakvxa_required = false; -jform_vvvvwakvxb_required = false; -jform_vvvvwakvxc_required = false; +jform_vvvvwamvxa_required = false; +jform_vvvvwanvxb_required = false; +jform_vvvvwanvxc_required = false; +jform_vvvvwanvxd_required = false; // Initial Script jQuery(document).ready(function() { - var target_vvvvwaj = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwaj(target_vvvvwaj); - - var target_vvvvwak = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwak(target_vvvvwak); - - var target_vvvvwal = jQuery("#jform_target input[type='radio']:checked").val(); - var type_vvvvwal = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvwal(target_vvvvwal,type_vvvvwal); - - var type_vvvvwam = jQuery("#jform_type input[type='radio']:checked").val(); var target_vvvvwam = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwam(type_vvvvwam,target_vvvvwam); + vvvvwam(target_vvvvwam); + + var target_vvvvwan = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwan(target_vvvvwan); + + var target_vvvvwao = jQuery("#jform_target input[type='radio']:checked").val(); + var type_vvvvwao = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwao(target_vvvvwao,type_vvvvwao); + + var type_vvvvwap = jQuery("#jform_type input[type='radio']:checked").val(); + var target_vvvvwap = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwap(type_vvvvwap,target_vvvvwap); }); -// the vvvvwaj function -function vvvvwaj(target_vvvvwaj) +// the vvvvwam function +function vvvvwam(target_vvvvwam) { // set the function logic - if (target_vvvvwaj == 2) + if (target_vvvvwam == 2) { jQuery('#jform_function_name').closest('.control-group').show(); // add required attribute to function_name field - if (jform_vvvvwajvwz_required) + if (jform_vvvvwamvxa_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_vvvvwajvwz_required = false; + jform_vvvvwamvxa_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); jQuery('#jform_system_name').closest('.control-group').show(); @@ -55,102 +55,102 @@ function vvvvwaj(target_vvvvwaj) { jQuery('#jform_function_name').closest('.control-group').hide(); // remove required attribute from function_name field - if (!jform_vvvvwajvwz_required) + if (!jform_vvvvwamvxa_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_vvvvwajvwz_required = true; + jform_vvvvwamvxa_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); } } -// the vvvvwak function -function vvvvwak(target_vvvvwak) +// the vvvvwan function +function vvvvwan(target_vvvvwan) { // set the function logic - if (target_vvvvwak == 1) + if (target_vvvvwan == 1) { jQuery('#jform_component').closest('.control-group').show(); // add required attribute to component field - if (jform_vvvvwakvxa_required) + if (jform_vvvvwanvxb_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); - jform_vvvvwakvxa_required = false; + jform_vvvvwanvxb_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field - if (jform_vvvvwakvxb_required) + if (jform_vvvvwanvxc_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvwakvxb_required = false; + jform_vvvvwanvxc_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_vvvvwakvxc_required) + if (jform_vvvvwanvxd_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); - jform_vvvvwakvxc_required = false; + jform_vvvvwanvxd_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); // remove required attribute from component field - if (!jform_vvvvwakvxa_required) + if (!jform_vvvvwanvxb_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); - jform_vvvvwakvxa_required = true; + jform_vvvvwanvxb_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field - if (!jform_vvvvwakvxb_required) + if (!jform_vvvvwanvxc_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvwakvxb_required = true; + jform_vvvvwanvxc_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_vvvvwakvxc_required) + if (!jform_vvvvwanvxd_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); - jform_vvvvwakvxc_required = true; + jform_vvvvwanvxd_required = true; } } } -// the vvvvwal function -function vvvvwal(target_vvvvwal,type_vvvvwal) +// the vvvvwao function +function vvvvwao(target_vvvvwao,type_vvvvwao) { // set the function logic - if (target_vvvvwal == 1 && type_vvvvwal == 1) + if (target_vvvvwao == 1 && type_vvvvwao == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); @@ -162,11 +162,11 @@ function vvvvwal(target_vvvvwal,type_vvvvwal) } } -// the vvvvwam function -function vvvvwam(type_vvvvwam,target_vvvvwam) +// the vvvvwap function +function vvvvwap(type_vvvvwap,target_vvvvwap) { // set the function logic - if (type_vvvvwam == 1 && target_vvvvwam == 1) + if (type_vvvvwap == 1 && target_vvvvwap == 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 b9eea9c07..afb2548da 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -9,34 +9,25 @@ */ // Some Global Values -jform_vvvvvzivwm_required = false; -jform_vvvvvzkvwn_required = false; -jform_vvvvvzlvwo_required = false; -jform_vvvvvzmvwp_required = false; -jform_vvvvvznvwq_required = false; -jform_vvvvvzyvwr_required = false; -jform_vvvvvzyvws_required = false; -jform_vvvvwadvwt_required = false; -jform_vvvvwadvwu_required = false; -jform_vvvvwadvwv_required = false; -jform_vvvvwaevww_required = false; -jform_vvvvwafvwx_required = false; -jform_vvvvwagvwy_required = false; +jform_vvvvvzlvwn_required = false; +jform_vvvvvznvwo_required = false; +jform_vvvvvzovwp_required = false; +jform_vvvvvzpvwq_required = false; +jform_vvvvvzqvwr_required = false; +jform_vvvvwabvws_required = false; +jform_vvvvwabvwt_required = false; +jform_vvvvwagvwu_required = false; +jform_vvvvwagvwv_required = false; +jform_vvvvwagvww_required = false; +jform_vvvvwahvwx_required = false; +jform_vvvvwaivwy_required = false; +jform_vvvvwajvwz_required = false; // Initial Script jQuery(document).ready(function() { - var gettype_vvvvvzi = jQuery("#jform_gettype").val(); - vvvvvzi(gettype_vvvvvzi); - - var main_source_vvvvvzj = jQuery("#jform_main_source").val(); - vvvvvzj(main_source_vvvvvzj); - - var main_source_vvvvvzk = jQuery("#jform_main_source").val(); - vvvvvzk(main_source_vvvvvzk); - - var main_source_vvvvvzl = jQuery("#jform_main_source").val(); - vvvvvzl(main_source_vvvvvzl); + var gettype_vvvvvzl = jQuery("#jform_gettype").val(); + vvvvvzl(gettype_vvvvvzl); var main_source_vvvvvzm = jQuery("#jform_main_source").val(); vvvvvzm(main_source_vvvvvzm); @@ -44,77 +35,86 @@ jQuery(document).ready(function() var main_source_vvvvvzn = jQuery("#jform_main_source").val(); vvvvvzn(main_source_vvvvvzn); - var addcalculation_vvvvvzo = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - vvvvvzo(addcalculation_vvvvvzo); + var main_source_vvvvvzo = jQuery("#jform_main_source").val(); + vvvvvzo(main_source_vvvvvzo); - var addcalculation_vvvvvzp = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - var gettype_vvvvvzp = jQuery("#jform_gettype").val(); - vvvvvzp(addcalculation_vvvvvzp,gettype_vvvvvzp); + var main_source_vvvvvzp = jQuery("#jform_main_source").val(); + vvvvvzp(main_source_vvvvvzp); - var addcalculation_vvvvvzq = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - var gettype_vvvvvzq = jQuery("#jform_gettype").val(); - vvvvvzq(addcalculation_vvvvvzq,gettype_vvvvvzq); + var main_source_vvvvvzq = jQuery("#jform_main_source").val(); + vvvvvzq(main_source_vvvvvzq); - var main_source_vvvvvzt = jQuery("#jform_main_source").val(); - vvvvvzt(main_source_vvvvvzt); + var addcalculation_vvvvvzr = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + vvvvvzr(addcalculation_vvvvvzr); - var main_source_vvvvvzu = jQuery("#jform_main_source").val(); - vvvvvzu(main_source_vvvvvzu); + var addcalculation_vvvvvzs = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + var gettype_vvvvvzs = jQuery("#jform_gettype").val(); + vvvvvzs(addcalculation_vvvvvzs,gettype_vvvvvzs); - var add_php_before_getitem_vvvvvzv = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); - var gettype_vvvvvzv = jQuery("#jform_gettype").val(); - vvvvvzv(add_php_before_getitem_vvvvvzv,gettype_vvvvvzv); + var addcalculation_vvvvvzt = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + var gettype_vvvvvzt = jQuery("#jform_gettype").val(); + vvvvvzt(addcalculation_vvvvvzt,gettype_vvvvvzt); - var add_php_after_getitem_vvvvvzw = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); - var gettype_vvvvvzw = jQuery("#jform_gettype").val(); - vvvvvzw(add_php_after_getitem_vvvvvzw,gettype_vvvvvzw); + var main_source_vvvvvzw = jQuery("#jform_main_source").val(); + vvvvvzw(main_source_vvvvvzw); + var main_source_vvvvvzx = jQuery("#jform_main_source").val(); + vvvvvzx(main_source_vvvvvzx); + + var add_php_before_getitem_vvvvvzy = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); var gettype_vvvvvzy = jQuery("#jform_gettype").val(); - vvvvvzy(gettype_vvvvvzy); + vvvvvzy(add_php_before_getitem_vvvvvzy,gettype_vvvvvzy); - var add_php_getlistquery_vvvvvzz = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + var add_php_after_getitem_vvvvvzz = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); var gettype_vvvvvzz = jQuery("#jform_gettype").val(); - vvvvvzz(add_php_getlistquery_vvvvvzz,gettype_vvvvvzz); + vvvvvzz(add_php_after_getitem_vvvvvzz,gettype_vvvvvzz); - var add_php_before_getitems_vvvvwaa = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); - var gettype_vvvvwaa = jQuery("#jform_gettype").val(); - vvvvwaa(add_php_before_getitems_vvvvwaa,gettype_vvvvwaa); - - var add_php_after_getitems_vvvvwab = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); var gettype_vvvvwab = jQuery("#jform_gettype").val(); - vvvvwab(add_php_after_getitems_vvvvwab,gettype_vvvvwab); + vvvvwab(gettype_vvvvwab); + var add_php_getlistquery_vvvvwac = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + var gettype_vvvvwac = jQuery("#jform_gettype").val(); + vvvvwac(add_php_getlistquery_vvvvwac,gettype_vvvvwac); + + var add_php_before_getitems_vvvvwad = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); var gettype_vvvvwad = jQuery("#jform_gettype").val(); - vvvvwad(gettype_vvvvwad); + vvvvwad(add_php_before_getitems_vvvvwad,gettype_vvvvwad); + var add_php_after_getitems_vvvvwae = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); var gettype_vvvvwae = jQuery("#jform_gettype").val(); - vvvvwae(gettype_vvvvwae); - - var gettype_vvvvwaf = jQuery("#jform_gettype").val(); - vvvvwaf(gettype_vvvvwaf); + vvvvwae(add_php_after_getitems_vvvvwae,gettype_vvvvwae); var gettype_vvvvwag = jQuery("#jform_gettype").val(); - var add_php_router_parse_vvvvwag = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); - vvvvwag(gettype_vvvvwag,add_php_router_parse_vvvvwag); + vvvvwag(gettype_vvvvwag); + + var gettype_vvvvwah = jQuery("#jform_gettype").val(); + vvvvwah(gettype_vvvvwah); var gettype_vvvvwai = jQuery("#jform_gettype").val(); vvvvwai(gettype_vvvvwai); + + var gettype_vvvvwaj = jQuery("#jform_gettype").val(); + var add_php_router_parse_vvvvwaj = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); + vvvvwaj(gettype_vvvvwaj,add_php_router_parse_vvvvwaj); + + var gettype_vvvvwal = jQuery("#jform_gettype").val(); + vvvvwal(gettype_vvvvwal); }); -// the vvvvvzi function -function vvvvvzi(gettype_vvvvvzi) +// the vvvvvzl function +function vvvvvzl(gettype_vvvvvzl) { - if (isSet(gettype_vvvvvzi) && gettype_vvvvvzi.constructor !== Array) + if (isSet(gettype_vvvvvzl) && gettype_vvvvvzl.constructor !== Array) { - var temp_vvvvvzi = gettype_vvvvvzi; - var gettype_vvvvvzi = []; - gettype_vvvvvzi.push(temp_vvvvvzi); + var temp_vvvvvzl = gettype_vvvvvzl; + var gettype_vvvvvzl = []; + gettype_vvvvvzl.push(temp_vvvvvzl); } - else if (!isSet(gettype_vvvvvzi)) + else if (!isSet(gettype_vvvvvzl)) { - var gettype_vvvvvzi = []; + var gettype_vvvvvzl = []; } - var gettype = gettype_vvvvvzi.some(gettype_vvvvvzi_SomeFunc); + var gettype = gettype_vvvvvzl.some(gettype_vvvvvzl_SomeFunc); // set this function logic @@ -122,185 +122,35 @@ function vvvvvzi(gettype_vvvvvzi) { jQuery('#jform_getcustom').closest('.control-group').show(); // add required attribute to getcustom field - if (jform_vvvvvzivwm_required) + if (jform_vvvvvzlvwn_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); - jform_vvvvvzivwm_required = false; + jform_vvvvvzlvwn_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); // remove required attribute from getcustom field - if (!jform_vvvvvzivwm_required) + if (!jform_vvvvvzlvwn_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); - jform_vvvvvzivwm_required = true; - } - } -} - -// the vvvvvzi Some function -function gettype_vvvvvzi_SomeFunc(gettype_vvvvvzi) -{ - // set the function logic - if (gettype_vvvvvzi == 3 || gettype_vvvvvzi == 4) - { - return true; - } - return false; -} - -// the vvvvvzj function -function vvvvvzj(main_source_vvvvvzj) -{ - if (isSet(main_source_vvvvvzj) && main_source_vvvvvzj.constructor !== Array) - { - var temp_vvvvvzj = main_source_vvvvvzj; - var main_source_vvvvvzj = []; - main_source_vvvvvzj.push(temp_vvvvvzj); - } - else if (!isSet(main_source_vvvvvzj)) - { - var main_source_vvvvvzj = []; - } - var main_source = main_source_vvvvvzj.some(main_source_vvvvvzj_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 vvvvvzj Some function -function main_source_vvvvvzj_SomeFunc(main_source_vvvvvzj) -{ - // set the function logic - if (main_source_vvvvvzj == 1 || main_source_vvvvvzj == 2) - { - return true; - } - return false; -} - -// the vvvvvzk function -function vvvvvzk(main_source_vvvvvzk) -{ - if (isSet(main_source_vvvvvzk) && main_source_vvvvvzk.constructor !== Array) - { - var temp_vvvvvzk = main_source_vvvvvzk; - var main_source_vvvvvzk = []; - main_source_vvvvvzk.push(temp_vvvvvzk); - } - else if (!isSet(main_source_vvvvvzk)) - { - var main_source_vvvvvzk = []; - } - var main_source = main_source_vvvvvzk.some(main_source_vvvvvzk_SomeFunc); - - - // 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_vvvvvzkvwn_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_vvvvvzkvwn_required = false; - } - } - else - { - jQuery('#jform_view_table_main').closest('.control-group').hide(); - // remove required attribute from view_table_main field - if (!jform_vvvvvzkvwn_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_vvvvvzkvwn_required = true; - } - } -} - -// the vvvvvzk Some function -function main_source_vvvvvzk_SomeFunc(main_source_vvvvvzk) -{ - // set the function logic - if (main_source_vvvvvzk == 1) - { - return true; - } - return false; -} - -// the vvvvvzl function -function vvvvvzl(main_source_vvvvvzl) -{ - if (isSet(main_source_vvvvvzl) && main_source_vvvvvzl.constructor !== Array) - { - var temp_vvvvvzl = main_source_vvvvvzl; - var main_source_vvvvvzl = []; - main_source_vvvvvzl.push(temp_vvvvvzl); - } - else if (!isSet(main_source_vvvvvzl)) - { - var main_source_vvvvvzl = []; - } - var main_source = main_source_vvvvvzl.some(main_source_vvvvvzl_SomeFunc); - - - // set this function logic - if (main_source) - { - jQuery('#jform_view_selection').closest('.control-group').show(); - // add required attribute to view_selection field - if (jform_vvvvvzlvwo_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_vvvvvzlvwo_required = false; - } - } - else - { - jQuery('#jform_view_selection').closest('.control-group').hide(); - // remove required attribute from view_selection field - if (!jform_vvvvvzlvwo_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_vvvvvzlvwo_required = true; + jform_vvvvvzlvwn_required = true; } } } // the vvvvvzl Some function -function main_source_vvvvvzl_SomeFunc(main_source_vvvvvzl) +function gettype_vvvvvzl_SomeFunc(gettype_vvvvvzl) { // set the function logic - if (main_source_vvvvvzl == 1) + if (gettype_vvvvvzl == 3 || gettype_vvvvvzl == 4) { return true; } @@ -326,29 +176,11 @@ function vvvvvzm(main_source_vvvvvzm) // 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_vvvvvzmvwp_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_vvvvvzmvwp_required = false; - } + jQuery('#jform_select_all').closest('.control-group').show(); } else { - jQuery('#jform_db_table_main').closest('.control-group').hide(); - // remove required attribute from db_table_main field - if (!jform_vvvvvzmvwp_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_vvvvvzmvwp_required = true; - } + jQuery('#jform_select_all').closest('.control-group').hide(); } } @@ -356,7 +188,7 @@ function vvvvvzm(main_source_vvvvvzm) function main_source_vvvvvzm_SomeFunc(main_source_vvvvvzm) { // set the function logic - if (main_source_vvvvvzm == 2) + if (main_source_vvvvvzm == 1 || main_source_vvvvvzm == 2) { return true; } @@ -382,28 +214,28 @@ function vvvvvzn(main_source_vvvvvzn) // set this function logic if (main_source) { - jQuery('#jform_db_selection').closest('.control-group').show(); - // add required attribute to db_selection field - if (jform_vvvvvznvwq_required) + jQuery('#jform_view_table_main').closest('.control-group').show(); + // add required attribute to view_table_main field + if (jform_vvvvvznvwo_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_vvvvvznvwq_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_vvvvvznvwo_required = false; } } else { - jQuery('#jform_db_selection').closest('.control-group').hide(); - // remove required attribute from db_selection field - if (!jform_vvvvvznvwq_required) + jQuery('#jform_view_table_main').closest('.control-group').hide(); + // remove required attribute from view_table_main field + if (!jform_vvvvvznvwo_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_vvvvvznvwq_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_vvvvvznvwo_required = true; } } } @@ -412,7 +244,7 @@ function vvvvvzn(main_source_vvvvvzn) function main_source_vvvvvzn_SomeFunc(main_source_vvvvvzn) { // set the function logic - if (main_source_vvvvvzn == 2) + if (main_source_vvvvvzn == 1) { return true; } @@ -420,10 +252,178 @@ function main_source_vvvvvzn_SomeFunc(main_source_vvvvvzn) } // the vvvvvzo function -function vvvvvzo(addcalculation_vvvvvzo) +function vvvvvzo(main_source_vvvvvzo) +{ + if (isSet(main_source_vvvvvzo) && main_source_vvvvvzo.constructor !== Array) + { + var temp_vvvvvzo = main_source_vvvvvzo; + var main_source_vvvvvzo = []; + main_source_vvvvvzo.push(temp_vvvvvzo); + } + else if (!isSet(main_source_vvvvvzo)) + { + var main_source_vvvvvzo = []; + } + var main_source = main_source_vvvvvzo.some(main_source_vvvvvzo_SomeFunc); + + + // set this function logic + if (main_source) + { + jQuery('#jform_view_selection').closest('.control-group').show(); + // add required attribute to view_selection field + if (jform_vvvvvzovwp_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_vvvvvzovwp_required = false; + } + } + else + { + jQuery('#jform_view_selection').closest('.control-group').hide(); + // remove required attribute from view_selection field + if (!jform_vvvvvzovwp_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_vvvvvzovwp_required = true; + } + } +} + +// the vvvvvzo Some function +function main_source_vvvvvzo_SomeFunc(main_source_vvvvvzo) { // set the function logic - if (addcalculation_vvvvvzo == 1) + if (main_source_vvvvvzo == 1) + { + return true; + } + return false; +} + +// the vvvvvzp function +function vvvvvzp(main_source_vvvvvzp) +{ + if (isSet(main_source_vvvvvzp) && main_source_vvvvvzp.constructor !== Array) + { + var temp_vvvvvzp = main_source_vvvvvzp; + var main_source_vvvvvzp = []; + main_source_vvvvvzp.push(temp_vvvvvzp); + } + else if (!isSet(main_source_vvvvvzp)) + { + var main_source_vvvvvzp = []; + } + var main_source = main_source_vvvvvzp.some(main_source_vvvvvzp_SomeFunc); + + + // 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_vvvvvzpvwq_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_vvvvvzpvwq_required = false; + } + } + else + { + jQuery('#jform_db_table_main').closest('.control-group').hide(); + // remove required attribute from db_table_main field + if (!jform_vvvvvzpvwq_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_vvvvvzpvwq_required = true; + } + } +} + +// the vvvvvzp Some function +function main_source_vvvvvzp_SomeFunc(main_source_vvvvvzp) +{ + // set the function logic + if (main_source_vvvvvzp == 2) + { + return true; + } + return false; +} + +// the vvvvvzq function +function vvvvvzq(main_source_vvvvvzq) +{ + if (isSet(main_source_vvvvvzq) && main_source_vvvvvzq.constructor !== Array) + { + var temp_vvvvvzq = main_source_vvvvvzq; + var main_source_vvvvvzq = []; + main_source_vvvvvzq.push(temp_vvvvvzq); + } + else if (!isSet(main_source_vvvvvzq)) + { + var main_source_vvvvvzq = []; + } + var main_source = main_source_vvvvvzq.some(main_source_vvvvvzq_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_vvvvvzqvwr_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_vvvvvzqvwr_required = false; + } + } + else + { + jQuery('#jform_db_selection').closest('.control-group').hide(); + // remove required attribute from db_selection field + if (!jform_vvvvvzqvwr_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_vvvvvzqvwr_required = true; + } + } +} + +// the vvvvvzq Some function +function main_source_vvvvvzq_SomeFunc(main_source_vvvvvzq) +{ + // set the function logic + if (main_source_vvvvvzq == 2) + { + return true; + } + return false; +} + +// the vvvvvzr function +function vvvvvzr(addcalculation_vvvvvzr) +{ + // set the function logic + if (addcalculation_vvvvvzr == 1) { jQuery('#jform_php_calculation-lbl').closest('.control-group').show(); } @@ -433,32 +433,32 @@ function vvvvvzo(addcalculation_vvvvvzo) } } -// the vvvvvzp function -function vvvvvzp(addcalculation_vvvvvzp,gettype_vvvvvzp) +// the vvvvvzs function +function vvvvvzs(addcalculation_vvvvvzs,gettype_vvvvvzs) { - if (isSet(addcalculation_vvvvvzp) && addcalculation_vvvvvzp.constructor !== Array) + if (isSet(addcalculation_vvvvvzs) && addcalculation_vvvvvzs.constructor !== Array) { - var temp_vvvvvzp = addcalculation_vvvvvzp; - var addcalculation_vvvvvzp = []; - addcalculation_vvvvvzp.push(temp_vvvvvzp); + var temp_vvvvvzs = addcalculation_vvvvvzs; + var addcalculation_vvvvvzs = []; + addcalculation_vvvvvzs.push(temp_vvvvvzs); } - else if (!isSet(addcalculation_vvvvvzp)) + else if (!isSet(addcalculation_vvvvvzs)) { - var addcalculation_vvvvvzp = []; + var addcalculation_vvvvvzs = []; } - var addcalculation = addcalculation_vvvvvzp.some(addcalculation_vvvvvzp_SomeFunc); + var addcalculation = addcalculation_vvvvvzs.some(addcalculation_vvvvvzs_SomeFunc); - if (isSet(gettype_vvvvvzp) && gettype_vvvvvzp.constructor !== Array) + if (isSet(gettype_vvvvvzs) && gettype_vvvvvzs.constructor !== Array) { - var temp_vvvvvzp = gettype_vvvvvzp; - var gettype_vvvvvzp = []; - gettype_vvvvvzp.push(temp_vvvvvzp); + var temp_vvvvvzs = gettype_vvvvvzs; + var gettype_vvvvvzs = []; + gettype_vvvvvzs.push(temp_vvvvvzs); } - else if (!isSet(gettype_vvvvvzp)) + else if (!isSet(gettype_vvvvvzs)) { - var gettype_vvvvvzp = []; + var gettype_vvvvvzs = []; } - var gettype = gettype_vvvvvzp.some(gettype_vvvvvzp_SomeFunc); + var gettype = gettype_vvvvvzs.some(gettype_vvvvvzs_SomeFunc); // set this function logic @@ -472,54 +472,54 @@ function vvvvvzp(addcalculation_vvvvvzp,gettype_vvvvvzp) } } -// the vvvvvzp Some function -function addcalculation_vvvvvzp_SomeFunc(addcalculation_vvvvvzp) +// the vvvvvzs Some function +function addcalculation_vvvvvzs_SomeFunc(addcalculation_vvvvvzs) { // set the function logic - if (addcalculation_vvvvvzp == 1) + if (addcalculation_vvvvvzs == 1) { return true; } return false; } -// the vvvvvzp Some function -function gettype_vvvvvzp_SomeFunc(gettype_vvvvvzp) +// the vvvvvzs Some function +function gettype_vvvvvzs_SomeFunc(gettype_vvvvvzs) { // set the function logic - if (gettype_vvvvvzp == 1 || gettype_vvvvvzp == 3) + if (gettype_vvvvvzs == 1 || gettype_vvvvvzs == 3) { return true; } return false; } -// the vvvvvzq function -function vvvvvzq(addcalculation_vvvvvzq,gettype_vvvvvzq) +// the vvvvvzt function +function vvvvvzt(addcalculation_vvvvvzt,gettype_vvvvvzt) { - if (isSet(addcalculation_vvvvvzq) && addcalculation_vvvvvzq.constructor !== Array) + if (isSet(addcalculation_vvvvvzt) && addcalculation_vvvvvzt.constructor !== Array) { - var temp_vvvvvzq = addcalculation_vvvvvzq; - var addcalculation_vvvvvzq = []; - addcalculation_vvvvvzq.push(temp_vvvvvzq); + var temp_vvvvvzt = addcalculation_vvvvvzt; + var addcalculation_vvvvvzt = []; + addcalculation_vvvvvzt.push(temp_vvvvvzt); } - else if (!isSet(addcalculation_vvvvvzq)) + else if (!isSet(addcalculation_vvvvvzt)) { - var addcalculation_vvvvvzq = []; + var addcalculation_vvvvvzt = []; } - var addcalculation = addcalculation_vvvvvzq.some(addcalculation_vvvvvzq_SomeFunc); + var addcalculation = addcalculation_vvvvvzt.some(addcalculation_vvvvvzt_SomeFunc); - if (isSet(gettype_vvvvvzq) && gettype_vvvvvzq.constructor !== Array) + if (isSet(gettype_vvvvvzt) && gettype_vvvvvzt.constructor !== Array) { - var temp_vvvvvzq = gettype_vvvvvzq; - var gettype_vvvvvzq = []; - gettype_vvvvvzq.push(temp_vvvvvzq); + var temp_vvvvvzt = gettype_vvvvvzt; + var gettype_vvvvvzt = []; + gettype_vvvvvzt.push(temp_vvvvvzt); } - else if (!isSet(gettype_vvvvvzq)) + else if (!isSet(gettype_vvvvvzt)) { - var gettype_vvvvvzq = []; + var gettype_vvvvvzt = []; } - var gettype = gettype_vvvvvzq.some(gettype_vvvvvzq_SomeFunc); + var gettype = gettype_vvvvvzt.some(gettype_vvvvvzt_SomeFunc); // set this function logic @@ -533,42 +533,42 @@ function vvvvvzq(addcalculation_vvvvvzq,gettype_vvvvvzq) } } -// the vvvvvzq Some function -function addcalculation_vvvvvzq_SomeFunc(addcalculation_vvvvvzq) +// the vvvvvzt Some function +function addcalculation_vvvvvzt_SomeFunc(addcalculation_vvvvvzt) { // set the function logic - if (addcalculation_vvvvvzq == 1) + if (addcalculation_vvvvvzt == 1) { return true; } return false; } -// the vvvvvzq Some function -function gettype_vvvvvzq_SomeFunc(gettype_vvvvvzq) +// the vvvvvzt Some function +function gettype_vvvvvzt_SomeFunc(gettype_vvvvvzt) { // set the function logic - if (gettype_vvvvvzq == 2 || gettype_vvvvvzq == 4) + if (gettype_vvvvvzt == 2 || gettype_vvvvvzt == 4) { return true; } return false; } -// the vvvvvzt function -function vvvvvzt(main_source_vvvvvzt) +// the vvvvvzw function +function vvvvvzw(main_source_vvvvvzw) { - if (isSet(main_source_vvvvvzt) && main_source_vvvvvzt.constructor !== Array) + if (isSet(main_source_vvvvvzw) && main_source_vvvvvzw.constructor !== Array) { - var temp_vvvvvzt = main_source_vvvvvzt; - var main_source_vvvvvzt = []; - main_source_vvvvvzt.push(temp_vvvvvzt); + var temp_vvvvvzw = main_source_vvvvvzw; + var main_source_vvvvvzw = []; + main_source_vvvvvzw.push(temp_vvvvvzw); } - else if (!isSet(main_source_vvvvvzt)) + else if (!isSet(main_source_vvvvvzw)) { - var main_source_vvvvvzt = []; + var main_source_vvvvvzw = []; } - var main_source = main_source_vvvvvzt.some(main_source_vvvvvzt_SomeFunc); + var main_source = main_source_vvvvvzw.some(main_source_vvvvvzw_SomeFunc); // set this function logic @@ -582,31 +582,31 @@ function vvvvvzt(main_source_vvvvvzt) } } -// the vvvvvzt Some function -function main_source_vvvvvzt_SomeFunc(main_source_vvvvvzt) +// the vvvvvzw Some function +function main_source_vvvvvzw_SomeFunc(main_source_vvvvvzw) { // set the function logic - if (main_source_vvvvvzt == 3) + if (main_source_vvvvvzw == 3) { return true; } return false; } -// the vvvvvzu function -function vvvvvzu(main_source_vvvvvzu) +// the vvvvvzx function +function vvvvvzx(main_source_vvvvvzx) { - if (isSet(main_source_vvvvvzu) && main_source_vvvvvzu.constructor !== Array) + if (isSet(main_source_vvvvvzx) && main_source_vvvvvzx.constructor !== Array) { - var temp_vvvvvzu = main_source_vvvvvzu; - var main_source_vvvvvzu = []; - main_source_vvvvvzu.push(temp_vvvvvzu); + var temp_vvvvvzx = main_source_vvvvvzx; + var main_source_vvvvvzx = []; + main_source_vvvvvzx.push(temp_vvvvvzx); } - else if (!isSet(main_source_vvvvvzu)) + else if (!isSet(main_source_vvvvvzx)) { - var main_source_vvvvvzu = []; + var main_source_vvvvvzx = []; } - var main_source = main_source_vvvvvzu.some(main_source_vvvvvzu_SomeFunc); + var main_source = main_source_vvvvvzx.some(main_source_vvvvvzx_SomeFunc); // set this function logic @@ -632,133 +632,11 @@ function vvvvvzu(main_source_vvvvvzu) } } -// the vvvvvzu Some function -function main_source_vvvvvzu_SomeFunc(main_source_vvvvvzu) +// the vvvvvzx Some function +function main_source_vvvvvzx_SomeFunc(main_source_vvvvvzx) { // set the function logic - if (main_source_vvvvvzu == 1 || main_source_vvvvvzu == 2) - { - return true; - } - return false; -} - -// the vvvvvzv function -function vvvvvzv(add_php_before_getitem_vvvvvzv,gettype_vvvvvzv) -{ - if (isSet(add_php_before_getitem_vvvvvzv) && add_php_before_getitem_vvvvvzv.constructor !== Array) - { - var temp_vvvvvzv = add_php_before_getitem_vvvvvzv; - var add_php_before_getitem_vvvvvzv = []; - add_php_before_getitem_vvvvvzv.push(temp_vvvvvzv); - } - else if (!isSet(add_php_before_getitem_vvvvvzv)) - { - var add_php_before_getitem_vvvvvzv = []; - } - var add_php_before_getitem = add_php_before_getitem_vvvvvzv.some(add_php_before_getitem_vvvvvzv_SomeFunc); - - if (isSet(gettype_vvvvvzv) && gettype_vvvvvzv.constructor !== Array) - { - var temp_vvvvvzv = gettype_vvvvvzv; - var gettype_vvvvvzv = []; - gettype_vvvvvzv.push(temp_vvvvvzv); - } - else if (!isSet(gettype_vvvvvzv)) - { - var gettype_vvvvvzv = []; - } - var gettype = gettype_vvvvvzv.some(gettype_vvvvvzv_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 vvvvvzv Some function -function add_php_before_getitem_vvvvvzv_SomeFunc(add_php_before_getitem_vvvvvzv) -{ - // set the function logic - if (add_php_before_getitem_vvvvvzv == 1) - { - return true; - } - return false; -} - -// the vvvvvzv Some function -function gettype_vvvvvzv_SomeFunc(gettype_vvvvvzv) -{ - // set the function logic - if (gettype_vvvvvzv == 1 || gettype_vvvvvzv == 3) - { - return true; - } - return false; -} - -// the vvvvvzw function -function vvvvvzw(add_php_after_getitem_vvvvvzw,gettype_vvvvvzw) -{ - if (isSet(add_php_after_getitem_vvvvvzw) && add_php_after_getitem_vvvvvzw.constructor !== Array) - { - var temp_vvvvvzw = add_php_after_getitem_vvvvvzw; - var add_php_after_getitem_vvvvvzw = []; - add_php_after_getitem_vvvvvzw.push(temp_vvvvvzw); - } - else if (!isSet(add_php_after_getitem_vvvvvzw)) - { - var add_php_after_getitem_vvvvvzw = []; - } - var add_php_after_getitem = add_php_after_getitem_vvvvvzw.some(add_php_after_getitem_vvvvvzw_SomeFunc); - - if (isSet(gettype_vvvvvzw) && gettype_vvvvvzw.constructor !== Array) - { - var temp_vvvvvzw = gettype_vvvvvzw; - var gettype_vvvvvzw = []; - gettype_vvvvvzw.push(temp_vvvvvzw); - } - else if (!isSet(gettype_vvvvvzw)) - { - var gettype_vvvvvzw = []; - } - var gettype = gettype_vvvvvzw.some(gettype_vvvvvzw_SomeFunc); - - - // set this function logic - if (add_php_after_getitem && gettype) - { - jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); - } - else - { - jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); - } -} - -// the vvvvvzw Some function -function add_php_after_getitem_vvvvvzw_SomeFunc(add_php_after_getitem_vvvvvzw) -{ - // set the function logic - if (add_php_after_getitem_vvvvvzw == 1) - { - return true; - } - return false; -} - -// the vvvvvzw Some function -function gettype_vvvvvzw_SomeFunc(gettype_vvvvvzw) -{ - // set the function logic - if (gettype_vvvvvzw == 1 || gettype_vvvvvzw == 3) + if (main_source_vvvvvzx == 1 || main_source_vvvvvzx == 2) { return true; } @@ -766,8 +644,20 @@ function gettype_vvvvvzw_SomeFunc(gettype_vvvvvzw) } // the vvvvvzy function -function vvvvvzy(gettype_vvvvvzy) +function vvvvvzy(add_php_before_getitem_vvvvvzy,gettype_vvvvvzy) { + if (isSet(add_php_before_getitem_vvvvvzy) && add_php_before_getitem_vvvvvzy.constructor !== Array) + { + var temp_vvvvvzy = add_php_before_getitem_vvvvvzy; + var add_php_before_getitem_vvvvvzy = []; + add_php_before_getitem_vvvvvzy.push(temp_vvvvvzy); + } + else if (!isSet(add_php_before_getitem_vvvvvzy)) + { + var add_php_before_getitem_vvvvvzy = []; + } + var add_php_before_getitem = add_php_before_getitem_vvvvvzy.some(add_php_before_getitem_vvvvvzy_SomeFunc); + if (isSet(gettype_vvvvvzy) && gettype_vvvvvzy.constructor !== Array) { var temp_vvvvvzy = gettype_vvvvvzy; @@ -782,54 +672,27 @@ function vvvvvzy(gettype_vvvvvzy) // set this function logic - if (gettype) + if (add_php_before_getitem && gettype) { - jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); - // add required attribute to add_php_after_getitem field - if (jform_vvvvvzyvwr_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_vvvvvzyvwr_required = false; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); - // add required attribute to add_php_before_getitem field - if (jform_vvvvvzyvws_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_vvvvvzyvws_required = false; - } + jQuery('#jform_php_before_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_vvvvvzyvwr_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_vvvvvzyvwr_required = true; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); - // remove required attribute from add_php_before_getitem field - if (!jform_vvvvvzyvws_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_vvvvvzyvws_required = true; - } + jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide(); } } +// the vvvvvzy Some function +function add_php_before_getitem_vvvvvzy_SomeFunc(add_php_before_getitem_vvvvvzy) +{ + // set the function logic + if (add_php_before_getitem_vvvvvzy == 1) + { + return true; + } + return false; +} + // the vvvvvzy Some function function gettype_vvvvvzy_SomeFunc(gettype_vvvvvzy) { @@ -842,19 +705,19 @@ function gettype_vvvvvzy_SomeFunc(gettype_vvvvvzy) } // the vvvvvzz function -function vvvvvzz(add_php_getlistquery_vvvvvzz,gettype_vvvvvzz) +function vvvvvzz(add_php_after_getitem_vvvvvzz,gettype_vvvvvzz) { - if (isSet(add_php_getlistquery_vvvvvzz) && add_php_getlistquery_vvvvvzz.constructor !== Array) + if (isSet(add_php_after_getitem_vvvvvzz) && add_php_after_getitem_vvvvvzz.constructor !== Array) { - var temp_vvvvvzz = add_php_getlistquery_vvvvvzz; - var add_php_getlistquery_vvvvvzz = []; - add_php_getlistquery_vvvvvzz.push(temp_vvvvvzz); + var temp_vvvvvzz = add_php_after_getitem_vvvvvzz; + var add_php_after_getitem_vvvvvzz = []; + add_php_after_getitem_vvvvvzz.push(temp_vvvvvzz); } - else if (!isSet(add_php_getlistquery_vvvvvzz)) + else if (!isSet(add_php_after_getitem_vvvvvzz)) { - var add_php_getlistquery_vvvvvzz = []; + var add_php_after_getitem_vvvvvzz = []; } - var add_php_getlistquery = add_php_getlistquery_vvvvvzz.some(add_php_getlistquery_vvvvvzz_SomeFunc); + var add_php_after_getitem = add_php_after_getitem_vvvvvzz.some(add_php_after_getitem_vvvvvzz_SomeFunc); if (isSet(gettype_vvvvvzz) && gettype_vvvvvzz.constructor !== Array) { @@ -870,21 +733,21 @@ function vvvvvzz(add_php_getlistquery_vvvvvzz,gettype_vvvvvzz) // set this function logic - if (add_php_getlistquery && gettype) + if (add_php_after_getitem && gettype) { - jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); + jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show(); } else { - jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); + jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide(); } } // the vvvvvzz Some function -function add_php_getlistquery_vvvvvzz_SomeFunc(add_php_getlistquery_vvvvvzz) +function add_php_after_getitem_vvvvvzz_SomeFunc(add_php_after_getitem_vvvvvzz) { // set the function logic - if (add_php_getlistquery_vvvvvzz == 1) + if (add_php_after_getitem_vvvvvzz == 1) { return true; } @@ -895,68 +758,7 @@ function add_php_getlistquery_vvvvvzz_SomeFunc(add_php_getlistquery_vvvvvzz) function gettype_vvvvvzz_SomeFunc(gettype_vvvvvzz) { // set the function logic - if (gettype_vvvvvzz == 2 || gettype_vvvvvzz == 4) - { - return true; - } - return false; -} - -// the vvvvwaa function -function vvvvwaa(add_php_before_getitems_vvvvwaa,gettype_vvvvwaa) -{ - if (isSet(add_php_before_getitems_vvvvwaa) && add_php_before_getitems_vvvvwaa.constructor !== Array) - { - var temp_vvvvwaa = add_php_before_getitems_vvvvwaa; - var add_php_before_getitems_vvvvwaa = []; - add_php_before_getitems_vvvvwaa.push(temp_vvvvwaa); - } - else if (!isSet(add_php_before_getitems_vvvvwaa)) - { - var add_php_before_getitems_vvvvwaa = []; - } - var add_php_before_getitems = add_php_before_getitems_vvvvwaa.some(add_php_before_getitems_vvvvwaa_SomeFunc); - - if (isSet(gettype_vvvvwaa) && gettype_vvvvwaa.constructor !== Array) - { - var temp_vvvvwaa = gettype_vvvvwaa; - var gettype_vvvvwaa = []; - gettype_vvvvwaa.push(temp_vvvvwaa); - } - else if (!isSet(gettype_vvvvwaa)) - { - var gettype_vvvvwaa = []; - } - var gettype = gettype_vvvvwaa.some(gettype_vvvvwaa_SomeFunc); - - - // set this function logic - if (add_php_before_getitems && gettype) - { - jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show(); - } - else - { - jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); - } -} - -// the vvvvwaa Some function -function add_php_before_getitems_vvvvwaa_SomeFunc(add_php_before_getitems_vvvvwaa) -{ - // set the function logic - if (add_php_before_getitems_vvvvwaa == 1) - { - return true; - } - return false; -} - -// the vvvvwaa Some function -function gettype_vvvvwaa_SomeFunc(gettype_vvvvwaa) -{ - // set the function logic - if (gettype_vvvvwaa == 2 || gettype_vvvvwaa == 4) + if (gettype_vvvvvzz == 1 || gettype_vvvvvzz == 3) { return true; } @@ -964,20 +766,8 @@ function gettype_vvvvwaa_SomeFunc(gettype_vvvvwaa) } // the vvvvwab function -function vvvvwab(add_php_after_getitems_vvvvwab,gettype_vvvvwab) +function vvvvwab(gettype_vvvvwab) { - if (isSet(add_php_after_getitems_vvvvwab) && add_php_after_getitems_vvvvwab.constructor !== Array) - { - var temp_vvvvwab = add_php_after_getitems_vvvvwab; - var add_php_after_getitems_vvvvwab = []; - add_php_after_getitems_vvvvwab.push(temp_vvvvwab); - } - else if (!isSet(add_php_after_getitems_vvvvwab)) - { - var add_php_after_getitems_vvvvwab = []; - } - var add_php_after_getitems = add_php_after_getitems_vvvvwab.some(add_php_after_getitems_vvvvwab_SomeFunc); - if (isSet(gettype_vvvvwab) && gettype_vvvvwab.constructor !== Array) { var temp_vvvvwab = gettype_vvvvwab; @@ -992,32 +782,120 @@ function vvvvwab(add_php_after_getitems_vvvvwab,gettype_vvvvwab) // set this function logic - if (add_php_after_getitems && gettype) + if (gettype) { - jQuery('#jform_php_after_getitems-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_vvvvwabvws_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_vvvvwabvws_required = false; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); + // add required attribute to add_php_before_getitem field + if (jform_vvvvwabvwt_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_vvvvwabvwt_required = false; + } } else { - jQuery('#jform_php_after_getitems-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_vvvvwabvws_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_vvvvwabvws_required = true; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); + // remove required attribute from add_php_before_getitem field + if (!jform_vvvvwabvwt_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_vvvvwabvwt_required = true; + } } } -// the vvvvwab Some function -function add_php_after_getitems_vvvvwab_SomeFunc(add_php_after_getitems_vvvvwab) -{ - // set the function logic - if (add_php_after_getitems_vvvvwab == 1) - { - return true; - } - return false; -} - // the vvvvwab Some function function gettype_vvvvwab_SomeFunc(gettype_vvvvwab) { // set the function logic - if (gettype_vvvvwab == 2 || gettype_vvvvwab == 4) + if (gettype_vvvvwab == 1 || gettype_vvvvwab == 3) + { + return true; + } + return false; +} + +// the vvvvwac function +function vvvvwac(add_php_getlistquery_vvvvwac,gettype_vvvvwac) +{ + if (isSet(add_php_getlistquery_vvvvwac) && add_php_getlistquery_vvvvwac.constructor !== Array) + { + var temp_vvvvwac = add_php_getlistquery_vvvvwac; + var add_php_getlistquery_vvvvwac = []; + add_php_getlistquery_vvvvwac.push(temp_vvvvwac); + } + else if (!isSet(add_php_getlistquery_vvvvwac)) + { + var add_php_getlistquery_vvvvwac = []; + } + var add_php_getlistquery = add_php_getlistquery_vvvvwac.some(add_php_getlistquery_vvvvwac_SomeFunc); + + if (isSet(gettype_vvvvwac) && gettype_vvvvwac.constructor !== Array) + { + var temp_vvvvwac = gettype_vvvvwac; + var gettype_vvvvwac = []; + gettype_vvvvwac.push(temp_vvvvwac); + } + else if (!isSet(gettype_vvvvwac)) + { + var gettype_vvvvwac = []; + } + var gettype = gettype_vvvvwac.some(gettype_vvvvwac_SomeFunc); + + + // set this function logic + if (add_php_getlistquery && gettype) + { + jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide(); + } +} + +// the vvvvwac Some function +function add_php_getlistquery_vvvvwac_SomeFunc(add_php_getlistquery_vvvvwac) +{ + // set the function logic + if (add_php_getlistquery_vvvvwac == 1) + { + return true; + } + return false; +} + +// the vvvvwac Some function +function gettype_vvvvwac_SomeFunc(gettype_vvvvwac) +{ + // set the function logic + if (gettype_vvvvwac == 2 || gettype_vvvvwac == 4) { return true; } @@ -1025,8 +903,20 @@ function gettype_vvvvwab_SomeFunc(gettype_vvvvwab) } // the vvvvwad function -function vvvvwad(gettype_vvvvwad) +function vvvvwad(add_php_before_getitems_vvvvwad,gettype_vvvvwad) { + if (isSet(add_php_before_getitems_vvvvwad) && add_php_before_getitems_vvvvwad.constructor !== Array) + { + var temp_vvvvwad = add_php_before_getitems_vvvvwad; + var add_php_before_getitems_vvvvwad = []; + add_php_before_getitems_vvvvwad.push(temp_vvvvwad); + } + else if (!isSet(add_php_before_getitems_vvvvwad)) + { + var add_php_before_getitems_vvvvwad = []; + } + var add_php_before_getitems = add_php_before_getitems_vvvvwad.some(add_php_before_getitems_vvvvwad_SomeFunc); + if (isSet(gettype_vvvvwad) && gettype_vvvvwad.constructor !== Array) { var temp_vvvvwad = gettype_vvvvwad; @@ -1041,74 +931,27 @@ function vvvvwad(gettype_vvvvwad) // set this function logic - if (gettype) + if (add_php_before_getitems && gettype) { - jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); - // add required attribute to add_php_after_getitems field - if (jform_vvvvwadvwt_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_vvvvwadvwt_required = false; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); - // add required attribute to add_php_before_getitems field - if (jform_vvvvwadvwu_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_vvvvwadvwu_required = false; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); - // add required attribute to add_php_getlistquery field - if (jform_vvvvwadvwv_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_vvvvwadvwv_required = false; - } + jQuery('#jform_php_before_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_vvvvwadvwt_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_vvvvwadvwt_required = true; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); - // remove required attribute from add_php_before_getitems field - if (!jform_vvvvwadvwu_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_vvvvwadvwu_required = true; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); - // remove required attribute from add_php_getlistquery field - if (!jform_vvvvwadvwv_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_vvvvwadvwv_required = true; - } + jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide(); } } +// the vvvvwad Some function +function add_php_before_getitems_vvvvwad_SomeFunc(add_php_before_getitems_vvvvwad) +{ + // set the function logic + if (add_php_before_getitems_vvvvwad == 1) + { + return true; + } + return false; +} + // the vvvvwad Some function function gettype_vvvvwad_SomeFunc(gettype_vvvvwad) { @@ -1121,8 +964,20 @@ function gettype_vvvvwad_SomeFunc(gettype_vvvvwad) } // the vvvvwae function -function vvvvwae(gettype_vvvvwae) +function vvvvwae(add_php_after_getitems_vvvvwae,gettype_vvvvwae) { + if (isSet(add_php_after_getitems_vvvvwae) && add_php_after_getitems_vvvvwae.constructor !== Array) + { + var temp_vvvvwae = add_php_after_getitems_vvvvwae; + var add_php_after_getitems_vvvvwae = []; + add_php_after_getitems_vvvvwae.push(temp_vvvvwae); + } + else if (!isSet(add_php_after_getitems_vvvvwae)) + { + var add_php_after_getitems_vvvvwae = []; + } + var add_php_after_getitems = add_php_after_getitems_vvvvwae.some(add_php_after_getitems_vvvvwae_SomeFunc); + if (isSet(gettype_vvvvwae) && gettype_vvvvwae.constructor !== Array) { var temp_vvvvwae = gettype_vvvvwae; @@ -1137,95 +992,32 @@ function vvvvwae(gettype_vvvvwae) // set this function logic - if (gettype) + if (add_php_after_getitems && gettype) { - jQuery('#jform_pagination').closest('.control-group').show(); - // add required attribute to pagination field - if (jform_vvvvwaevww_required) - { - updateFieldRequired('pagination',0); - jQuery('#jform_pagination').prop('required','required'); - jQuery('#jform_pagination').attr('aria-required',true); - jQuery('#jform_pagination').addClass('required'); - jform_vvvvwaevww_required = false; - } + jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show(); } else { - jQuery('#jform_pagination').closest('.control-group').hide(); - // remove required attribute from pagination field - if (!jform_vvvvwaevww_required) - { - updateFieldRequired('pagination',1); - jQuery('#jform_pagination').removeAttr('required'); - jQuery('#jform_pagination').removeAttr('aria-required'); - jQuery('#jform_pagination').removeClass('required'); - jform_vvvvwaevww_required = true; - } + jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide(); } } // the vvvvwae Some function -function gettype_vvvvwae_SomeFunc(gettype_vvvvwae) +function add_php_after_getitems_vvvvwae_SomeFunc(add_php_after_getitems_vvvvwae) { // set the function logic - if (gettype_vvvvwae == 2) + if (add_php_after_getitems_vvvvwae == 1) { return true; } return false; } -// the vvvvwaf function -function vvvvwaf(gettype_vvvvwaf) -{ - if (isSet(gettype_vvvvwaf) && gettype_vvvvwaf.constructor !== Array) - { - var temp_vvvvwaf = gettype_vvvvwaf; - var gettype_vvvvwaf = []; - gettype_vvvvwaf.push(temp_vvvvwaf); - } - else if (!isSet(gettype_vvvvwaf)) - { - var gettype_vvvvwaf = []; - } - var gettype = gettype_vvvvwaf.some(gettype_vvvvwaf_SomeFunc); - - - // 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_vvvvwafvwx_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_vvvvwafvwx_required = false; - } - } - else - { - jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); - // remove required attribute from add_php_router_parse field - if (!jform_vvvvwafvwx_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_vvvvwafvwx_required = true; - } - } -} - -// the vvvvwaf Some function -function gettype_vvvvwaf_SomeFunc(gettype_vvvvwaf) +// the vvvvwae Some function +function gettype_vvvvwae_SomeFunc(gettype_vvvvwae) { // set the function logic - if (gettype_vvvvwaf == 1 || gettype_vvvvwaf == 2) + if (gettype_vvvvwae == 2 || gettype_vvvvwae == 4) { return true; } @@ -1233,7 +1025,7 @@ function gettype_vvvvwaf_SomeFunc(gettype_vvvvwaf) } // the vvvvwag function -function vvvvwag(gettype_vvvvwag,add_php_router_parse_vvvvwag) +function vvvvwag(gettype_vvvvwag) { if (isSet(gettype_vvvvwag) && gettype_vvvvwag.constructor !== Array) { @@ -1247,44 +1039,72 @@ function vvvvwag(gettype_vvvvwag,add_php_router_parse_vvvvwag) } var gettype = gettype_vvvvwag.some(gettype_vvvvwag_SomeFunc); - if (isSet(add_php_router_parse_vvvvwag) && add_php_router_parse_vvvvwag.constructor !== Array) - { - var temp_vvvvwag = add_php_router_parse_vvvvwag; - var add_php_router_parse_vvvvwag = []; - add_php_router_parse_vvvvwag.push(temp_vvvvwag); - } - else if (!isSet(add_php_router_parse_vvvvwag)) - { - var add_php_router_parse_vvvvwag = []; - } - var add_php_router_parse = add_php_router_parse_vvvvwag.some(add_php_router_parse_vvvvwag_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_vvvvwagvwy_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); + // add required attribute to add_php_after_getitems field + if (jform_vvvvwagvwu_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_vvvvwagvwy_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_vvvvwagvwu_required = false; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); + // add required attribute to add_php_before_getitems field + if (jform_vvvvwagvwv_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_vvvvwagvwv_required = false; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); + // add required attribute to add_php_getlistquery field + if (jform_vvvvwagvww_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_vvvvwagvww_required = false; } } else { - jQuery('#jform_php_router_parse').closest('.control-group').hide(); - // remove required attribute from php_router_parse field - if (!jform_vvvvwagvwy_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); + // remove required attribute from add_php_after_getitems field + if (!jform_vvvvwagvwu_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_vvvvwagvwy_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_vvvvwagvwu_required = true; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); + // remove required attribute from add_php_before_getitems field + if (!jform_vvvvwagvwv_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_vvvvwagvwv_required = true; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); + // remove required attribute from add_php_getlistquery field + if (!jform_vvvvwagvww_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_vvvvwagvww_required = true; } } } @@ -1293,18 +1113,63 @@ function vvvvwag(gettype_vvvvwag,add_php_router_parse_vvvvwag) function gettype_vvvvwag_SomeFunc(gettype_vvvvwag) { // set the function logic - if (gettype_vvvvwag == 1 || gettype_vvvvwag == 2) + if (gettype_vvvvwag == 2 || gettype_vvvvwag == 4) { return true; } return false; } -// the vvvvwag Some function -function add_php_router_parse_vvvvwag_SomeFunc(add_php_router_parse_vvvvwag) +// the vvvvwah function +function vvvvwah(gettype_vvvvwah) +{ + if (isSet(gettype_vvvvwah) && gettype_vvvvwah.constructor !== Array) + { + var temp_vvvvwah = gettype_vvvvwah; + var gettype_vvvvwah = []; + gettype_vvvvwah.push(temp_vvvvwah); + } + else if (!isSet(gettype_vvvvwah)) + { + var gettype_vvvvwah = []; + } + var gettype = gettype_vvvvwah.some(gettype_vvvvwah_SomeFunc); + + + // set this function logic + if (gettype) + { + jQuery('#jform_pagination').closest('.control-group').show(); + // add required attribute to pagination field + if (jform_vvvvwahvwx_required) + { + updateFieldRequired('pagination',0); + jQuery('#jform_pagination').prop('required','required'); + jQuery('#jform_pagination').attr('aria-required',true); + jQuery('#jform_pagination').addClass('required'); + jform_vvvvwahvwx_required = false; + } + } + else + { + jQuery('#jform_pagination').closest('.control-group').hide(); + // remove required attribute from pagination field + if (!jform_vvvvwahvwx_required) + { + updateFieldRequired('pagination',1); + jQuery('#jform_pagination').removeAttr('required'); + jQuery('#jform_pagination').removeAttr('aria-required'); + jQuery('#jform_pagination').removeClass('required'); + jform_vvvvwahvwx_required = true; + } + } +} + +// the vvvvwah Some function +function gettype_vvvvwah_SomeFunc(gettype_vvvvwah) { // set the function logic - if (add_php_router_parse_vvvvwag == 1) + if (gettype_vvvvwah == 2) { return true; } @@ -1327,6 +1192,141 @@ function vvvvwai(gettype_vvvvwai) var gettype = gettype_vvvvwai.some(gettype_vvvvwai_SomeFunc); + // 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_vvvvwaivwy_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_vvvvwaivwy_required = false; + } + } + else + { + jQuery('#jform_add_php_router_parse').closest('.control-group').hide(); + // remove required attribute from add_php_router_parse field + if (!jform_vvvvwaivwy_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_vvvvwaivwy_required = true; + } + } +} + +// the vvvvwai Some function +function gettype_vvvvwai_SomeFunc(gettype_vvvvwai) +{ + // set the function logic + if (gettype_vvvvwai == 1 || gettype_vvvvwai == 2) + { + return true; + } + return false; +} + +// the vvvvwaj function +function vvvvwaj(gettype_vvvvwaj,add_php_router_parse_vvvvwaj) +{ + if (isSet(gettype_vvvvwaj) && gettype_vvvvwaj.constructor !== Array) + { + var temp_vvvvwaj = gettype_vvvvwaj; + var gettype_vvvvwaj = []; + gettype_vvvvwaj.push(temp_vvvvwaj); + } + else if (!isSet(gettype_vvvvwaj)) + { + var gettype_vvvvwaj = []; + } + var gettype = gettype_vvvvwaj.some(gettype_vvvvwaj_SomeFunc); + + if (isSet(add_php_router_parse_vvvvwaj) && add_php_router_parse_vvvvwaj.constructor !== Array) + { + var temp_vvvvwaj = add_php_router_parse_vvvvwaj; + var add_php_router_parse_vvvvwaj = []; + add_php_router_parse_vvvvwaj.push(temp_vvvvwaj); + } + else if (!isSet(add_php_router_parse_vvvvwaj)) + { + var add_php_router_parse_vvvvwaj = []; + } + var add_php_router_parse = add_php_router_parse_vvvvwaj.some(add_php_router_parse_vvvvwaj_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_vvvvwajvwz_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_vvvvwajvwz_required = false; + } + } + else + { + jQuery('#jform_php_router_parse').closest('.control-group').hide(); + // remove required attribute from php_router_parse field + if (!jform_vvvvwajvwz_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_vvvvwajvwz_required = true; + } + } +} + +// the vvvvwaj Some function +function gettype_vvvvwaj_SomeFunc(gettype_vvvvwaj) +{ + // set the function logic + if (gettype_vvvvwaj == 1 || gettype_vvvvwaj == 2) + { + return true; + } + return false; +} + +// the vvvvwaj Some function +function add_php_router_parse_vvvvwaj_SomeFunc(add_php_router_parse_vvvvwaj) +{ + // set the function logic + if (add_php_router_parse_vvvvwaj == 1) + { + return true; + } + return false; +} + +// the vvvvwal function +function vvvvwal(gettype_vvvvwal) +{ + if (isSet(gettype_vvvvwal) && gettype_vvvvwal.constructor !== Array) + { + var temp_vvvvwal = gettype_vvvvwal; + var gettype_vvvvwal = []; + gettype_vvvvwal.push(temp_vvvvwal); + } + else if (!isSet(gettype_vvvvwal)) + { + var gettype_vvvvwal = []; + } + var gettype = gettype_vvvvwal.some(gettype_vvvvwal_SomeFunc); + + // set this function logic if (gettype) { @@ -1338,11 +1338,11 @@ function vvvvwai(gettype_vvvvwai) } } -// the vvvvwai Some function -function gettype_vvvvwai_SomeFunc(gettype_vvvvwai) +// the vvvvwal Some function +function gettype_vvvvwal_SomeFunc(gettype_vvvvwal) { // set the function logic - if (gettype_vvvvwai == 1) + if (gettype_vvvvwal == 1) { return true; } diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 9aa9a6970..6ae2f6468 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -9,57 +9,57 @@ */ // Some Global Values -jform_vvvvwaxvxh_required = false; -jform_vvvvwayvxi_required = false; -jform_vvvvwazvxj_required = false; -jform_vvvvwbavxk_required = false; +jform_vvvvwbavxi_required = false; +jform_vvvvwbbvxj_required = false; +jform_vvvvwbcvxk_required = false; +jform_vvvvwbdvxl_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwax = jQuery("#jform_datalenght").val(); - vvvvwax(datalenght_vvvvwax); + var datalenght_vvvvwba = jQuery("#jform_datalenght").val(); + vvvvwba(datalenght_vvvvwba); - var datadefault_vvvvway = jQuery("#jform_datadefault").val(); - vvvvway(datadefault_vvvvway); + var datadefault_vvvvwbb = jQuery("#jform_datadefault").val(); + vvvvwbb(datadefault_vvvvwbb); - var datatype_vvvvwaz = jQuery("#jform_datatype").val(); - vvvvwaz(datatype_vvvvwaz); + var datatype_vvvvwbc = jQuery("#jform_datatype").val(); + vvvvwbc(datatype_vvvvwbc); - var datatype_vvvvwba = jQuery("#jform_datatype").val(); - vvvvwba(datatype_vvvvwba); + var datatype_vvvvwbd = jQuery("#jform_datatype").val(); + vvvvwbd(datatype_vvvvwbd); - var store_vvvvwbb = jQuery("#jform_store").val(); - var datatype_vvvvwbb = jQuery("#jform_datatype").val(); - vvvvwbb(store_vvvvwbb,datatype_vvvvwbb); + var store_vvvvwbe = jQuery("#jform_store").val(); + var datatype_vvvvwbe = jQuery("#jform_datatype").val(); + vvvvwbe(store_vvvvwbe,datatype_vvvvwbe); - var add_css_view_vvvvwbd = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwbd(add_css_view_vvvvwbd); + var add_css_view_vvvvwbg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwbg(add_css_view_vvvvwbg); - var add_css_views_vvvvwbe = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwbe(add_css_views_vvvvwbe); + var add_css_views_vvvvwbh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwbh(add_css_views_vvvvwbh); - var add_javascript_view_footer_vvvvwbf = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwbf(add_javascript_view_footer_vvvvwbf); + var add_javascript_view_footer_vvvvwbi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwbi(add_javascript_view_footer_vvvvwbi); - var add_javascript_views_footer_vvvvwbg = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwbg(add_javascript_views_footer_vvvvwbg); + var add_javascript_views_footer_vvvvwbj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwbj(add_javascript_views_footer_vvvvwbj); }); -// the vvvvwax function -function vvvvwax(datalenght_vvvvwax) +// the vvvvwba function +function vvvvwba(datalenght_vvvvwba) { - if (isSet(datalenght_vvvvwax) && datalenght_vvvvwax.constructor !== Array) + if (isSet(datalenght_vvvvwba) && datalenght_vvvvwba.constructor !== Array) { - var temp_vvvvwax = datalenght_vvvvwax; - var datalenght_vvvvwax = []; - datalenght_vvvvwax.push(temp_vvvvwax); + var temp_vvvvwba = datalenght_vvvvwba; + var datalenght_vvvvwba = []; + datalenght_vvvvwba.push(temp_vvvvwba); } - else if (!isSet(datalenght_vvvvwax)) + else if (!isSet(datalenght_vvvvwba)) { - var datalenght_vvvvwax = []; + var datalenght_vvvvwba = []; } - var datalenght = datalenght_vvvvwax.some(datalenght_vvvvwax_SomeFunc); + var datalenght = datalenght_vvvvwba.some(datalenght_vvvvwba_SomeFunc); // set this function logic @@ -67,55 +67,55 @@ function vvvvwax(datalenght_vvvvwax) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwaxvxh_required) + if (jform_vvvvwbavxi_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_vvvvwaxvxh_required = false; + jform_vvvvwbavxi_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwaxvxh_required) + if (!jform_vvvvwbavxi_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_vvvvwaxvxh_required = true; + jform_vvvvwbavxi_required = true; } } } -// the vvvvwax Some function -function datalenght_vvvvwax_SomeFunc(datalenght_vvvvwax) +// the vvvvwba Some function +function datalenght_vvvvwba_SomeFunc(datalenght_vvvvwba) { // set the function logic - if (datalenght_vvvvwax == 'Other') + if (datalenght_vvvvwba == 'Other') { return true; } return false; } -// the vvvvway function -function vvvvway(datadefault_vvvvway) +// the vvvvwbb function +function vvvvwbb(datadefault_vvvvwbb) { - if (isSet(datadefault_vvvvway) && datadefault_vvvvway.constructor !== Array) + if (isSet(datadefault_vvvvwbb) && datadefault_vvvvwbb.constructor !== Array) { - var temp_vvvvway = datadefault_vvvvway; - var datadefault_vvvvway = []; - datadefault_vvvvway.push(temp_vvvvway); + var temp_vvvvwbb = datadefault_vvvvwbb; + var datadefault_vvvvwbb = []; + datadefault_vvvvwbb.push(temp_vvvvwbb); } - else if (!isSet(datadefault_vvvvway)) + else if (!isSet(datadefault_vvvvwbb)) { - var datadefault_vvvvway = []; + var datadefault_vvvvwbb = []; } - var datadefault = datadefault_vvvvway.some(datadefault_vvvvway_SomeFunc); + var datadefault = datadefault_vvvvwbb.some(datadefault_vvvvwbb_SomeFunc); // set this function logic @@ -123,55 +123,55 @@ function vvvvway(datadefault_vvvvway) { jQuery('#jform_datadefault_other').closest('.control-group').show(); // add required attribute to datadefault_other field - if (jform_vvvvwayvxi_required) + if (jform_vvvvwbbvxj_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_vvvvwayvxi_required = false; + jform_vvvvwbbvxj_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); // remove required attribute from datadefault_other field - if (!jform_vvvvwayvxi_required) + if (!jform_vvvvwbbvxj_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_vvvvwayvxi_required = true; + jform_vvvvwbbvxj_required = true; } } } -// the vvvvway Some function -function datadefault_vvvvway_SomeFunc(datadefault_vvvvway) +// the vvvvwbb Some function +function datadefault_vvvvwbb_SomeFunc(datadefault_vvvvwbb) { // set the function logic - if (datadefault_vvvvway == 'Other') + if (datadefault_vvvvwbb == 'Other') { return true; } return false; } -// the vvvvwaz function -function vvvvwaz(datatype_vvvvwaz) +// the vvvvwbc function +function vvvvwbc(datatype_vvvvwbc) { - if (isSet(datatype_vvvvwaz) && datatype_vvvvwaz.constructor !== Array) + if (isSet(datatype_vvvvwbc) && datatype_vvvvwbc.constructor !== Array) { - var temp_vvvvwaz = datatype_vvvvwaz; - var datatype_vvvvwaz = []; - datatype_vvvvwaz.push(temp_vvvvwaz); + var temp_vvvvwbc = datatype_vvvvwbc; + var datatype_vvvvwbc = []; + datatype_vvvvwbc.push(temp_vvvvwbc); } - else if (!isSet(datatype_vvvvwaz)) + else if (!isSet(datatype_vvvvwbc)) { - var datatype_vvvvwaz = []; + var datatype_vvvvwbc = []; } - var datatype = datatype_vvvvwaz.some(datatype_vvvvwaz_SomeFunc); + var datatype = datatype_vvvvwbc.some(datatype_vvvvwbc_SomeFunc); // set this function logic @@ -181,13 +181,13 @@ function vvvvwaz(datatype_vvvvwaz) jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field - if (jform_vvvvwazvxj_required) + if (jform_vvvvwbcvxk_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvwazvxj_required = false; + jform_vvvvwbcvxk_required = false; } } else @@ -196,42 +196,42 @@ function vvvvwaz(datatype_vvvvwaz) jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field - if (!jform_vvvvwazvxj_required) + if (!jform_vvvvwbcvxk_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwazvxj_required = true; + jform_vvvvwbcvxk_required = true; } } } -// the vvvvwaz Some function -function datatype_vvvvwaz_SomeFunc(datatype_vvvvwaz) +// the vvvvwbc Some function +function datatype_vvvvwbc_SomeFunc(datatype_vvvvwbc) { // set the function logic - if (datatype_vvvvwaz == 'CHAR' || datatype_vvvvwaz == 'VARCHAR' || datatype_vvvvwaz == 'DATETIME' || datatype_vvvvwaz == 'DATE' || datatype_vvvvwaz == 'TIME' || datatype_vvvvwaz == 'INT' || datatype_vvvvwaz == 'TINYINT' || datatype_vvvvwaz == 'BIGINT' || datatype_vvvvwaz == 'FLOAT' || datatype_vvvvwaz == 'DECIMAL' || datatype_vvvvwaz == 'DOUBLE') + if (datatype_vvvvwbc == 'CHAR' || datatype_vvvvwbc == 'VARCHAR' || datatype_vvvvwbc == 'DATETIME' || datatype_vvvvwbc == 'DATE' || datatype_vvvvwbc == 'TIME' || datatype_vvvvwbc == 'INT' || datatype_vvvvwbc == 'TINYINT' || datatype_vvvvwbc == 'BIGINT' || datatype_vvvvwbc == 'FLOAT' || datatype_vvvvwbc == 'DECIMAL' || datatype_vvvvwbc == 'DOUBLE') { return true; } return false; } -// the vvvvwba function -function vvvvwba(datatype_vvvvwba) +// the vvvvwbd function +function vvvvwbd(datatype_vvvvwbd) { - if (isSet(datatype_vvvvwba) && datatype_vvvvwba.constructor !== Array) + if (isSet(datatype_vvvvwbd) && datatype_vvvvwbd.constructor !== Array) { - var temp_vvvvwba = datatype_vvvvwba; - var datatype_vvvvwba = []; - datatype_vvvvwba.push(temp_vvvvwba); + var temp_vvvvwbd = datatype_vvvvwbd; + var datatype_vvvvwbd = []; + datatype_vvvvwbd.push(temp_vvvvwbd); } - else if (!isSet(datatype_vvvvwba)) + else if (!isSet(datatype_vvvvwbd)) { - var datatype_vvvvwba = []; + var datatype_vvvvwbd = []; } - var datatype = datatype_vvvvwba.some(datatype_vvvvwba_SomeFunc); + var datatype = datatype_vvvvwbd.some(datatype_vvvvwbd_SomeFunc); // set this function logic @@ -239,67 +239,67 @@ function vvvvwba(datatype_vvvvwba) { jQuery('#jform_store').closest('.control-group').show(); // add required attribute to store field - if (jform_vvvvwbavxk_required) + if (jform_vvvvwbdvxl_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); - jform_vvvvwbavxk_required = false; + jform_vvvvwbdvxl_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); // remove required attribute from store field - if (!jform_vvvvwbavxk_required) + if (!jform_vvvvwbdvxl_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); - jform_vvvvwbavxk_required = true; + jform_vvvvwbdvxl_required = true; } } } -// the vvvvwba Some function -function datatype_vvvvwba_SomeFunc(datatype_vvvvwba) +// the vvvvwbd Some function +function datatype_vvvvwbd_SomeFunc(datatype_vvvvwbd) { // set the function logic - if (datatype_vvvvwba == 'CHAR' || datatype_vvvvwba == 'VARCHAR' || datatype_vvvvwba == 'TEXT' || datatype_vvvvwba == 'MEDIUMTEXT' || datatype_vvvvwba == 'LONGTEXT' || datatype_vvvvwba == 'BLOB' || datatype_vvvvwba == 'TINYBLOB' || datatype_vvvvwba == 'MEDIUMBLOB' || datatype_vvvvwba == 'LONGBLOB') + if (datatype_vvvvwbd == 'CHAR' || datatype_vvvvwbd == 'VARCHAR' || datatype_vvvvwbd == 'TEXT' || datatype_vvvvwbd == 'MEDIUMTEXT' || datatype_vvvvwbd == 'LONGTEXT' || datatype_vvvvwbd == 'BLOB' || datatype_vvvvwbd == 'TINYBLOB' || datatype_vvvvwbd == 'MEDIUMBLOB' || datatype_vvvvwbd == 'LONGBLOB') { return true; } return false; } -// the vvvvwbb function -function vvvvwbb(store_vvvvwbb,datatype_vvvvwbb) +// the vvvvwbe function +function vvvvwbe(store_vvvvwbe,datatype_vvvvwbe) { - if (isSet(store_vvvvwbb) && store_vvvvwbb.constructor !== Array) + if (isSet(store_vvvvwbe) && store_vvvvwbe.constructor !== Array) { - var temp_vvvvwbb = store_vvvvwbb; - var store_vvvvwbb = []; - store_vvvvwbb.push(temp_vvvvwbb); + var temp_vvvvwbe = store_vvvvwbe; + var store_vvvvwbe = []; + store_vvvvwbe.push(temp_vvvvwbe); } - else if (!isSet(store_vvvvwbb)) + else if (!isSet(store_vvvvwbe)) { - var store_vvvvwbb = []; + var store_vvvvwbe = []; } - var store = store_vvvvwbb.some(store_vvvvwbb_SomeFunc); + var store = store_vvvvwbe.some(store_vvvvwbe_SomeFunc); - if (isSet(datatype_vvvvwbb) && datatype_vvvvwbb.constructor !== Array) + if (isSet(datatype_vvvvwbe) && datatype_vvvvwbe.constructor !== Array) { - var temp_vvvvwbb = datatype_vvvvwbb; - var datatype_vvvvwbb = []; - datatype_vvvvwbb.push(temp_vvvvwbb); + var temp_vvvvwbe = datatype_vvvvwbe; + var datatype_vvvvwbe = []; + datatype_vvvvwbe.push(temp_vvvvwbe); } - else if (!isSet(datatype_vvvvwbb)) + else if (!isSet(datatype_vvvvwbe)) { - var datatype_vvvvwbb = []; + var datatype_vvvvwbe = []; } - var datatype = datatype_vvvvwbb.some(datatype_vvvvwbb_SomeFunc); + var datatype = datatype_vvvvwbe.some(datatype_vvvvwbe_SomeFunc); // set this function logic @@ -313,33 +313,33 @@ function vvvvwbb(store_vvvvwbb,datatype_vvvvwbb) } } -// the vvvvwbb Some function -function store_vvvvwbb_SomeFunc(store_vvvvwbb) +// the vvvvwbe Some function +function store_vvvvwbe_SomeFunc(store_vvvvwbe) { // set the function logic - if (store_vvvvwbb == 4) + if (store_vvvvwbe == 4) { return true; } return false; } -// the vvvvwbb Some function -function datatype_vvvvwbb_SomeFunc(datatype_vvvvwbb) +// the vvvvwbe Some function +function datatype_vvvvwbe_SomeFunc(datatype_vvvvwbe) { // set the function logic - if (datatype_vvvvwbb == 'CHAR' || datatype_vvvvwbb == 'VARCHAR' || datatype_vvvvwbb == 'TEXT' || datatype_vvvvwbb == 'MEDIUMTEXT' || datatype_vvvvwbb == 'LONGTEXT' || datatype_vvvvwbb == 'BLOB' || datatype_vvvvwbb == 'TINYBLOB' || datatype_vvvvwbb == 'MEDIUMBLOB' || datatype_vvvvwbb == 'LONGBLOB') + if (datatype_vvvvwbe == 'CHAR' || datatype_vvvvwbe == 'VARCHAR' || datatype_vvvvwbe == 'TEXT' || datatype_vvvvwbe == 'MEDIUMTEXT' || datatype_vvvvwbe == 'LONGTEXT' || datatype_vvvvwbe == 'BLOB' || datatype_vvvvwbe == 'TINYBLOB' || datatype_vvvvwbe == 'MEDIUMBLOB' || datatype_vvvvwbe == 'LONGBLOB') { return true; } return false; } -// the vvvvwbd function -function vvvvwbd(add_css_view_vvvvwbd) +// the vvvvwbg function +function vvvvwbg(add_css_view_vvvvwbg) { // set the function logic - if (add_css_view_vvvvwbd == 1) + if (add_css_view_vvvvwbg == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -349,11 +349,11 @@ function vvvvwbd(add_css_view_vvvvwbd) } } -// the vvvvwbe function -function vvvvwbe(add_css_views_vvvvwbe) +// the vvvvwbh function +function vvvvwbh(add_css_views_vvvvwbh) { // set the function logic - if (add_css_views_vvvvwbe == 1) + if (add_css_views_vvvvwbh == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -363,11 +363,11 @@ function vvvvwbe(add_css_views_vvvvwbe) } } -// the vvvvwbf function -function vvvvwbf(add_javascript_view_footer_vvvvwbf) +// the vvvvwbi function +function vvvvwbi(add_javascript_view_footer_vvvvwbi) { // set the function logic - if (add_javascript_view_footer_vvvvwbf == 1) + if (add_javascript_view_footer_vvvvwbi == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -377,11 +377,11 @@ function vvvvwbf(add_javascript_view_footer_vvvvwbf) } } -// the vvvvwbg function -function vvvvwbg(add_javascript_views_footer_vvvvwbg) +// the vvvvwbj function +function vvvvwbj(add_javascript_views_footer_vvvvwbj) { // set the function logic - if (add_javascript_views_footer_vvvvwbg == 1) + if (add_javascript_views_footer_vvvvwbj == 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 27bb8c29a..31671ac67 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,82 +9,82 @@ */ // Some Global Values -jform_vvvvwbhvxl_required = false; -jform_vvvvwbjvxm_required = false; -jform_vvvvwblvxn_required = false; -jform_vvvvwbmvxo_required = false; -jform_vvvvwbnvxp_required = false; -jform_vvvvwbsvxq_required = false; -jform_vvvvwbsvxr_required = false; +jform_vvvvwbkvxm_required = false; +jform_vvvvwbmvxn_required = false; +jform_vvvvwbovxo_required = false; +jform_vvvvwbpvxp_required = false; +jform_vvvvwbqvxq_required = false; +jform_vvvvwbvvxr_required = false; +jform_vvvvwbvvxs_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwbh = jQuery("#jform_datalenght").val(); - var has_defaults_vvvvwbh = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbh(datalenght_vvvvwbh,has_defaults_vvvvwbh); - - var datadefault_vvvvwbj = jQuery("#jform_datadefault").val(); - var has_defaults_vvvvwbj = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbj(datadefault_vvvvwbj,has_defaults_vvvvwbj); - - var datatype_vvvvwbl = jQuery("#jform_datatype").val(); - var has_defaults_vvvvwbl = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbl(datatype_vvvvwbl,has_defaults_vvvvwbl); + var datalenght_vvvvwbk = jQuery("#jform_datalenght").val(); + var has_defaults_vvvvwbk = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbk(datalenght_vvvvwbk,has_defaults_vvvvwbk); + var datadefault_vvvvwbm = jQuery("#jform_datadefault").val(); var has_defaults_vvvvwbm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var datatype_vvvvwbm = jQuery("#jform_datatype").val(); - vvvvwbm(has_defaults_vvvvwbm,datatype_vvvvwbm); + vvvvwbm(datadefault_vvvvwbm,has_defaults_vvvvwbm); - var datatype_vvvvwbn = jQuery("#jform_datatype").val(); - var has_defaults_vvvvwbn = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbn(datatype_vvvvwbn,has_defaults_vvvvwbn); + var datatype_vvvvwbo = jQuery("#jform_datatype").val(); + var has_defaults_vvvvwbo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbo(datatype_vvvvwbo,has_defaults_vvvvwbo); - var store_vvvvwbp = jQuery("#jform_store").val(); - var datatype_vvvvwbp = jQuery("#jform_datatype").val(); var has_defaults_vvvvwbp = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbp(store_vvvvwbp,datatype_vvvvwbp,has_defaults_vvvvwbp); + var datatype_vvvvwbp = jQuery("#jform_datatype").val(); + vvvvwbp(has_defaults_vvvvwbp,datatype_vvvvwbp); var datatype_vvvvwbq = jQuery("#jform_datatype").val(); - var store_vvvvwbq = jQuery("#jform_store").val(); var has_defaults_vvvvwbq = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbq(datatype_vvvvwbq,store_vvvvwbq,has_defaults_vvvvwbq); - - var has_defaults_vvvvwbr = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var store_vvvvwbr = jQuery("#jform_store").val(); - var datatype_vvvvwbr = jQuery("#jform_datatype").val(); - vvvvwbr(has_defaults_vvvvwbr,store_vvvvwbr,datatype_vvvvwbr); + vvvvwbq(datatype_vvvvwbq,has_defaults_vvvvwbq); + var store_vvvvwbs = jQuery("#jform_store").val(); + var datatype_vvvvwbs = jQuery("#jform_datatype").val(); var has_defaults_vvvvwbs = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbs(has_defaults_vvvvwbs); + vvvvwbs(store_vvvvwbs,datatype_vvvvwbs,has_defaults_vvvvwbs); + + var datatype_vvvvwbt = jQuery("#jform_datatype").val(); + var store_vvvvwbt = jQuery("#jform_store").val(); + var has_defaults_vvvvwbt = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbt(datatype_vvvvwbt,store_vvvvwbt,has_defaults_vvvvwbt); + + var has_defaults_vvvvwbu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + var store_vvvvwbu = jQuery("#jform_store").val(); + var datatype_vvvvwbu = jQuery("#jform_datatype").val(); + vvvvwbu(has_defaults_vvvvwbu,store_vvvvwbu,datatype_vvvvwbu); + + var has_defaults_vvvvwbv = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbv(has_defaults_vvvvwbv); }); -// the vvvvwbh function -function vvvvwbh(datalenght_vvvvwbh,has_defaults_vvvvwbh) +// the vvvvwbk function +function vvvvwbk(datalenght_vvvvwbk,has_defaults_vvvvwbk) { - if (isSet(datalenght_vvvvwbh) && datalenght_vvvvwbh.constructor !== Array) + if (isSet(datalenght_vvvvwbk) && datalenght_vvvvwbk.constructor !== Array) { - var temp_vvvvwbh = datalenght_vvvvwbh; - var datalenght_vvvvwbh = []; - datalenght_vvvvwbh.push(temp_vvvvwbh); + var temp_vvvvwbk = datalenght_vvvvwbk; + var datalenght_vvvvwbk = []; + datalenght_vvvvwbk.push(temp_vvvvwbk); } - else if (!isSet(datalenght_vvvvwbh)) + else if (!isSet(datalenght_vvvvwbk)) { - var datalenght_vvvvwbh = []; + var datalenght_vvvvwbk = []; } - var datalenght = datalenght_vvvvwbh.some(datalenght_vvvvwbh_SomeFunc); + var datalenght = datalenght_vvvvwbk.some(datalenght_vvvvwbk_SomeFunc); - if (isSet(has_defaults_vvvvwbh) && has_defaults_vvvvwbh.constructor !== Array) + if (isSet(has_defaults_vvvvwbk) && has_defaults_vvvvwbk.constructor !== Array) { - var temp_vvvvwbh = has_defaults_vvvvwbh; - var has_defaults_vvvvwbh = []; - has_defaults_vvvvwbh.push(temp_vvvvwbh); + var temp_vvvvwbk = has_defaults_vvvvwbk; + var has_defaults_vvvvwbk = []; + has_defaults_vvvvwbk.push(temp_vvvvwbk); } - else if (!isSet(has_defaults_vvvvwbh)) + else if (!isSet(has_defaults_vvvvwbk)) { - var has_defaults_vvvvwbh = []; + var has_defaults_vvvvwbk = []; } - var has_defaults = has_defaults_vvvvwbh.some(has_defaults_vvvvwbh_SomeFunc); + var has_defaults = has_defaults_vvvvwbk.some(has_defaults_vvvvwbk_SomeFunc); // set this function logic @@ -92,208 +92,46 @@ function vvvvwbh(datalenght_vvvvwbh,has_defaults_vvvvwbh) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwbhvxl_required) + if (jform_vvvvwbkvxm_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_vvvvwbhvxl_required = false; + jform_vvvvwbkvxm_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwbhvxl_required) + if (!jform_vvvvwbkvxm_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_vvvvwbhvxl_required = true; + jform_vvvvwbkvxm_required = true; } } } -// the vvvvwbh Some function -function datalenght_vvvvwbh_SomeFunc(datalenght_vvvvwbh) +// the vvvvwbk Some function +function datalenght_vvvvwbk_SomeFunc(datalenght_vvvvwbk) { // set the function logic - if (datalenght_vvvvwbh == 'Other') + if (datalenght_vvvvwbk == 'Other') { return true; } return false; } -// the vvvvwbh Some function -function has_defaults_vvvvwbh_SomeFunc(has_defaults_vvvvwbh) +// the vvvvwbk Some function +function has_defaults_vvvvwbk_SomeFunc(has_defaults_vvvvwbk) { // set the function logic - if (has_defaults_vvvvwbh == 1) - { - return true; - } - return false; -} - -// the vvvvwbj function -function vvvvwbj(datadefault_vvvvwbj,has_defaults_vvvvwbj) -{ - if (isSet(datadefault_vvvvwbj) && datadefault_vvvvwbj.constructor !== Array) - { - var temp_vvvvwbj = datadefault_vvvvwbj; - var datadefault_vvvvwbj = []; - datadefault_vvvvwbj.push(temp_vvvvwbj); - } - else if (!isSet(datadefault_vvvvwbj)) - { - var datadefault_vvvvwbj = []; - } - var datadefault = datadefault_vvvvwbj.some(datadefault_vvvvwbj_SomeFunc); - - if (isSet(has_defaults_vvvvwbj) && has_defaults_vvvvwbj.constructor !== Array) - { - var temp_vvvvwbj = has_defaults_vvvvwbj; - var has_defaults_vvvvwbj = []; - has_defaults_vvvvwbj.push(temp_vvvvwbj); - } - else if (!isSet(has_defaults_vvvvwbj)) - { - var has_defaults_vvvvwbj = []; - } - var has_defaults = has_defaults_vvvvwbj.some(has_defaults_vvvvwbj_SomeFunc); - - - // set this function logic - if (datadefault && has_defaults) - { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwbjvxm_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_vvvvwbjvxm_required = false; - } - } - else - { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwbjvxm_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_vvvvwbjvxm_required = true; - } - } -} - -// the vvvvwbj Some function -function datadefault_vvvvwbj_SomeFunc(datadefault_vvvvwbj) -{ - // set the function logic - if (datadefault_vvvvwbj == 'Other') - { - return true; - } - return false; -} - -// the vvvvwbj Some function -function has_defaults_vvvvwbj_SomeFunc(has_defaults_vvvvwbj) -{ - // set the function logic - if (has_defaults_vvvvwbj == 1) - { - return true; - } - return false; -} - -// the vvvvwbl function -function vvvvwbl(datatype_vvvvwbl,has_defaults_vvvvwbl) -{ - if (isSet(datatype_vvvvwbl) && datatype_vvvvwbl.constructor !== Array) - { - var temp_vvvvwbl = datatype_vvvvwbl; - var datatype_vvvvwbl = []; - datatype_vvvvwbl.push(temp_vvvvwbl); - } - else if (!isSet(datatype_vvvvwbl)) - { - var datatype_vvvvwbl = []; - } - var datatype = datatype_vvvvwbl.some(datatype_vvvvwbl_SomeFunc); - - if (isSet(has_defaults_vvvvwbl) && has_defaults_vvvvwbl.constructor !== Array) - { - var temp_vvvvwbl = has_defaults_vvvvwbl; - var has_defaults_vvvvwbl = []; - has_defaults_vvvvwbl.push(temp_vvvvwbl); - } - else if (!isSet(has_defaults_vvvvwbl)) - { - var has_defaults_vvvvwbl = []; - } - var has_defaults = has_defaults_vvvvwbl.some(has_defaults_vvvvwbl_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_vvvvwblvxn_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwblvxn_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_vvvvwblvxn_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwblvxn_required = true; - } - } -} - -// the vvvvwbl Some function -function datatype_vvvvwbl_SomeFunc(datatype_vvvvwbl) -{ - // set the function logic - if (datatype_vvvvwbl == 'CHAR' || datatype_vvvvwbl == 'VARCHAR' || datatype_vvvvwbl == 'DATETIME' || datatype_vvvvwbl == 'DATE' || datatype_vvvvwbl == 'TIME' || datatype_vvvvwbl == 'INT' || datatype_vvvvwbl == 'TINYINT' || datatype_vvvvwbl == 'BIGINT' || datatype_vvvvwbl == 'FLOAT' || datatype_vvvvwbl == 'DECIMAL' || datatype_vvvvwbl == 'DOUBLE') - { - return true; - } - return false; -} - -// the vvvvwbl Some function -function has_defaults_vvvvwbl_SomeFunc(has_defaults_vvvvwbl) -{ - // set the function logic - if (has_defaults_vvvvwbl == 1) + if (has_defaults_vvvvwbk == 1) { return true; } @@ -301,8 +139,20 @@ function has_defaults_vvvvwbl_SomeFunc(has_defaults_vvvvwbl) } // the vvvvwbm function -function vvvvwbm(has_defaults_vvvvwbm,datatype_vvvvwbm) +function vvvvwbm(datadefault_vvvvwbm,has_defaults_vvvvwbm) { + if (isSet(datadefault_vvvvwbm) && datadefault_vvvvwbm.constructor !== Array) + { + var temp_vvvvwbm = datadefault_vvvvwbm; + var datadefault_vvvvwbm = []; + datadefault_vvvvwbm.push(temp_vvvvwbm); + } + else if (!isSet(datadefault_vvvvwbm)) + { + var datadefault_vvvvwbm = []; + } + var datadefault = datadefault_vvvvwbm.some(datadefault_vvvvwbm_SomeFunc); + if (isSet(has_defaults_vvvvwbm) && has_defaults_vvvvwbm.constructor !== Array) { var temp_vvvvwbm = has_defaults_vvvvwbm; @@ -315,52 +165,47 @@ function vvvvwbm(has_defaults_vvvvwbm,datatype_vvvvwbm) } var has_defaults = has_defaults_vvvvwbm.some(has_defaults_vvvvwbm_SomeFunc); - if (isSet(datatype_vvvvwbm) && datatype_vvvvwbm.constructor !== Array) - { - var temp_vvvvwbm = datatype_vvvvwbm; - var datatype_vvvvwbm = []; - datatype_vvvvwbm.push(temp_vvvvwbm); - } - else if (!isSet(datatype_vvvvwbm)) - { - var datatype_vvvvwbm = []; - } - var datatype = datatype_vvvvwbm.some(datatype_vvvvwbm_SomeFunc); - // set this function logic - if (has_defaults && datatype) + if (datadefault && 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_vvvvwbmvxo_required) + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field + if (jform_vvvvwbmvxn_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbmvxo_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_vvvvwbmvxn_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_vvvvwbmvxo_required) + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field + if (!jform_vvvvwbmvxn_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbmvxo_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_vvvvwbmvxn_required = true; } } } +// the vvvvwbm Some function +function datadefault_vvvvwbm_SomeFunc(datadefault_vvvvwbm) +{ + // set the function logic + if (datadefault_vvvvwbm == 'Other') + { + return true; + } + return false; +} + // the vvvvwbm Some function function has_defaults_vvvvwbm_SomeFunc(has_defaults_vvvvwbm) { @@ -372,90 +217,83 @@ function has_defaults_vvvvwbm_SomeFunc(has_defaults_vvvvwbm) return false; } -// the vvvvwbm Some function -function datatype_vvvvwbm_SomeFunc(datatype_vvvvwbm) +// the vvvvwbo function +function vvvvwbo(datatype_vvvvwbo,has_defaults_vvvvwbo) { - // set the function logic - if (datatype_vvvvwbm == 'CHAR' || datatype_vvvvwbm == 'VARCHAR' || datatype_vvvvwbm == 'DATETIME' || datatype_vvvvwbm == 'DATE' || datatype_vvvvwbm == 'TIME' || datatype_vvvvwbm == 'INT' || datatype_vvvvwbm == 'TINYINT' || datatype_vvvvwbm == 'BIGINT' || datatype_vvvvwbm == 'FLOAT' || datatype_vvvvwbm == 'DECIMAL' || datatype_vvvvwbm == 'DOUBLE') + if (isSet(datatype_vvvvwbo) && datatype_vvvvwbo.constructor !== Array) { - return true; + var temp_vvvvwbo = datatype_vvvvwbo; + var datatype_vvvvwbo = []; + datatype_vvvvwbo.push(temp_vvvvwbo); } - return false; -} + else if (!isSet(datatype_vvvvwbo)) + { + var datatype_vvvvwbo = []; + } + var datatype = datatype_vvvvwbo.some(datatype_vvvvwbo_SomeFunc); -// the vvvvwbn function -function vvvvwbn(datatype_vvvvwbn,has_defaults_vvvvwbn) -{ - if (isSet(datatype_vvvvwbn) && datatype_vvvvwbn.constructor !== Array) + if (isSet(has_defaults_vvvvwbo) && has_defaults_vvvvwbo.constructor !== Array) { - var temp_vvvvwbn = datatype_vvvvwbn; - var datatype_vvvvwbn = []; - datatype_vvvvwbn.push(temp_vvvvwbn); + var temp_vvvvwbo = has_defaults_vvvvwbo; + var has_defaults_vvvvwbo = []; + has_defaults_vvvvwbo.push(temp_vvvvwbo); } - else if (!isSet(datatype_vvvvwbn)) + else if (!isSet(has_defaults_vvvvwbo)) { - var datatype_vvvvwbn = []; + var has_defaults_vvvvwbo = []; } - var datatype = datatype_vvvvwbn.some(datatype_vvvvwbn_SomeFunc); - - if (isSet(has_defaults_vvvvwbn) && has_defaults_vvvvwbn.constructor !== Array) - { - var temp_vvvvwbn = has_defaults_vvvvwbn; - var has_defaults_vvvvwbn = []; - has_defaults_vvvvwbn.push(temp_vvvvwbn); - } - else if (!isSet(has_defaults_vvvvwbn)) - { - var has_defaults_vvvvwbn = []; - } - var has_defaults = has_defaults_vvvvwbn.some(has_defaults_vvvvwbn_SomeFunc); + var has_defaults = has_defaults_vvvvwbo.some(has_defaults_vvvvwbo_SomeFunc); // set this function logic if (datatype && has_defaults) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwbnvxp_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_vvvvwbovxo_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwbnvxp_required = false; + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwbovxo_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwbnvxp_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_vvvvwbovxo_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwbnvxp_required = true; + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwbovxo_required = true; } } } -// the vvvvwbn Some function -function datatype_vvvvwbn_SomeFunc(datatype_vvvvwbn) +// the vvvvwbo Some function +function datatype_vvvvwbo_SomeFunc(datatype_vvvvwbo) { // set the function logic - if (datatype_vvvvwbn == 'CHAR' || datatype_vvvvwbn == 'VARCHAR' || datatype_vvvvwbn == 'TEXT' || datatype_vvvvwbn == 'MEDIUMTEXT' || datatype_vvvvwbn == 'LONGTEXT' || datatype_vvvvwbn == 'BLOB' || datatype_vvvvwbn == 'TINYBLOB' || datatype_vvvvwbn == 'MEDIUMBLOB' || datatype_vvvvwbn == 'LONGBLOB') + if (datatype_vvvvwbo == 'CHAR' || datatype_vvvvwbo == 'VARCHAR' || datatype_vvvvwbo == 'DATETIME' || datatype_vvvvwbo == 'DATE' || datatype_vvvvwbo == 'TIME' || datatype_vvvvwbo == 'INT' || datatype_vvvvwbo == 'TINYINT' || datatype_vvvvwbo == 'BIGINT' || datatype_vvvvwbo == 'FLOAT' || datatype_vvvvwbo == 'DECIMAL' || datatype_vvvvwbo == 'DOUBLE') { return true; } return false; } -// the vvvvwbn Some function -function has_defaults_vvvvwbn_SomeFunc(has_defaults_vvvvwbn) +// the vvvvwbo Some function +function has_defaults_vvvvwbo_SomeFunc(has_defaults_vvvvwbo) { // set the function logic - if (has_defaults_vvvvwbn == 1) + if (has_defaults_vvvvwbo == 1) { return true; } @@ -463,19 +301,19 @@ function has_defaults_vvvvwbn_SomeFunc(has_defaults_vvvvwbn) } // the vvvvwbp function -function vvvvwbp(store_vvvvwbp,datatype_vvvvwbp,has_defaults_vvvvwbp) +function vvvvwbp(has_defaults_vvvvwbp,datatype_vvvvwbp) { - if (isSet(store_vvvvwbp) && store_vvvvwbp.constructor !== Array) + if (isSet(has_defaults_vvvvwbp) && has_defaults_vvvvwbp.constructor !== Array) { - var temp_vvvvwbp = store_vvvvwbp; - var store_vvvvwbp = []; - store_vvvvwbp.push(temp_vvvvwbp); + var temp_vvvvwbp = has_defaults_vvvvwbp; + var has_defaults_vvvvwbp = []; + has_defaults_vvvvwbp.push(temp_vvvvwbp); } - else if (!isSet(store_vvvvwbp)) + else if (!isSet(has_defaults_vvvvwbp)) { - var store_vvvvwbp = []; + var has_defaults_vvvvwbp = []; } - var store = store_vvvvwbp.some(store_vvvvwbp_SomeFunc); + var has_defaults = has_defaults_vvvvwbp.some(has_defaults_vvvvwbp_SomeFunc); if (isSet(datatype_vvvvwbp) && datatype_vvvvwbp.constructor !== Array) { @@ -489,52 +327,40 @@ function vvvvwbp(store_vvvvwbp,datatype_vvvvwbp,has_defaults_vvvvwbp) } var datatype = datatype_vvvvwbp.some(datatype_vvvvwbp_SomeFunc); - if (isSet(has_defaults_vvvvwbp) && has_defaults_vvvvwbp.constructor !== Array) - { - var temp_vvvvwbp = has_defaults_vvvvwbp; - var has_defaults_vvvvwbp = []; - has_defaults_vvvvwbp.push(temp_vvvvwbp); - } - else if (!isSet(has_defaults_vvvvwbp)) - { - var has_defaults_vvvvwbp = []; - } - var has_defaults = has_defaults_vvvvwbp.some(has_defaults_vvvvwbp_SomeFunc); - // set this function logic - if (store && datatype && has_defaults) + if (has_defaults && datatype) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + 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_vvvvwbpvxp_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwbpvxp_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + 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_vvvvwbpvxp_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwbpvxp_required = true; + } } } -// the vvvvwbp Some function -function store_vvvvwbp_SomeFunc(store_vvvvwbp) -{ - // set the function logic - if (store_vvvvwbp == 4) - { - return true; - } - return false; -} - -// the vvvvwbp Some function -function datatype_vvvvwbp_SomeFunc(datatype_vvvvwbp) -{ - // set the function logic - if (datatype_vvvvwbp == 'CHAR' || datatype_vvvvwbp == 'VARCHAR' || datatype_vvvvwbp == 'TEXT' || datatype_vvvvwbp == 'MEDIUMTEXT' || datatype_vvvvwbp == 'LONGTEXT' || datatype_vvvvwbp == 'BLOB' || datatype_vvvvwbp == 'TINYBLOB' || datatype_vvvvwbp == 'MEDIUMBLOB' || datatype_vvvvwbp == 'LONGBLOB') - { - return true; - } - return false; -} - // the vvvvwbp Some function function has_defaults_vvvvwbp_SomeFunc(has_defaults_vvvvwbp) { @@ -546,8 +372,19 @@ function has_defaults_vvvvwbp_SomeFunc(has_defaults_vvvvwbp) return false; } +// the vvvvwbp Some function +function datatype_vvvvwbp_SomeFunc(datatype_vvvvwbp) +{ + // set the function logic + if (datatype_vvvvwbp == 'CHAR' || datatype_vvvvwbp == 'VARCHAR' || datatype_vvvvwbp == 'DATETIME' || datatype_vvvvwbp == 'DATE' || datatype_vvvvwbp == 'TIME' || datatype_vvvvwbp == 'INT' || datatype_vvvvwbp == 'TINYINT' || datatype_vvvvwbp == 'BIGINT' || datatype_vvvvwbp == 'FLOAT' || datatype_vvvvwbp == 'DECIMAL' || datatype_vvvvwbp == 'DOUBLE') + { + return true; + } + return false; +} + // the vvvvwbq function -function vvvvwbq(datatype_vvvvwbq,store_vvvvwbq,has_defaults_vvvvwbq) +function vvvvwbq(datatype_vvvvwbq,has_defaults_vvvvwbq) { if (isSet(datatype_vvvvwbq) && datatype_vvvvwbq.constructor !== Array) { @@ -561,18 +398,6 @@ function vvvvwbq(datatype_vvvvwbq,store_vvvvwbq,has_defaults_vvvvwbq) } var datatype = datatype_vvvvwbq.some(datatype_vvvvwbq_SomeFunc); - if (isSet(store_vvvvwbq) && store_vvvvwbq.constructor !== Array) - { - var temp_vvvvwbq = store_vvvvwbq; - var store_vvvvwbq = []; - store_vvvvwbq.push(temp_vvvvwbq); - } - else if (!isSet(store_vvvvwbq)) - { - var store_vvvvwbq = []; - } - var store = store_vvvvwbq.some(store_vvvvwbq_SomeFunc); - if (isSet(has_defaults_vvvvwbq) && has_defaults_vvvvwbq.constructor !== Array) { var temp_vvvvwbq = has_defaults_vvvvwbq; @@ -587,13 +412,31 @@ function vvvvwbq(datatype_vvvvwbq,store_vvvvwbq,has_defaults_vvvvwbq) // set this function logic - if (datatype && store && 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_vvvvwbqvxq_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwbqvxq_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_vvvvwbqvxq_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwbqvxq_required = true; + } } } @@ -608,17 +451,6 @@ function datatype_vvvvwbq_SomeFunc(datatype_vvvvwbq) return false; } -// the vvvvwbq Some function -function store_vvvvwbq_SomeFunc(store_vvvvwbq) -{ - // set the function logic - if (store_vvvvwbq == 4) - { - return true; - } - return false; -} - // the vvvvwbq Some function function has_defaults_vvvvwbq_SomeFunc(has_defaults_vvvvwbq) { @@ -630,44 +462,212 @@ function has_defaults_vvvvwbq_SomeFunc(has_defaults_vvvvwbq) return false; } -// the vvvvwbr function -function vvvvwbr(has_defaults_vvvvwbr,store_vvvvwbr,datatype_vvvvwbr) +// the vvvvwbs function +function vvvvwbs(store_vvvvwbs,datatype_vvvvwbs,has_defaults_vvvvwbs) { - if (isSet(has_defaults_vvvvwbr) && has_defaults_vvvvwbr.constructor !== Array) + if (isSet(store_vvvvwbs) && store_vvvvwbs.constructor !== Array) { - var temp_vvvvwbr = has_defaults_vvvvwbr; - var has_defaults_vvvvwbr = []; - has_defaults_vvvvwbr.push(temp_vvvvwbr); + var temp_vvvvwbs = store_vvvvwbs; + var store_vvvvwbs = []; + store_vvvvwbs.push(temp_vvvvwbs); } - else if (!isSet(has_defaults_vvvvwbr)) + else if (!isSet(store_vvvvwbs)) { - var has_defaults_vvvvwbr = []; + var store_vvvvwbs = []; } - var has_defaults = has_defaults_vvvvwbr.some(has_defaults_vvvvwbr_SomeFunc); + var store = store_vvvvwbs.some(store_vvvvwbs_SomeFunc); - if (isSet(store_vvvvwbr) && store_vvvvwbr.constructor !== Array) + if (isSet(datatype_vvvvwbs) && datatype_vvvvwbs.constructor !== Array) { - var temp_vvvvwbr = store_vvvvwbr; - var store_vvvvwbr = []; - store_vvvvwbr.push(temp_vvvvwbr); + var temp_vvvvwbs = datatype_vvvvwbs; + var datatype_vvvvwbs = []; + datatype_vvvvwbs.push(temp_vvvvwbs); } - else if (!isSet(store_vvvvwbr)) + else if (!isSet(datatype_vvvvwbs)) { - var store_vvvvwbr = []; + var datatype_vvvvwbs = []; } - var store = store_vvvvwbr.some(store_vvvvwbr_SomeFunc); + var datatype = datatype_vvvvwbs.some(datatype_vvvvwbs_SomeFunc); - if (isSet(datatype_vvvvwbr) && datatype_vvvvwbr.constructor !== Array) + if (isSet(has_defaults_vvvvwbs) && has_defaults_vvvvwbs.constructor !== Array) { - var temp_vvvvwbr = datatype_vvvvwbr; - var datatype_vvvvwbr = []; - datatype_vvvvwbr.push(temp_vvvvwbr); + var temp_vvvvwbs = has_defaults_vvvvwbs; + var has_defaults_vvvvwbs = []; + has_defaults_vvvvwbs.push(temp_vvvvwbs); } - else if (!isSet(datatype_vvvvwbr)) + else if (!isSet(has_defaults_vvvvwbs)) { - var datatype_vvvvwbr = []; + var has_defaults_vvvvwbs = []; } - var datatype = datatype_vvvvwbr.some(datatype_vvvvwbr_SomeFunc); + var has_defaults = has_defaults_vvvvwbs.some(has_defaults_vvvvwbs_SomeFunc); + + + // set this function logic + if (store && datatype && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbs Some function +function store_vvvvwbs_SomeFunc(store_vvvvwbs) +{ + // set the function logic + if (store_vvvvwbs == 4) + { + return true; + } + return false; +} + +// the vvvvwbs Some function +function datatype_vvvvwbs_SomeFunc(datatype_vvvvwbs) +{ + // set the function logic + if (datatype_vvvvwbs == 'CHAR' || datatype_vvvvwbs == 'VARCHAR' || datatype_vvvvwbs == 'TEXT' || datatype_vvvvwbs == 'MEDIUMTEXT' || datatype_vvvvwbs == 'LONGTEXT' || datatype_vvvvwbs == 'BLOB' || datatype_vvvvwbs == 'TINYBLOB' || datatype_vvvvwbs == 'MEDIUMBLOB' || datatype_vvvvwbs == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbs Some function +function has_defaults_vvvvwbs_SomeFunc(has_defaults_vvvvwbs) +{ + // set the function logic + if (has_defaults_vvvvwbs == 1) + { + return true; + } + return false; +} + +// the vvvvwbt function +function vvvvwbt(datatype_vvvvwbt,store_vvvvwbt,has_defaults_vvvvwbt) +{ + if (isSet(datatype_vvvvwbt) && datatype_vvvvwbt.constructor !== Array) + { + var temp_vvvvwbt = datatype_vvvvwbt; + var datatype_vvvvwbt = []; + datatype_vvvvwbt.push(temp_vvvvwbt); + } + else if (!isSet(datatype_vvvvwbt)) + { + var datatype_vvvvwbt = []; + } + var datatype = datatype_vvvvwbt.some(datatype_vvvvwbt_SomeFunc); + + if (isSet(store_vvvvwbt) && store_vvvvwbt.constructor !== Array) + { + var temp_vvvvwbt = store_vvvvwbt; + var store_vvvvwbt = []; + store_vvvvwbt.push(temp_vvvvwbt); + } + else if (!isSet(store_vvvvwbt)) + { + var store_vvvvwbt = []; + } + var store = store_vvvvwbt.some(store_vvvvwbt_SomeFunc); + + if (isSet(has_defaults_vvvvwbt) && has_defaults_vvvvwbt.constructor !== Array) + { + var temp_vvvvwbt = has_defaults_vvvvwbt; + var has_defaults_vvvvwbt = []; + has_defaults_vvvvwbt.push(temp_vvvvwbt); + } + else if (!isSet(has_defaults_vvvvwbt)) + { + var has_defaults_vvvvwbt = []; + } + var has_defaults = has_defaults_vvvvwbt.some(has_defaults_vvvvwbt_SomeFunc); + + + // set this function logic + if (datatype && store && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbt Some function +function datatype_vvvvwbt_SomeFunc(datatype_vvvvwbt) +{ + // set the function logic + if (datatype_vvvvwbt == 'CHAR' || datatype_vvvvwbt == 'VARCHAR' || datatype_vvvvwbt == 'TEXT' || datatype_vvvvwbt == 'MEDIUMTEXT' || datatype_vvvvwbt == 'LONGTEXT' || datatype_vvvvwbt == 'BLOB' || datatype_vvvvwbt == 'TINYBLOB' || datatype_vvvvwbt == 'MEDIUMBLOB' || datatype_vvvvwbt == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbt Some function +function store_vvvvwbt_SomeFunc(store_vvvvwbt) +{ + // set the function logic + if (store_vvvvwbt == 4) + { + return true; + } + return false; +} + +// the vvvvwbt Some function +function has_defaults_vvvvwbt_SomeFunc(has_defaults_vvvvwbt) +{ + // set the function logic + if (has_defaults_vvvvwbt == 1) + { + return true; + } + return false; +} + +// the vvvvwbu function +function vvvvwbu(has_defaults_vvvvwbu,store_vvvvwbu,datatype_vvvvwbu) +{ + if (isSet(has_defaults_vvvvwbu) && has_defaults_vvvvwbu.constructor !== Array) + { + var temp_vvvvwbu = has_defaults_vvvvwbu; + var has_defaults_vvvvwbu = []; + has_defaults_vvvvwbu.push(temp_vvvvwbu); + } + else if (!isSet(has_defaults_vvvvwbu)) + { + var has_defaults_vvvvwbu = []; + } + var has_defaults = has_defaults_vvvvwbu.some(has_defaults_vvvvwbu_SomeFunc); + + if (isSet(store_vvvvwbu) && store_vvvvwbu.constructor !== Array) + { + var temp_vvvvwbu = store_vvvvwbu; + var store_vvvvwbu = []; + store_vvvvwbu.push(temp_vvvvwbu); + } + else if (!isSet(store_vvvvwbu)) + { + var store_vvvvwbu = []; + } + var store = store_vvvvwbu.some(store_vvvvwbu_SomeFunc); + + if (isSet(datatype_vvvvwbu) && datatype_vvvvwbu.constructor !== Array) + { + var temp_vvvvwbu = datatype_vvvvwbu; + var datatype_vvvvwbu = []; + datatype_vvvvwbu.push(temp_vvvvwbu); + } + else if (!isSet(datatype_vvvvwbu)) + { + var datatype_vvvvwbu = []; + } + var datatype = datatype_vvvvwbu.some(datatype_vvvvwbu_SomeFunc); // set this function logic @@ -681,87 +681,87 @@ function vvvvwbr(has_defaults_vvvvwbr,store_vvvvwbr,datatype_vvvvwbr) } } -// the vvvvwbr Some function -function has_defaults_vvvvwbr_SomeFunc(has_defaults_vvvvwbr) +// the vvvvwbu Some function +function has_defaults_vvvvwbu_SomeFunc(has_defaults_vvvvwbu) { // set the function logic - if (has_defaults_vvvvwbr == 1) + if (has_defaults_vvvvwbu == 1) { return true; } return false; } -// the vvvvwbr Some function -function store_vvvvwbr_SomeFunc(store_vvvvwbr) +// the vvvvwbu Some function +function store_vvvvwbu_SomeFunc(store_vvvvwbu) { // set the function logic - if (store_vvvvwbr == 4) + if (store_vvvvwbu == 4) { return true; } return false; } -// the vvvvwbr Some function -function datatype_vvvvwbr_SomeFunc(datatype_vvvvwbr) +// the vvvvwbu Some function +function datatype_vvvvwbu_SomeFunc(datatype_vvvvwbu) { // set the function logic - if (datatype_vvvvwbr == 'CHAR' || datatype_vvvvwbr == 'VARCHAR' || datatype_vvvvwbr == 'TEXT' || datatype_vvvvwbr == 'MEDIUMTEXT' || datatype_vvvvwbr == 'LONGTEXT' || datatype_vvvvwbr == 'BLOB' || datatype_vvvvwbr == 'TINYBLOB' || datatype_vvvvwbr == 'MEDIUMBLOB' || datatype_vvvvwbr == 'LONGBLOB') + if (datatype_vvvvwbu == 'CHAR' || datatype_vvvvwbu == 'VARCHAR' || datatype_vvvvwbu == 'TEXT' || datatype_vvvvwbu == 'MEDIUMTEXT' || datatype_vvvvwbu == 'LONGTEXT' || datatype_vvvvwbu == 'BLOB' || datatype_vvvvwbu == 'TINYBLOB' || datatype_vvvvwbu == 'MEDIUMBLOB' || datatype_vvvvwbu == 'LONGBLOB') { return true; } return false; } -// the vvvvwbs function -function vvvvwbs(has_defaults_vvvvwbs) +// the vvvvwbv function +function vvvvwbv(has_defaults_vvvvwbv) { // set the function logic - if (has_defaults_vvvvwbs == 1) + if (has_defaults_vvvvwbv == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwbsvxq_required) + if (jform_vvvvwbvvxr_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwbsvxq_required = false; + jform_vvvvwbvvxr_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwbsvxr_required) + if (jform_vvvvwbvvxs_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_vvvvwbsvxr_required = false; + jform_vvvvwbvvxs_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwbsvxq_required) + if (!jform_vvvvwbvvxr_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwbsvxq_required = true; + jform_vvvvwbvvxr_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwbsvxr_required) + if (!jform_vvvvwbvvxs_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_vvvvwbsvxr_required = true; + jform_vvvvwbvvxs_required = true; } } } diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 70dc34927..78daca80f 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,112 +9,112 @@ */ // Some Global Values -jform_vvvvwcdvyd_required = false; -jform_vvvvwcevye_required = false; -jform_vvvvwcfvyf_required = false; -jform_vvvvwcgvyg_required = false; -jform_vvvvwcivyh_required = false; +jform_vvvvwcgvye_required = false; +jform_vvvvwchvyf_required = false; +jform_vvvvwcivyg_required = false; +jform_vvvvwcjvyh_required = false; +jform_vvvvwclvyi_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwcd = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwcd(location_vvvvwcd); + var location_vvvvwcg = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwcg(location_vvvvwcg); - var location_vvvvwce = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwce(location_vvvvwce); + var location_vvvvwch = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwch(location_vvvvwch); - var type_vvvvwcf = jQuery("#jform_type").val(); - vvvvwcf(type_vvvvwcf); + var type_vvvvwci = jQuery("#jform_type").val(); + vvvvwci(type_vvvvwci); - var type_vvvvwcg = jQuery("#jform_type").val(); - vvvvwcg(type_vvvvwcg); + var type_vvvvwcj = jQuery("#jform_type").val(); + vvvvwcj(type_vvvvwcj); - var type_vvvvwch = jQuery("#jform_type").val(); - vvvvwch(type_vvvvwch); + var type_vvvvwck = jQuery("#jform_type").val(); + vvvvwck(type_vvvvwck); - var target_vvvvwci = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwci(target_vvvvwci); + var target_vvvvwcl = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwcl(target_vvvvwcl); }); -// the vvvvwcd function -function vvvvwcd(location_vvvvwcd) +// the vvvvwcg function +function vvvvwcg(location_vvvvwcg) { // set the function logic - if (location_vvvvwcd == 1) + if (location_vvvvwcg == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwcdvyd_required) + if (jform_vvvvwcgvye_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_vvvvwcdvyd_required = false; + jform_vvvvwcgvye_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwcdvyd_required) + if (!jform_vvvvwcgvye_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_vvvvwcdvyd_required = true; + jform_vvvvwcgvye_required = true; } } } -// the vvvvwce function -function vvvvwce(location_vvvvwce) +// the vvvvwch function +function vvvvwch(location_vvvvwch) { // set the function logic - if (location_vvvvwce == 2) + if (location_vvvvwch == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwcevye_required) + if (jform_vvvvwchvyf_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_vvvvwcevye_required = false; + jform_vvvvwchvyf_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwcevye_required) + if (!jform_vvvvwchvyf_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_vvvvwcevye_required = true; + jform_vvvvwchvyf_required = true; } } } -// the vvvvwcf function -function vvvvwcf(type_vvvvwcf) +// the vvvvwci function +function vvvvwci(type_vvvvwci) { - if (isSet(type_vvvvwcf) && type_vvvvwcf.constructor !== Array) + if (isSet(type_vvvvwci) && type_vvvvwci.constructor !== Array) { - var temp_vvvvwcf = type_vvvvwcf; - var type_vvvvwcf = []; - type_vvvvwcf.push(temp_vvvvwcf); + var temp_vvvvwci = type_vvvvwci; + var type_vvvvwci = []; + type_vvvvwci.push(temp_vvvvwci); } - else if (!isSet(type_vvvvwcf)) + else if (!isSet(type_vvvvwci)) { - var type_vvvvwcf = []; + var type_vvvvwci = []; } - var type = type_vvvvwcf.some(type_vvvvwcf_SomeFunc); + var type = type_vvvvwci.some(type_vvvvwci_SomeFunc); // set this function logic @@ -122,55 +122,55 @@ function vvvvwcf(type_vvvvwcf) { jQuery('#jform_url').closest('.control-group').show(); // add required attribute to url field - if (jform_vvvvwcfvyf_required) + if (jform_vvvvwcivyg_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwcfvyf_required = false; + jform_vvvvwcivyg_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); // remove required attribute from url field - if (!jform_vvvvwcfvyf_required) + if (!jform_vvvvwcivyg_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwcfvyf_required = true; + jform_vvvvwcivyg_required = true; } } } -// the vvvvwcf Some function -function type_vvvvwcf_SomeFunc(type_vvvvwcf) +// the vvvvwci Some function +function type_vvvvwci_SomeFunc(type_vvvvwci) { // set the function logic - if (type_vvvvwcf == 3) + if (type_vvvvwci == 3) { return true; } return false; } -// the vvvvwcg function -function vvvvwcg(type_vvvvwcg) +// the vvvvwcj function +function vvvvwcj(type_vvvvwcj) { - if (isSet(type_vvvvwcg) && type_vvvvwcg.constructor !== Array) + if (isSet(type_vvvvwcj) && type_vvvvwcj.constructor !== Array) { - var temp_vvvvwcg = type_vvvvwcg; - var type_vvvvwcg = []; - type_vvvvwcg.push(temp_vvvvwcg); + var temp_vvvvwcj = type_vvvvwcj; + var type_vvvvwcj = []; + type_vvvvwcj.push(temp_vvvvwcj); } - else if (!isSet(type_vvvvwcg)) + else if (!isSet(type_vvvvwcj)) { - var type_vvvvwcg = []; + var type_vvvvwcj = []; } - var type = type_vvvvwcg.some(type_vvvvwcg_SomeFunc); + var type = type_vvvvwcj.some(type_vvvvwcj_SomeFunc); // set this function logic @@ -178,55 +178,55 @@ function vvvvwcg(type_vvvvwcg) { jQuery('#jform_article').closest('.control-group').show(); // add required attribute to article field - if (jform_vvvvwcgvyg_required) + if (jform_vvvvwcjvyh_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwcgvyg_required = false; + jform_vvvvwcjvyh_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); // remove required attribute from article field - if (!jform_vvvvwcgvyg_required) + if (!jform_vvvvwcjvyh_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwcgvyg_required = true; + jform_vvvvwcjvyh_required = true; } } } -// the vvvvwcg Some function -function type_vvvvwcg_SomeFunc(type_vvvvwcg) +// the vvvvwcj Some function +function type_vvvvwcj_SomeFunc(type_vvvvwcj) { // set the function logic - if (type_vvvvwcg == 1) + if (type_vvvvwcj == 1) { return true; } return false; } -// the vvvvwch function -function vvvvwch(type_vvvvwch) +// the vvvvwck function +function vvvvwck(type_vvvvwck) { - if (isSet(type_vvvvwch) && type_vvvvwch.constructor !== Array) + if (isSet(type_vvvvwck) && type_vvvvwck.constructor !== Array) { - var temp_vvvvwch = type_vvvvwch; - var type_vvvvwch = []; - type_vvvvwch.push(temp_vvvvwch); + var temp_vvvvwck = type_vvvvwck; + var type_vvvvwck = []; + type_vvvvwck.push(temp_vvvvwck); } - else if (!isSet(type_vvvvwch)) + else if (!isSet(type_vvvvwck)) { - var type_vvvvwch = []; + var type_vvvvwck = []; } - var type = type_vvvvwch.some(type_vvvvwch_SomeFunc); + var type = type_vvvvwck.some(type_vvvvwck_SomeFunc); // set this function logic @@ -240,45 +240,45 @@ function vvvvwch(type_vvvvwch) } } -// the vvvvwch Some function -function type_vvvvwch_SomeFunc(type_vvvvwch) +// the vvvvwck Some function +function type_vvvvwck_SomeFunc(type_vvvvwck) { // set the function logic - if (type_vvvvwch == 2) + if (type_vvvvwck == 2) { return true; } return false; } -// the vvvvwci function -function vvvvwci(target_vvvvwci) +// the vvvvwcl function +function vvvvwcl(target_vvvvwcl) { // set the function logic - if (target_vvvvwci == 1) + if (target_vvvvwcl == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwcivyh_required) + if (jform_vvvvwclvyi_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwcivyh_required = false; + jform_vvvvwclvyi_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwcivyh_required) + if (!jform_vvvvwclvyi_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwcivyh_required = true; + jform_vvvvwclvyi_required = true; } } } diff --git a/admin/models/forms/joomla_plugin.js b/admin/models/forms/joomla_plugin.js index 3ede6f498..b1af96344 100644 --- a/admin/models/forms/joomla_plugin.js +++ b/admin/models/forms/joomla_plugin.js @@ -8,6 +8,9 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +// Some Global Values +jform_vvvvvxevwd_required = false; + // Initial Script jQuery(document).ready(function() { @@ -18,6 +21,13 @@ jQuery(document).ready(function() var joomla_plugin_group_vvvvvxc = jQuery("#jform_joomla_plugin_group").val(); var class_extends_vvvvvxc = jQuery("#jform_class_extends").val(); vvvvvxc(joomla_plugin_group_vvvvvxc,class_extends_vvvvvxc); + + var class_extends_vvvvvxd = jQuery("#jform_class_extends").val(); + vvvvvxd(class_extends_vvvvvxd); + + var add_head_vvvvvxe = jQuery("#jform_add_head input[type='radio']:checked").val(); + var class_extends_vvvvvxe = jQuery("#jform_class_extends").val(); + vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe); }); // the vvvvvxb function @@ -150,6 +160,150 @@ function class_extends_vvvvvxc_SomeFunc(class_extends_vvvvvxc) return false; } +// the vvvvvxd function +function vvvvvxd(class_extends_vvvvvxd) +{ + if (isSet(class_extends_vvvvvxd) && class_extends_vvvvvxd.constructor !== Array) + { + var temp_vvvvvxd = class_extends_vvvvvxd; + var class_extends_vvvvvxd = []; + class_extends_vvvvvxd.push(temp_vvvvvxd); + } + else if (!isSet(class_extends_vvvvvxd)) + { + var class_extends_vvvvvxd = []; + } + var class_extends = class_extends_vvvvvxd.some(class_extends_vvvvvxd_SomeFunc); + + + // set this function logic + if (class_extends) + { + jQuery('#jform_add_head').closest('.control-group').show(); + } + else + { + jQuery('#jform_add_head').closest('.control-group').hide(); + } +} + +// the vvvvvxd Some function +function class_extends_vvvvvxd_SomeFunc(class_extends_vvvvvxd) +{ + // set the function logic + if (isSet(class_extends_vvvvvxd)) + { + return true; + } + return false; +} + +// the vvvvvxe function +function vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe) +{ + if (isSet(add_head_vvvvvxe) && add_head_vvvvvxe.constructor !== Array) + { + var temp_vvvvvxe = add_head_vvvvvxe; + var add_head_vvvvvxe = []; + add_head_vvvvvxe.push(temp_vvvvvxe); + } + else if (!isSet(add_head_vvvvvxe)) + { + var add_head_vvvvvxe = []; + } + var add_head = add_head_vvvvvxe.some(add_head_vvvvvxe_SomeFunc); + + if (isSet(class_extends_vvvvvxe) && class_extends_vvvvvxe.constructor !== Array) + { + var temp_vvvvvxe = class_extends_vvvvvxe; + var class_extends_vvvvvxe = []; + class_extends_vvvvvxe.push(temp_vvvvvxe); + } + else if (!isSet(class_extends_vvvvvxe)) + { + var class_extends_vvvvvxe = []; + } + var class_extends = class_extends_vvvvvxe.some(class_extends_vvvvvxe_SomeFunc); + + + // set this function logic + if (add_head && class_extends) + { + jQuery('#jform_head-lbl').closest('.control-group').show(); + // add required attribute to head field + if (jform_vvvvvxevwd_required) + { + updateFieldRequired('head',0); + jQuery('#jform_head').prop('required','required'); + jQuery('#jform_head').attr('aria-required',true); + jQuery('#jform_head').addClass('required'); + jform_vvvvvxevwd_required = false; + } + } + else + { + jQuery('#jform_head-lbl').closest('.control-group').hide(); + // remove required attribute from head field + if (!jform_vvvvvxevwd_required) + { + updateFieldRequired('head',1); + jQuery('#jform_head').removeAttr('required'); + jQuery('#jform_head').removeAttr('aria-required'); + jQuery('#jform_head').removeClass('required'); + jform_vvvvvxevwd_required = true; + } + } +} + +// the vvvvvxe Some function +function add_head_vvvvvxe_SomeFunc(add_head_vvvvvxe) +{ + // set the function logic + if (add_head_vvvvvxe == 1) + { + return true; + } + return false; +} + +// the vvvvvxe Some function +function class_extends_vvvvvxe_SomeFunc(class_extends_vvvvvxe) +{ + // set the function logic + if (isSet(class_extends_vvvvvxe)) + { + return true; + } + return false; +} + +// update required fields +function updateFieldRequired(name,status) +{ + var not_required = jQuery('#jform_not_required').val(); + + if(status == 1) + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required+','+name; + } + else + { + not_required = ','+name; + } + } + else + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required.replace(','+name,''); + } + } + + jQuery('#jform_not_required').val(not_required); +} + // the isSet function function isSet(val) { @@ -165,15 +319,8 @@ jQuery(document).ready(function() // get the linked details getLinked(); // load the active array values - buildSelectionArray('property'); - buildSelectionArray('method'); - // set joomla_plugin_group Array - selectionArray['joomla_plugin_group'] = {}; - jQuery("#jform_joomla_plugin_group option").each(function() { - var key = jQuery(this).val(); - var text = jQuery(this).text(); - selectionArray['joomla_plugin_group'][key] = text; - }); + buildSelectionMemory('property'); + buildSelectionMemory('method'); // load the active selection array values getClassCodeIds('joomla_plugin_group', 'jform_class_extends', false); getClassCodeIds('property', 'jform_joomla_plugin_group', false); @@ -184,6 +331,23 @@ jQuery(document).ready(function() rowWatcher(); }); +// set selection the options +selectionMemory = {'property':{},'method':{}}; +selectionActiveArray = {'property':{},'method':{}}; +selectedIdRemoved = {'property':'not','method':'not'}; + +function buildSelectionMemory(type) { + var i; + for (i = 0; i < 70; i++) { + // build ID + var id_check = 'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type; + // set memory + if (jQuery("#"+id_check).length) { + selectionMemory[type][id_check] = jQuery("#"+id_check+" option:selected").val(); + } + } +} + function getClassStuff_server(id, type, callingName){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax."+callingName+"&format=json&raw=true"); if(token.length > 0 && id > 0 && type.length > 0){ @@ -198,6 +362,30 @@ function getClassStuff_server(id, type, callingName){ }); } +function getClassHeaderCode(){ + // now get the values + var value = jQuery("#jform_class_extends option:selected").val(); + var add_value = jQuery("#jform_add_head input[type='radio']:checked").val(); + if (add_value == 1 && value > 0){ + // we first check local memory + var _result = jQuery.jStorage.get('extends_header_'+value, null); + if (_result) { + // now set the code + addCodeToEditor(_result, "jform_head", false); + } else { + // now get the code + getClassStuff_server(value, 'extends', 'getClassHeaderCode').done(function(result) { + if(result){ + // now set the code + addCodeToEditor(result, "jform_head", false); + // add result to local memory + jQuery.jStorage.set('extends_header_'+value, result, {TTL: expire}); + } + }); + } + } +} + function getClassCodeIds(type, target_field, reset_all){ // now get the value var value = jQuery('#'+target_field).val(); @@ -207,7 +395,7 @@ function getClassCodeIds(type, target_field, reset_all){ // reset the selection selectionActiveArray[type] = {}; // update the active array - jQuery.each( result, function(i, prop) { + jQuery.each(result, function(i, prop) { selectionActiveArray[type][prop] = selectionArray[type][prop]; }); // update the active field selection @@ -276,6 +464,7 @@ function resetAll(type) { } } Joomla.editors.instances['jform_main_class_code'].setValue(''); + selectionMemory = {'property':{},'method':{}}; } function getClassCode(field, type){ @@ -283,6 +472,31 @@ function getClassCode(field, type){ var id = jQuery(field).attr('id'); // now get the value var value = jQuery('#' + id).val(); + // check if we have a memory for this field, if true remove code of old selection and clear memory + if (selectionMemory[type].hasOwnProperty(id) && selectionMemory[type][id] > 0) { + // the old id to remove + var old_value = selectionMemory[type][id]; + // remove the code // we first check local memory + var _result = jQuery.jStorage.get('code_4_'+type+'_'+old_value, null); + if (_result) { + // now remove the code + if (removeCodeFromEditor(_result)) { + selectionMemory[type][id] = 0; + } + } else { + // now get the code + getClassStuff_server(old_value, type, 'getClassCode').done(function(result) { + if(result){ + // now remove the code + if (removeCodeFromEditor(result)) { + selectionMemory[type][id] = 0; + } + // add result to local memory + jQuery.jStorage.set('code_4_'+type+'_'+old_value, result, {TTL: expire}); + } + }); + } + } if (propertyIsSet(value, id, type)) { // reset the selection jQuery('#'+id).val(''); @@ -294,69 +508,81 @@ function getClassCode(field, type){ selectedIdRemoved[type] = id; // do a dynamic update (to remove what was already used) selectionDynamicUpdate(type); - // now get the code - getClassStuff_server(value, type, 'getClassCode').done(function(result) { - if(result){ - if (Joomla.editors.instances.hasOwnProperty("jform_main_class_code")) { - var old_result = Joomla.editors.instances['jform_main_class_code'].getValue(); - if (old_result.length > 0) { - // make sure not to load the same string twice - if (old_result.indexOf(result) !== -1) { - // reset the selection - jQuery('#'+id).val(''); - jQuery('#'+id).trigger("liszt:updated"); - // give out a notice - jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'}); - } else { - Joomla.editors.instances['jform_main_class_code'].setValue(old_result + "\n\n" + result); - } - } else { - Joomla.editors.instances['jform_main_class_code'].setValue(result); - } - } else { - var old_result = jQuery('textarea#jform_main_class_code').val(); - if (old_result.length > 0) { - // make sure not to load the same string twice - if (old_result.indexOf(result) !== -1) { - // reset the selection - jQuery('#'+id).val(''); - jQuery('#'+id).trigger("liszt:updated"); - // give out a notice - jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'}); - } else { - jQuery('textarea#jform_main_class_code').val(old_result + "\n\n" + result); - } - } else { - jQuery('textarea#jform_main_class_code').val(result); - } - } + // we first check local memory + var _result = jQuery.jStorage.get('code_4_'+type+'_'+value, null); + if (_result) { + // now set the code + if (addCodeToEditor(_result, "jform_main_class_code", true)) { + selectionMemory[type][id] = value; } - }); + } else { + // now get the code + getClassStuff_server(value, type, 'getClassCode').done(function(result) { + if(result){ + // now set the code + if (addCodeToEditor(result, "jform_main_class_code", true)) { + selectionMemory[type][id] = value; + } + // add result to local memory + jQuery.jStorage.set('code_4_'+type+'_'+value, result, {TTL: expire}); + } + }); + } } } -// set selection the options -selectionArray = {'property':{},'method':{}}; -selectionActiveArray = {'property':{},'method':{}}; -selectedIdRemoved = {'property':'not','method':'not'}; -justonce = {'property':1,'method':1}; - -function buildSelectionArray(type) { - var i; - for (i = 0; i < 10; i++) { - // build ID - var id_check = 'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type; - // first check if Id is on page as that not the same as the one currently calling - if (justonce[type] == 1 && jQuery("#"+id_check).length) { - // set buckets - jQuery("#"+id_check+" option").each(function() { - var key = jQuery(this).val(); - var text = jQuery(this).text(); - selectionArray[type][key] = text; - }); - justonce[type]++; +function addCodeToEditor(code_string, editor_id, merge){ + if (Joomla.editors.instances.hasOwnProperty(editor_id)) { + var old_code_string = Joomla.editors.instances[editor_id].getValue(); + if (merge && old_code_string.length > 0) { + // make sure not to load the same string twice + if (old_code_string.indexOf(code_string) == -1) { + Joomla.editors.instances[editor_id].setValue(old_code_string + "\n\n" + code_string); + return true; + } + } else { + Joomla.editors.instances[editor_id].setValue(code_string); + return true; + } + } else { + var old_code_string = jQuery('textarea#'+editor_id).val(); + if (merge && old_code_string.length > 0) { + // make sure not to load the same string twice + if (old_code_string.indexOf(code_string) == -1) { + jQuery('textarea#'+editor_id).val(old_code_string + "\n\n" + code_string); + return true; + } + } else { + jQuery('textarea#'+editor_id).val(code_string); + return true; } } + return false; +} + +function removeCodeFromEditor(code_string){ + if (Joomla.editors.instances.hasOwnProperty("jform_main_class_code")) { + var old_code_string = Joomla.editors.instances['jform_main_class_code'].getValue(); + if (old_code_string.length > 0) { + // make sure not to load the same string twice + if (old_code_string.indexOf(code_string) !== -1) { + // remove the code + Joomla.editors.instances['jform_main_class_code'].setValue(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,'')); + return true; + } + } + } else { + var old_code_string = jQuery('textarea#jform_main_class_code').val(); + if (old_code_string.length > 0) { + // make sure not to load the same string twice + if (old_code_string.indexOf(code_string) !== -1) { + // remove the code + jQuery('textarea#jform_main_class_code').val(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,'')); + return true; + } + } + } + return false; } function selectionDynamicUpdate(type) { @@ -379,8 +605,6 @@ function selectionDynamicUpdate(type) { jQuery("#"+id_check).find('option').remove().end(); } } - // trigger chosen on the list fields - // jQuery('.'+type+'_selection_list').chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":Joomla.JText._("COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS"),"placeholder_text_single":Joomla.JText._("COM_COMPONENTBUILDER_SELECT_A_PROPERTY"),"no_results_text":Joomla.JText._("COM_COMPONENTBUILDER_NO_RESULTS_MATCH")}); // now build the list to keep jQuery.each( selectionActiveArray[type], function( prop, name ) { if (!selectionSelectedArray.hasOwnProperty(prop)) { @@ -416,29 +640,28 @@ function rowWatcher() { selectionDynamicUpdate(type_call); // also remove from code var valid_value = jQuery(row.innerHTML).find('#' + valid_call + ' option:selected').val(); - getClassStuff_server(valid_value, type_call, 'getClassCode').done(function(result) { - if(result){ - if (Joomla.editors.instances.hasOwnProperty("jform_main_class_code")) { - var old_result = Joomla.editors.instances['jform_main_class_code'].getValue(); - if (old_result.length > 0) { - // make sure not to load the same string twice - if (old_result.indexOf(result) !== -1) { - // remove the code - Joomla.editors.instances['jform_main_class_code'].setValue(old_result.replace(result+"\n\n",'').replace("\n\n"+result,'').replace(result,'')); - } - } - } else { - var old_result = jQuery('textarea#jform_main_class_code').val(); - if (old_result.length > 0) { - // make sure not to load the same string twice - if (old_result.indexOf(result) !== -1) { - // remove the code - jQuery('textarea#jform_main_class_code').val(old_result.replace(result+"\n\n",'').replace("\n\n"+result,'').replace(result,'')); - } - } - } + if (valid_value === '') { + valid_value = selectionMemory[type_call][valid_call]; + } + // remove the code // we first check local memory + var _result = jQuery.jStorage.get('code_4_'+type_call+'_'+valid_value, null); + if (_result) { + // now remove the code + if (removeCodeFromEditor(_result)) { + selectionMemory[type_call][valid_call] = 0; } - }); + } else { + // now get the code + getClassStuff_server(valid_value, type_call, 'getClassCode').done(function(result) { + if(result){ + if (removeCodeFromEditor(result)) { + selectionMemory[type_call][valid_call] = 0;; + } + // add result to local memory + jQuery.jStorage.set('code_4_'+type_call+'_'+valid_value, result, {TTL: expire}); + } + }); + } } }); jQuery(document).on('subform-row-add', function(event, row){ diff --git a/admin/models/forms/joomla_plugin.xml b/admin/models/forms/joomla_plugin.xml index faa14c014..e36c0067d 100644 --- a/admin/models/forms/joomla_plugin.xml +++ b/admin/models/forms/joomla_plugin.xml @@ -85,21 +85,19 @@ filter="unset" /> - + + + + + + + + + + + diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index f676d5719..e9704ab08 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_vvvvvzh = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvzh(add_php_view_vvvvvzh); + var add_php_view_vvvvvzk = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvzk(add_php_view_vvvvvzk); }); -// the vvvvvzh function -function vvvvvzh(add_php_view_vvvvvzh) +// the vvvvvzk function +function vvvvvzk(add_php_view_vvvvvzk) { // set the function logic - if (add_php_view_vvvvvzh == 1) + if (add_php_view_vvvvvzk == 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 653d0d802..a7cf65e70 100644 --- a/admin/models/forms/library.js +++ b/admin/models/forms/library.js @@ -9,21 +9,12 @@ */ // Some Global Values -jform_vvvvwaqvxf_required = false; -jform_vvvvwawvxg_required = false; +jform_vvvvwatvxg_required = false; +jform_vvvvwazvxh_required = false; // Initial Script jQuery(document).ready(function() { - var how_vvvvwap = jQuery("#jform_how").val(); - vvvvwap(how_vvvvwap); - - var how_vvvvwaq = jQuery("#jform_how").val(); - vvvvwaq(how_vvvvwaq); - - var how_vvvvwar = jQuery("#jform_how").val(); - vvvvwar(how_vvvvwar); - var how_vvvvwas = jQuery("#jform_how").val(); vvvvwas(how_vvvvwas); @@ -36,142 +27,19 @@ jQuery(document).ready(function() var how_vvvvwav = jQuery("#jform_how").val(); vvvvwav(how_vvvvwav); - var type_vvvvwaw = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvwaw(type_vvvvwaw); + var how_vvvvwaw = jQuery("#jform_how").val(); + vvvvwaw(how_vvvvwaw); + + var how_vvvvwax = jQuery("#jform_how").val(); + vvvvwax(how_vvvvwax); + + var how_vvvvway = jQuery("#jform_how").val(); + vvvvway(how_vvvvway); + + var type_vvvvwaz = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwaz(type_vvvvwaz); }); -// the vvvvwap function -function vvvvwap(how_vvvvwap) -{ - if (isSet(how_vvvvwap) && how_vvvvwap.constructor !== Array) - { - var temp_vvvvwap = how_vvvvwap; - var how_vvvvwap = []; - how_vvvvwap.push(temp_vvvvwap); - } - else if (!isSet(how_vvvvwap)) - { - var how_vvvvwap = []; - } - var how = how_vvvvwap.some(how_vvvvwap_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 vvvvwap Some function -function how_vvvvwap_SomeFunc(how_vvvvwap) -{ - // set the function logic - if (how_vvvvwap == 2) - { - return true; - } - return false; -} - -// the vvvvwaq function -function vvvvwaq(how_vvvvwaq) -{ - if (isSet(how_vvvvwaq) && how_vvvvwaq.constructor !== Array) - { - var temp_vvvvwaq = how_vvvvwaq; - var how_vvvvwaq = []; - how_vvvvwaq.push(temp_vvvvwaq); - } - else if (!isSet(how_vvvvwaq)) - { - var how_vvvvwaq = []; - } - var how = how_vvvvwaq.some(how_vvvvwaq_SomeFunc); - - - // set this function logic - if (how) - { - jQuery('#jform_php_setdocument').closest('.control-group').show(); - // add required attribute to php_setdocument field - if (jform_vvvvwaqvxf_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_vvvvwaqvxf_required = false; - } - } - else - { - jQuery('#jform_php_setdocument').closest('.control-group').hide(); - // remove required attribute from php_setdocument field - if (!jform_vvvvwaqvxf_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_vvvvwaqvxf_required = true; - } - } -} - -// the vvvvwaq Some function -function how_vvvvwaq_SomeFunc(how_vvvvwaq) -{ - // set the function logic - if (how_vvvvwaq == 3) - { - return true; - } - return false; -} - -// the vvvvwar function -function vvvvwar(how_vvvvwar) -{ - if (isSet(how_vvvvwar) && how_vvvvwar.constructor !== Array) - { - var temp_vvvvwar = how_vvvvwar; - var how_vvvvwar = []; - how_vvvvwar.push(temp_vvvvwar); - } - else if (!isSet(how_vvvvwar)) - { - var how_vvvvwar = []; - } - var how = how_vvvvwar.some(how_vvvvwar_SomeFunc); - - - // set this function logic - if (how) - { - jQuery('.note_display_library_config').closest('.control-group').show(); - } - else - { - jQuery('.note_display_library_config').closest('.control-group').hide(); - } -} - -// the vvvvwar Some function -function how_vvvvwar_SomeFunc(how_vvvvwar) -{ - // set the function logic - if (how_vvvvwar == 2 || how_vvvvwar == 3) - { - return true; - } - return false; -} - // the vvvvwas function function vvvvwas(how_vvvvwas) { @@ -191,11 +59,11 @@ function vvvvwas(how_vvvvwas) // set this function logic if (how) { - jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); + jQuery('#jform_addconditions-lbl').closest('.control-group').show(); } else { - jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); + jQuery('#jform_addconditions-lbl').closest('.control-group').hide(); } } @@ -203,7 +71,7 @@ function vvvvwas(how_vvvvwas) function how_vvvvwas_SomeFunc(how_vvvvwas) { // set the function logic - if (how_vvvvwas == 1 || how_vvvvwas == 2 || how_vvvvwas == 3) + if (how_vvvvwas == 2) { return true; } @@ -229,15 +97,29 @@ function vvvvwat(how_vvvvwat) // 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('#jform_php_setdocument').closest('.control-group').show(); + // add required attribute to php_setdocument field + if (jform_vvvvwatvxg_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_vvvvwatvxg_required = false; + } } 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('#jform_php_setdocument').closest('.control-group').hide(); + // remove required attribute from php_setdocument field + if (!jform_vvvvwatvxg_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_vvvvwatvxg_required = true; + } } } @@ -245,7 +127,7 @@ function vvvvwat(how_vvvvwat) function how_vvvvwat_SomeFunc(how_vvvvwat) { // set the function logic - if (how_vvvvwat == 0) + if (how_vvvvwat == 3) { return true; } @@ -271,13 +153,11 @@ function vvvvwau(how_vvvvwau) // 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_display_library_config').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_display_library_config').closest('.control-group').hide(); } } @@ -285,7 +165,7 @@ function vvvvwau(how_vvvvwau) function how_vvvvwau_SomeFunc(how_vvvvwau) { // set the function logic - if (how_vvvvwau == 1) + if (how_vvvvwau == 2 || how_vvvvwau == 3) { return true; } @@ -308,6 +188,126 @@ function vvvvwav(how_vvvvwav) var how = how_vvvvwav.some(how_vvvvwav_SomeFunc); + // set this function logic + if (how) + { + jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); + } + else + { + jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); + } +} + +// the vvvvwav Some function +function how_vvvvwav_SomeFunc(how_vvvvwav) +{ + // set the function logic + if (how_vvvvwav == 1 || how_vvvvwav == 2 || how_vvvvwav == 3) + { + return true; + } + return false; +} + +// the vvvvwaw function +function vvvvwaw(how_vvvvwaw) +{ + if (isSet(how_vvvvwaw) && how_vvvvwaw.constructor !== Array) + { + var temp_vvvvwaw = how_vvvvwaw; + var how_vvvvwaw = []; + how_vvvvwaw.push(temp_vvvvwaw); + } + else if (!isSet(how_vvvvwaw)) + { + var how_vvvvwaw = []; + } + var how = how_vvvvwaw.some(how_vvvvwaw_SomeFunc); + + + // 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(); + } + 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(); + } +} + +// the vvvvwaw Some function +function how_vvvvwaw_SomeFunc(how_vvvvwaw) +{ + // set the function logic + if (how_vvvvwaw == 0) + { + return true; + } + return false; +} + +// the vvvvwax function +function vvvvwax(how_vvvvwax) +{ + if (isSet(how_vvvvwax) && how_vvvvwax.constructor !== Array) + { + var temp_vvvvwax = how_vvvvwax; + var how_vvvvwax = []; + how_vvvvwax.push(temp_vvvvwax); + } + else if (!isSet(how_vvvvwax)) + { + var how_vvvvwax = []; + } + var how = how_vvvvwax.some(how_vvvvwax_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 vvvvwax Some function +function how_vvvvwax_SomeFunc(how_vvvvwax) +{ + // set the function logic + if (how_vvvvwax == 1) + { + return true; + } + return false; +} + +// the vvvvway function +function vvvvway(how_vvvvway) +{ + if (isSet(how_vvvvway) && how_vvvvway.constructor !== Array) + { + var temp_vvvvway = how_vvvvway; + var how_vvvvway = []; + how_vvvvway.push(temp_vvvvway); + } + else if (!isSet(how_vvvvway)) + { + var how_vvvvway = []; + } + var how = how_vvvvway.some(how_vvvvway_SomeFunc); + + // set this function logic if (how) { @@ -323,45 +323,45 @@ function vvvvwav(how_vvvvwav) } } -// the vvvvwav Some function -function how_vvvvwav_SomeFunc(how_vvvvwav) +// the vvvvway Some function +function how_vvvvway_SomeFunc(how_vvvvway) { // set the function logic - if (how_vvvvwav == 4) + if (how_vvvvway == 4) { return true; } return false; } -// the vvvvwaw function -function vvvvwaw(type_vvvvwaw) +// the vvvvwaz function +function vvvvwaz(type_vvvvwaz) { // set the function logic - if (type_vvvvwaw == 2) + if (type_vvvvwaz == 2) { jQuery('#jform_libraries').closest('.control-group').show(); // add required attribute to libraries field - if (jform_vvvvwawvxg_required) + if (jform_vvvvwazvxh_required) { updateFieldRequired('libraries',0); jQuery('#jform_libraries').prop('required','required'); jQuery('#jform_libraries').attr('aria-required',true); jQuery('#jform_libraries').addClass('required'); - jform_vvvvwawvxg_required = false; + jform_vvvvwazvxh_required = false; } } else { jQuery('#jform_libraries').closest('.control-group').hide(); // remove required attribute from libraries field - if (!jform_vvvvwawvxg_required) + if (!jform_vvvvwazvxh_required) { updateFieldRequired('libraries',1); jQuery('#jform_libraries').removeAttr('required'); jQuery('#jform_libraries').removeAttr('aria-required'); jQuery('#jform_libraries').removeClass('required'); - jform_vvvvwawvxg_required = true; + jform_vvvvwazvxh_required = true; } } } diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index a85edeee0..0a2d48ce3 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -9,56 +9,56 @@ */ // Some Global Values -jform_vvvvwbtvxt_required = false; -jform_vvvvwbtvxu_required = false; -jform_vvvvwbtvxv_required = false; -jform_vvvvwbtvxw_required = false; -jform_vvvvwbtvxx_required = false; -jform_vvvvwbuvxy_required = false; -jform_vvvvwbvvxz_required = false; -jform_vvvvwbxvya_required = false; -jform_vvvvwbzvyb_required = false; +jform_vvvvwbwvxu_required = false; +jform_vvvvwbwvxv_required = false; +jform_vvvvwbwvxw_required = false; +jform_vvvvwbwvxx_required = false; +jform_vvvvwbwvxy_required = false; +jform_vvvvwbxvxz_required = false; +jform_vvvvwbyvya_required = false; +jform_vvvvwcavyb_required = false; +jform_vvvvwccvyc_required = false; // Initial Script jQuery(document).ready(function() { - var protocol_vvvvwbt = jQuery("#jform_protocol").val(); - vvvvwbt(protocol_vvvvwbt); - - var protocol_vvvvwbu = jQuery("#jform_protocol").val(); - vvvvwbu(protocol_vvvvwbu); - - var protocol_vvvvwbv = jQuery("#jform_protocol").val(); - var authentication_vvvvwbv = jQuery("#jform_authentication").val(); - vvvvwbv(protocol_vvvvwbv,authentication_vvvvwbv); + var protocol_vvvvwbw = jQuery("#jform_protocol").val(); + vvvvwbw(protocol_vvvvwbw); var protocol_vvvvwbx = jQuery("#jform_protocol").val(); - var authentication_vvvvwbx = jQuery("#jform_authentication").val(); - vvvvwbx(protocol_vvvvwbx,authentication_vvvvwbx); + vvvvwbx(protocol_vvvvwbx); - var protocol_vvvvwbz = jQuery("#jform_protocol").val(); - var authentication_vvvvwbz = jQuery("#jform_authentication").val(); - vvvvwbz(protocol_vvvvwbz,authentication_vvvvwbz); + var protocol_vvvvwby = jQuery("#jform_protocol").val(); + var authentication_vvvvwby = jQuery("#jform_authentication").val(); + vvvvwby(protocol_vvvvwby,authentication_vvvvwby); - var protocol_vvvvwcb = jQuery("#jform_protocol").val(); - var authentication_vvvvwcb = jQuery("#jform_authentication").val(); - vvvvwcb(protocol_vvvvwcb,authentication_vvvvwcb); + var protocol_vvvvwca = jQuery("#jform_protocol").val(); + var authentication_vvvvwca = jQuery("#jform_authentication").val(); + vvvvwca(protocol_vvvvwca,authentication_vvvvwca); + + var protocol_vvvvwcc = jQuery("#jform_protocol").val(); + var authentication_vvvvwcc = jQuery("#jform_authentication").val(); + vvvvwcc(protocol_vvvvwcc,authentication_vvvvwcc); + + var protocol_vvvvwce = jQuery("#jform_protocol").val(); + var authentication_vvvvwce = jQuery("#jform_authentication").val(); + vvvvwce(protocol_vvvvwce,authentication_vvvvwce); }); -// the vvvvwbt function -function vvvvwbt(protocol_vvvvwbt) +// the vvvvwbw function +function vvvvwbw(protocol_vvvvwbw) { - if (isSet(protocol_vvvvwbt) && protocol_vvvvwbt.constructor !== Array) + if (isSet(protocol_vvvvwbw) && protocol_vvvvwbw.constructor !== Array) { - var temp_vvvvwbt = protocol_vvvvwbt; - var protocol_vvvvwbt = []; - protocol_vvvvwbt.push(temp_vvvvwbt); + var temp_vvvvwbw = protocol_vvvvwbw; + var protocol_vvvvwbw = []; + protocol_vvvvwbw.push(temp_vvvvwbw); } - else if (!isSet(protocol_vvvvwbt)) + else if (!isSet(protocol_vvvvwbw)) { - var protocol_vvvvwbt = []; + var protocol_vvvvwbw = []; } - var protocol = protocol_vvvvwbt.some(protocol_vvvvwbt_SomeFunc); + var protocol = protocol_vvvvwbw.some(protocol_vvvvwbw_SomeFunc); // set this function logic @@ -66,254 +66,117 @@ function vvvvwbt(protocol_vvvvwbt) { jQuery('#jform_authentication').closest('.control-group').show(); // add required attribute to authentication field - if (jform_vvvvwbtvxt_required) + if (jform_vvvvwbwvxu_required) { updateFieldRequired('authentication',0); jQuery('#jform_authentication').prop('required','required'); jQuery('#jform_authentication').attr('aria-required',true); jQuery('#jform_authentication').addClass('required'); - jform_vvvvwbtvxt_required = false; + jform_vvvvwbwvxu_required = false; } jQuery('#jform_host').closest('.control-group').show(); // add required attribute to host field - if (jform_vvvvwbtvxu_required) + if (jform_vvvvwbwvxv_required) { updateFieldRequired('host',0); jQuery('#jform_host').prop('required','required'); jQuery('#jform_host').attr('aria-required',true); jQuery('#jform_host').addClass('required'); - jform_vvvvwbtvxu_required = false; + jform_vvvvwbwvxv_required = false; } jQuery('#jform_port').closest('.control-group').show(); // add required attribute to port field - if (jform_vvvvwbtvxv_required) + if (jform_vvvvwbwvxw_required) { updateFieldRequired('port',0); jQuery('#jform_port').prop('required','required'); jQuery('#jform_port').attr('aria-required',true); jQuery('#jform_port').addClass('required'); - jform_vvvvwbtvxv_required = false; + jform_vvvvwbwvxw_required = false; } jQuery('#jform_path').closest('.control-group').show(); // add required attribute to path field - if (jform_vvvvwbtvxw_required) + if (jform_vvvvwbwvxx_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvwbtvxw_required = false; + jform_vvvvwbwvxx_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_vvvvwbtvxx_required) + if (jform_vvvvwbwvxy_required) { updateFieldRequired('username',0); jQuery('#jform_username').prop('required','required'); jQuery('#jform_username').attr('aria-required',true); jQuery('#jform_username').addClass('required'); - jform_vvvvwbtvxx_required = false; + jform_vvvvwbwvxy_required = false; } } else { jQuery('#jform_authentication').closest('.control-group').hide(); // remove required attribute from authentication field - if (!jform_vvvvwbtvxt_required) + if (!jform_vvvvwbwvxu_required) { updateFieldRequired('authentication',1); jQuery('#jform_authentication').removeAttr('required'); jQuery('#jform_authentication').removeAttr('aria-required'); jQuery('#jform_authentication').removeClass('required'); - jform_vvvvwbtvxt_required = true; + jform_vvvvwbwvxu_required = true; } jQuery('#jform_host').closest('.control-group').hide(); // remove required attribute from host field - if (!jform_vvvvwbtvxu_required) + if (!jform_vvvvwbwvxv_required) { updateFieldRequired('host',1); jQuery('#jform_host').removeAttr('required'); jQuery('#jform_host').removeAttr('aria-required'); jQuery('#jform_host').removeClass('required'); - jform_vvvvwbtvxu_required = true; + jform_vvvvwbwvxv_required = true; } jQuery('#jform_port').closest('.control-group').hide(); // remove required attribute from port field - if (!jform_vvvvwbtvxv_required) + if (!jform_vvvvwbwvxw_required) { updateFieldRequired('port',1); jQuery('#jform_port').removeAttr('required'); jQuery('#jform_port').removeAttr('aria-required'); jQuery('#jform_port').removeClass('required'); - jform_vvvvwbtvxv_required = true; + jform_vvvvwbwvxw_required = true; } jQuery('#jform_path').closest('.control-group').hide(); // remove required attribute from path field - if (!jform_vvvvwbtvxw_required) + if (!jform_vvvvwbwvxx_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvwbtvxw_required = true; + jform_vvvvwbwvxx_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_vvvvwbtvxx_required) + if (!jform_vvvvwbwvxy_required) { updateFieldRequired('username',1); jQuery('#jform_username').removeAttr('required'); jQuery('#jform_username').removeAttr('aria-required'); jQuery('#jform_username').removeClass('required'); - jform_vvvvwbtvxx_required = true; + jform_vvvvwbwvxy_required = true; } } } -// the vvvvwbt Some function -function protocol_vvvvwbt_SomeFunc(protocol_vvvvwbt) +// the vvvvwbw Some function +function protocol_vvvvwbw_SomeFunc(protocol_vvvvwbw) { // set the function logic - if (protocol_vvvvwbt == 2) - { - return true; - } - return false; -} - -// the vvvvwbu function -function vvvvwbu(protocol_vvvvwbu) -{ - if (isSet(protocol_vvvvwbu) && protocol_vvvvwbu.constructor !== Array) - { - var temp_vvvvwbu = protocol_vvvvwbu; - var protocol_vvvvwbu = []; - protocol_vvvvwbu.push(temp_vvvvwbu); - } - else if (!isSet(protocol_vvvvwbu)) - { - var protocol_vvvvwbu = []; - } - var protocol = protocol_vvvvwbu.some(protocol_vvvvwbu_SomeFunc); - - - // 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_vvvvwbuvxy_required) - { - updateFieldRequired('signature',0); - jQuery('#jform_signature').prop('required','required'); - jQuery('#jform_signature').attr('aria-required',true); - jQuery('#jform_signature').addClass('required'); - jform_vvvvwbuvxy_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_vvvvwbuvxy_required) - { - updateFieldRequired('signature',1); - jQuery('#jform_signature').removeAttr('required'); - jQuery('#jform_signature').removeAttr('aria-required'); - jQuery('#jform_signature').removeClass('required'); - jform_vvvvwbuvxy_required = true; - } - } -} - -// the vvvvwbu Some function -function protocol_vvvvwbu_SomeFunc(protocol_vvvvwbu) -{ - // set the function logic - if (protocol_vvvvwbu == 1) - { - return true; - } - return false; -} - -// the vvvvwbv function -function vvvvwbv(protocol_vvvvwbv,authentication_vvvvwbv) -{ - if (isSet(protocol_vvvvwbv) && protocol_vvvvwbv.constructor !== Array) - { - var temp_vvvvwbv = protocol_vvvvwbv; - var protocol_vvvvwbv = []; - protocol_vvvvwbv.push(temp_vvvvwbv); - } - else if (!isSet(protocol_vvvvwbv)) - { - var protocol_vvvvwbv = []; - } - var protocol = protocol_vvvvwbv.some(protocol_vvvvwbv_SomeFunc); - - if (isSet(authentication_vvvvwbv) && authentication_vvvvwbv.constructor !== Array) - { - var temp_vvvvwbv = authentication_vvvvwbv; - var authentication_vvvvwbv = []; - authentication_vvvvwbv.push(temp_vvvvwbv); - } - else if (!isSet(authentication_vvvvwbv)) - { - var authentication_vvvvwbv = []; - } - var authentication = authentication_vvvvwbv.some(authentication_vvvvwbv_SomeFunc); - - - // set this function logic - if (protocol && authentication) - { - jQuery('#jform_password').closest('.control-group').show(); - // add required attribute to password field - if (jform_vvvvwbvvxz_required) - { - updateFieldRequired('password',0); - jQuery('#jform_password').prop('required','required'); - jQuery('#jform_password').attr('aria-required',true); - jQuery('#jform_password').addClass('required'); - jform_vvvvwbvvxz_required = false; - } - } - else - { - jQuery('#jform_password').closest('.control-group').hide(); - // remove required attribute from password field - if (!jform_vvvvwbvvxz_required) - { - updateFieldRequired('password',1); - jQuery('#jform_password').removeAttr('required'); - jQuery('#jform_password').removeAttr('aria-required'); - jQuery('#jform_password').removeClass('required'); - jform_vvvvwbvvxz_required = true; - } - } -} - -// the vvvvwbv Some function -function protocol_vvvvwbv_SomeFunc(protocol_vvvvwbv) -{ - // set the function logic - if (protocol_vvvvwbv == 2) - { - return true; - } - return false; -} - -// the vvvvwbv Some function -function authentication_vvvvwbv_SomeFunc(authentication_vvvvwbv) -{ - // set the function logic - if (authentication_vvvvwbv == 1 || authentication_vvvvwbv == 3 || authentication_vvvvwbv == 5) + if (protocol_vvvvwbw == 2) { return true; } @@ -321,7 +184,7 @@ function authentication_vvvvwbv_SomeFunc(authentication_vvvvwbv) } // the vvvvwbx function -function vvvvwbx(protocol_vvvvwbx,authentication_vvvvwbx) +function vvvvwbx(protocol_vvvvwbx) { if (isSet(protocol_vvvvwbx) && protocol_vvvvwbx.constructor !== Array) { @@ -335,44 +198,34 @@ function vvvvwbx(protocol_vvvvwbx,authentication_vvvvwbx) } var protocol = protocol_vvvvwbx.some(protocol_vvvvwbx_SomeFunc); - if (isSet(authentication_vvvvwbx) && authentication_vvvvwbx.constructor !== Array) - { - var temp_vvvvwbx = authentication_vvvvwbx; - var authentication_vvvvwbx = []; - authentication_vvvvwbx.push(temp_vvvvwbx); - } - else if (!isSet(authentication_vvvvwbx)) - { - var authentication_vvvvwbx = []; - } - var authentication = authentication_vvvvwbx.some(authentication_vvvvwbx_SomeFunc); - // set this function logic - if (protocol && authentication) + if (protocol) { - jQuery('#jform_private').closest('.control-group').show(); - // add required attribute to private field - if (jform_vvvvwbxvya_required) + jQuery('.note_ftp_signature').closest('.control-group').show(); + jQuery('#jform_signature').closest('.control-group').show(); + // add required attribute to signature field + if (jform_vvvvwbxvxz_required) { - updateFieldRequired('private',0); - jQuery('#jform_private').prop('required','required'); - jQuery('#jform_private').attr('aria-required',true); - jQuery('#jform_private').addClass('required'); - jform_vvvvwbxvya_required = false; + updateFieldRequired('signature',0); + jQuery('#jform_signature').prop('required','required'); + jQuery('#jform_signature').attr('aria-required',true); + jQuery('#jform_signature').addClass('required'); + jform_vvvvwbxvxz_required = false; } } else { - jQuery('#jform_private').closest('.control-group').hide(); - // remove required attribute from private field - if (!jform_vvvvwbxvya_required) + jQuery('.note_ftp_signature').closest('.control-group').hide(); + jQuery('#jform_signature').closest('.control-group').hide(); + // remove required attribute from signature field + if (!jform_vvvvwbxvxz_required) { - updateFieldRequired('private',1); - jQuery('#jform_private').removeAttr('required'); - jQuery('#jform_private').removeAttr('aria-required'); - jQuery('#jform_private').removeClass('required'); - jform_vvvvwbxvya_required = true; + updateFieldRequired('signature',1); + jQuery('#jform_signature').removeAttr('required'); + jQuery('#jform_signature').removeAttr('aria-required'); + jQuery('#jform_signature').removeClass('required'); + jform_vvvvwbxvxz_required = true; } } } @@ -381,50 +234,197 @@ function vvvvwbx(protocol_vvvvwbx,authentication_vvvvwbx) function protocol_vvvvwbx_SomeFunc(protocol_vvvvwbx) { // set the function logic - if (protocol_vvvvwbx == 2) + if (protocol_vvvvwbx == 1) { return true; } return false; } -// the vvvvwbx Some function -function authentication_vvvvwbx_SomeFunc(authentication_vvvvwbx) +// the vvvvwby function +function vvvvwby(protocol_vvvvwby,authentication_vvvvwby) +{ + if (isSet(protocol_vvvvwby) && protocol_vvvvwby.constructor !== Array) + { + var temp_vvvvwby = protocol_vvvvwby; + var protocol_vvvvwby = []; + protocol_vvvvwby.push(temp_vvvvwby); + } + else if (!isSet(protocol_vvvvwby)) + { + var protocol_vvvvwby = []; + } + var protocol = protocol_vvvvwby.some(protocol_vvvvwby_SomeFunc); + + if (isSet(authentication_vvvvwby) && authentication_vvvvwby.constructor !== Array) + { + var temp_vvvvwby = authentication_vvvvwby; + var authentication_vvvvwby = []; + authentication_vvvvwby.push(temp_vvvvwby); + } + else if (!isSet(authentication_vvvvwby)) + { + var authentication_vvvvwby = []; + } + var authentication = authentication_vvvvwby.some(authentication_vvvvwby_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_password').closest('.control-group').show(); + // add required attribute to password field + if (jform_vvvvwbyvya_required) + { + updateFieldRequired('password',0); + jQuery('#jform_password').prop('required','required'); + jQuery('#jform_password').attr('aria-required',true); + jQuery('#jform_password').addClass('required'); + jform_vvvvwbyvya_required = false; + } + } + else + { + jQuery('#jform_password').closest('.control-group').hide(); + // remove required attribute from password field + if (!jform_vvvvwbyvya_required) + { + updateFieldRequired('password',1); + jQuery('#jform_password').removeAttr('required'); + jQuery('#jform_password').removeAttr('aria-required'); + jQuery('#jform_password').removeClass('required'); + jform_vvvvwbyvya_required = true; + } + } +} + +// the vvvvwby Some function +function protocol_vvvvwby_SomeFunc(protocol_vvvvwby) { // set the function logic - if (authentication_vvvvwbx == 2 || authentication_vvvvwbx == 3) + if (protocol_vvvvwby == 2) { return true; } return false; } -// the vvvvwbz function -function vvvvwbz(protocol_vvvvwbz,authentication_vvvvwbz) +// the vvvvwby Some function +function authentication_vvvvwby_SomeFunc(authentication_vvvvwby) { - if (isSet(protocol_vvvvwbz) && protocol_vvvvwbz.constructor !== Array) + // set the function logic + if (authentication_vvvvwby == 1 || authentication_vvvvwby == 3 || authentication_vvvvwby == 5) { - var temp_vvvvwbz = protocol_vvvvwbz; - var protocol_vvvvwbz = []; - protocol_vvvvwbz.push(temp_vvvvwbz); + return true; } - else if (!isSet(protocol_vvvvwbz)) - { - var protocol_vvvvwbz = []; - } - var protocol = protocol_vvvvwbz.some(protocol_vvvvwbz_SomeFunc); + return false; +} - if (isSet(authentication_vvvvwbz) && authentication_vvvvwbz.constructor !== Array) +// the vvvvwca function +function vvvvwca(protocol_vvvvwca,authentication_vvvvwca) +{ + if (isSet(protocol_vvvvwca) && protocol_vvvvwca.constructor !== Array) { - var temp_vvvvwbz = authentication_vvvvwbz; - var authentication_vvvvwbz = []; - authentication_vvvvwbz.push(temp_vvvvwbz); + var temp_vvvvwca = protocol_vvvvwca; + var protocol_vvvvwca = []; + protocol_vvvvwca.push(temp_vvvvwca); } - else if (!isSet(authentication_vvvvwbz)) + else if (!isSet(protocol_vvvvwca)) { - var authentication_vvvvwbz = []; + var protocol_vvvvwca = []; } - var authentication = authentication_vvvvwbz.some(authentication_vvvvwbz_SomeFunc); + var protocol = protocol_vvvvwca.some(protocol_vvvvwca_SomeFunc); + + if (isSet(authentication_vvvvwca) && authentication_vvvvwca.constructor !== Array) + { + var temp_vvvvwca = authentication_vvvvwca; + var authentication_vvvvwca = []; + authentication_vvvvwca.push(temp_vvvvwca); + } + else if (!isSet(authentication_vvvvwca)) + { + var authentication_vvvvwca = []; + } + var authentication = authentication_vvvvwca.some(authentication_vvvvwca_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_private').closest('.control-group').show(); + // add required attribute to private field + if (jform_vvvvwcavyb_required) + { + updateFieldRequired('private',0); + jQuery('#jform_private').prop('required','required'); + jQuery('#jform_private').attr('aria-required',true); + jQuery('#jform_private').addClass('required'); + jform_vvvvwcavyb_required = false; + } + } + else + { + jQuery('#jform_private').closest('.control-group').hide(); + // remove required attribute from private field + if (!jform_vvvvwcavyb_required) + { + updateFieldRequired('private',1); + jQuery('#jform_private').removeAttr('required'); + jQuery('#jform_private').removeAttr('aria-required'); + jQuery('#jform_private').removeClass('required'); + jform_vvvvwcavyb_required = true; + } + } +} + +// the vvvvwca Some function +function protocol_vvvvwca_SomeFunc(protocol_vvvvwca) +{ + // set the function logic + if (protocol_vvvvwca == 2) + { + return true; + } + return false; +} + +// the vvvvwca Some function +function authentication_vvvvwca_SomeFunc(authentication_vvvvwca) +{ + // set the function logic + if (authentication_vvvvwca == 2 || authentication_vvvvwca == 3) + { + return true; + } + return false; +} + +// the vvvvwcc function +function vvvvwcc(protocol_vvvvwcc,authentication_vvvvwcc) +{ + if (isSet(protocol_vvvvwcc) && protocol_vvvvwcc.constructor !== Array) + { + var temp_vvvvwcc = protocol_vvvvwcc; + var protocol_vvvvwcc = []; + protocol_vvvvwcc.push(temp_vvvvwcc); + } + else if (!isSet(protocol_vvvvwcc)) + { + var protocol_vvvvwcc = []; + } + var protocol = protocol_vvvvwcc.some(protocol_vvvvwcc_SomeFunc); + + if (isSet(authentication_vvvvwcc) && authentication_vvvvwcc.constructor !== Array) + { + var temp_vvvvwcc = authentication_vvvvwcc; + var authentication_vvvvwcc = []; + authentication_vvvvwcc.push(temp_vvvvwcc); + } + else if (!isSet(authentication_vvvvwcc)) + { + var authentication_vvvvwcc = []; + } + var authentication = authentication_vvvvwcc.some(authentication_vvvvwcc_SomeFunc); // set this function logic @@ -432,78 +432,78 @@ function vvvvwbz(protocol_vvvvwbz,authentication_vvvvwbz) { jQuery('#jform_private_key').closest('.control-group').show(); // add required attribute to private_key field - if (jform_vvvvwbzvyb_required) + if (jform_vvvvwccvyc_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_vvvvwbzvyb_required = false; + jform_vvvvwccvyc_required = false; } } else { jQuery('#jform_private_key').closest('.control-group').hide(); // remove required attribute from private_key field - if (!jform_vvvvwbzvyb_required) + if (!jform_vvvvwccvyc_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_vvvvwbzvyb_required = true; + jform_vvvvwccvyc_required = true; } } } -// the vvvvwbz Some function -function protocol_vvvvwbz_SomeFunc(protocol_vvvvwbz) +// the vvvvwcc Some function +function protocol_vvvvwcc_SomeFunc(protocol_vvvvwcc) { // set the function logic - if (protocol_vvvvwbz == 2) + if (protocol_vvvvwcc == 2) { return true; } return false; } -// the vvvvwbz Some function -function authentication_vvvvwbz_SomeFunc(authentication_vvvvwbz) +// the vvvvwcc Some function +function authentication_vvvvwcc_SomeFunc(authentication_vvvvwcc) { // set the function logic - if (authentication_vvvvwbz == 4 || authentication_vvvvwbz == 5) + if (authentication_vvvvwcc == 4 || authentication_vvvvwcc == 5) { return true; } return false; } -// the vvvvwcb function -function vvvvwcb(protocol_vvvvwcb,authentication_vvvvwcb) +// the vvvvwce function +function vvvvwce(protocol_vvvvwce,authentication_vvvvwce) { - if (isSet(protocol_vvvvwcb) && protocol_vvvvwcb.constructor !== Array) + if (isSet(protocol_vvvvwce) && protocol_vvvvwce.constructor !== Array) { - var temp_vvvvwcb = protocol_vvvvwcb; - var protocol_vvvvwcb = []; - protocol_vvvvwcb.push(temp_vvvvwcb); + var temp_vvvvwce = protocol_vvvvwce; + var protocol_vvvvwce = []; + protocol_vvvvwce.push(temp_vvvvwce); } - else if (!isSet(protocol_vvvvwcb)) + else if (!isSet(protocol_vvvvwce)) { - var protocol_vvvvwcb = []; + var protocol_vvvvwce = []; } - var protocol = protocol_vvvvwcb.some(protocol_vvvvwcb_SomeFunc); + var protocol = protocol_vvvvwce.some(protocol_vvvvwce_SomeFunc); - if (isSet(authentication_vvvvwcb) && authentication_vvvvwcb.constructor !== Array) + if (isSet(authentication_vvvvwce) && authentication_vvvvwce.constructor !== Array) { - var temp_vvvvwcb = authentication_vvvvwcb; - var authentication_vvvvwcb = []; - authentication_vvvvwcb.push(temp_vvvvwcb); + var temp_vvvvwce = authentication_vvvvwce; + var authentication_vvvvwce = []; + authentication_vvvvwce.push(temp_vvvvwce); } - else if (!isSet(authentication_vvvvwcb)) + else if (!isSet(authentication_vvvvwce)) { - var authentication_vvvvwcb = []; + var authentication_vvvvwce = []; } - var authentication = authentication_vvvvwcb.some(authentication_vvvvwcb_SomeFunc); + var authentication = authentication_vvvvwce.some(authentication_vvvvwce_SomeFunc); // set this function logic @@ -517,22 +517,22 @@ function vvvvwcb(protocol_vvvvwcb,authentication_vvvvwcb) } } -// the vvvvwcb Some function -function protocol_vvvvwcb_SomeFunc(protocol_vvvvwcb) +// the vvvvwce Some function +function protocol_vvvvwce_SomeFunc(protocol_vvvvwce) { // set the function logic - if (protocol_vvvvwcb == 2) + if (protocol_vvvvwce == 2) { return true; } return false; } -// the vvvvwcb Some function -function authentication_vvvvwcb_SomeFunc(authentication_vvvvwcb) +// the vvvvwce Some function +function authentication_vvvvwce_SomeFunc(authentication_vvvvwce) { // set the function logic - if (authentication_vvvvwcb == 2 || authentication_vvvvwcb == 3 || authentication_vvvvwcb == 4 || authentication_vvvvwcb == 5) + if (authentication_vvvvwce == 2 || authentication_vvvvwce == 3 || authentication_vvvvwce == 4 || authentication_vvvvwce == 5) { return true; } diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index b80ccbaf8..a628bfb2a 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_vvvvvyv = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyv(add_php_view_vvvvvyv); + var add_php_view_vvvvvyy = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvyy(add_php_view_vvvvvyy); - var add_php_jview_display_vvvvvyw = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvyw(add_php_jview_display_vvvvvyw); + var add_php_jview_display_vvvvvyz = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvyz(add_php_jview_display_vvvvvyz); - var add_php_jview_vvvvvyx = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvyx(add_php_jview_vvvvvyx); + var add_php_jview_vvvvvza = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvza(add_php_jview_vvvvvza); - var add_php_document_vvvvvyy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvyy(add_php_document_vvvvvyy); + var add_php_document_vvvvvzb = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvzb(add_php_document_vvvvvzb); - var add_css_document_vvvvvyz = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvyz(add_css_document_vvvvvyz); + var add_css_document_vvvvvzc = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvzc(add_css_document_vvvvvzc); - var add_javascript_file_vvvvvza = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); - vvvvvza(add_javascript_file_vvvvvza); + var add_javascript_file_vvvvvzd = jQuery("#jform_add_javascript_file input[type='radio']:checked").val(); + vvvvvzd(add_javascript_file_vvvvvzd); - var add_js_document_vvvvvzb = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvzb(add_js_document_vvvvvzb); + var add_js_document_vvvvvze = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvze(add_js_document_vvvvvze); - var add_css_vvvvvzc = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvzc(add_css_vvvvvzc); + var add_css_vvvvvzf = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvzf(add_css_vvvvvzf); - var add_php_ajax_vvvvvzd = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvzd(add_php_ajax_vvvvvzd); + var add_php_ajax_vvvvvzg = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvzg(add_php_ajax_vvvvvzg); - var add_custom_button_vvvvvze = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvze(add_custom_button_vvvvvze); + var add_custom_button_vvvvvzh = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvzh(add_custom_button_vvvvvzh); - var button_position_vvvvvzf = jQuery("#jform_button_position").val(); - vvvvvzf(button_position_vvvvvzf); + var button_position_vvvvvzi = jQuery("#jform_button_position").val(); + vvvvvzi(button_position_vvvvvzi); }); -// the vvvvvyv function -function vvvvvyv(add_php_view_vvvvvyv) +// the vvvvvyy function +function vvvvvyy(add_php_view_vvvvvyy) { // set the function logic - if (add_php_view_vvvvvyv == 1) + if (add_php_view_vvvvvyy == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } @@ -59,11 +59,11 @@ function vvvvvyv(add_php_view_vvvvvyv) } } -// the vvvvvyw function -function vvvvvyw(add_php_jview_display_vvvvvyw) +// the vvvvvyz function +function vvvvvyz(add_php_jview_display_vvvvvyz) { // set the function logic - if (add_php_jview_display_vvvvvyw == 1) + if (add_php_jview_display_vvvvvyz == 1) { jQuery('#jform_php_jview_display-lbl').closest('.control-group').show(); } @@ -73,11 +73,11 @@ function vvvvvyw(add_php_jview_display_vvvvvyw) } } -// the vvvvvyx function -function vvvvvyx(add_php_jview_vvvvvyx) +// the vvvvvza function +function vvvvvza(add_php_jview_vvvvvza) { // set the function logic - if (add_php_jview_vvvvvyx == 1) + if (add_php_jview_vvvvvza == 1) { jQuery('#jform_php_jview-lbl').closest('.control-group').show(); } @@ -87,11 +87,11 @@ function vvvvvyx(add_php_jview_vvvvvyx) } } -// the vvvvvyy function -function vvvvvyy(add_php_document_vvvvvyy) +// the vvvvvzb function +function vvvvvzb(add_php_document_vvvvvzb) { // set the function logic - if (add_php_document_vvvvvyy == 1) + if (add_php_document_vvvvvzb == 1) { jQuery('#jform_php_document-lbl').closest('.control-group').show(); } @@ -101,11 +101,11 @@ function vvvvvyy(add_php_document_vvvvvyy) } } -// the vvvvvyz function -function vvvvvyz(add_css_document_vvvvvyz) +// the vvvvvzc function +function vvvvvzc(add_css_document_vvvvvzc) { // set the function logic - if (add_css_document_vvvvvyz == 1) + if (add_css_document_vvvvvzc == 1) { jQuery('#jform_css_document-lbl').closest('.control-group').show(); } @@ -115,11 +115,11 @@ function vvvvvyz(add_css_document_vvvvvyz) } } -// the vvvvvza function -function vvvvvza(add_javascript_file_vvvvvza) +// the vvvvvzd function +function vvvvvzd(add_javascript_file_vvvvvzd) { // set the function logic - if (add_javascript_file_vvvvvza == 1) + if (add_javascript_file_vvvvvzd == 1) { jQuery('#jform_javascript_file-lbl').closest('.control-group').show(); } @@ -129,11 +129,11 @@ function vvvvvza(add_javascript_file_vvvvvza) } } -// the vvvvvzb function -function vvvvvzb(add_js_document_vvvvvzb) +// the vvvvvze function +function vvvvvze(add_js_document_vvvvvze) { // set the function logic - if (add_js_document_vvvvvzb == 1) + if (add_js_document_vvvvvze == 1) { jQuery('#jform_js_document-lbl').closest('.control-group').show(); } @@ -143,11 +143,11 @@ function vvvvvzb(add_js_document_vvvvvzb) } } -// the vvvvvzc function -function vvvvvzc(add_css_vvvvvzc) +// the vvvvvzf function +function vvvvvzf(add_css_vvvvvzf) { // set the function logic - if (add_css_vvvvvzc == 1) + if (add_css_vvvvvzf == 1) { jQuery('#jform_css-lbl').closest('.control-group').show(); } @@ -157,11 +157,11 @@ function vvvvvzc(add_css_vvvvvzc) } } -// the vvvvvzd function -function vvvvvzd(add_php_ajax_vvvvvzd) +// the vvvvvzg function +function vvvvvzg(add_php_ajax_vvvvvzg) { // set the function logic - if (add_php_ajax_vvvvvzd == 1) + if (add_php_ajax_vvvvvzg == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show(); @@ -173,11 +173,11 @@ function vvvvvzd(add_php_ajax_vvvvvzd) } } -// the vvvvvze function -function vvvvvze(add_custom_button_vvvvvze) +// the vvvvvzh function +function vvvvvzh(add_custom_button_vvvvvzh) { // set the function logic - if (add_custom_button_vvvvvze == 1) + if (add_custom_button_vvvvvzh == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); @@ -191,20 +191,20 @@ function vvvvvze(add_custom_button_vvvvvze) } } -// the vvvvvzf function -function vvvvvzf(button_position_vvvvvzf) +// the vvvvvzi function +function vvvvvzi(button_position_vvvvvzi) { - if (isSet(button_position_vvvvvzf) && button_position_vvvvvzf.constructor !== Array) + if (isSet(button_position_vvvvvzi) && button_position_vvvvvzi.constructor !== Array) { - var temp_vvvvvzf = button_position_vvvvvzf; - var button_position_vvvvvzf = []; - button_position_vvvvvzf.push(temp_vvvvvzf); + var temp_vvvvvzi = button_position_vvvvvzi; + var button_position_vvvvvzi = []; + button_position_vvvvvzi.push(temp_vvvvvzi); } - else if (!isSet(button_position_vvvvvzf)) + else if (!isSet(button_position_vvvvvzi)) { - var button_position_vvvvvzf = []; + var button_position_vvvvvzi = []; } - var button_position = button_position_vvvvvzf.some(button_position_vvvvvzf_SomeFunc); + var button_position = button_position_vvvvvzi.some(button_position_vvvvvzi_SomeFunc); // set this function logic @@ -218,11 +218,11 @@ function vvvvvzf(button_position_vvvvvzf) } } -// the vvvvvzf Some function -function button_position_vvvvvzf_SomeFunc(button_position_vvvvvzf) +// the vvvvvzi Some function +function button_position_vvvvvzi_SomeFunc(button_position_vvvvvzi) { // set the function logic - if (button_position_vvvvvzf == 5) + if (button_position_vvvvvzi == 5) { return true; } diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index 863bc2eb5..6f1c5bbd2 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_vvvvvzg = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvzg(add_php_view_vvvvvzg); + var add_php_view_vvvvvzj = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvzj(add_php_view_vvvvvzj); }); -// the vvvvvzg function -function vvvvvzg(add_php_view_vvvvvzg) +// the vvvvvzj function +function vvvvvzj(add_php_view_vvvvvzj) { // set the function logic - if (add_php_view_vvvvvzg == 1) + if (add_php_view_vvvvvzj == 1) { jQuery('#jform_php_view-lbl').closest('.control-group').show(); } diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php index 8923b3cee..6b3d2ab63 100644 --- a/admin/models/import_joomla_components.php +++ b/admin/models/import_joomla_components.php @@ -698,12 +698,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy } // the array of tables to store $tables = array( - 'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view', - 'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code', 'placeholder', + 'validation_rule','class_extends', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view','joomla_plugin_group', + 'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code', 'placeholder','class_property','class_method','joomla_plugin', 'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'admin_custom_tabs', 'component_admin_views', 'component_site_views', 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks', 'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders', - 'component_placeholders' + 'component_placeholders','component_plugins' ); // get prefix $prefix = $this->_db->getPrefix(); @@ -2065,6 +2065,21 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); } break; + case 'component_plugins': + // diverged id already updated + if (!$diverged) + { + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + } + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'addjoomla_plugins' => array('plugin' => 'joomla_plugin') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_plugins', $updaterT); + break; case 'component_files_folders': // diverged id already updated if (!$diverged) @@ -2859,6 +2874,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy case 'component_config': case 'component_dashboard': case 'component_placeholders': + case 'component_plugins': case 'component_files_folders': // get by joomla_component (since there should only be one of each component) $getter = array('joomla_component'); diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 4db61d5fd..dd5a1e279 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -25,9 +25,13 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin * @var array */ protected $tabLayoutFields = array( - 'details' => array( + 'code' => array( 'left' => array( 'note_beta_stage', + 'name', + 'class_extends', + 'joomla_plugin_group', + 'add_head', 'note_plugin' ), 'right' => array( @@ -35,13 +39,12 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin 'method_selection' ), 'fullwidth' => array( + 'head', 'main_class_code', 'note_linked_to_notice' ), 'above' => array( - 'name', - 'class_extends', - 'joomla_plugin_group' + 'system_name' ) ), 'configparams' => array( @@ -131,6 +134,12 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin $item->main_class_code = base64_decode($item->main_class_code); } + if (!empty($item->head)) + { + // base64 Decode head. + $item->head = base64_decode($item->head); + } + if (!empty($item->fields)) { // Convert the fields field to an array. @@ -461,6 +470,42 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin return $data; } + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ + public function validate($form, $data, $group = null) + { + // check if the not_required field is set + if (ComponentbuilderHelper::checkString($data['not_required'])) + { + $requiredFields = (array) explode(',',(string) $data['not_required']); + $requiredFields = array_unique($requiredFields); + // now change the required field attributes value + foreach ($requiredFields as $requiredField) + { + // make sure there is a string value + if (ComponentbuilderHelper::checkString($requiredField)) + { + // change to false + $form->setFieldAttribute($requiredField, 'required', 'false'); + // also clear the data set + $data[$requiredField] = ''; + } + } + } + return parent::validate($form, $data, $group); + } + /** * Method to get the unique fields of this table. * @@ -685,9 +730,9 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } // Only for strings - if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name)) + if (ComponentbuilderHelper::checkString($this->table->system_name) && !is_numeric($this->table->system_name)) { - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name); } // insert all set values @@ -933,6 +978,12 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin if (isset($data['main_class_code'])) { $data['main_class_code'] = base64_encode($data['main_class_code']); + } + + // Set the head string to base64 string. + if (isset($data['head'])) + { + $data['head'] = base64_encode($data['head']); } // Set the Params Items to data diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index 01f4819a7..791e31ed4 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -27,7 +27,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.name','name', + 'a.system_name','system_name', 'a.class_extends','class_extends', 'a.joomla_plugin_group','joomla_plugin_group' ); @@ -237,8 +237,8 @@ class ComponentbuilderModelJoomla_plugins extends JModelList { $this->context .= '.' . $layout; } - $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); + $this->setState('filter.system_name', $system_name); $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); $this->setState('filter.class_extends', $class_extends); @@ -363,15 +363,10 @@ class ComponentbuilderModelJoomla_plugins extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.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.')'); + $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.')'); } } - // Filter by Name. - if ($name = $this->getState('filter.name')) - { - $query->where('a.name = ' . $db->quote($db->escape($name))); - } // Filter by class_extends. if ($class_extends = $this->getState('filter.class_extends')) { @@ -392,106 +387,6 @@ class ComponentbuilderModelJoomla_plugins extends JModelList } return $query; - } - - /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getExportData($pks) - { - // setup the query - if (ComponentbuilderHelper::checkArray($pks)) - { - // Set a value to know this is exporting method. - $_export = true; - // 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_joomla_plugin table - $query->from($db->quoteName('#__componentbuilder_joomla_plugin', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } - - // Order the results by ordering - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // set values to display correctly. - if (ComponentbuilderHelper::checkArray($items)) - { - foreach ($items as $nr => &$item) - { - $access = (JFactory::getUser()->authorise('joomla_plugin.access', 'com_componentbuilder.joomla_plugin.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_plugin.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - // decode main_class_code - $item->main_class_code = base64_decode($item->main_class_code); - // unset the values we don't want exported. - unset($item->asset_id); - unset($item->checked_out); - unset($item->checked_out_time); - } - } - // Add headers to items array. - $headers = $this->getExImPortHeaders(); - if (ComponentbuilderHelper::checkObject($headers)) - { - array_unshift($items,$headers); - } - return $items; - } - } - return false; - } - - /** - * Method to get header. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getExImPortHeaders() - { - // Get a db connection. - $db = JFactory::getDbo(); - // get the columns - $columns = $db->getTableColumns("#__componentbuilder_joomla_plugin"); - if (ComponentbuilderHelper::checkArray($columns)) - { - // remove the headers you don't import/export. - unset($columns['asset_id']); - unset($columns['checked_out']); - unset($columns['checked_out_time']); - $headers = new stdClass(); - foreach ($columns as $column => $type) - { - $headers->{$column} = $column; - } - return $headers; - } - return false; } /** @@ -509,7 +404,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.system_name'); $id .= ':' . $this->getState('filter.class_extends'); $id .= ':' . $this->getState('filter.joomla_plugin_group'); diff --git a/admin/models/rules/int.php b/admin/models/rules/int.php index 3d2e83c69..fa06a94b2 100644 --- a/admin/models/rules/int.php +++ b/admin/models/rules/int.php @@ -21,5 +21,36 @@ use Joomla\Registry\Registry; */ class JFormRuleInt extends FormRule { + /** + * Method to test that an integer value was added. + * + * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param Registry $input An optional Registry object with the entire data set to validate against the entire form. + * @param Form $form The form object for which the field is being tested. + * + * @return boolean True if the value is valid integer, false otherwise. + * + */ + public function test(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null) + { + // Check if the field is required. + $required = ((string) $element['required'] == 'true' || (string) $element['required'] == 'required'); + // If the value is empty and the field is not required return True. + if (($value === '' || $value === null) && ! $required) + { + return true; + } + + // now validate the value to be an integer + // we need to validate a string with the integer in it + // since this is how Joomla passes the value to the test method + // so we use type coercion along with is_numeric + return is_numeric($value) && is_int(+$value); + // if you have a better idea... lets hear it. + } } diff --git a/admin/models/server.php b/admin/models/server.php index 4438ef7bc..f03f0c9f1 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -189,7 +189,7 @@ class ComponentbuilderModelServer extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyclinked_components() + public function getVydlinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 267554887..cec82291e 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -144,13 +144,16 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `add_head` TINYINT(1) NOT NULL DEFAULT 0, `class_extends` INT(11) NOT NULL DEFAULT 0, `fields` TEXT NOT NULL, + `head` TEXT NOT NULL, `joomla_plugin_group` INT(11) NOT NULL DEFAULT 0, `main_class_code` MEDIUMTEXT NOT NULL, `method_selection` TEXT NOT NULL, `name` VARCHAR(255) NOT NULL DEFAULT '', `property_selection` TEXT NOT NULL, + `system_name` VARCHAR(255) NOT NULL DEFAULT '', `params` text NOT NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -169,9 +172,10 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), - KEY `idx_name` (`name`), + KEY `idx_system_name` (`system_name`), KEY `idx_class_extends` (`class_extends`), - KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), + 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` ( diff --git a/admin/sql/updates/mysql/2.9.33.sql b/admin/sql/updates/mysql/2.9.33.sql new file mode 100644 index 000000000..8d911f995 --- /dev/null +++ b/admin/sql/updates/mysql/2.9.33.sql @@ -0,0 +1,5 @@ +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `add_head` TINYINT(1) NOT NULL DEFAULT 0 AFTER `asset_id`; + +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `head` TEXT NOT NULL AFTER `fields`; + +ALTER TABLE `#__componentbuilder_joomla_plugin` ADD `system_name` VARCHAR(255) NOT NULL DEFAULT '' AFTER `property_selection`; diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 4b255e138..91f6b8857 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -208,521 +208,521 @@ $componentParams = $this->params; // will be removed just use $this->params inst + diff --git a/admin/views/joomla_plugin_files_folders_urls/tmpl/index.html b/admin/views/joomla_plugin_files_folders_urls/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugin_files_folders_urls/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugin_files_folders_urls/view.html.php b/admin/views/joomla_plugin_files_folders_urls/view.html.php new file mode 100644 index 000000000..eeae8920d --- /dev/null +++ b/admin/views/joomla_plugin_files_folders_urls/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_files_folders_urls View class + */ +class ComponentbuilderViewJoomla_plugin_files_folders_urls 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_files_folders_urls', $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_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('joomla_plugin_files_folders_urls.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('joomla_plugin_files_folders_urls.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('joomla_plugin_files_folders_urls.edit')) + { + // We can save the record. + JToolBarHelper::save('joomla_plugin_files_folders_urls.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('joomla_plugin_files_folders_urls.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('joomla_plugin_files_folders_urls.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('joomla_plugin_files_folders_urls.create')) + { + JToolBarHelper::apply('joomla_plugin_files_folders_urls.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin_files_folders_urls.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('joomla_plugin_files_folders_urls.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('joomla_plugin_files_folders_urls.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('joomla_plugin_files_folders_urls.edit')) + { + // We can save the new record + JToolBarHelper::apply('joomla_plugin_files_folders_urls.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('joomla_plugin_files_folders_urls.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_files_folders_urls.create')) + { + JToolBarHelper::custom('joomla_plugin_files_folders_urls.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('joomla_plugin_files_folders_urls.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('joomla_plugin_files_folders_urls.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.joomla_plugin_files_folders_urls', $this->item->id); + } + if ($this->canDo->get('joomla_plugin_files_folders_urls.create')) + { + JToolBarHelper::custom('joomla_plugin_files_folders_urls.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('joomla_plugin_files_folders_urls.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugin_files_folders_urls'); + 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_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugin_files_folders_urls.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_files_folders_urls/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 d518f164c..81086652e 100644 --- a/admin/views/joomla_plugins/tmpl/default_body.php +++ b/admin/views/joomla_plugins/tmpl/default_body.php @@ -61,15 +61,38 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p -
- get('joomla_plugin.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'joomla_plugins.', $canCheckin); ?> - - - escape($item->system_name); ?> +
+ get('joomla_plugin.edit')): ?> + escape($item->system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'joomla_plugins.', $canCheckin); ?> + + escape($item->system_name); ?> + +
+ 'joomla_plugin_files_folders_urls', + 'views' => 'joomla_plugins_files_folders_urls', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_PLUGIN_FILES_FOLDERS'), + 'icon' => 'briefcase') + ); + } + ?> +
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_plugin', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + +
diff --git a/admin/views/joomla_plugins_files_folders_urls/index.html b/admin/views/joomla_plugins_files_folders_urls/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php new file mode 100644 index 000000000..b899a2008 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'joomla_plugin_files_folders_urlsList', '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_FILES_FOLDERS_URLS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_batch_body.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_batch_body.php new file mode 100644 index 000000000..b19367ab3 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls/tmpl/default_batch_footer.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_batch_footer.php new file mode 100644 index 000000000..5d6ff2d47 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls/tmpl/default_body.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_body.php new file mode 100644 index 000000000..e26c9e453 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls&task=joomla_plugin_files_folders_urls.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_files_folders_urls',$item,'joomla_plugins_files_folders_urls'); + ?> + + + get('joomla_plugin_files_folders_urls.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('joomla_plugin_files_folders_urls.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('joomla_plugin_files_folders_urls.edit')): ?> + escape($item->joomla_plugin_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'joomla_plugins_files_folders_urls.', $canCheckin); ?> + + + escape($item->joomla_plugin_system_name); ?> + +
+ + + get('joomla_plugin_files_folders_urls.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'joomla_plugins_files_folders_urls.', true, 'cb'); ?> + + published, $i, 'joomla_plugins_files_folders_urls.', false, 'cb'); ?> + + + published, $i, 'joomla_plugins_files_folders_urls.', true, 'cb'); ?> + + + published, $i, 'joomla_plugins_files_folders_urls.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_foot.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_foot.php new file mode 100644 index 000000000..d020003b6 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php new file mode 100644 index 000000000..e3f4a891b --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls/tmpl/default_toolbar.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_toolbar.php new file mode 100644 index 000000000..f40efa672 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls/tmpl/index.html b/admin/views/joomla_plugins_files_folders_urls/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/joomla_plugins_files_folders_urls/view.html.php b/admin/views/joomla_plugins_files_folders_urls/view.html.php new file mode 100644 index 000000000..964af701f --- /dev/null +++ b/admin/views/joomla_plugins_files_folders_urls/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_files_folders_urls + */ +class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy +{ + /** + * Joomla_plugins_files_folders_urls view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('joomla_plugins_files_folders_urls'); + } + + // 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_files_folders_urls'); + $this->canEdit = $this->canDo->get('joomla_plugin_files_folders_urls.edit'); + $this->canState = $this->canDo->get('joomla_plugin_files_folders_urls.edit.state'); + $this->canCreate = $this->canDo->get('joomla_plugin_files_folders_urls.create'); + $this->canDelete = $this->canDo->get('joomla_plugin_files_folders_urls.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_FILES_FOLDERS_URLS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=joomla_plugins_files_folders_urls'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('joomla_plugin_files_folders_urls.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('joomla_plugin_files_folders_urls.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('joomla_plugins_files_folders_urls.publish'); + JToolBarHelper::unpublishList('joomla_plugins_files_folders_urls.unpublish'); + JToolBarHelper::archiveList('joomla_plugins_files_folders_urls.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('joomla_plugins_files_folders_urls.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_files_folders_urls.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('joomla_plugins_files_folders_urls.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('joomla_plugins_files_folders_urls'); + 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_FILES_FOLDERS_URLS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_plugins_files_folders_urls.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 38c610bd4..0c7989276 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 + 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