From 8e79417664eb3a9f5b000faa2a4c3bc286f2c89e Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 16 May 2019 00:50:45 +0200 Subject: [PATCH 01/26] Added create new custom code to all fields that have string lenght. --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler/a_Get.php | 2 +- admin/models/ajax.php | 69 ++++++++++++-------- admin/models/forms/admin_fields_relations.js | 2 +- admin/models/forms/admin_view.js | 2 +- admin/models/forms/component_dashboard.js | 2 +- admin/models/forms/custom_admin_view.js | 2 +- admin/models/forms/custom_code.js | 2 +- admin/models/forms/dynamic_get.js | 2 +- admin/models/forms/field.js | 2 +- admin/models/forms/fieldtype.js | 2 +- admin/models/forms/joomla_component.js | 2 +- admin/models/forms/layout.js | 2 +- admin/models/forms/library.js | 2 +- admin/models/forms/site_view.js | 2 +- admin/models/forms/template.js | 2 +- admin/models/forms/validation_rule.js | 2 +- 18 files changed, 59 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 7628886d5..3da9b4583 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ TODO + *Version*: 2.9.18 + *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*: **206359** ++ *Line count*: **206374** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index 7628886d5..3da9b4583 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -150,7 +150,7 @@ TODO + *Version*: 2.9.18 + *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*: **206359** ++ *Line count*: **206374** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 5e90575d7..50adbd094 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access'); */ class Get { - + /** * The hash placeholder * diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 6c09e19d2..77128b307 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -315,6 +315,7 @@ class ComponentbuilderModelAjax extends JModelList 'component_config' => 'components_config', 'component_dashboard' => 'components_dashboard', 'component_files_folders' => 'components_files_folders', + 'custom_code' => 'custom_codes', 'language' => true); public function getButton($type, $size) @@ -341,11 +342,16 @@ class ComponentbuilderModelAjax extends JModelList $ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'] . '&return=' . urlencode(base64_encode($return_url)); } // build url (A tag) - $startAtag = ''; - // build the smaller button - if (2 == $size) + $startAtag = 'onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&view=' . $type . '&layout=edit' . $ref . '\' })" href="javascript:void(0)" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($type, 'W')).'">'; + // build the smallest button + if (3 == $size) { - $button = $startAtag.' ' . JText::_('COM_COMPONENTBUILDER_CREATE') . ''; + $button = ''; + } + // build the smaller button + elseif (2 == $size) + { + $button = ' ' . JText::_('COM_COMPONENTBUILDER_CREATE') . ''; } else // build the big button @@ -354,7 +360,7 @@ class ComponentbuilderModelAjax extends JModelList
-
'.$startAtag.' +
' . JText::_('COM_COMPONENTBUILDER_NEW') . ' @@ -1934,6 +1940,23 @@ class ComponentbuilderModelAjax extends JModelList // only continue if this is a legitimate call if (isset($view['a_id']) && $view['a_id'] == $id && isset($view['a_view']) && ($target = $this->getCodeSearchKeys($view['a_view'], 'query_')) !== false) { + // reset the buttons bucket + $buttons = array(); + // some helper for some fields + $helper = array('xml' => 'note_select_field_type'); + // get input + $jinput = JFactory::getApplication()->input; + $return_here = $jinput->get('return_here', null, 'base64'); + // set the return here value if not found + if (ComponentbuilderHelper::checkString($return_here)) + { + $return_here = '&return=' . $return_here; + } + else + { + $return_here = '&ref=' . $view['a_view'] . '&refid=' . (int) $id; + } + // start db query $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName($target['select'])) @@ -1944,8 +1967,6 @@ class ComponentbuilderModelAjax extends JModelList if ($db->loadRowList()) { $data = $db->loadAssoc(); - // some helper for some fields - $helper = array('xml' => 'note_select_field_type'); // reset the bucket $bucket = array(); foreach ($data as $key => $value) @@ -1973,25 +1994,20 @@ class ComponentbuilderModelAjax extends JModelList // get all custom codes in value $bucket[$key] = ComponentbuilderHelper::getAllBetween($value, '[CUSTOMC' . 'ODE=', ']'); } + // check if field has string length + if (ComponentbuilderHelper::checkString($value)) + { + $buttons[$key] = array(); + if (($button = $this->getButton('custom_code', 3)) && ComponentbuilderHelper::checkString($button)) + { + $buttons[$key]['_create'] = $button; + } + } } } // check if any values found if (ComponentbuilderHelper::checkArray($bucket)) { - // get input - $jinput = JFactory::getApplication()->input; - $return_here = $jinput->get('return_here', null, 'base64'); - // set the return here value if not found - if (ComponentbuilderHelper::checkString($return_here)) - { - $return_here = '&return=' . $return_here; - } - else - { - $return_here = '&ref=' . $view['a_view'] . '&refid=' . (int) $id; - } - // reset the buttons bucket - $buttons = array(); foreach ($bucket as $field => $customcodes) { $edit_icon = ' '; @@ -2000,7 +2016,6 @@ class ComponentbuilderModelAjax extends JModelList { $field = $helper[$field]; } - $buttons[$field] = array(); foreach ($customcodes as $customcode) { $key = (array) explode('+', $customcode); @@ -2012,13 +2027,13 @@ class ComponentbuilderModelAjax extends JModelList } } } - // only continue if we have buttons in array - if (ComponentbuilderHelper::checkArray($buttons, true)) - { - return $buttons; - } } } + // only continue if we have buttons in array + if (ComponentbuilderHelper::checkArray($buttons, true)) + { + return $buttons; + } } return false; } diff --git a/admin/models/forms/admin_fields_relations.js b/admin/models/forms/admin_fields_relations.js index 2e5e265c6..dd027678a 100644 --- a/admin/models/forms/admin_fields_relations.js +++ b/admin/models/forms/admin_fields_relations.js @@ -93,7 +93,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index e08365bb0..8e894c1c6 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -1507,7 +1507,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/component_dashboard.js b/admin/models/forms/component_dashboard.js index ed2e6521b..70dd5c103 100644 --- a/admin/models/forms/component_dashboard.js +++ b/admin/models/forms/component_dashboard.js @@ -37,7 +37,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index 664b3240a..9f7e4b7ec 100644 --- a/admin/models/forms/custom_admin_view.js +++ b/admin/models/forms/custom_admin_view.js @@ -686,7 +686,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js index 3de69a3a7..d2e0dfb44 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -377,7 +377,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js index 33da3c9f4..70cf89b22 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -1744,7 +1744,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 03abec751..01ea9b93b 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -873,7 +873,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index 927afbd1a..317cf5c28 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -829,7 +829,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index e0b813187..b8537ce62 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -1184,7 +1184,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index 2a0fbe32d..96f1224c5 100644 --- a/admin/models/forms/layout.js +++ b/admin/models/forms/layout.js @@ -113,7 +113,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js index 148612aed..c4bd265e8 100644 --- a/admin/models/forms/library.js +++ b/admin/models/forms/library.js @@ -491,7 +491,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index 9d7b8b3f7..927686d42 100644 --- a/admin/models/forms/site_view.js +++ b/admin/models/forms/site_view.js @@ -727,7 +727,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index dad4fdef6..595af1b84 100644 --- a/admin/models/forms/template.js +++ b/admin/models/forms/template.js @@ -113,7 +113,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/validation_rule.js b/admin/models/forms/validation_rule.js index 8e28efbc4..992c3fdc9 100644 --- a/admin/models/forms/validation_rule.js +++ b/admin/models/forms/validation_rule.js @@ -117,7 +117,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); -- 2.40.1 From 42d5b3b55c7a3974d9cafbafd486b3a7e5c44ded Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 16 May 2019 01:07:38 +0200 Subject: [PATCH 02/26] Added the feature that loads the company global values when creating a new component, if they are set. --- README.md | 2 +- admin/README.txt | 2 +- admin/models/joomla_component.php | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3da9b4583..9c6490ec9 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ TODO + *Version*: 2.9.18 + *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*: **206374** ++ *Line count*: **206387** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index 3da9b4583..9c6490ec9 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -150,7 +150,7 @@ TODO + *Version*: 2.9.18 + *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*: **206374** ++ *Line count*: **206387** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 5900dd346..e79d0f450 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -407,7 +407,20 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $form->setFieldAttribute($name, 'editor', $global_editor . '|none'); } } - + + // Only load these values if no id is found + if (0 == $id) + { + // get components global params + $params = JComponentHelper::getParams('com_componentbuilder'); + // set company defaults + $form->setValue('companyname', null, $params->get('export_company', '')); + $form->setValue('author', null, $params->get('export_owner', '')); + $form->setValue('email', null, $params->get('export_email', '')); + $form->setValue('website', null, $params->get('export_website', '')); + $form->setValue('copyright', null, $params->get('export_copyright', 'Copyright (C) 2015. All Rights Reserved')); + $form->setValue('license', null, $params->get('export_license', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html')); + } return $form; } -- 2.40.1 From d3f623d184c4f2b8314d90e5427c8633a4b0bd80 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 17 May 2019 00:43:24 +0200 Subject: [PATCH 03/26] Improved on the mysql default selected values to use InnoDB, utf8mb4, utf8mb4_general_ci --- README.md | 4 ++-- admin/README.txt | 4 ++-- .../en-GB/en-GB.com_componentbuilder.ini | 4 +--- admin/models/admin_view.php | 16 ++++++++++++++++ admin/models/forms/admin_view.xml | 16 +++++----------- admin/models/joomla_component.php | 14 ++++++-------- componentbuilder.xml | 2 +- 7 files changed, 33 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 9c6490ec9..19e759ab3 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*: 15th May, 2019 ++ *Last Build*: 16th May, 2019 + *Version*: 2.9.18 + *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*: **206387** ++ *Line count*: **206393** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index 9c6490ec9..19e759ab3 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*: 15th May, 2019 ++ *Last Build*: 16th May, 2019 + *Version*: 2.9.18 + *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*: **206387** ++ *Line count*: **206393** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 980a285a3..a07e188dc 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -746,9 +746,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_GENERIC="Generic" COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_BIN_CHARSET_GEOSTDEIGHT="geostd8_bin (charset = geostd8)" COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_GENERAL_CI_CHARSET_GEOSTDEIGHT="geostd8_general_ci (charset = geostd8)" COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_GEOSTDEIGHT_GEORGIAN_MOST_SUITABLE_COLLATION_GEOSTDEIGHT_GENERAL_CI="geostd8 - GEOSTD8 Georgian (most suitable collation = geostd8_general_ci)" -COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_MYISAM="Global (default = MyISAM)" -COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_UTFEIGHT="Global (default = utf8)" -COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_UTFEIGHT_GENERAL_CI="Global (default = utf8_general_ci)" COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_BIN_CHARSET_GREEK="greek_bin (charset = greek)" COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_GENERAL_CI_CHARSET_GREEK="greek_general_ci (charset = greek)" COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_ISO_EIGHT_THOUSAND_EIGHT_HUNDRED_AND_FIFTY_NINESEVEN_GREEK_MOST_SUITABLE_COLLATION_GREEK_GENERAL_CI="greek - ISO 8859-7 Greek (most suitable collation = greek_general_ci)" @@ -950,6 +947,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL="Tab Setup Options" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION="Notification" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION_CIRCLE="Notification Circle" COM_COMPONENTBUILDER_ADMIN_VIEW_NOT_REQUIRED="Not Required" +COM_COMPONENTBUILDER_ADMIN_VIEW_OMIT="Omit" COM_COMPONENTBUILDER_ADMIN_VIEW_ONLY_FUNCTION="Only Function" COM_COMPONENTBUILDER_ADMIN_VIEW_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_ADMIN_VIEW_PALETTE="Palette" diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 7bcce1a50..f456d2198 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -419,6 +419,22 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { $this->_db->updateObject('#__componentbuilder_admin_view', $objectUpdate, 'id'); } + + // update the mysql_table_engine defaults + if (isset($item->mysql_table_engine) && is_numeric($item->mysql_table_engine)) + { + $item->mysql_table_engine = 'MyISAM'; + } + // update the mysql_table_charset defaults + if (isset($item->mysql_table_charset) && is_numeric($item->mysql_table_charset)) + { + $item->mysql_table_charset = 'utf8'; + } + // update the mysql_table_collate defaults + if (isset($item->mysql_table_collate) && is_numeric($item->mysql_table_collate)) + { + $item->mysql_table_collate = 'utf8_general_ci'; + } if (!empty($item->id)) { diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 9099467ab..1fe000cd8 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -352,10 +352,8 @@ multiple="false" filter="CMD" required="true" - default="1"> + default="utf8mb4_general_ci"> - + COM_COMPONENTBUILDER_ADMIN_VIEW_OMIT
"; + // close divs + if (ComponentbuilderHelper::checkString($span)) + { + $body .= PHP_EOL . $this->_t(1) . "
"; + } $body .= PHP_EOL . ""; // check if left has been set if (strlen($leftside) > 0) @@ -8046,6 +7621,536 @@ class Interpretation extends Fields return ''; } + /** + * get Edit Body Linked Admin Views + * + * @param array $view The view data + * @param string $view_name_single The single view name + * @param array $keys The tabs to add in layout + * @param array $linkedViewIdentifier The linked view identifier + * + * @return array The linked Admin Views tabs + * + */ + protected function getEditBodyLinkedAdminViewsTabs(&$view, &$view_name_single, &$keys, &$linkedViewIdentifier) + { + // start linked tabs bucket + $linkedTab = array(); + // check if the view has linked admin view + if (isset($this->linkedAdminViews[$view_name_single]) && ComponentbuilderHelper::checkArray($this->linkedAdminViews[$view_name_single])) + { + foreach ($this->linkedAdminViews[$view_name_single] as $linkedView) + { + // get the tab name + $tabName = $view['settings']->tabs[(int) $linkedView['tab']]; + // update the tab counter + $this->tabCounter[$view_name_single][$linkedView['tab']] = $tabName; + // add the linked view + $linkedTab[$linkedView['adminview']] = $linkedView['tab']; + // set the keys if values are set + if (ComponentbuilderHelper::checkString($linkedView['key']) && ComponentbuilderHelper::checkString($linkedView['parentkey'])) + { + $keys[$linkedView['adminview']] = array('key' => $linkedView['key'], 'parentKey' => $linkedView['parentkey']); + } + else + { + $keys[$linkedView['adminview']] = array('key' => null, 'parentKey' => null); + } + // set the button switches + if (isset($linkedView['addnew'])) + { + $keys[$linkedView['adminview']]['addNewButton'] = (int) $linkedView['addnew']; + } + else + { + $keys[$linkedView['adminview']]['addNewButton'] = 0; + } + } + } + return $linkedTab; + } + + /** + * get Edit Body Tabs + * + * @param string $view_name_single The single view name + * @param string $langView The main lang prefix + * @param array $linkedTab The linked admin view tabs + * @param array $keys The tabs to add in layout + * @param array $linkedViewIdentifier The linked view identifier + * @param array $searchTabs The tabs to add in layout + * @param string $leftside The left side html string + * @param string $rightside The right side html string + * @param string $footer The footer html string + * @param string $header The header html string + * @param int $mainwidth The main width value + * @param int $sidewidth The side width value + * + * @return array The linked tabs + * + */ + protected function getEditBodyTabs(&$view_name_single, &$langView, &$linkedTab, &$keys, &$linkedViewIdentifier, &$searchTabs, &$leftside, &$rightside, &$footer, &$header, &$mainwidth, &$sidewidth) + { + // start tabs + $tabs = array(); + // sort the tabs based on key order + ksort($this->tabCounter[$view_name_single]); + // start tab builinging loop + foreach ($this->tabCounter[$view_name_single] as $tabNr => $tabName) + { + $tabWidth = 12; + $lrCounter = 0; + // set tab lang + $tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U'); + // set tab code name + $tabCodeName = ComponentbuilderHelper::safeString($tabName); + /// set the values to use in search latter + $searchTabs[$tabCodeName] = $tabNr; + // add to lang array + if (!isset($this->langContent[$this->lang][$tabLangName])) + { + $this->langContent[$this->lang][$tabLangName] = $tabName; + } + // check if linked view belongs to this tab + $buildLayout = true; + $linkedViewId = ''; + if (ComponentbuilderHelper::checkArray($linkedTab)) + { + if (($linkedViewId = array_search($tabNr, $linkedTab)) !== false) + { + // don't build (since this is a linked view) + $buildLayout = false; + } + } + // build layout these are actual fields + if ($buildLayout) + { + // sort to make sure it loads left first + $alignments = $this->layoutBuilder[$view_name_single][$tabName]; + ksort($alignments); + foreach ($alignments as $alignment => $names) + { + // set layout code name + $layoutCodeName = $tabCodeName . '_' . $this->alignmentOptions[$alignment]; + // reset each time + $items = ''; + $itemCounter = 0; + // sort the names based on order of keys + ksort($names); + // build the items array for this alignment + foreach ($names as $nr => $name) + { + if ($itemCounter == 0) + { + $items .= "'" . $name . "'"; + } + else + { + $items .= "," . PHP_EOL . $this->_t(1) . "'" . $name . "'"; + } + $itemCounter++; + } + // based on alignment build the layout + switch ($alignment) + { + case 1: // left + case 2: // right + // count + $lrCounter++; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // load the body + if (!isset($tabs[$tabCodeName][(int) $alignment])) + { + $tabs[$tabCodeName][(int) $alignment] = ''; + } + $tabs[$tabCodeName][(int) $alignment] .= ""; + break; + case 3: // fullwidth + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutfull'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // load the body + if (!isset($tabs[$tabCodeName][(int) $alignment])) + { + $tabs[$tabCodeName][(int) $alignment] = ''; + } + $tabs[$tabCodeName][(int) $alignment] .= ""; + break; + case 4: // above + // set as title layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layouttitle'); + // load to header + $header .= PHP_EOL . $this->_t(1) . ""; + break; + case 5: // under + // set as title layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layouttitle'); + // load to footer + $footer .= PHP_EOL . PHP_EOL . "
" . PHP_EOL . ""; + break; + case 6: // left side + $tabWidth = $tabWidth - 2; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // load the body + $leftside .= PHP_EOL . $this->_t(1) . ""; + break; + case 7: // right side + $tabWidth = $tabWidth - 2; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // load the body + $rightside .= PHP_EOL . $this->_t(1) . ""; + break; + } + } + } + else + { + // set layout code name + $layoutCodeName = $tabCodeName . '_fullwidth'; + // set identifiers + $linkedViewIdentifier[$linkedViewId] = $tabCodeName; + //set function name + $codeName = ComponentbuilderHelper::safeString($this->uniquekey(3) . $tabCodeName); + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $codeName, 'layoutlinkedview'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // set all the linked view stuff + $this->secondRunAdmin['setLinkedView'][] = array( + 'viewId' => $linkedViewId, + 'view_name_single' => $view_name_single, + 'codeName' => $codeName, + 'layoutCodeName' => $layoutCodeName, + 'key' => $keys[$linkedViewId]['key'], + 'parentKey' => $keys[$linkedViewId]['parentKey'], + 'addNewButon' => $keys[$linkedViewId]['addNewButton']); + // load the body + if (!isset($tabs[$tabCodeName][3])) + { + $tabs[$tabCodeName][3] = ''; + } + $tabs[$tabCodeName][3] .= ""; + } + // width calculator :) + if ($tabWidth == 8) + { + $mainwidth = 8; + $sidewidth = 2; + } + elseif ($tabWidth == 10 && $mainwidth != 8) + { + $mainwidth = 9; + $sidewidth = 3; + } + $tabs[$tabCodeName]['lr'] = $lrCounter; + } + return $tabs; + } + + /** + * set Edit Body Main Center Positions Div + * + * @param string $main The main position of this tab + * @param string $mainbottom The main bottom position of this tab + * @param array $positions The build positions of this tab + * + * @return array The linked Admin Views tabs + * + */ + protected function setEditBodyTabMainCenterPositionDiv(&$main, &$mainbottom, &$positions) + { + foreach ($positions as $position => $string) + { + if ($positions['lr'] == 2) + { + switch ($position) + { + case 1: // left + case 2: // right + $main .= PHP_EOL . $this->_t(3) . '
'; + $main .= PHP_EOL . $this->_t(4) . $string; + $main .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + else + { + switch ($position) + { + case 1: // left + case 2: // right + $main .= PHP_EOL . $this->_t(3) . '
'; + $main .= PHP_EOL . $this->_t(4) . $string; + $main .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + switch ($position) + { + case 3: // fullwidth + $mainbottom .= PHP_EOL . $this->_t(3) . '
'; + $mainbottom .= PHP_EOL . $this->_t(4) . $string; + $mainbottom .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + } + + /** + * get Edit Body Publish and Meta Tab + * + * @param string $view_name_single The single view name + * @param string $langView The main lang prefix + * + * @return string The published and Meta Data Tabs + * + */ + protected function getEditBodyPublishMetaTabs(&$view_name_single, &$langView) + { + // build the two tabs + $tabs = ''; + // set default publishing tab lang + $tabLangName = $langView . '_PUBLISHING'; + // add to lang array + if (!isset($this->langContent[$this->lang][$tabLangName])) + { + $this->langContent[$this->lang][$tabLangName] = 'Publishing'; + } + // the default publishing items + $items = array('left' => array(), 'right' => array()); + // Setup the default (custom) fields + // only load (1 => 'left', 2 => 'right') + $fieldsAddedRight = false; + if (isset($this->newPublishingFields[$view_name_single])) + { + foreach ($this->newPublishingFields[$view_name_single] as $df_alignment => $df_items) + { + foreach ($df_items as $df_order => $df_name) + { + if ($df_alignment == 2 || $df_alignment == 1) + { + $items[$this->alignmentOptions[$df_alignment]][$df_order] = $df_name; + } + else + { + $this->app->enqueueMessage(JText::_('

Field Warning

'), 'Warning'); + $this->app->enqueueMessage(JText::sprintf('Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $this->alignmentOptions[$df_alignment], $view_name_single), 'Warning'); + } + } + } + // set switch to trigger notice if custom fields added to right + if (ComponentbuilderHelper::checkArray($items['right'])) + { + $fieldsAddedRight = true; + } + } + // load all defaults + $loadDefaultFields = array( + 'left' => array('created', 'created_by', 'modified', 'modified_by'), + 'right' => array('published', 'ordering', 'access', 'version', 'hits', 'id') + ); + foreach ($loadDefaultFields as $d_alignment => $defaultFields) + { + foreach ($defaultFields as $defaultField) + { + if (!isset($this->movedPublishingFields[$view_name_single][$defaultField])) + { + if ($defaultField != 'access') + { + $items[$d_alignment][] = $defaultField; + } + elseif ($defaultField === 'access' && isset($this->accessBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view_name_single])) + { + $items[$d_alignment][] = $defaultField; + } + } + } + } + // check if metadata is added to this view + if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) + { + // set default publishing tab code name + $tabCodeNameLeft = 'publishing'; + $tabCodeNameRight = 'metadata'; + // the default publishing tiems + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) + { + $items_one = ''; + // load the items into one side + if (ComponentbuilderHelper::checkArray($items['left'])) + { + $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; + } + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // there is already fields just add these + if (strlen($items_one) > 3) + { + $items_one .= "," . PHP_EOL . $this->_t(1) . "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + } + // no fields has been added yet + else + { + $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + } + } + // only triger the info notice if there were custom fields targeted to the right alignment position. + if ($fieldsAddedRight) + { + $this->app->enqueueMessage(JText::_('

Field Notice

'), 'Notice'); + $this->app->enqueueMessage(JText::sprintf('Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', $view_name_single), 'Notice'); + } + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); + $items_one = true; + } + else + { + $items_one = false; + } + // set the metadata layout + $this->setLayout($view_name_single, $tabCodeNameRight, false, 'layoutmetadata'); + $items_two = true; + } + else + { + // set default publishing tab code name + $tabCodeNameLeft = 'publishing'; + $tabCodeNameRight = 'publlshing'; + // the default publishing tiems + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) + { + // load left items that remain + if (ComponentbuilderHelper::checkArray($items['left'])) + { + // load all items + $items_one = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); + $items_one = true; + } + // load right items that remain + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // load all items + $items_two = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameRight, $items_two, 'layoutpublished'); + $items_two = true; + } + } + else + { + $items_one = false; + $items_two = false; + } + } + if ($items_one && $items_two) + { + $classs = "span6"; + } + elseif ($items_one || $items_two) + { + $classs = "span12"; + } + // setup correct core target + $coreLoad = false; + if (isset($this->permissionCore[$view_name_single])) + { + $core = $this->permissionCore[$view_name_single]; + $coreLoad = true; + } + // only load this if needed + if ($items_one || $items_two) + { + // check if the item has permissions. + $publishingPer = array(); + $allToBeChekced = array('core.delete', 'core.edit.created_by', 'core.edit.state', 'core.edit.created'); + foreach ($allToBeChekced as $core_permission) + { + if ($coreLoad && isset($core[$core_permission]) && isset($this->permissionBuilder['global'][$core[$core_permission]]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core[$core_permission]]) && in_array($view_name_single, $this->permissionBuilder['global'][$core[$core_permission]])) + { + // set permissions. + $publishingPer[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; + } + else + { + // set permissions. + $publishingPer[] = "\$this->canDo->get('" . $core_permission . "')"; + } + } + // check if custom tab must be added + if (($_customTabHTML = $this->addCustomTabs(15, $view_name_single, 1)) !== false) + { + $tabs .= $_customTabHTML; + } + $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; + // set the default publishing tab + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(2) . '
'; + if ($items_one) + { + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . ""; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + } + if ($items_two) + { + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . ""; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + } + $tabs .= PHP_EOL . $this->_t(2) . "
"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(1) . ""; + // check if custom tab must be added + if (($_customTabHTML = $this->addCustomTabs(15, $view_name_single, 2)) !== false) + { + $tabs .= $_customTabHTML; + } + } + + // make sure we dont load it to a view with the name component (as this will cause conflict with Joomla conventions) + if ($view_name_single != 'component') + { + // set permissions tab lang + $tabLangName = $langView . '_PERMISSION'; + // set permissions tab code name + $tabCodeName = 'permissions'; + // add to lang array + if (!isset($this->langContent[$this->lang][$tabLangName])) + { + $this->langContent[$this->lang][$tabLangName] = 'Permissions'; + } + // set the permissions tab + $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . "canDo->get('core.admin')) : ?>"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(2) . '
'; + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . "form->getFieldset('accesscontrol') as \$field): ?>"; + $tabs .= PHP_EOL . $this->_t(6) . "
"; + $tabs .= PHP_EOL . $this->_t(7) . "label; echo \$field->input;?>"; + $tabs .= PHP_EOL . $this->_t(6) . "
"; + $tabs .= PHP_EOL . $this->_t(6) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . ""; + $tabs .= PHP_EOL . $this->_t(5) . "
"; + $tabs .= PHP_EOL . $this->_t(4) . "
"; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + $tabs .= PHP_EOL . $this->_t(2) . "
"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(1) . ""; + } + return $tabs; + } + protected function addCustomTabs($nr, $name_single, $target) { // check if this view is having custom tabs @@ -8143,7 +8248,7 @@ class Interpretation extends Fields { /** * @var $viewId - * @var $viewName_single + * @var $view_name_single * @var $codeName * @var $layoutCodeName * @var $key @@ -8164,16 +8269,16 @@ class Interpretation extends Fields } if (ComponentbuilderHelper::checkString($single) && ComponentbuilderHelper::checkString($list)) { - $head = $this->setListHeadLinked($single, $list, $addNewButon, $viewName_single); - $body = $this->setListBodyLinked($single, $list, $viewName_single); + $head = $this->setListHeadLinked($single, $list, $addNewButon, $view_name_single); + $body = $this->setListBodyLinked($single, $list, $view_name_single); $functionName = ComponentbuilderHelper::safeString($codeName, 'F'); // LAYOUTITEMSTABLE <<>> - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; // LAYOUTITEMSHEADER <<>> $headerscript = '//' . $this->setLine(__LINE__) . ' set the edit URL'; $headerscript .= PHP_EOL . '$edit = "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $list . '&task=' . $single . '.edit";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set a return value'; - $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $viewName_single . '&layout=edit&id=" . $id : "";'; + $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $view_name_single . '&layout=edit&id=" . $id : "";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' check for a return value'; $headerscript .= PHP_EOL . '$jinput = JFactory::getApplication()->input;'; $headerscript .= PHP_EOL . "if (\$_return = \$jinput->get('return', null, 'base64'))"; @@ -8184,11 +8289,11 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . 'if (' . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::checkString($return))'; $headerscript .= PHP_EOL . '{'; $headerscript .= PHP_EOL . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' set the referral values'; - $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $viewName_single . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; + $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $view_name_single . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; $headerscript .= PHP_EOL . '}'; $headerscript .= PHP_EOL . 'else'; $headerscript .= PHP_EOL . '{'; - $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $viewName_single . '&refid=" . $id : "";'; + $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $view_name_single . '&refid=" . $id : "";'; $headerscript .= PHP_EOL . '}'; if ($addNewButon > 0) { @@ -8207,11 +8312,11 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' load the action object'; $headerscript .= PHP_EOL . '$can = ' . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::getActions(' . "'" . $single . "'" . ');'; } - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; // LINKEDVIEWITEMS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . $this->_t(2) . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . $this->_t(2) . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; // LINKEDVIEWTABLESCRIPTS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); if (strpos($parentKey, '-R>') !== false || strpos($parentKey, '-A>') !== false) { list($parent_key) = explode('-', $parentKey); @@ -8245,22 +8350,22 @@ class Interpretation extends Fields foreach ($parent_keys as $parent_key) { $globalKey[$parent_key] = ComponentbuilderHelper::safeString($_key . $this->uniquekey(4)); - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key . ";"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key . ";"; } } else { // set the global key $globalKey = ComponentbuilderHelper::safeString($_key . $this->uniquekey(4)); - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; } // LINKEDVIEWMETHODS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked($single, $list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey); + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked($single, $list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey); } else { - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; } } @@ -10870,14 +10975,14 @@ class Interpretation extends Fields $type = ComponentbuilderHelper::safeString($filter['custom']['type'], 'F'); $otherFilter[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Set " . $CodeName . " Selection"; $otherFilter[] = $this->_t(2) . "\$this->" . $codeName . "Options = JFormHelper::loadFieldType('" . $type . "')->options;"; - $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " We do some sanitation for " . $Codename . " filter"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " We do some sanitation for " . $CodeName . " filter"; $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $codeName . "Options) &&"; $otherFilter[] = $this->_t(3) . "isset(\$this->" . $codeName . "Options[0]->value) &&"; $otherFilter[] = $this->_t(3) . "!" . $Component . "Helper::checkString(\$this->" . $codeName . "Options[0]->value))"; $otherFilter[] = $this->_t(2) . "{"; $otherFilter[] = $this->_t(3) . "unset(\$this->" . $codeName . "Options[0]);"; $otherFilter[] = $this->_t(2) . "}"; - $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load " . $Codename . " filter if it has values"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load " . $CodeName . " filter if it has values"; $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $codeName . "Options))"; $otherFilter[] = $this->_t(2) . "{"; $otherFilter[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " " . $CodeName . " Filter"; diff --git a/admin/views/admin_custom_tabs/tmpl/edit.php b/admin/views/admin_custom_tabs/tmpl/edit.php index f60c56f96..1c79ba18f 100644 --- a/admin/views/admin_custom_tabs/tmpl/edit.php +++ b/admin/views/admin_custom_tabs/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index 3b67bf0c1..278221f6f 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index bcf801c43..35293dbf6 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields_relations/tmpl/edit.php b/admin/views/admin_fields_relations/tmpl/edit.php index 8c3d119f5..732d6d559 100644 --- a/admin/views/admin_fields_relations/tmpl/edit.php +++ b/admin/views/admin_fields_relations/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 5fcfeeae8..9e7213dcc 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -199,7 +199,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/component_admin_views/tmpl/edit.php b/admin/views/component_admin_views/tmpl/edit.php index 2d2638c9b..6cd2c6d48 100644 --- a/admin/views/component_admin_views/tmpl/edit.php +++ b/admin/views/component_admin_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_config/tmpl/edit.php b/admin/views/component_config/tmpl/edit.php index 146a68db6..656539340 100644 --- a/admin/views/component_config/tmpl/edit.php +++ b/admin/views/component_config/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_custom_admin_menus/tmpl/edit.php b/admin/views/component_custom_admin_menus/tmpl/edit.php index 94a52643e..a6c005b35 100644 --- a/admin/views/component_custom_admin_menus/tmpl/edit.php +++ b/admin/views/component_custom_admin_menus/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_custom_admin_views/tmpl/edit.php b/admin/views/component_custom_admin_views/tmpl/edit.php index d07f1067a..b62b5dcee 100644 --- a/admin/views/component_custom_admin_views/tmpl/edit.php +++ b/admin/views/component_custom_admin_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index fc324dda5..6fbb3b9eb 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_files_folders/tmpl/edit.php b/admin/views/component_files_folders/tmpl/edit.php index 6a9c79eb6..1879c399a 100644 --- a/admin/views/component_files_folders/tmpl/edit.php +++ b/admin/views/component_files_folders/tmpl/edit.php @@ -111,7 +111,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_mysql_tweaks/tmpl/edit.php b/admin/views/component_mysql_tweaks/tmpl/edit.php index 67ac00d4b..9970e017b 100644 --- a/admin/views/component_mysql_tweaks/tmpl/edit.php +++ b/admin/views/component_mysql_tweaks/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_placeholders/tmpl/edit.php b/admin/views/component_placeholders/tmpl/edit.php index 0e7bcb08f..351192dcf 100644 --- a/admin/views/component_placeholders/tmpl/edit.php +++ b/admin/views/component_placeholders/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_site_views/tmpl/edit.php b/admin/views/component_site_views/tmpl/edit.php index b1027db93..536689b42 100644 --- a/admin/views/component_site_views/tmpl/edit.php +++ b/admin/views/component_site_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_updates/tmpl/edit.php b/admin/views/component_updates/tmpl/edit.php index e839286b4..4e44499ba 100644 --- a/admin/views/component_updates/tmpl/edit.php +++ b/admin/views/component_updates/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index 6a846c5d6..4e83cc5dc 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy // Set Main Get Name Selection $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; - // We do some sanitation for filter + // We do some sanitation for Main Get Name filter if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && isset($this->main_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) { unset($this->main_getNameOptions[0]); } - // Only load filter if it has values + // Only load Main Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->main_getNameOptions)) { // Main Get Name Filter diff --git a/admin/views/custom_code/tmpl/edit.php b/admin/views/custom_code/tmpl/edit.php index ef280be15..f8daef458 100644 --- a/admin/views/custom_code/tmpl/edit.php +++ b/admin/views/custom_code/tmpl/edit.php @@ -107,7 +107,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 08224edcc..db5ad1716 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Set Component System Name Selection $this->componentSystem_nameOptions = JFormHelper::loadFieldType('Component')->options; - // We do some sanitation for filter + // We do some sanitation for Component System Name filter if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions) && isset($this->componentSystem_nameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->componentSystem_nameOptions[0]->value)) { unset($this->componentSystem_nameOptions[0]); } - // Only load filter if it has values + // Only load Component System Name filter if it has values if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions)) { // Component System Name Filter diff --git a/admin/views/dynamic_get/tmpl/edit.php b/admin/views/dynamic_get/tmpl/edit.php index 24cb27a45..f1fb7a49a 100644 --- a/admin/views/dynamic_get/tmpl/edit.php +++ b/admin/views/dynamic_get/tmpl/edit.php @@ -150,7 +150,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 0c0e23432..c8d7469a8 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -138,7 +138,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index a6aa8de80..e630e565c 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -210,14 +210,14 @@ class ComponentbuilderViewFields extends JViewLegacy // Set Fieldtype Name Selection $this->fieldtypeNameOptions = JFormHelper::loadFieldType('Fieldtypes')->options; - // We do some sanitation for filter + // We do some sanitation for Fieldtype Name filter if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions) && isset($this->fieldtypeNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->fieldtypeNameOptions[0]->value)) { unset($this->fieldtypeNameOptions[0]); } - // Only load filter if it has values + // Only load Fieldtype Name filter if it has values if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions)) { // Fieldtype Name Filter diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 70d7950b2..c7b73a222 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -130,7 +130,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 69d6aa117..9aa5e5226 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -107,7 +107,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index e6c9ffc39..f8c689ace 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -248,14 +248,14 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Set Admin View Selection $this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options; - // We do some sanitation for Location filter + // We do some sanitation for Admin View filter if (ComponentbuilderHelper::checkArray($this->admin_viewOptions) && isset($this->admin_viewOptions[0]->value) && !ComponentbuilderHelper::checkString($this->admin_viewOptions[0]->value)) { unset($this->admin_viewOptions[0]); } - // Only load Location filter if it has values + // Only load Admin View filter if it has values if (ComponentbuilderHelper::checkArray($this->admin_viewOptions)) { // Admin View Filter @@ -278,14 +278,14 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Set Site View Selection $this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options; - // We do some sanitation for Location filter + // We do some sanitation for Site View filter if (ComponentbuilderHelper::checkArray($this->site_viewOptions) && isset($this->site_viewOptions[0]->value) && !ComponentbuilderHelper::checkString($this->site_viewOptions[0]->value)) { unset($this->site_viewOptions[0]); } - // Only load Location filter if it has values + // Only load Site View filter if it has values if (ComponentbuilderHelper::checkArray($this->site_viewOptions)) { // Site View Filter diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 9fb086a8d..e34b2ad7b 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -216,7 +216,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/language/tmpl/edit.php b/admin/views/language/tmpl/edit.php index 0cf99de05..1f7611150 100644 --- a/admin/views/language/tmpl/edit.php +++ b/admin/views/language/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/language_translation/tmpl/edit.php b/admin/views/language_translation/tmpl/edit.php index 18e8ac1f4..942618c09 100644 --- a/admin/views/language_translation/tmpl/edit.php +++ b/admin/views/language_translation/tmpl/edit.php @@ -100,7 +100,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 5073b0f94..1d5d0348e 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewLayouts extends JViewLegacy // Set Dynamic Get Name Selection $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; - // We do some sanitation for filter + // We do some sanitation for Dynamic Get Name filter if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && isset($this->dynamic_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) { unset($this->dynamic_getNameOptions[0]); } - // Only load filter if it has values + // Only load Dynamic Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions)) { // Dynamic Get Name Filter diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 750b54488..65f000fb1 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -183,14 +183,14 @@ class ComponentbuilderViewLibraries extends JViewLegacy // Set How Selection $this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->options; - // We do some sanitation for filter + // We do some sanitation for How filter if (ComponentbuilderHelper::checkArray($this->howOptions) && isset($this->howOptions[0]->value) && !ComponentbuilderHelper::checkString($this->howOptions[0]->value)) { unset($this->howOptions[0]); } - // Only load filter if it has values + // Only load How filter if it has values if (ComponentbuilderHelper::checkArray($this->howOptions)) { // How Filter diff --git a/admin/views/library/tmpl/edit.php b/admin/views/library/tmpl/edit.php index 18884165b..a3486484a 100644 --- a/admin/views/library/tmpl/edit.php +++ b/admin/views/library/tmpl/edit.php @@ -137,7 +137,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/library_config/tmpl/edit.php b/admin/views/library_config/tmpl/edit.php index 05b4afd7a..fb54628a5 100644 --- a/admin/views/library_config/tmpl/edit.php +++ b/admin/views/library_config/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/library_files_folders_urls/tmpl/edit.php b/admin/views/library_files_folders_urls/tmpl/edit.php index 06150a6d3..0945a0a3f 100644 --- a/admin/views/library_files_folders_urls/tmpl/edit.php +++ b/admin/views/library_files_folders_urls/tmpl/edit.php @@ -111,7 +111,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/placeholder/tmpl/edit.php b/admin/views/placeholder/tmpl/edit.php index 7bfa7109d..86a95b352 100644 --- a/admin/views/placeholder/tmpl/edit.php +++ b/admin/views/placeholder/tmpl/edit.php @@ -106,7 +106,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/server/tmpl/edit.php b/admin/views/server/tmpl/edit.php index 649ae69c1..a31794b6f 100644 --- a/admin/views/server/tmpl/edit.php +++ b/admin/views/server/tmpl/edit.php @@ -119,7 +119,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index ed2558801..26fb9cbf2 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewSite_views extends JViewLegacy // Set Main Get Name Selection $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; - // We do some sanitation for filter + // We do some sanitation for Main Get Name filter if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && isset($this->main_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) { unset($this->main_getNameOptions[0]); } - // Only load filter if it has values + // Only load Main Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->main_getNameOptions)) { // Main Get Name Filter diff --git a/admin/views/snippet/tmpl/edit.php b/admin/views/snippet/tmpl/edit.php index 155977b34..712485f5d 100644 --- a/admin/views/snippet/tmpl/edit.php +++ b/admin/views/snippet/tmpl/edit.php @@ -96,7 +96,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/snippet_type/tmpl/edit.php b/admin/views/snippet_type/tmpl/edit.php index 642aaa3e2..3229d5f76 100644 --- a/admin/views/snippet_type/tmpl/edit.php +++ b/admin/views/snippet_type/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index ac86ec282..d5fce4fb1 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -198,14 +198,14 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Set Type Name Selection $this->typeNameOptions = JFormHelper::loadFieldType('Snippettype')->options; - // We do some sanitation for filter + // We do some sanitation for Type Name filter if (ComponentbuilderHelper::checkArray($this->typeNameOptions) && isset($this->typeNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->typeNameOptions[0]->value)) { unset($this->typeNameOptions[0]); } - // Only load filter if it has values + // Only load Type Name filter if it has values if (ComponentbuilderHelper::checkArray($this->typeNameOptions)) { // Type Name Filter @@ -228,14 +228,14 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Set Library Name Selection $this->libraryNameOptions = JFormHelper::loadFieldType('Library')->options; - // We do some sanitation for filter + // We do some sanitation for Library Name filter if (ComponentbuilderHelper::checkArray($this->libraryNameOptions) && isset($this->libraryNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->libraryNameOptions[0]->value)) { unset($this->libraryNameOptions[0]); } - // Only load filter if it has values + // Only load Library Name filter if it has values if (ComponentbuilderHelper::checkArray($this->libraryNameOptions)) { // Library Name Filter diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 482e94779..2875b164c 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewTemplates extends JViewLegacy // Set Dynamic Get Name Selection $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; - // We do some sanitation for filter + // We do some sanitation for Dynamic Get Name filter if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && isset($this->dynamic_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) { unset($this->dynamic_getNameOptions[0]); } - // Only load filter if it has values + // Only load Dynamic Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions)) { // Dynamic Get Name Filter diff --git a/admin/views/validation_rule/tmpl/edit.php b/admin/views/validation_rule/tmpl/edit.php index 5a7f2e736..d12d3b46a 100644 --- a/admin/views/validation_rule/tmpl/edit.php +++ b/admin/views/validation_rule/tmpl/edit.php @@ -107,7 +107,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - -- 2.40.1 From c8b5993219cfd37df84410f6467287780ddde0bf Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 11 Jun 2019 14:37:12 +0200 Subject: [PATCH 13/26] Fixed gh-420 to allow the linked site view to save correctly. --- README.md | 4 +-- admin/README.txt | 4 +-- admin/models/fields/adminsviews.php | 33 ++++++++++--------- admin/models/forms/component_admin_views.xml | 10 ------ .../forms/component_custom_admin_menus.xml | 5 --- .../forms/component_custom_admin_views.xml | 9 ----- .../models/forms/component_files_folders.xml | 4 --- admin/models/forms/component_site_views.xml | 5 --- .../forms/library_files_folders_urls.xml | 4 --- componentbuilder.xml | 2 +- 10 files changed, 22 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index e04a07bd7..de45167cb 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*: 9th June, 2019 ++ *Last Build*: 11th June, 2019 + *Version*: 2.9.18 + *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*: **206638** ++ *Line count*: **206602** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index e04a07bd7..de45167cb 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*: 9th June, 2019 ++ *Last Build*: 11th June, 2019 + *Version*: 2.9.18 + *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*: **206638** ++ *Line count*: **206602** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/models/fields/adminsviews.php b/admin/models/fields/adminsviews.php index b459a6a64..6c0728229 100644 --- a/admin/models/fields/adminsviews.php +++ b/admin/models/fields/adminsviews.php @@ -35,22 +35,23 @@ class JFormFieldAdminsviews extends JFormFieldList */ protected function getOptions() { - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name'))); - $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); - $query->order('a.system_name ASC'); - $db->setQuery((string)$query); - $items = $db->loadObjectList(); - $options = array(); - if ($items) - { - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->id, $item->adminviews_system_name); - } - } + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->adminviews_system_name); + } + } + return $options; } } diff --git a/admin/models/forms/component_admin_views.xml b/admin/models/forms/component_admin_views.xml index 4a59ffc99..7236ff821 100644 --- a/admin/models/forms/component_admin_views.xml +++ b/admin/models/forms/component_admin_views.xml @@ -560,7 +560,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MAINMENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MAINMENU_DESCRIPTION" class="inputbox" /> @@ -571,7 +570,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_ADD_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_ADD_DESCRIPTION" class="inputbox" /> @@ -582,7 +580,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_LIST_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_LIST_DESCRIPTION" class="inputbox" /> @@ -593,7 +590,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SUBMENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SUBMENU_DESCRIPTION" class="inputbox" /> @@ -604,7 +600,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKIN_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKIN_DESCRIPTION" class="inputbox" /> @@ -615,7 +610,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HISTORY_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HISTORY_DESCRIPTION" class="inputbox" /> @@ -626,7 +620,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_FIELDS_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_FIELDS_DESCRIPTION" class="inputbox" /> @@ -637,7 +630,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_METADATA_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_METADATA_DESCRIPTION" class="inputbox" /> @@ -648,7 +640,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_DESCRIPTION" class="inputbox" /> @@ -659,7 +650,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PORT_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PORT_DESCRIPTION" class="inputbox" /> diff --git a/admin/models/forms/component_custom_admin_menus.xml b/admin/models/forms/component_custom_admin_menus.xml index fe82909b8..066fbc9f4 100644 --- a/admin/models/forms/component_custom_admin_menus.xml +++ b/admin/models/forms/component_custom_admin_menus.xml @@ -172,7 +172,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MAINMENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MAINMENU_DESCRIPTION" class="inputbox" /> @@ -183,7 +182,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_DASHBOARD_LIST_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_DASHBOARD_LIST_DESCRIPTION" class="inputbox" /> @@ -194,7 +192,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SUBMENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SUBMENU_DESCRIPTION" class="inputbox" /> @@ -206,8 +203,6 @@ description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_BEFORE_DESCRIPTION" class="list_class fieldMedium" multiple="false" - default="" - required="true" button="false" /> diff --git a/admin/models/forms/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml index adbade988..d4bb68794 100644 --- a/admin/models/forms/component_custom_admin_views.xml +++ b/admin/models/forms/component_custom_admin_views.xml @@ -558,7 +558,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MAINMENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MAINMENU_DESCRIPTION" class="inputbox" /> @@ -569,7 +568,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DASHBOARD_LIST_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DASHBOARD_LIST_DESCRIPTION" class="inputbox" /> @@ -580,7 +578,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SUBMENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SUBMENU_DESCRIPTION" class="inputbox" /> @@ -591,7 +588,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_METADATA_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_METADATA_DESCRIPTION" class="inputbox" /> @@ -602,7 +598,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ACCESS_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ACCESS_DESCRIPTION" class="inputbox" /> @@ -614,8 +609,6 @@ description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADMINVIEWS_DESCRIPTION" class="fieldMedium" multiple="true" - default="" - required="true" button="false" /> @@ -626,8 +619,6 @@ description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BEFORE_DESCRIPTION" class="list_class fieldMedium" multiple="false" - default="" - required="true" button="false" /> diff --git a/admin/models/forms/component_files_folders.xml b/admin/models/forms/component_files_folders.xml index b3545f0a4..bafddc473 100644 --- a/admin/models/forms/component_files_folders.xml +++ b/admin/models/forms/component_files_folders.xml @@ -149,7 +149,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_RENAME_LABEL" value="1" default="" - required="true" class="inputbox" /> @@ -205,7 +204,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION" class="inputbox" /> @@ -259,7 +257,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_RENAME_LABEL" value="1" default="" - required="true" class="inputbox" /> @@ -312,7 +309,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION" class="inputbox" /> diff --git a/admin/models/forms/component_site_views.xml b/admin/models/forms/component_site_views.xml index fbccadb38..69519b668 100644 --- a/admin/models/forms/component_site_views.xml +++ b/admin/models/forms/component_site_views.xml @@ -128,7 +128,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_DESCRIPTION" class="inputbox" /> @@ -139,7 +138,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_DESCRIPTION" class="inputbox" /> @@ -150,7 +148,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_DESCRIPTION" class="inputbox" /> @@ -161,7 +158,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_LABEL" value="1" default="1" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION" class="inputbox" /> @@ -172,7 +168,6 @@ label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_DESCRIPTION" class="inputbox" /> diff --git a/admin/models/forms/library_files_folders_urls.xml b/admin/models/forms/library_files_folders_urls.xml index 3334baa9f..d7e733258 100644 --- a/admin/models/forms/library_files_folders_urls.xml +++ b/admin/models/forms/library_files_folders_urls.xml @@ -148,7 +148,6 @@ label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_RENAME_LABEL" value="1" default="" - required="true" class="inputbox" /> @@ -204,7 +203,6 @@ label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_DESCRIPTION" class="inputbox" /> @@ -258,7 +256,6 @@ label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_RENAME_LABEL" value="1" default="" - required="true" class="inputbox" /> @@ -311,7 +308,6 @@ label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_LABEL" value="1" default="" - required="true" description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_DESCRIPTION" class="inputbox" /> diff --git a/componentbuilder.xml b/componentbuilder.xml index a15554311..ae52ac6cf 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 9th June, 2019 + 11th June, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1 From eae13dff06484354b5733df3c5b27aa6b1b4bbd0 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 12 Jun 2019 22:06:19 +0200 Subject: [PATCH 14/26] Resolved gh-418 by adding an on before cancel custom script area to the admin view. --- README.md | 12 +- admin/README.txt | 12 +- admin/compiler/joomla_3/JControllerForm.php | 2 +- admin/helpers/compiler/a_Get.php | 2 +- admin/helpers/compiler/f_Infusion.php | 4 + .../en-GB/en-GB.com_componentbuilder.ini | 9 +- admin/layouts/admin_view/php_fullwidth.php | 2 + admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../server/linked_components_fullwidth.php | 2 +- admin/models/admin_view.php | 180 +-- admin/models/admin_views.php | 26 +- admin/models/fieldtype.php | 12 +- admin/models/forms/admin_view.js | 456 +++--- admin/models/forms/admin_view.xml | 1169 +++++++-------- admin/models/forms/custom_admin_view.js | 354 ++--- admin/models/forms/custom_code.js | 76 +- admin/models/forms/dynamic_get.js | 1252 ++++++++--------- admin/models/forms/field.js | 428 +++--- admin/models/forms/fieldtype.js | 632 ++++----- admin/models/forms/help_document.js | 234 +-- admin/models/forms/layout.js | 20 +- admin/models/forms/library.js | 188 +-- admin/models/forms/server.js | 560 ++++---- admin/models/forms/site_view.js | 350 ++--- admin/models/forms/template.js | 20 +- admin/models/server.php | 2 +- admin/sql/install.mysql.utf8.sql | 27 +- admin/sql/updates/mysql/2.9.18.sql | 3 + admin/views/admin_view/tmpl/edit.php | 209 +-- admin/views/custom_admin_view/tmpl/edit.php | 100 +- admin/views/custom_code/tmpl/edit.php | 114 +- admin/views/dynamic_get/tmpl/edit.php | 336 ++--- admin/views/field/tmpl/edit.php | 132 +- admin/views/fieldtype/tmpl/edit.php | 412 +++--- admin/views/fieldtype/view.html.php | 2 +- admin/views/help_document/tmpl/edit.php | 54 +- admin/views/layout/tmpl/edit.php | 10 +- admin/views/library/tmpl/edit.php | 40 +- admin/views/server/tmpl/edit.php | 156 +- admin/views/server/view.html.php | 2 +- admin/views/site_view/tmpl/edit.php | 110 +- admin/views/template/tmpl/edit.php | 10 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 17 + script.php | 10 +- 45 files changed, 3943 insertions(+), 3813 deletions(-) create mode 100644 admin/sql/updates/mysql/2.9.18.sql diff --git a/README.md b/README.md index de45167cb..088ed10a2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.18) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.19) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -146,13 +146,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 11th June, 2019 -+ *Version*: 2.9.18 ++ *Last Build*: 12th June, 2019 ++ *Version*: 2.9.19 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206602** -+ *Field count*: **1136** -+ *File count*: **1344** ++ *Line count*: **206728** ++ *Field count*: **1138** ++ *File count*: **1345** + *Folder count*: **209** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index de45167cb..088ed10a2 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.18) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.19) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -146,13 +146,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 11th June, 2019 -+ *Version*: 2.9.18 ++ *Last Build*: 12th June, 2019 ++ *Version*: 2.9.19 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206602** -+ *Field count*: **1136** -+ *File count*: **1344** ++ *Line count*: **206728** ++ *Field count*: **1138** ++ *File count*: **1345** + *Folder count*: **209** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/JControllerForm.php b/admin/compiler/joomla_3/JControllerForm.php index 305a23fec..d5700c152 100644 --- a/admin/compiler/joomla_3/JControllerForm.php +++ b/admin/compiler/joomla_3/JControllerForm.php @@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm $this->refid = $this->input->get('refid', 0, 'int'); // Check if there is a return value - $return = $this->input->get('return', null, 'base64'); + $return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL### $cancel = parent::cancel($key); diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 3d5c81d8b..48fe02d08 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2046,7 +2046,7 @@ class Get } } // add_php - $addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document'); + $addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_cancel', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document'); foreach ($addArrayP as $scripter) { if (isset($view->{'add_' . $scripter}) && $view->{'add_' . $scripter} == 1) diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index af5d955c4..cfe129b60 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -527,9 +527,13 @@ class Infusion extends Interpretation // BATCH_ONCLICK_CANCEL_SCRIPT <<>> $this->fileContentDynamic[$viewName_list][$this->hhh . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh] = ''; // TODO <-- must still be build + // JCONTROLLERFORM_ALLOWADD <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh] = $this->setJcontrollerAllowAdd($viewName_single, $viewName_list); + // JCONTROLLERFORM_BEFORECANCEL <<>> + $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_before_cancel', $viewName_single, PHP_EOL, null, null, ''); + // JCONTROLLERFORM_ALLOWEDIT <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh] = $this->setJcontrollerAllowEdit($viewName_single, $viewName_list); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index ce57c939c..ca9b1b4d1 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -496,7 +496,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_NEW_CLOSE_BUTTON="Add New + New & Close COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE="Add Php After Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL="Add PHP (script - after delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH="Add Php After Publish" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after publish)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after state change)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX="Add Php Ajax" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL="Add PHP (AJAX)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD="Add Php Allowadd" @@ -507,10 +507,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY="Add Php Batchcopy" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL="Add PHP (batchCopy Method)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE="Add Php Batchmove" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL="Add PHP (batchMove Method)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL="Add Php Before Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL_LABEL="Add PHP (script - before cancel)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE="Add Php Before Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL="Add PHP (script - before delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH="Add Php Before Publish" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before publish)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before state change)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE="Add Php Before Save" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL="Add PHP (save Method - before data modeling)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT="Add Php Document" @@ -990,6 +992,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL="PHP batchCopy Method
< COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE="Php Batchmove" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION="Add PHP Here that should run in the batchMove Method. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL="PHP batchMove Method
submitted values are in $values, id's are in $pks" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL="Php Before Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_DESCRIPTION="Add PHP Here that should run in the Cancel Method before cancel. Do not add the php tags." +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_LABEL="PHP Cancel Method before
(string) $key is the name of the primary key of the URL variable." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE="Php Before Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION="Add PHP Here that should run in the delete Method before items are deleted. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL="PHP delete Method
Target (array) $pks is an array of record primary keys." diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index 0e66638d4..32e231549 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -38,6 +38,8 @@ $fields = $displayData->get('fields') ?: array( 'php_allowadd', 'add_php_allowedit', 'php_allowedit', + 'add_php_before_cancel', + 'php_before_cancel', 'add_php_batchcopy', 'php_batchcopy', 'add_php_batchmove', diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 9e78718bf..be5611b20 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wapfields; +$items = $displayData->waqfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 1b07ca66f..14a1587a7 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wazlinked_components; +$items = $displayData->wbalinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index f456d2198..ae0ec90f7 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -86,12 +86,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->php_import_headers)) - { - // base64 Decode php_import_headers. - $item->php_import_headers = base64_decode($item->php_import_headers); - } - if (!empty($item->html_import_view)) { // base64 Decode html_import_view. @@ -104,10 +98,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_save = base64_decode($item->php_import_save); } - if (!empty($item->php_getitems)) + if (!empty($item->php_import_headers)) { - // base64 Decode php_getitems. - $item->php_getitems = base64_decode($item->php_getitems); + // base64 Decode php_import_headers. + $item->php_import_headers = base64_decode($item->php_import_headers); } if (!empty($item->php_getitems_after_all)) @@ -182,42 +176,48 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->javascript_view_footer = base64_decode($item->javascript_view_footer); } + if (!empty($item->php_before_cancel)) + { + // base64 Decode php_before_cancel. + $item->php_before_cancel = base64_decode($item->php_before_cancel); + } + if (!empty($item->php_batchcopy)) { // base64 Decode php_batchcopy. $item->php_batchcopy = base64_decode($item->php_batchcopy); } - if (!empty($item->php_batchmove)) - { - // base64 Decode php_batchmove. - $item->php_batchmove = base64_decode($item->php_batchmove); - } - if (!empty($item->javascript_views_file)) { // base64 Decode javascript_views_file. $item->javascript_views_file = base64_decode($item->javascript_views_file); } + if (!empty($item->php_batchmove)) + { + // base64 Decode php_batchmove. + $item->php_batchmove = base64_decode($item->php_batchmove); + } + if (!empty($item->php_before_publish)) { // base64 Decode php_before_publish. $item->php_before_publish = base64_decode($item->php_before_publish); } - if (!empty($item->php_after_publish)) - { - // base64 Decode php_after_publish. - $item->php_after_publish = base64_decode($item->php_after_publish); - } - if (!empty($item->javascript_views_footer)) { // base64 Decode javascript_views_footer. $item->javascript_views_footer = base64_decode($item->javascript_views_footer); } + if (!empty($item->php_after_publish)) + { + // base64 Decode php_after_publish. + $item->php_after_publish = base64_decode($item->php_after_publish); + } + if (!empty($item->php_before_delete)) { // base64 Decode php_before_delete. @@ -230,18 +230,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_after_delete = base64_decode($item->php_after_delete); } - if (!empty($item->php_document)) - { - // base64 Decode php_document. - $item->php_document = base64_decode($item->php_document); - } - if (!empty($item->php_controller)) { // base64 Decode php_controller. $item->php_controller = base64_decode($item->php_controller); } + if (!empty($item->php_document)) + { + // base64 Decode php_document. + $item->php_document = base64_decode($item->php_document); + } + if (!empty($item->php_model)) { // base64 Decode php_model. @@ -284,30 +284,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import = base64_decode($item->php_import); } - if (!empty($item->php_import_setdata)) - { - // base64 Decode php_import_setdata. - $item->php_import_setdata = base64_decode($item->php_import_setdata); - } - if (!empty($item->php_getitem)) { // base64 Decode php_getitem. $item->php_getitem = base64_decode($item->php_getitem); } + if (!empty($item->php_import_setdata)) + { + // base64 Decode php_import_setdata. + $item->php_import_setdata = base64_decode($item->php_import_setdata); + } + if (!empty($item->php_import_ext)) { // base64 Decode php_import_ext. $item->php_import_ext = base64_decode($item->php_import_ext); } - if (!empty($item->addtables)) + if (!empty($item->php_getitems)) { - // Convert the addtables field to an array. - $addtables = new Registry; - $addtables->loadString($item->addtables); - $item->addtables = $addtables->toArray(); + // base64 Decode php_getitems. + $item->php_getitems = base64_decode($item->php_getitems); } if (!empty($item->addpermissions)) @@ -334,6 +332,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addlinked_views = $addlinked_views->toArray(); } + if (!empty($item->addtables)) + { + // Convert the addtables field to an array. + $addtables = new Registry; + $addtables->loadString($item->addtables); + $item->addtables = $addtables->toArray(); + } + if (!empty($item->alias_builder)) { // Convert the alias_builder field to an array. @@ -1238,19 +1244,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['system_name'] = $data['name_single']; } - // Set the addtables items to data. - if (isset($data['addtables']) && is_array($data['addtables'])) - { - $addtables = new JRegistry; - $addtables->loadArray($data['addtables']); - $data['addtables'] = (string) $addtables; - } - elseif (!isset($data['addtables'])) - { - // Set the empty addtables to data - $data['addtables'] = ''; - } - // Set the addpermissions items to data. if (isset($data['addpermissions']) && is_array($data['addpermissions'])) { @@ -1290,6 +1283,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addlinked_views'] = ''; } + // Set the addtables items to data. + if (isset($data['addtables']) && is_array($data['addtables'])) + { + $addtables = new JRegistry; + $addtables->loadArray($data['addtables']); + $data['addtables'] = (string) $addtables; + } + elseif (!isset($data['addtables'])) + { + // Set the empty addtables to data + $data['addtables'] = ''; + } + // Set the alias_builder items to data. if (isset($data['alias_builder']) && is_array($data['alias_builder'])) { @@ -1329,12 +1335,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['ajax_input'] = ''; } - // Set the php_import_headers string to base64 string. - if (isset($data['php_import_headers'])) - { - $data['php_import_headers'] = base64_encode($data['php_import_headers']); - } - // Set the html_import_view string to base64 string. if (isset($data['html_import_view'])) { @@ -1347,10 +1347,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_save'] = base64_encode($data['php_import_save']); } - // Set the php_getitems string to base64 string. - if (isset($data['php_getitems'])) + // Set the php_import_headers string to base64 string. + if (isset($data['php_import_headers'])) { - $data['php_getitems'] = base64_encode($data['php_getitems']); + $data['php_import_headers'] = base64_encode($data['php_import_headers']); } // Set the php_getitems_after_all string to base64 string. @@ -1425,42 +1425,48 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); } + // Set the php_before_cancel string to base64 string. + if (isset($data['php_before_cancel'])) + { + $data['php_before_cancel'] = base64_encode($data['php_before_cancel']); + } + // Set the php_batchcopy string to base64 string. if (isset($data['php_batchcopy'])) { $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); } - // Set the php_batchmove string to base64 string. - if (isset($data['php_batchmove'])) - { - $data['php_batchmove'] = base64_encode($data['php_batchmove']); - } - // Set the javascript_views_file string to base64 string. if (isset($data['javascript_views_file'])) { $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); } + // Set the php_batchmove string to base64 string. + if (isset($data['php_batchmove'])) + { + $data['php_batchmove'] = base64_encode($data['php_batchmove']); + } + // Set the php_before_publish string to base64 string. if (isset($data['php_before_publish'])) { $data['php_before_publish'] = base64_encode($data['php_before_publish']); } - // Set the php_after_publish string to base64 string. - if (isset($data['php_after_publish'])) - { - $data['php_after_publish'] = base64_encode($data['php_after_publish']); - } - // Set the javascript_views_footer string to base64 string. if (isset($data['javascript_views_footer'])) { $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); } + // Set the php_after_publish string to base64 string. + if (isset($data['php_after_publish'])) + { + $data['php_after_publish'] = base64_encode($data['php_after_publish']); + } + // Set the php_before_delete string to base64 string. if (isset($data['php_before_delete'])) { @@ -1473,18 +1479,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_after_delete'] = base64_encode($data['php_after_delete']); } - // Set the php_document string to base64 string. - if (isset($data['php_document'])) - { - $data['php_document'] = base64_encode($data['php_document']); - } - // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { $data['php_controller'] = base64_encode($data['php_controller']); } + // Set the php_document string to base64 string. + if (isset($data['php_document'])) + { + $data['php_document'] = base64_encode($data['php_document']); + } + // Set the php_model string to base64 string. if (isset($data['php_model'])) { @@ -1527,22 +1533,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import'] = base64_encode($data['php_import']); } - // Set the php_import_setdata string to base64 string. - if (isset($data['php_import_setdata'])) - { - $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); - } - // Set the php_getitem string to base64 string. if (isset($data['php_getitem'])) { $data['php_getitem'] = base64_encode($data['php_getitem']); } + // Set the php_import_setdata string to base64 string. + if (isset($data['php_import_setdata'])) + { + $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); + } + // Set the php_import_ext string to base64 string. if (isset($data['php_import_ext'])) { $data['php_import_ext'] = base64_encode($data['php_import_ext']); + } + + // Set the php_getitems string to base64 string. + if (isset($data['php_getitems'])) + { + $data['php_getitems'] = base64_encode($data['php_getitems']); } // Set the Params Items to data diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 6ee4f09f9..d45f5217b 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -376,14 +376,12 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode php_import_headers - $item->php_import_headers = base64_decode($item->php_import_headers); // decode html_import_view $item->html_import_view = base64_decode($item->html_import_view); // decode php_import_save $item->php_import_save = base64_decode($item->php_import_save); - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); + // decode php_import_headers + $item->php_import_headers = base64_decode($item->php_import_headers); // decode php_getitems_after_all $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); // decode php_getlistquery @@ -408,26 +406,28 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_allowedit = base64_decode($item->php_allowedit); // decode javascript_view_footer $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + // decode php_before_cancel + $item->php_before_cancel = base64_decode($item->php_before_cancel); // decode php_batchcopy $item->php_batchcopy = base64_decode($item->php_batchcopy); - // decode php_batchmove - $item->php_batchmove = base64_decode($item->php_batchmove); // decode javascript_views_file $item->javascript_views_file = base64_decode($item->javascript_views_file); + // decode php_batchmove + $item->php_batchmove = base64_decode($item->php_batchmove); // decode php_before_publish $item->php_before_publish = base64_decode($item->php_before_publish); - // decode php_after_publish - $item->php_after_publish = base64_decode($item->php_after_publish); // decode javascript_views_footer $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + // decode php_after_publish + $item->php_after_publish = base64_decode($item->php_after_publish); // decode php_before_delete $item->php_before_delete = base64_decode($item->php_before_delete); // decode php_after_delete $item->php_after_delete = base64_decode($item->php_after_delete); - // decode php_document - $item->php_document = base64_decode($item->php_document); // decode php_controller $item->php_controller = base64_decode($item->php_controller); + // decode php_document + $item->php_document = base64_decode($item->php_document); // decode php_model $item->php_model = base64_decode($item->php_model); // decode php_controller_list @@ -442,12 +442,14 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_import_display = base64_decode($item->php_import_display); // decode php_import $item->php_import = base64_decode($item->php_import); - // decode php_import_setdata - $item->php_import_setdata = base64_decode($item->php_import_setdata); // decode php_getitem $item->php_getitem = base64_decode($item->php_getitem); + // decode php_import_setdata + $item->php_import_setdata = base64_decode($item->php_import_setdata); // decode php_import_ext $item->php_import_ext = base64_decode($item->php_import_ext); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 6a2d0300e..23c476ebb 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -155,7 +155,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWapfields() + public function getWaqfields() { // Get the user object. $user = JFactory::getUser(); @@ -237,13 +237,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationWapfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationWaqfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationWapfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationWaqfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationWapfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationWaqfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationWapfields($item->store, 'store'); + $item->store = $this->selectionTranslationWaqfields($item->store, 'store'); } } @@ -257,7 +257,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationWapfields($value,$name) + public function selectionTranslationWaqfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index 8e894c1c6..7feaaf4f8 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -35,17 +35,18 @@ jform_vvvvvxxvxn_required = false; jform_vvvvvxyvxo_required = false; jform_vvvvvxzvxp_required = false; jform_vvvvvyavxq_required = false; -jform_vvvvvyevxr_required = false; -jform_vvvvvyevxs_required = false; -jform_vvvvvyevxt_required = false; -jform_vvvvvyevxu_required = false; -jform_vvvvvyevxv_required = false; -jform_vvvvvyevxw_required = false; -jform_vvvvvyevxx_required = false; -jform_vvvvvygvxy_required = false; -jform_vvvvvygvxz_required = false; -jform_vvvvvygvya_required = false; -jform_vvvvvygvyb_required = false; +jform_vvvvvybvxr_required = false; +jform_vvvvvyfvxs_required = false; +jform_vvvvvyfvxt_required = false; +jform_vvvvvyfvxu_required = false; +jform_vvvvvyfvxv_required = false; +jform_vvvvvyfvxw_required = false; +jform_vvvvvyfvxx_required = false; +jform_vvvvvyfvxy_required = false; +jform_vvvvvyhvxz_required = false; +jform_vvvvvyhvya_required = false; +jform_vvvvvyhvyb_required = false; +jform_vvvvvyhvyc_required = false; // Initial Script jQuery(document).ready(function() @@ -101,46 +102,49 @@ jQuery(document).ready(function() var add_php_allowedit_vvvvvxr = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); vvvvvxr(add_php_allowedit_vvvvvxr); - var add_php_batchcopy_vvvvvxs = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxs(add_php_batchcopy_vvvvvxs); + var add_php_before_cancel_vvvvvxs = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvxs(add_php_before_cancel_vvvvvxs); - var add_php_batchmove_vvvvvxt = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxt(add_php_batchmove_vvvvvxt); + var add_php_batchcopy_vvvvvxt = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxt(add_php_batchcopy_vvvvvxt); - var add_php_before_publish_vvvvvxu = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxu(add_php_before_publish_vvvvvxu); + var add_php_batchmove_vvvvvxu = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxu(add_php_batchmove_vvvvvxu); - var add_php_after_publish_vvvvvxv = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxv(add_php_after_publish_vvvvvxv); + var add_php_before_publish_vvvvvxv = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxv(add_php_before_publish_vvvvvxv); - var add_php_before_delete_vvvvvxw = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxw(add_php_before_delete_vvvvvxw); + var add_php_after_publish_vvvvvxw = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxw(add_php_after_publish_vvvvvxw); - var add_php_after_delete_vvvvvxx = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxx(add_php_after_delete_vvvvvxx); + var add_php_before_delete_vvvvvxx = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvxx(add_php_before_delete_vvvvvxx); - var add_php_document_vvvvvxy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvxy(add_php_document_vvvvvxy); + var add_php_after_delete_vvvvvxy = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvxy(add_php_after_delete_vvvvvxy); - var add_sql_vvvvvxz = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxz(add_sql_vvvvvxz); + var add_php_document_vvvvvxz = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvxz(add_php_document_vvvvvxz); - var source_vvvvvya = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvya = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvya(source_vvvvvya,add_sql_vvvvvya); + vvvvvya(add_sql_vvvvvya); - var source_vvvvvyc = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvyc = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc); + var source_vvvvvyb = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyb = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyb(source_vvvvvyb,add_sql_vvvvvyb); - var add_custom_import_vvvvvye = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvye(add_custom_import_vvvvvye); + var source_vvvvvyd = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvyd = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyd(source_vvvvvyd,add_sql_vvvvvyd); var add_custom_import_vvvvvyf = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvvyf(add_custom_import_vvvvvyf); - var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyg(add_custom_button_vvvvvyg); + var add_custom_import_vvvvvyg = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyg(add_custom_import_vvvvvyg); + + var add_custom_button_vvvvvyh = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyh(add_custom_button_vvvvvyh); }); // the vvvvvxb function @@ -690,298 +694,330 @@ function vvvvvxr(add_php_allowedit_vvvvvxr) } // the vvvvvxs function -function vvvvvxs(add_php_batchcopy_vvvvvxs) +function vvvvvxs(add_php_before_cancel_vvvvvxs) { // set the function logic - if (add_php_batchcopy_vvvvvxs == 1) + if (add_php_before_cancel_vvvvvxs == 1) { - jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); - // add required attribute to php_batchcopy field + jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show(); + // add required attribute to php_before_cancel field if (jform_vvvvvxsvxi_required) { - updateFieldRequired('php_batchcopy',0); - jQuery('#jform_php_batchcopy').prop('required','required'); - jQuery('#jform_php_batchcopy').attr('aria-required',true); - jQuery('#jform_php_batchcopy').addClass('required'); + updateFieldRequired('php_before_cancel',0); + jQuery('#jform_php_before_cancel').prop('required','required'); + jQuery('#jform_php_before_cancel').attr('aria-required',true); + jQuery('#jform_php_before_cancel').addClass('required'); jform_vvvvvxsvxi_required = false; } } else { - jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide(); - // remove required attribute from php_batchcopy field + jQuery('#jform_php_before_cancel-lbl').closest('.control-group').hide(); + // remove required attribute from php_before_cancel field if (!jform_vvvvvxsvxi_required) { - updateFieldRequired('php_batchcopy',1); - jQuery('#jform_php_batchcopy').removeAttr('required'); - jQuery('#jform_php_batchcopy').removeAttr('aria-required'); - jQuery('#jform_php_batchcopy').removeClass('required'); + updateFieldRequired('php_before_cancel',1); + jQuery('#jform_php_before_cancel').removeAttr('required'); + jQuery('#jform_php_before_cancel').removeAttr('aria-required'); + jQuery('#jform_php_before_cancel').removeClass('required'); jform_vvvvvxsvxi_required = true; } } } // the vvvvvxt function -function vvvvvxt(add_php_batchmove_vvvvvxt) +function vvvvvxt(add_php_batchcopy_vvvvvxt) { // set the function logic - if (add_php_batchmove_vvvvvxt == 1) + if (add_php_batchcopy_vvvvvxt == 1) { - jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); - // add required attribute to php_batchmove field + jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show(); + // add required attribute to php_batchcopy field if (jform_vvvvvxtvxj_required) { - updateFieldRequired('php_batchmove',0); - jQuery('#jform_php_batchmove').prop('required','required'); - jQuery('#jform_php_batchmove').attr('aria-required',true); - jQuery('#jform_php_batchmove').addClass('required'); + updateFieldRequired('php_batchcopy',0); + jQuery('#jform_php_batchcopy').prop('required','required'); + jQuery('#jform_php_batchcopy').attr('aria-required',true); + jQuery('#jform_php_batchcopy').addClass('required'); jform_vvvvvxtvxj_required = false; } } else { - jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide(); - // remove required attribute from php_batchmove field + jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide(); + // remove required attribute from php_batchcopy field if (!jform_vvvvvxtvxj_required) { - updateFieldRequired('php_batchmove',1); - jQuery('#jform_php_batchmove').removeAttr('required'); - jQuery('#jform_php_batchmove').removeAttr('aria-required'); - jQuery('#jform_php_batchmove').removeClass('required'); + updateFieldRequired('php_batchcopy',1); + jQuery('#jform_php_batchcopy').removeAttr('required'); + jQuery('#jform_php_batchcopy').removeAttr('aria-required'); + jQuery('#jform_php_batchcopy').removeClass('required'); jform_vvvvvxtvxj_required = true; } } } // the vvvvvxu function -function vvvvvxu(add_php_before_publish_vvvvvxu) +function vvvvvxu(add_php_batchmove_vvvvvxu) { // set the function logic - if (add_php_before_publish_vvvvvxu == 1) + if (add_php_batchmove_vvvvvxu == 1) { - jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); - // add required attribute to php_before_publish field + jQuery('#jform_php_batchmove-lbl').closest('.control-group').show(); + // add required attribute to php_batchmove field if (jform_vvvvvxuvxk_required) { - updateFieldRequired('php_before_publish',0); - jQuery('#jform_php_before_publish').prop('required','required'); - jQuery('#jform_php_before_publish').attr('aria-required',true); - jQuery('#jform_php_before_publish').addClass('required'); + updateFieldRequired('php_batchmove',0); + jQuery('#jform_php_batchmove').prop('required','required'); + jQuery('#jform_php_batchmove').attr('aria-required',true); + jQuery('#jform_php_batchmove').addClass('required'); jform_vvvvvxuvxk_required = false; } } else { - jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_publish field + jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide(); + // remove required attribute from php_batchmove field if (!jform_vvvvvxuvxk_required) { - updateFieldRequired('php_before_publish',1); - jQuery('#jform_php_before_publish').removeAttr('required'); - jQuery('#jform_php_before_publish').removeAttr('aria-required'); - jQuery('#jform_php_before_publish').removeClass('required'); + updateFieldRequired('php_batchmove',1); + jQuery('#jform_php_batchmove').removeAttr('required'); + jQuery('#jform_php_batchmove').removeAttr('aria-required'); + jQuery('#jform_php_batchmove').removeClass('required'); jform_vvvvvxuvxk_required = true; } } } // the vvvvvxv function -function vvvvvxv(add_php_after_publish_vvvvvxv) +function vvvvvxv(add_php_before_publish_vvvvvxv) { // set the function logic - if (add_php_after_publish_vvvvvxv == 1) + if (add_php_before_publish_vvvvvxv == 1) { - jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); - // add required attribute to php_after_publish field + jQuery('#jform_php_before_publish-lbl').closest('.control-group').show(); + // add required attribute to php_before_publish field if (jform_vvvvvxvvxl_required) { - updateFieldRequired('php_after_publish',0); - jQuery('#jform_php_after_publish').prop('required','required'); - jQuery('#jform_php_after_publish').attr('aria-required',true); - jQuery('#jform_php_after_publish').addClass('required'); + updateFieldRequired('php_before_publish',0); + jQuery('#jform_php_before_publish').prop('required','required'); + jQuery('#jform_php_before_publish').attr('aria-required',true); + jQuery('#jform_php_before_publish').addClass('required'); jform_vvvvvxvvxl_required = false; } } else { - jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_publish field + jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide(); + // remove required attribute from php_before_publish field if (!jform_vvvvvxvvxl_required) { - updateFieldRequired('php_after_publish',1); - jQuery('#jform_php_after_publish').removeAttr('required'); - jQuery('#jform_php_after_publish').removeAttr('aria-required'); - jQuery('#jform_php_after_publish').removeClass('required'); + updateFieldRequired('php_before_publish',1); + jQuery('#jform_php_before_publish').removeAttr('required'); + jQuery('#jform_php_before_publish').removeAttr('aria-required'); + jQuery('#jform_php_before_publish').removeClass('required'); jform_vvvvvxvvxl_required = true; } } } // the vvvvvxw function -function vvvvvxw(add_php_before_delete_vvvvvxw) +function vvvvvxw(add_php_after_publish_vvvvvxw) { // set the function logic - if (add_php_before_delete_vvvvvxw == 1) + if (add_php_after_publish_vvvvvxw == 1) { - jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); - // add required attribute to php_before_delete field + jQuery('#jform_php_after_publish-lbl').closest('.control-group').show(); + // add required attribute to php_after_publish field if (jform_vvvvvxwvxm_required) { - updateFieldRequired('php_before_delete',0); - jQuery('#jform_php_before_delete').prop('required','required'); - jQuery('#jform_php_before_delete').attr('aria-required',true); - jQuery('#jform_php_before_delete').addClass('required'); + updateFieldRequired('php_after_publish',0); + jQuery('#jform_php_after_publish').prop('required','required'); + jQuery('#jform_php_after_publish').attr('aria-required',true); + jQuery('#jform_php_after_publish').addClass('required'); jform_vvvvvxwvxm_required = false; } } else { - jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide(); - // remove required attribute from php_before_delete field + jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide(); + // remove required attribute from php_after_publish field if (!jform_vvvvvxwvxm_required) { - updateFieldRequired('php_before_delete',1); - jQuery('#jform_php_before_delete').removeAttr('required'); - jQuery('#jform_php_before_delete').removeAttr('aria-required'); - jQuery('#jform_php_before_delete').removeClass('required'); + updateFieldRequired('php_after_publish',1); + jQuery('#jform_php_after_publish').removeAttr('required'); + jQuery('#jform_php_after_publish').removeAttr('aria-required'); + jQuery('#jform_php_after_publish').removeClass('required'); jform_vvvvvxwvxm_required = true; } } } // the vvvvvxx function -function vvvvvxx(add_php_after_delete_vvvvvxx) +function vvvvvxx(add_php_before_delete_vvvvvxx) { // set the function logic - if (add_php_after_delete_vvvvvxx == 1) + if (add_php_before_delete_vvvvvxx == 1) { - jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); - // add required attribute to php_after_delete field + jQuery('#jform_php_before_delete-lbl').closest('.control-group').show(); + // add required attribute to php_before_delete field if (jform_vvvvvxxvxn_required) { - updateFieldRequired('php_after_delete',0); - jQuery('#jform_php_after_delete').prop('required','required'); - jQuery('#jform_php_after_delete').attr('aria-required',true); - jQuery('#jform_php_after_delete').addClass('required'); + updateFieldRequired('php_before_delete',0); + jQuery('#jform_php_before_delete').prop('required','required'); + jQuery('#jform_php_before_delete').attr('aria-required',true); + jQuery('#jform_php_before_delete').addClass('required'); jform_vvvvvxxvxn_required = false; } } else { - jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide(); - // remove required attribute from php_after_delete field + jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide(); + // remove required attribute from php_before_delete field if (!jform_vvvvvxxvxn_required) { - updateFieldRequired('php_after_delete',1); - jQuery('#jform_php_after_delete').removeAttr('required'); - jQuery('#jform_php_after_delete').removeAttr('aria-required'); - jQuery('#jform_php_after_delete').removeClass('required'); + updateFieldRequired('php_before_delete',1); + jQuery('#jform_php_before_delete').removeAttr('required'); + jQuery('#jform_php_before_delete').removeAttr('aria-required'); + jQuery('#jform_php_before_delete').removeClass('required'); jform_vvvvvxxvxn_required = true; } } } // the vvvvvxy function -function vvvvvxy(add_php_document_vvvvvxy) +function vvvvvxy(add_php_after_delete_vvvvvxy) { // set the function logic - if (add_php_document_vvvvvxy == 1) + if (add_php_after_delete_vvvvvxy == 1) { - jQuery('#jform_php_document-lbl').closest('.control-group').show(); - // add required attribute to php_document field + jQuery('#jform_php_after_delete-lbl').closest('.control-group').show(); + // add required attribute to php_after_delete field if (jform_vvvvvxyvxo_required) { - updateFieldRequired('php_document',0); - jQuery('#jform_php_document').prop('required','required'); - jQuery('#jform_php_document').attr('aria-required',true); - jQuery('#jform_php_document').addClass('required'); + updateFieldRequired('php_after_delete',0); + jQuery('#jform_php_after_delete').prop('required','required'); + jQuery('#jform_php_after_delete').attr('aria-required',true); + jQuery('#jform_php_after_delete').addClass('required'); jform_vvvvvxyvxo_required = false; } } else { - jQuery('#jform_php_document-lbl').closest('.control-group').hide(); - // remove required attribute from php_document field + jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide(); + // remove required attribute from php_after_delete field if (!jform_vvvvvxyvxo_required) { - updateFieldRequired('php_document',1); - jQuery('#jform_php_document').removeAttr('required'); - jQuery('#jform_php_document').removeAttr('aria-required'); - jQuery('#jform_php_document').removeClass('required'); + updateFieldRequired('php_after_delete',1); + jQuery('#jform_php_after_delete').removeAttr('required'); + jQuery('#jform_php_after_delete').removeAttr('aria-required'); + jQuery('#jform_php_after_delete').removeClass('required'); jform_vvvvvxyvxo_required = true; } } } // the vvvvvxz function -function vvvvvxz(add_sql_vvvvvxz) +function vvvvvxz(add_php_document_vvvvvxz) { // set the function logic - if (add_sql_vvvvvxz == 1) + if (add_php_document_vvvvvxz == 1) { - jQuery('#jform_source').closest('.control-group').show(); - // add required attribute to source field + jQuery('#jform_php_document-lbl').closest('.control-group').show(); + // add required attribute to php_document field if (jform_vvvvvxzvxp_required) { - updateFieldRequired('source',0); - jQuery('#jform_source').prop('required','required'); - jQuery('#jform_source').attr('aria-required',true); - jQuery('#jform_source').addClass('required'); + updateFieldRequired('php_document',0); + jQuery('#jform_php_document').prop('required','required'); + jQuery('#jform_php_document').attr('aria-required',true); + jQuery('#jform_php_document').addClass('required'); jform_vvvvvxzvxp_required = false; } } else { - jQuery('#jform_source').closest('.control-group').hide(); - // remove required attribute from source field + jQuery('#jform_php_document-lbl').closest('.control-group').hide(); + // remove required attribute from php_document field if (!jform_vvvvvxzvxp_required) { - updateFieldRequired('source',1); - jQuery('#jform_source').removeAttr('required'); - jQuery('#jform_source').removeAttr('aria-required'); - jQuery('#jform_source').removeClass('required'); + updateFieldRequired('php_document',1); + jQuery('#jform_php_document').removeAttr('required'); + jQuery('#jform_php_document').removeAttr('aria-required'); + jQuery('#jform_php_document').removeClass('required'); jform_vvvvvxzvxp_required = true; } } } // the vvvvvya function -function vvvvvya(source_vvvvvya,add_sql_vvvvvya) +function vvvvvya(add_sql_vvvvvya) { // set the function logic - if (source_vvvvvya == 2 && add_sql_vvvvvya == 1) + if (add_sql_vvvvvya == 1) + { + jQuery('#jform_source').closest('.control-group').show(); + // add required attribute to source field + if (jform_vvvvvyavxq_required) + { + updateFieldRequired('source',0); + jQuery('#jform_source').prop('required','required'); + jQuery('#jform_source').attr('aria-required',true); + jQuery('#jform_source').addClass('required'); + jform_vvvvvyavxq_required = false; + } + } + else + { + jQuery('#jform_source').closest('.control-group').hide(); + // remove required attribute from source field + if (!jform_vvvvvyavxq_required) + { + updateFieldRequired('source',1); + jQuery('#jform_source').removeAttr('required'); + jQuery('#jform_source').removeAttr('aria-required'); + jQuery('#jform_source').removeClass('required'); + jform_vvvvvyavxq_required = true; + } + } +} + +// the vvvvvyb function +function vvvvvyb(source_vvvvvyb,add_sql_vvvvvyb) +{ + // set the function logic + if (source_vvvvvyb == 2 && add_sql_vvvvvyb == 1) { jQuery('#jform_sql').closest('.control-group').show(); // add required attribute to sql field - if (jform_vvvvvyavxq_required) + if (jform_vvvvvybvxr_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvyavxq_required = false; + jform_vvvvvybvxr_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); // remove required attribute from sql field - if (!jform_vvvvvyavxq_required) + if (!jform_vvvvvybvxr_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvyavxq_required = true; + jform_vvvvvybvxr_required = true; } } } -// the vvvvvyc function -function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) +// the vvvvvyd function +function vvvvvyd(source_vvvvvyd,add_sql_vvvvvyd) { // set the function logic - if (source_vvvvvyc == 1 && add_sql_vvvvvyc == 1) + if (source_vvvvvyd == 1 && add_sql_vvvvvyd == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -991,165 +1027,165 @@ function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc) } } -// the vvvvvye function -function vvvvvye(add_custom_import_vvvvvye) +// the vvvvvyf function +function vvvvvyf(add_custom_import_vvvvvyf) { // set the function logic - if (add_custom_import_vvvvvye == 1) + if (add_custom_import_vvvvvyf == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); // add required attribute to html_import_view field - if (jform_vvvvvyevxr_required) + if (jform_vvvvvyfvxs_required) { updateFieldRequired('html_import_view',0); jQuery('#jform_html_import_view').prop('required','required'); jQuery('#jform_html_import_view').attr('aria-required',true); jQuery('#jform_html_import_view').addClass('required'); - jform_vvvvvyevxr_required = false; + jform_vvvvvyfvxs_required = false; } jQuery('.note_advanced_import').closest('.control-group').show(); jQuery('#jform_php_import_display').closest('.control-group').show(); // add required attribute to php_import_display field - if (jform_vvvvvyevxs_required) + if (jform_vvvvvyfvxt_required) { updateFieldRequired('php_import_display',0); jQuery('#jform_php_import_display').prop('required','required'); jQuery('#jform_php_import_display').attr('aria-required',true); jQuery('#jform_php_import_display').addClass('required'); - jform_vvvvvyevxs_required = false; + jform_vvvvvyfvxt_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); // add required attribute to php_import_ext field - if (jform_vvvvvyevxt_required) + if (jform_vvvvvyfvxu_required) { updateFieldRequired('php_import_ext',0); jQuery('#jform_php_import_ext').prop('required','required'); jQuery('#jform_php_import_ext').attr('aria-required',true); jQuery('#jform_php_import_ext').addClass('required'); - jform_vvvvvyevxt_required = false; + jform_vvvvvyfvxu_required = false; } jQuery('#jform_php_import_headers').closest('.control-group').show(); // add required attribute to php_import_headers field - if (jform_vvvvvyevxu_required) + if (jform_vvvvvyfvxv_required) { updateFieldRequired('php_import_headers',0); jQuery('#jform_php_import_headers').prop('required','required'); jQuery('#jform_php_import_headers').attr('aria-required',true); jQuery('#jform_php_import_headers').addClass('required'); - jform_vvvvvyevxu_required = false; + jform_vvvvvyfvxv_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); // add required attribute to php_import field - if (jform_vvvvvyevxv_required) + if (jform_vvvvvyfvxw_required) { updateFieldRequired('php_import',0); jQuery('#jform_php_import').prop('required','required'); jQuery('#jform_php_import').attr('aria-required',true); jQuery('#jform_php_import').addClass('required'); - jform_vvvvvyevxv_required = false; + jform_vvvvvyfvxw_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); // add required attribute to php_import_save field - if (jform_vvvvvyevxw_required) + if (jform_vvvvvyfvxx_required) { updateFieldRequired('php_import_save',0); jQuery('#jform_php_import_save').prop('required','required'); jQuery('#jform_php_import_save').attr('aria-required',true); jQuery('#jform_php_import_save').addClass('required'); - jform_vvvvvyevxw_required = false; + jform_vvvvvyfvxx_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); // add required attribute to php_import_setdata field - if (jform_vvvvvyevxx_required) + if (jform_vvvvvyfvxy_required) { updateFieldRequired('php_import_setdata',0); jQuery('#jform_php_import_setdata').prop('required','required'); jQuery('#jform_php_import_setdata').attr('aria-required',true); jQuery('#jform_php_import_setdata').addClass('required'); - jform_vvvvvyevxx_required = false; + jform_vvvvvyfvxy_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); // remove required attribute from html_import_view field - if (!jform_vvvvvyevxr_required) + if (!jform_vvvvvyfvxs_required) { updateFieldRequired('html_import_view',1); jQuery('#jform_html_import_view').removeAttr('required'); jQuery('#jform_html_import_view').removeAttr('aria-required'); jQuery('#jform_html_import_view').removeClass('required'); - jform_vvvvvyevxr_required = true; + jform_vvvvvyfvxs_required = true; } jQuery('.note_advanced_import').closest('.control-group').hide(); jQuery('#jform_php_import_display').closest('.control-group').hide(); // remove required attribute from php_import_display field - if (!jform_vvvvvyevxs_required) + if (!jform_vvvvvyfvxt_required) { updateFieldRequired('php_import_display',1); jQuery('#jform_php_import_display').removeAttr('required'); jQuery('#jform_php_import_display').removeAttr('aria-required'); jQuery('#jform_php_import_display').removeClass('required'); - jform_vvvvvyevxs_required = true; + jform_vvvvvyfvxt_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); // remove required attribute from php_import_ext field - if (!jform_vvvvvyevxt_required) + if (!jform_vvvvvyfvxu_required) { updateFieldRequired('php_import_ext',1); jQuery('#jform_php_import_ext').removeAttr('required'); jQuery('#jform_php_import_ext').removeAttr('aria-required'); jQuery('#jform_php_import_ext').removeClass('required'); - jform_vvvvvyevxt_required = true; + jform_vvvvvyfvxu_required = true; } jQuery('#jform_php_import_headers').closest('.control-group').hide(); // remove required attribute from php_import_headers field - if (!jform_vvvvvyevxu_required) + if (!jform_vvvvvyfvxv_required) { updateFieldRequired('php_import_headers',1); jQuery('#jform_php_import_headers').removeAttr('required'); jQuery('#jform_php_import_headers').removeAttr('aria-required'); jQuery('#jform_php_import_headers').removeClass('required'); - jform_vvvvvyevxu_required = true; + jform_vvvvvyfvxv_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); // remove required attribute from php_import field - if (!jform_vvvvvyevxv_required) + if (!jform_vvvvvyfvxw_required) { updateFieldRequired('php_import',1); jQuery('#jform_php_import').removeAttr('required'); jQuery('#jform_php_import').removeAttr('aria-required'); jQuery('#jform_php_import').removeClass('required'); - jform_vvvvvyevxv_required = true; + jform_vvvvvyfvxw_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); // remove required attribute from php_import_save field - if (!jform_vvvvvyevxw_required) + if (!jform_vvvvvyfvxx_required) { updateFieldRequired('php_import_save',1); jQuery('#jform_php_import_save').removeAttr('required'); jQuery('#jform_php_import_save').removeAttr('aria-required'); jQuery('#jform_php_import_save').removeClass('required'); - jform_vvvvvyevxw_required = true; + jform_vvvvvyfvxx_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); // remove required attribute from php_import_setdata field - if (!jform_vvvvvyevxx_required) + if (!jform_vvvvvyfvxy_required) { updateFieldRequired('php_import_setdata',1); jQuery('#jform_php_import_setdata').removeAttr('required'); jQuery('#jform_php_import_setdata').removeAttr('aria-required'); jQuery('#jform_php_import_setdata').removeClass('required'); - jform_vvvvvyevxx_required = true; + jform_vvvvvyfvxy_required = true; } } } -// the vvvvvyf function -function vvvvvyf(add_custom_import_vvvvvyf) +// the vvvvvyg function +function vvvvvyg(add_custom_import_vvvvvyg) { // set the function logic - if (add_custom_import_vvvvvyf == 0) + if (add_custom_import_vvvvvyg == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -1159,52 +1195,52 @@ function vvvvvyf(add_custom_import_vvvvvyf) } } -// the vvvvvyg function -function vvvvvyg(add_custom_button_vvvvvyg) +// the vvvvvyh function +function vvvvvyh(add_custom_button_vvvvvyh) { // set the function logic - if (add_custom_button_vvvvvyg == 1) + if (add_custom_button_vvvvvyh == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller-lbl').closest('.control-group').show(); // add required attribute to php_controller field - if (jform_vvvvvygvxy_required) + if (jform_vvvvvyhvxz_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvygvxy_required = false; + jform_vvvvvyhvxz_required = false; } jQuery('#jform_php_controller_list-lbl').closest('.control-group').show(); // add required attribute to php_controller_list field - if (jform_vvvvvygvxz_required) + if (jform_vvvvvyhvya_required) { updateFieldRequired('php_controller_list',0); jQuery('#jform_php_controller_list').prop('required','required'); jQuery('#jform_php_controller_list').attr('aria-required',true); jQuery('#jform_php_controller_list').addClass('required'); - jform_vvvvvygvxz_required = false; + jform_vvvvvyhvya_required = false; } jQuery('#jform_php_model-lbl').closest('.control-group').show(); // add required attribute to php_model field - if (jform_vvvvvygvya_required) + if (jform_vvvvvyhvyb_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvygvya_required = false; + jform_vvvvvyhvyb_required = false; } jQuery('#jform_php_model_list-lbl').closest('.control-group').show(); // add required attribute to php_model_list field - if (jform_vvvvvygvyb_required) + if (jform_vvvvvyhvyc_required) { updateFieldRequired('php_model_list',0); jQuery('#jform_php_model_list').prop('required','required'); jQuery('#jform_php_model_list').attr('aria-required',true); jQuery('#jform_php_model_list').addClass('required'); - jform_vvvvvygvyb_required = false; + jform_vvvvvyhvyc_required = false; } } else @@ -1212,43 +1248,43 @@ function vvvvvyg(add_custom_button_vvvvvyg) jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller-lbl').closest('.control-group').hide(); // remove required attribute from php_controller field - if (!jform_vvvvvygvxy_required) + if (!jform_vvvvvyhvxz_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvygvxy_required = true; + jform_vvvvvyhvxz_required = true; } jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide(); // remove required attribute from php_controller_list field - if (!jform_vvvvvygvxz_required) + if (!jform_vvvvvyhvya_required) { updateFieldRequired('php_controller_list',1); jQuery('#jform_php_controller_list').removeAttr('required'); jQuery('#jform_php_controller_list').removeAttr('aria-required'); jQuery('#jform_php_controller_list').removeClass('required'); - jform_vvvvvygvxz_required = true; + jform_vvvvvyhvya_required = true; } jQuery('#jform_php_model-lbl').closest('.control-group').hide(); // remove required attribute from php_model field - if (!jform_vvvvvygvya_required) + if (!jform_vvvvvyhvyb_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvygvya_required = true; + jform_vvvvvyhvyb_required = true; } jQuery('#jform_php_model_list-lbl').closest('.control-group').hide(); // remove required attribute from php_model_list field - if (!jform_vvvvvygvyb_required) + if (!jform_vvvvvyhvyc_required) { updateFieldRequired('php_model_list',1); jQuery('#jform_php_model_list').removeAttr('required'); jQuery('#jform_php_model_list').removeAttr('aria-required'); jQuery('#jform_php_model_list').removeClass('required'); - jform_vvvvvygvyb_required = true; + jform_vvvvvyhvyc_required = true; } } } diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 0b3278446..f140bd015 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -129,11 +129,11 @@ message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" /> - + @@ -207,11 +207,11 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION" directory="" /> - + @@ -265,6 +265,304 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION" directory="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + -