diff --git a/README.md b/README.md index 4c365b20b..b60e50426 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,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*: 25th May, 2020 ++ *Last Build*: 29th May, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282168** ++ *Line count*: **282456** + *Field count*: **1522** -+ *File count*: **1783** ++ *File count*: **1785** + *Folder count*: **295** > 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 4c365b20b..b60e50426 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,13 +144,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*: 25th May, 2020 ++ *Last Build*: 29th May, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282168** ++ *Line count*: **282456** + *Field count*: **1522** -+ *File count*: **1783** ++ *File count*: **1785** + *Folder count*: **295** > 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/Helper_category_view.php b/admin/compiler/joomla_3/Helper_category_view.php index e02ee4b00..46524c443 100644 --- a/admin/compiler/joomla_3/Helper_category_view.php +++ b/admin/compiler/joomla_3/Helper_category_view.php @@ -20,7 +20,7 @@ defined('_JEXEC') or die('Restricted access'); /** * ###Component### ###View### Component Category Tree */ -class ###Component######Views###Categories extends JCategories +class ###Component######View###Categories extends JCategories { /** * Class constructor @@ -31,7 +31,7 @@ class ###Component######Views###Categories extends JCategories public function __construct($options = array()) { $options['table'] = '#__###component###_###view###'; - $options['extension'] = 'com_###component###.###views###'; + $options['extension'] = 'com_###component###.###view###'; parent::__construct($options); } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 8072c1fc0..f687a3b93 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -17461,24 +17461,24 @@ class Interpretation extends Fields } // load the category helper details in not already loaded if (!isset( - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'view' . $this->hhh] )) { // lets also set the category helper for this view - $target = array('site' => 'category' . $viewName_list); + $target = array('site' => 'category' . $otherView); $this->buildDynamique($target, 'category'); // insure the file gets updated - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'view' . $this->hhh] = $otherView; - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'View' . $this->hhh] = ucfirst($otherView); - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'views' . $this->hhh] = $otherViews; - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'Views' . $this->hhh] = ucfirst($otherViews); // set script to global helper file @@ -17486,12 +17486,12 @@ class Interpretation extends Fields $includeHelper[] = "\n//" . $this->setLine(__LINE__) . "Insure this view category file is loaded."; $includeHelper[] = "\$classname = '" . ucfirst($component) - . ucfirst($viewName_list) . "Categories';"; + . ucfirst($otherView) . "Categories';"; $includeHelper[] = "if (!class_exists(\$classname))"; $includeHelper[] = "{"; $includeHelper[] = $this->_t(1) . "\$path = JPATH_SITE . '/components/com_" . $component - . "/helpers/category" . $viewName_list . ".php';"; + . "/helpers/category" . $otherView . ".php';"; $includeHelper[] = $this->_t(1) . "if (is_file(\$path))"; $includeHelper[] = $this->_t(1) . "{"; $includeHelper[] = $this->_t(2) . "include_once \$path;"; diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index de38067e9..f30834db6 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -7,6 +7,7 @@ COM_COMPONENTBUILDER_ACCESS="Access" COM_COMPONENTBUILDER_ACCESS_BULK_TOOLS="Access Bulk Tools" COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_ADD="Add" COM_COMPONENTBUILDER_ADD_ACCESS="Add Access" COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging." COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" @@ -7717,6 +7718,7 @@ COM_COMPONENTBUILDER_MODEL_AFTER_MODELLING="Model (after modelling)" COM_COMPONENTBUILDER_MODEL_BEFORE_MODELLING="Model (before modelling)" COM_COMPONENTBUILDER_MODULE="Module" COM_COMPONENTBUILDER_MODULES="Modules" +COM_COMPONENTBUILDER_MOVE="Move" COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)" @@ -7913,6 +7915,7 @@ COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_REFRESH="Refresh" COM_COMPONENTBUILDER_RELEASED_THIS="released this" +COM_COMPONENTBUILDER_REMOVE="Remove" COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list." diff --git a/admin/layouts/repeatablejcb.php b/admin/layouts/repeatablejcb.php new file mode 100644 index 000000000..53d215068 --- /dev/null +++ b/admin/layouts/repeatablejcb.php @@ -0,0 +1,95 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $tmpl The Empty form for template + * @var array $forms Array of JForm instances for render the rows + * @var bool $multiple The multiple state for the form field + * @var int $min Count of minimum repeating in multiple mode + * @var int $max Count of maximum repeating in multiple mode + * @var string $fieldname The field name + * @var string $control The forms control + * @var string $label The field label + * @var string $description The field description + * @var array $buttons Array of the buttons that will be rendered + * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset + */ +extract($displayData); + +// Add script +JHtml::_('jquery.ui', array('core', 'sortable')); +JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); + +$sublayout = 'sectionjcb'; + +?> +
+
+
+ + +
+
+ + + +
+
+ + $form) : + echo JLayoutHelper::render( + $sublayout, + array( + 'form' => $form, + 'basegroup' => $fieldname, + 'group' => $fieldname . $k, + 'buttons' => $buttons, + 'unique_subform_id' => $unique_subform_id + ) + ); + endforeach; + ?> + + + +
+
+
diff --git a/admin/layouts/sectionjcb.php b/admin/layouts/sectionjcb.php new file mode 100644 index 000000000..bbcc14347 --- /dev/null +++ b/admin/layouts/sectionjcb.php @@ -0,0 +1,62 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $form The form instance for render the section + * @var string $basegroup The base group name + * @var string $group Current group name + * @var array $buttons Array of the buttons that will be rendered + */ +extract($displayData); + +?> +
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + +
+ getGroup('') as $field) : ?> +
+
+ renderField(); ?> +
+
+ +
+
diff --git a/admin/models/fields/adminlistvieworderfields.php b/admin/models/fields/adminlistvieworderfields.php new file mode 100644 index 000000000..710ddf443 --- /dev/null +++ b/admin/models/fields/adminlistvieworderfields.php @@ -0,0 +1,99 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminlistvieworderfields Form Field class for the Componentbuilder component + */ +class JFormFieldAdminlistvieworderfields extends JFormFieldList +{ + /** + * The adminlistvieworderfields field type. + * + * @var string + */ + public $type = 'adminlistvieworderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // load the db object + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // admin list view and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 3) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[] = (int) $addField['field']; + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = JHtml::_('select.option', -1, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = JHtml::_('select.option', -2, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = JHtml::_('select.option', -3, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/models/fields/linkedviewsorderfields.php b/admin/models/fields/linkedviewsorderfields.php new file mode 100644 index 000000000..d9194bb41 --- /dev/null +++ b/admin/models/fields/linkedviewsorderfields.php @@ -0,0 +1,99 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Linkedviewsorderfields Form Field class for the Componentbuilder component + */ +class JFormFieldLinkedviewsorderfields extends JFormFieldList +{ + /** + * The linkedviewsorderfields field type. + * + * @var string + */ + public $type = 'linkedviewsorderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // load the db object + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // linked list views and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 4) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[] = (int) $addField['field']; + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = JHtml::_('select.option', -1, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = JHtml::_('select.option', -2, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = JHtml::_('select.option', -3, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/models/forms/admin_custom_tabs.xml b/admin/models/forms/admin_custom_tabs.xml index 786c03827..8153f3f82 100644 --- a/admin/models/forms/admin_custom_tabs.xml +++ b/admin/models/forms/admin_custom_tabs.xml @@ -103,7 +103,7 @@ type="subform" name="tabs" label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="joomla.form.field.subform.repeatable" multiple="true" buttons="add,remove,move" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_DESCRIPTION" diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index b94b9b6cf..29917814f 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -103,7 +103,7 @@ type="subform" name="addfields" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION" default="" diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index ec148c220..1423d0631 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -103,7 +103,7 @@ type="subform" name="addconditions" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_LABEL" - layout="joomla.form.field.subform.repeatable" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_DESCRIPTION" default="" diff --git a/admin/models/forms/admin_fields_relations.xml b/admin/models/forms/admin_fields_relations.xml index 46d660b6c..6b243214e 100644 --- a/admin/models/forms/admin_fields_relations.xml +++ b/admin/models/forms/admin_fields_relations.xml @@ -103,7 +103,7 @@ type="subform" name="addrelations" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_LABEL" - layout="joomla.form.field.subform.repeatable" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_DESCRIPTION" default="" diff --git a/admin/models/forms/component_admin_views.xml b/admin/models/forms/component_admin_views.xml index 7236ff821..a7c6fd334 100644 --- a/admin/models/forms/component_admin_views.xml +++ b/admin/models/forms/component_admin_views.xml @@ -103,7 +103,7 @@ type="subform" name="addadmin_views" label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION" default="[{"submenu":"1","checkin":"1","history":"1","access":"1","port":"1"}]" diff --git a/admin/models/forms/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml index d4bb68794..720ad7f95 100644 --- a/admin/models/forms/component_custom_admin_views.xml +++ b/admin/models/forms/component_custom_admin_views.xml @@ -103,7 +103,7 @@ type="subform" name="addcustom_admin_views" label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" default="" icon="list"> diff --git a/admin/models/forms/component_site_views.xml b/admin/models/forms/component_site_views.xml index 69519b668..86989bcc6 100644 --- a/admin/models/forms/component_site_views.xml +++ b/admin/models/forms/component_site_views.xml @@ -103,7 +103,7 @@ type="subform" name="addsite_views" label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_DESCRIPTION" default="" diff --git a/admin/models/import_language_translations.php b/admin/models/import_language_translations.php index 9d2745852..a98a7e9e5 100644 --- a/admin/models/import_language_translations.php +++ b/admin/models/import_language_translations.php @@ -419,8 +419,8 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy { if (ComponentbuilderHelper::checkArray($target_headers)) { - // make sure the file is loaded - JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers'); + // make sure the file is loaded + ComponentbuilderHelper::composerAutoload('phpspreadsheet'); $jinput = JFactory::getApplication()->input; foreach($target_headers as $header) { @@ -429,14 +429,14 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy // set the data if(isset($package['dir'])) { - $inputFileType = PHPExcel_IOFactory::identify($package['dir']); - $excelReader = PHPExcel_IOFactory::createReader($inputFileType); + $inputFileType = IOFactory::identify($package['dir']); + $excelReader = IOFactory::createReader($inputFileType); $excelReader->setReadDataOnly(true); $excelObj = $excelReader->load($package['dir']); $data['array'] = $excelObj->getActiveSheet()->toArray(null, true,true,true); $excelObj->disconnectWorksheets(); unset($excelObj); - return $this->save($data,$table); + return $this->save($data, $table); } } return false; diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 2feb16036..c4681421c 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2139,7 +2139,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name (8, '', 'The Editor field type provides a WYSIWYG editor.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties7\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties8\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties9\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties10\":{\"name\":\"buttons\",\"example\":\"no\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties11\":{\"name\":\"syntax\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) can be used to set the code syntax matching for this field.\"},\"properties12\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties13\":{\"name\":\"editor\",\"example\":\"codemirror|none\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties14\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties15\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties16\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides an editor area field.', '', 1, 11, '', '', '51f288d2-6eaa-42bc-a182-a6f69b3032b8'), (9, '', 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value this is entered i', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties5\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'provides a hidden field for saving a form field whose value cannot be altered directly by a user.', '', 1, 2, '', '', '82f1b5ca-bb9b-44d7-9a7a-9a03fb2a31dd'), (10, '', 'The integer form field type provides a select box with a range of integer values. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Integer', '{\"properties0\":{\"name\":\"type\",\"example\":\"integer\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be integer.\"},\"properties1\":{\"name\":\"name\",\"example\":\"size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties8\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties9\":{\"name\":\"first\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties10\":{\"name\":\"last\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties11\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of integers between a minimum and maximum.', '', 1, 6, '', '', 'fdbb50ea-35d2-45b2-a0bc-076fdf1544b8'), -(11, '', 'The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'List', '{\"properties0\":{\"name\":\"type\",\"example\":\"list\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be list.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mylist\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) filter options\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"option\",\"example\":\"0|Option 1,1|Option 2,2|Option 1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties11\":{\"name\":\"useglobal\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) if set to true, it will show the value that is set in the global configuration if found in the database.\"},\"properties12\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default list item value.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of custom-defined entries.', '', 1, 9, '', '', 'a51dfc06-1b9b-4d0a-86ba-f705bcd40d4d'), +(11, '', 'The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'List', '{\"properties0\":{\"name\":\"type\",\"example\":\"list\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be list.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mylist\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) filter options\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"option\",\"example\":\"0|Option 1,1|Option 2,2|Option 1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties11\":{\"name\":\"useglobal\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) if set to true, it will show the value that is set in the global configuration if found in the database.\"},\"properties12\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default list item value.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of custom-defined entries.', '', 1, 10, '', '', 'a51dfc06-1b9b-4d0a-86ba-f705bcd40d4d'), (12, '', 'The media form field type provides modal access to the media manager for the choice of an image. Users with appropriate permissions will be able to upload files.', 'Media', '{\"properties0\":{\"name\":\"type\",\"example\":\"media\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be media.\"},\"properties1\":{\"name\":\"name\",\"example\":\"media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"directory\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the directory from which the user will be able to choose a file. This attribute should be relative to the top level \\/images\\/ folder.\"},\"properties5\":{\"name\":\"preview\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) shows or hides the preview of the currently chosen image. (\\\"true\\\": Show always, \\\"tooltip\\\": Show as tooltip, \\\"false\\\": Show never) (since Joomla! 2.5.5)\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides modal access to the media manager for insertion of images with upload for users with appropriate permissions.', '', 1, 4, '', '', '69957007-e3d4-4976-a32b-611d02dbad71'), (13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a meter to show value in a range.', '', 1, 3, '', '', '81668284-e572-4e17-927b-ba697fc64bd0'), (14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without having to rely on the tooltips). Or adding any other text you want.', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'supports a one line text field.', '', 1, 5, '', '', 'f9ecacd0-8481-4157-8c71-d7aaefc2b7c3'), diff --git a/admin/views/admin_custom_tabs/view.html.php b/admin/views/admin_custom_tabs/view.html.php index a5c26fcfb..ecb664470 100644 --- a/admin/views/admin_custom_tabs/view.html.php +++ b/admin/views/admin_custom_tabs/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewAdmin_custom_tabs extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_custom_tabs.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_custom_tabs/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_custom_tabs/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index 2782639a6..a8c811eca 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -191,12 +191,15 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); JText::script('COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE'); diff --git a/admin/views/admin_fields_conditions/view.html.php b/admin/views/admin_fields_conditions/view.html.php index 6edc2d910..73eceb8cf 100644 --- a/admin/views/admin_fields_conditions/view.html.php +++ b/admin/views/admin_fields_conditions/view.html.php @@ -191,7 +191,13 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_fields_relations/view.html.php b/admin/views/admin_fields_relations/view.html.php index d6750ca21..4c387ddb2 100644 --- a/admin/views/admin_fields_relations/view.html.php +++ b/admin/views/admin_fields_relations/view.html.php @@ -192,6 +192,12 @@ class ComponentbuilderViewAdmin_fields_relations extends JViewLegacy $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_relations/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add var key $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); // add return_here diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php index 7f39b3ec9..92aca99af 100644 --- a/admin/views/admin_view/view.html.php +++ b/admin/views/admin_view/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/class_extends/view.html.php b/admin/views/class_extends/view.html.php index 7e2f938fc..c758cac0b 100644 --- a/admin/views/class_extends/view.html.php +++ b/admin/views/class_extends/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewClass_extends extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_extends/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/class_method/view.html.php b/admin/views/class_method/view.html.php index 3d70d2a97..bef921b04 100644 --- a/admin/views/class_method/view.html.php +++ b/admin/views/class_method/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewClass_method extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_method/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/class_property/view.html.php b/admin/views/class_property/view.html.php index 90f99f6d5..6db978037 100644 --- a/admin/views/class_property/view.html.php +++ b/admin/views/class_property/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewClass_property extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_property/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index 4d726a446..12c562fc4 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -59,6 +59,10 @@ class ComponentbuilderViewCompiler extends JViewLegacy parent::display($tpl); } + // These are subform layouts used in JCB + // JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout is loaded + // JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout is loaded + public function setForm() { if(ComponentbuilderHelper::checkArray($this->Components)) @@ -192,8 +196,30 @@ class ComponentbuilderViewCompiler extends JViewLegacy $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); } + // Load the script to find all uikit components needed. + if ($uikit != 2) + { + // Set the default uikit components in this view. + $uikitComp = array(); + $uikitComp[] = 'data-uk-grid'; + + // Get field uikit components needed in this view. + $uikitFieldComp = $this->get('UikitComp'); + if (isset($uikitFieldComp) && ComponentbuilderHelper::checkArray($uikitFieldComp)) + { + if (isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) + { + $uikitComp = array_merge($uikitComp, $uikitFieldComp); + $uikitComp = array_unique($uikitComp); + } + else + { + $uikitComp = $uikitFieldComp; + } + } + } + // Load the needed uikit components in this view. - $uikitComp = $this->get('UikitComp'); if ($uikit != 2 && isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) { // load just in case. diff --git a/admin/views/component_admin_views/view.html.php b/admin/views/component_admin_views/view.html.php index d7e89df0b..f8f62b6a2 100644 --- a/admin/views/component_admin_views/view.html.php +++ b/admin/views/component_admin_views/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_admin_views.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_custom_admin_menus/view.html.php b/admin/views/component_custom_admin_menus/view.html.php index 2df89ad51..72df3bdad 100644 --- a/admin/views/component_custom_admin_menus/view.html.php +++ b/admin/views/component_custom_admin_menus/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_custom_admin_views/view.html.php b/admin/views/component_custom_admin_views/view.html.php index 7a9c3063a..aa193a104 100644 --- a/admin/views/component_custom_admin_views/view.html.php +++ b/admin/views/component_custom_admin_views/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_dashboard/view.html.php b/admin/views/component_dashboard/view.html.php index dc9e2d092..c81cf8f83 100644 --- a/admin/views/component_dashboard/view.html.php +++ b/admin/views/component_dashboard/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_dashboard/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/component_site_views/view.html.php b/admin/views/component_site_views/view.html.php index ff1c47e82..66f45e8a0 100644 --- a/admin/views/component_site_views/view.html.php +++ b/admin/views/component_site_views/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_site_views.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/custom_admin_view/view.html.php b/admin/views/custom_admin_view/view.html.php index 23b625269..0348ac11c 100644 --- a/admin/views/custom_admin_view/view.html.php +++ b/admin/views/custom_admin_view/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_admin_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/custom_code/view.html.php b/admin/views/custom_code/view.html.php index 78d2be551..9603ee62b 100644 --- a/admin/views/custom_code/view.html.php +++ b/admin/views/custom_code/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewCustom_code extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_code/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/dynamic_get/view.html.php b/admin/views/dynamic_get/view.html.php index 8ae84b76f..eb7231da3 100644 --- a/admin/views/dynamic_get/view.html.php +++ b/admin/views/dynamic_get/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/dynamic_get/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/field/view.html.php b/admin/views/field/view.html.php index 859e5ea36..213bcb753 100644 --- a/admin/views/field/view.html.php +++ b/admin/views/field/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewField extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/field/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php index 4c8563b26..9efee96d0 100644 --- a/admin/views/import_joomla_components/view.html.php +++ b/admin/views/import_joomla_components/view.html.php @@ -156,12 +156,15 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy // add a token on the page for javascript $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); } diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index b78328334..37640592a 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/joomla_module/view.html.php b/admin/views/joomla_module/view.html.php index cf16779cc..dd1a2026b 100644 --- a/admin/views/joomla_module/view.html.php +++ b/admin/views/joomla_module/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewJoomla_module extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_module/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // Add the JavaScript for JStore diff --git a/admin/views/joomla_plugin/view.html.php b/admin/views/joomla_plugin/view.html.php index 8b83c69bb..3a03654e5 100644 --- a/admin/views/joomla_plugin/view.html.php +++ b/admin/views/joomla_plugin/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewJoomla_plugin extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_plugin/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // Add the JavaScript for JStore diff --git a/admin/views/layout/view.html.php b/admin/views/layout/view.html.php index c4dd87ee4..9d3be7ca6 100644 --- a/admin/views/layout/view.html.php +++ b/admin/views/layout/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewLayout extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/library/view.html.php b/admin/views/library/view.html.php index 1a4d9a567..d4734bbe2 100644 --- a/admin/views/library/view.html.php +++ b/admin/views/library/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewLibrary extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/placeholder/view.html.php b/admin/views/placeholder/view.html.php index d6843ce01..20b1abd02 100644 --- a/admin/views/placeholder/view.html.php +++ b/admin/views/placeholder/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewPlaceholder extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/placeholder/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add some language strings diff --git a/admin/views/site_view/view.html.php b/admin/views/site_view/view.html.php index 72ef6159d..689722c6c 100644 --- a/admin/views/site_view/view.html.php +++ b/admin/views/site_view/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewSite_view extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/site_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/template/view.html.php b/admin/views/template/view.html.php index 94df9687d..574a3a8af 100644 --- a/admin/views/template/view.html.php +++ b/admin/views/template/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewTemplate extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/validation_rule/view.html.php b/admin/views/validation_rule/view.html.php index 9dc0aed8f..6a78444d6 100644 --- a/admin/views/validation_rule/view.html.php +++ b/admin/views/validation_rule/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewValidation_rule extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/validation_rule/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/componentbuilder.xml b/componentbuilder.xml index 6e71467f8..f96061588 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 25th May, 2020 + 29th May, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/category.php b/site/helpers/category.php index ecead8458..6960fd59f 100644 --- a/site/helpers/category.php +++ b/site/helpers/category.php @@ -17,20 +17,20 @@ defined('_JEXEC') or die('Restricted access'); */ //Insure this view category file is loaded. -$classname = 'ComponentbuilderFieldsCategories'; +$classname = 'ComponentbuilderFieldCategories'; if (!class_exists($classname)) { - $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfields.php'; + $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfield.php'; if (is_file($path)) { include_once $path; } } //Insure this view category file is loaded. -$classname = 'ComponentbuilderFieldtypesCategories'; +$classname = 'ComponentbuilderFieldtypeCategories'; if (!class_exists($classname)) { - $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfieldtypes.php'; + $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfieldtype.php'; if (is_file($path)) { include_once $path; diff --git a/site/helpers/categoryfields.php b/site/helpers/categoryfield.php similarity index 86% rename from site/helpers/categoryfields.php rename to site/helpers/categoryfield.php index 766030339..59387bd16 100644 --- a/site/helpers/categoryfields.php +++ b/site/helpers/categoryfield.php @@ -15,7 +15,7 @@ defined('_JEXEC') or die('Restricted access'); /** * Componentbuilder Field Component Category Tree */ -class ComponentbuilderFieldsCategories extends JCategories +class ComponentbuilderFieldCategories extends JCategories { /** * Class constructor @@ -26,7 +26,7 @@ class ComponentbuilderFieldsCategories extends JCategories public function __construct($options = array()) { $options['table'] = '#__componentbuilder_field'; - $options['extension'] = 'com_componentbuilder.fields'; + $options['extension'] = 'com_componentbuilder.field'; parent::__construct($options); } diff --git a/site/helpers/categoryfieldtypes.php b/site/helpers/categoryfieldtype.php similarity index 85% rename from site/helpers/categoryfieldtypes.php rename to site/helpers/categoryfieldtype.php index 6dd7ff9f4..ba3a88b35 100644 --- a/site/helpers/categoryfieldtypes.php +++ b/site/helpers/categoryfieldtype.php @@ -15,7 +15,7 @@ defined('_JEXEC') or die('Restricted access'); /** * Componentbuilder Fieldtype Component Category Tree */ -class ComponentbuilderFieldtypesCategories extends JCategories +class ComponentbuilderFieldtypeCategories extends JCategories { /** * Class constructor @@ -26,7 +26,7 @@ class ComponentbuilderFieldtypesCategories extends JCategories public function __construct($options = array()) { $options['table'] = '#__componentbuilder_fieldtype'; - $options['extension'] = 'com_componentbuilder.fieldtypes'; + $options['extension'] = 'com_componentbuilder.fieldtype'; parent::__construct($options); }