From 98a5803faf2bcaa27ccdd115fabb08ff6310a7de Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 22 Dec 2017 21:46:03 +0200 Subject: [PATCH] Added auto versioning to all JavaScript and CSS fiels being added, to insure it reloads when there is an update. Resolves gh-203 --- README.md | 4 +- admin/README.txt | 4 +- admin/compiler/joomla_3/JViewLegacy_edit.php | 6 +-- .../joomla_3/JViewLegacy_edit_site.php | 10 ++--- admin/compiler/joomla_3/JViewLegacy_list.php | 2 +- .../JViewLegacy_list_custom_admin.php | 2 +- .../joomla_3/JViewLegacy_list_site.php | 2 +- admin/compiler/joomla_3/JViewLegacy_site.php | 2 +- admin/helpers/compiler/e_Interpretation.php | 44 +++++++++---------- admin/models/ajax.php | 3 +- admin/views/admin_fields/view.html.php | 6 +-- .../admin_fields_conditions/view.html.php | 6 +-- admin/views/admin_view/view.html.php | 21 ++++----- admin/views/admin_views/view.html.php | 2 +- admin/views/admins_fields/view.html.php | 2 +- .../admins_fields_conditions/view.html.php | 2 +- admin/views/compiler/view.html.php | 10 ++--- .../views/component_admin_views/view.html.php | 6 +-- admin/views/component_config/view.html.php | 6 +-- .../view.html.php | 6 +-- .../view.html.php | 6 +-- admin/views/component_dashboard/view.html.php | 6 +-- .../component_files_folders/view.html.php | 6 +-- .../component_mysql_tweaks/view.html.php | 6 +-- .../views/component_site_views/view.html.php | 6 +-- admin/views/component_updates/view.html.php | 6 +-- .../components_admin_views/view.html.php | 2 +- admin/views/components_config/view.html.php | 2 +- .../view.html.php | 2 +- .../view.html.php | 2 +- .../views/components_dashboard/view.html.php | 2 +- .../components_files_folders/view.html.php | 2 +- .../components_mysql_tweaks/view.html.php | 2 +- .../views/components_site_views/view.html.php | 2 +- admin/views/components_updates/view.html.php | 2 +- admin/views/custom_admin_view/view.html.php | 6 +-- admin/views/custom_admin_views/view.html.php | 2 +- admin/views/custom_code/view.html.php | 20 +++++---- admin/views/custom_codes/view.html.php | 2 +- admin/views/dynamic_get/view.html.php | 6 +-- admin/views/dynamic_gets/view.html.php | 2 +- admin/views/field/view.html.php | 6 +-- admin/views/fields/view.html.php | 2 +- admin/views/fieldtype/view.html.php | 10 ++--- admin/views/fieldtypes/view.html.php | 2 +- admin/views/ftp/view.html.php | 10 ++--- admin/views/ftps/view.html.php | 2 +- admin/views/get_snippets/view.html.php | 12 ++--- admin/views/help_document/view.html.php | 6 +-- admin/views/help_documents/view.html.php | 2 +- admin/views/joomla_component/view.html.php | 25 ++++++----- admin/views/joomla_components/view.html.php | 2 +- admin/views/language/view.html.php | 6 +-- .../views/language_translation/view.html.php | 6 +-- .../views/language_translations/view.html.php | 2 +- admin/views/languages/view.html.php | 2 +- admin/views/layout/view.html.php | 6 +-- admin/views/layouts/view.html.php | 2 +- admin/views/libraries/view.html.php | 2 +- admin/views/libraries_config/view.html.php | 2 +- .../view.html.php | 2 +- admin/views/library/view.html.php | 21 ++++----- admin/views/library_config/view.html.php | 6 +-- .../library_files_folders_urls/view.html.php | 6 +-- admin/views/site_view/view.html.php | 6 +-- admin/views/site_views/view.html.php | 2 +- admin/views/snippet/view.html.php | 6 +-- admin/views/snippet_type/view.html.php | 6 +-- admin/views/snippet_types/view.html.php | 2 +- admin/views/snippets/view.html.php | 2 +- admin/views/template/view.html.php | 6 +-- admin/views/templates/view.html.php | 2 +- componentbuilder.xml | 2 +- site/views/api/view.html.php | 6 +-- 74 files changed, 213 insertions(+), 207 deletions(-) diff --git a/README.md b/README.md index da9322ad1..2da4fe2a1 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,11 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th December, 2017 ++ *Last Build*: 22nd December, 2017 + *Version*: 2.6.7 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **178375** ++ *Line count*: **178381** + *File count*: **1145** + *Folder count*: **184** diff --git a/admin/README.txt b/admin/README.txt index da9322ad1..2da4fe2a1 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -111,11 +111,11 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th December, 2017 ++ *Last Build*: 22nd December, 2017 + *Version*: 2.6.7 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **178375** ++ *Line count*: **178381** + *File count*: **1145** + *Folder count*: **184** diff --git a/admin/compiler/joomla_3/JViewLegacy_edit.php b/admin/compiler/joomla_3/JViewLegacy_edit.php index 208a2a045..6ac457c7a 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit.php @@ -122,9 +122,9 @@ class ###Component###View###View### extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP### + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css", array('version' => 'auto'));###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js", array('version' => 'auto')); ###DOCUMENT_CUSTOM_PHP### JText::script('view not acceptable. Error'); } } diff --git a/admin/compiler/joomla_3/JViewLegacy_edit_site.php b/admin/compiler/joomla_3/JViewLegacy_edit_site.php index c5a70864a..63d5d0e73 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit_site.php @@ -127,13 +127,13 @@ class ###Component###View###View### extends JViewLegacy } $this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // we need this to fix the form display - $this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css"); - $this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js"); + $this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css", array('version' => 'auto')); + $this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js", array('version' => 'auto')); // the default style of this view - $this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### + $this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css", array('version' => 'auto'));###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### // default javascript of this view - $this->document->addScript(JURI::root().$this->script); - $this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP### + $this->document->addScript(JURI::root().$this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js", array('version' => 'auto')); ###DOCUMENT_CUSTOM_PHP### JText::script('view not acceptable. Error'); } } diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index b918cfada..1c114be8b 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -202,7 +202,7 @@ class ###Component###View###Views### extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_###COMPONENT###_###VIEWS###')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css", array('version' => 'auto')); } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php index 17cf44234..6242152ee 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php @@ -56,7 +56,7 @@ class ###Component###View###SViews### extends JViewLegacy protected function setDocument() {###CUSTOM_ADMIN_LIBRARIES_LOADER### ###CUSTOM_ADMIN_UIKIT_LOADER### ###CUSTOM_ADMIN_GOOGLECHART_LOADER### ###CUSTOM_ADMIN_FOOTABLE_LOADER### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css', array('version' => 'auto'));###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_list_site.php b/admin/compiler/joomla_3/JViewLegacy_list_site.php index 7b7e038cc..d3832c31c 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_site.php @@ -54,7 +54,7 @@ class ###Component###View###SViews### extends JViewLegacy protected function _prepareDocument() {###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css');###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_site.php b/admin/compiler/joomla_3/JViewLegacy_site.php index 66c087eff..aab75da62 100644 --- a/admin/compiler/joomla_3/JViewLegacy_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_site.php @@ -54,7 +54,7 @@ class ###Component###View###SView### extends JViewLegacy protected function _prepareDocument() {###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP### // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css');###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### + $this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS### } /** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index c450534b3..509671add 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -3492,9 +3492,9 @@ class Interpretation extends Fields $chart[] = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " add the google chart builder class."; $chart[] = "\t\trequire_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/chartbuilder.php';"; $chart[] = "\t\t//" . $this->setLine(__LINE__) . " load the google chart js."; - $chart[] = "\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/js/google.jsapi.js');"; - $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js');"; - $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js');"; + $chart[] = "\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/js/google.jsapi.js', array('version' => 'auto'));"; + $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js', array('version' => 'auto'));"; + $chart[] = "\t\t\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js', array('version' => 'auto'));"; return implode(PHP_EOL, $chart); } return ''; @@ -3698,11 +3698,11 @@ class Interpretation extends Fields switch ($pathInfo['extension']) { case 'js': - return '$this->document->addScript(' . $JURI . '"' . $path . '");'; + return '$this->document->addScript(' . $JURI . '"' . $path . '", array("version" => "auto"));'; break; case 'css': case 'less': - return '$this->document->addStyleSheet(' . $JURI . '"' . $path . '");'; + return '$this->document->addStyleSheet(' . $JURI . '"' . $path . '", array("version" => "auto"));'; break; case 'php': if (strpos($path, 'http') === false) @@ -3764,12 +3764,12 @@ class Interpretation extends Fields $setter .= PHP_EOL . PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit css."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->css_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/uikit'.\$style.\$size.'.css');"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/uikit'.\$style.\$size.'.css', array('version' => 'auto'));"; $setter .= PHP_EOL . $tabV . "\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit js."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/uikit'.\$size.'.js');"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/uikit'.\$size.'.js', array('version' => 'auto'));"; $setter .= PHP_EOL . $tabV . "\t\t}"; } // load the components need @@ -3817,13 +3817,13 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the css."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css');"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', array('version' => 'auto'));"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t//" . $this->setLine(__LINE__) . " check if the JavaScript file exists."; $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the js."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', 'text/javascript', true);"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async'));"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t}"; @@ -3846,13 +3846,13 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the css."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css');"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', array('version' => 'auto'));"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t//" . $this->setLine(__LINE__) . " check if the JavaScript file exists."; $setter .= PHP_EOL . $tabV . "\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t{"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t//" . $this->setLine(__LINE__) . " load the js."; - $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', 'text/javascript', true);"; + $setter .= PHP_EOL . $tabV . "\t\t\t\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v2/js/components/'.\$name.\$size.'.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async'));"; $setter .= PHP_EOL . $tabV . "\t\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t\t}"; @@ -3872,12 +3872,12 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit css."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->css_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/css/uikit'.\$size.'.css');"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/css/uikit'.\$size.'.css', array('version' => 'auto'));"; $setter .= PHP_EOL . $tabV . "\t\t}"; $setter .= PHP_EOL . $tabV . "\t\t//" . $this->setLine(__LINE__) . " The uikit js."; $setter .= PHP_EOL . $tabV . "\t\tif ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . "\t\t{"; - $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/js/uikit'.\$size.'.js');"; + $setter .= PHP_EOL . $tabV . "\t\t\t\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic['###component###'] . "/uikit-v3/js/uikit'.\$size.'.js', array('version' => 'auto'));"; $setter .= PHP_EOL . $tabV . "\t\t}"; if (2 == $this->uikit) { @@ -7175,22 +7175,22 @@ class Interpretation extends Fields if (!isset($this->footableVersion) || 2 == $this->footableVersion) // loading version 2 { $foo = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the CSS for Footable."; - $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.core.min.css');"; + $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.core.min.css', array('version' => 'auto'));"; $foo .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Use the Metro Style"; $foo .= PHP_EOL . "\t\tif (!isset(\$this->fooTableStyle) || 0 == \$this->fooTableStyle)"; $foo .= PHP_EOL . "\t\t{"; - $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.metro.min.css');"; + $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.metro.min.css', array('version' => 'auto'));"; $foo .= PHP_EOL . "\t\t}"; $foo .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Use the Legacy Style."; $foo .= PHP_EOL . "\t\telseif (isset(\$this->fooTableStyle) && 1 == \$this->fooTableStyle)"; $foo .= PHP_EOL . "\t\t{"; - $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.standalone.min.css');"; + $foo .= PHP_EOL . "\t\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/css/footable.standalone.min.css', array('version' => 'auto'));"; $foo .= PHP_EOL . "\t\t}"; $foo .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the JavaScript for Footable"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.js');"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.sort.js');"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.filter.js');"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.paginate.js');"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.js', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.sort.js', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.filter.js', array('version' => 'auto'));"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v2/js/footable.paginate.js', array('version' => 'auto'));"; if ($init) { $foo .= PHP_EOL . PHP_EOL . "\t\t" . '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery(' . "'.footable'" . ').footable(); }); jQuery(' . "'.nav-tabs'" . ').on(' . "'click'" . ', ' . "'li'" . ', function() { setTimeout(tableFix, 10); }); }); function tableFix() { jQuery(' . "'.footable'" . ').trigger(' . "'footable_resize'" . '); }";'; @@ -7202,9 +7202,9 @@ class Interpretation extends Fields $foo = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the CSS for Footable"; $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');"; - $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/css/footable.standalone.min.css');"; + $foo .= PHP_EOL . "\t\t\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/css/footable.standalone.min.css', array('version' => 'auto'));"; $foo .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Add the JavaScript for Footable (adding all funtions)"; - $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/js/footable.min.js');"; + $foo .= PHP_EOL . "\t\t\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic['###component###'] . "/footable-v3/js/footable.min.js', array('version' => 'auto'));"; if ($init) { $foo .= PHP_EOL . PHP_EOL . "\t\t" . '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery(' . "'.footable'" . ').footable();});});";'; diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 68c2b6e1e..77f4a237e 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -367,6 +367,7 @@ class ComponentbuilderModelAjax extends JModelList 'metadata' => 'setYesNo', 'default_view' => 'setYesNo', 'access' => 'setYesNo', + 'public_access' => 'setYesNo', 'mainmenu' => 'setYesNo', 'dashboard_list' => 'setYesNo', 'submenu' => 'setYesNo', @@ -415,7 +416,7 @@ class ComponentbuilderModelAjax extends JModelList 'metadata' => JText::_('COM_COMPONENTBUILDER_HAS_METADATA'), 'default_view' => JText::_('COM_COMPONENTBUILDER_DEFAULT_VIEW'), 'access' => JText::_('COM_COMPONENTBUILDER_ADD_ACCESS'), - 'component_site_views|=VDM=|access' => JText::_('COM_COMPONENTBUILDER_PUBLIC_ACCESS'), + 'public_access' => JText::_('COM_COMPONENTBUILDER_PUBLIC_ACCESS'), 'mainmenu' => JText::_('COM_COMPONENTBUILDER_MAIN_MENU'), 'dashboard_list' => JText::_('COM_COMPONENTBUILDER_DASHBOARD_LIST_OF_RECORDS'), 'dashboard_add' => JText::_('COM_COMPONENTBUILDER_DASHBOARD_ADD_RECORD'), diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index d77ff9115..3eb6e5aa1 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_fields_conditions/view.html.php b/admin/views/admin_fields_conditions/view.html.php index a656c75cf..efdc8a73d 100644 --- a/admin/views/admin_fields_conditions/view.html.php +++ b/admin/views/admin_fields_conditions/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields_conditions.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields_conditions.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php index cc8599659..23f5593b1 100644 --- a/admin/views/admin_view/view.html.php +++ b/admin/views/admin_view/view.html.php @@ -194,18 +194,19 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_view.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_view.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_view/submitbutton.js"); - // add JavaScripts - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' ); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', 'text/javascript', true); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', 'text/javascript', true); - // add the style sheets - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' ); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' ); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_view/submitbutton.js", array('version' => 'auto')); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , array('version' => 'auto')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , array('version' => 'auto')); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , array('version' => 'auto')); // add var key $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); JText::script('view not acceptable. Error'); diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index b4744aff2..d01e56638 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -214,7 +214,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMIN_VIEWS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_views.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_views.css", array('version' => 'auto')); } /** diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index 3bb105b72..1ab6070e9 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMINS_FIELDS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields.css", array('version' => 'auto')); } /** diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index 8c2ab36bb..4b73d6ef8 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields_conditions.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields_conditions.css", array('version' => 'auto')); } /** diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index ab79d1d7f..4ebade2ad 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -162,12 +162,12 @@ class ComponentbuilderViewCompiler extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css', array('version' => 'auto')); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js'); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', array('version' => 'auto')); } // Load the needed uikit components in this view. @@ -185,13 +185,13 @@ class ComponentbuilderViewCompiler extends JViewLegacy if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. - $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', array('version' => 'auto')); } // check if the JavaScript file exists. if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. - $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', 'text/javascript', true); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); } } } @@ -199,7 +199,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy // add marked library $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js"); // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/compiler.css'); + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/compiler.css', array('version' => 'auto')); // Set the Custom CSS script to view $this->document->addStyleDeclaration(" .j-sidebar-container { diff --git a/admin/views/component_admin_views/view.html.php b/admin/views/component_admin_views/view.html.php index 246bf81d2..c9fa14884 100644 --- a/admin/views/component_admin_views/view.html.php +++ b/admin/views/component_admin_views/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy $this->document = JFactory::getDocument(); } $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"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_admin_views.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_config/view.html.php b/admin/views/component_config/view.html.php index f5b8d169f..56e42153c 100644 --- a/admin/views/component_config/view.html.php +++ b/admin/views/component_config/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_config extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_config.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_config/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_config.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_config/submitbutton.js", array('version' => 'auto')); 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 95f1c750c..3b24c48dd 100644 --- a/admin/views/component_custom_admin_menus/view.html.php +++ b/admin/views/component_custom_admin_menus/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy $this->document = JFactory::getDocument(); } $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"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js", array('version' => 'auto')); 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 a144b2ba4..228320727 100644 --- a/admin/views/component_custom_admin_views/view.html.php +++ b/admin/views/component_custom_admin_views/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy $this->document = JFactory::getDocument(); } $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"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js", array('version' => 'auto')); 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 1969f6ae5..01edfeb42 100644 --- a/admin/views/component_dashboard/view.html.php +++ b/admin/views/component_dashboard/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_dashboard.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_dashboard/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_dashboard.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_dashboard/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_files_folders/view.html.php b/admin/views/component_files_folders/view.html.php index 4652dd384..2335f0ac1 100644 --- a/admin/views/component_files_folders/view.html.php +++ b/admin/views/component_files_folders/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_files_folders.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_files_folders/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_files_folders.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_files_folders/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_mysql_tweaks/view.html.php b/admin/views/component_mysql_tweaks/view.html.php index 69163bfc9..c6d88d726 100644 --- a/admin/views/component_mysql_tweaks/view.html.php +++ b/admin/views/component_mysql_tweaks/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_mysql_tweaks.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_mysql_tweaks/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_mysql_tweaks.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_mysql_tweaks/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_site_views/view.html.php b/admin/views/component_site_views/view.html.php index 95db00378..827c46b84 100644 --- a/admin/views/component_site_views/view.html.php +++ b/admin/views/component_site_views/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy $this->document = JFactory::getDocument(); } $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"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_site_views.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_updates/view.html.php b/admin/views/component_updates/view.html.php index 2be22d29c..e599d45fe 100644 --- a/admin/views/component_updates/view.html.php +++ b/admin/views/component_updates/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_updates.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_updates/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_updates.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_updates/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/components_admin_views/view.html.php b/admin/views/components_admin_views/view.html.php index e563ca5e9..4efc66748 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_admin_views.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_admin_views.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php index 2cdb4b655..3ed37d560 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CONFIG')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_config.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_config.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php index 70da83f8d..3fbcaefa1 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_menus.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_menus.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php index 87335bb1c..29e69a3c8 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_views.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_views.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php index 32a9ce26f..2e7d50c1a 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_dashboard.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_dashboard.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php index 2d5c446ae..275fe7acc 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_files_folders.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_files_folders.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php index 7c15da0b0..eb30725a4 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_mysql_tweaks.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_mysql_tweaks.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php index d2a73f2ee..f7adc10cc 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_site_views.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_site_views.css", array('version' => 'auto')); } /** diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php index abece48e8..2f8517325 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_UPDATES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_updates.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_updates.css", array('version' => 'auto')); } /** diff --git a/admin/views/custom_admin_view/view.html.php b/admin/views/custom_admin_view/view.html.php index ba325ff45..8bd70cd3e 100644 --- a/admin/views/custom_admin_view/view.html.php +++ b/admin/views/custom_admin_view/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_view.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_view.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_admin_view/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_admin_view/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index e59932b7e..71374b065 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -219,7 +219,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_views.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_views.css", array('version' => 'auto')); } /** diff --git a/admin/views/custom_code/view.html.php b/admin/views/custom_code/view.html.php index a389cd4fd..385e312f5 100644 --- a/admin/views/custom_code/view.html.php +++ b/admin/views/custom_code/view.html.php @@ -194,17 +194,19 @@ class ComponentbuilderViewCustom_code extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_CODE_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_CODE_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_code.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_code.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_code/submitbutton.js"); - // add JavaScripts - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' ); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', 'text/javascript', true); - // add the style sheets - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' ); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' ); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_code/submitbutton.js", array('version' => 'auto')); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , array('version' => 'auto')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , array('version' => 'auto')); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index f73ff3b0f..a263dc995 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -302,7 +302,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_CUSTOM_CODES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_codes.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_codes.css", array('version' => 'auto')); } /** diff --git a/admin/views/dynamic_get/view.html.php b/admin/views/dynamic_get/view.html.php index a7e08f0e9..0cb9f3251 100644 --- a/admin/views/dynamic_get/view.html.php +++ b/admin/views/dynamic_get/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_DYNAMIC_GET_NEW' : 'COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_get.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_get.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/dynamic_get/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/dynamic_get/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 5676d585e..a1aaa443c 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -258,7 +258,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_DYNAMIC_GETS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_gets.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_gets.css", array('version' => 'auto')); } /** diff --git a/admin/views/field/view.html.php b/admin/views/field/view.html.php index 744ab28cb..10052505c 100644 --- a/admin/views/field/view.html.php +++ b/admin/views/field/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewField extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_FIELD_NEW' : 'COM_COMPONENTBUILDER_FIELD_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/field.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/field.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/field/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/field/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index fd232c8b5..31781d49a 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -341,7 +341,7 @@ class ComponentbuilderViewFields extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_FIELDS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fields.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fields.css", array('version' => 'auto')); } /** diff --git a/admin/views/fieldtype/view.html.php b/admin/views/fieldtype/view.html.php index 25fbbbaa8..8787b178a 100644 --- a/admin/views/fieldtype/view.html.php +++ b/admin/views/fieldtype/view.html.php @@ -197,19 +197,19 @@ class ComponentbuilderViewFieldtype extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_FIELDTYPE_NEW' : 'COM_COMPONENTBUILDER_FIELDTYPE_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fieldtype.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fieldtype.css", array('version' => 'auto')); // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css'); + $this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', array('version' => 'auto')); // Add the JavaScript for Footable (adding all funtions) - $this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js', array('version' => 'auto')); $footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});"; $this->document->addScriptDeclaration($footable); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/fieldtype/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/fieldtype/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index e1be30f07..880c7fb93 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -231,7 +231,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_FIELDTYPES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fieldtypes.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fieldtypes.css", array('version' => 'auto')); } /** diff --git a/admin/views/ftp/view.html.php b/admin/views/ftp/view.html.php index f97e1e31d..4fb03d74d 100644 --- a/admin/views/ftp/view.html.php +++ b/admin/views/ftp/view.html.php @@ -197,19 +197,19 @@ class ComponentbuilderViewFtp extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_FTP_NEW' : 'COM_COMPONENTBUILDER_FTP_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftp.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftp.css", array('version' => 'auto')); // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css'); + $this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', array('version' => 'auto')); // Add the JavaScript for Footable (adding all funtions) - $this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js', array('version' => 'auto')); $footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});"; $this->document->addScriptDeclaration($footable); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/ftp/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/ftp/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/ftps/view.html.php b/admin/views/ftps/view.html.php index 215a0f65b..4ae5620db 100644 --- a/admin/views/ftps/view.html.php +++ b/admin/views/ftps/view.html.php @@ -236,7 +236,7 @@ class ComponentbuilderViewFtps extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_FTPS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftps.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftps.css", array('version' => 'auto')); } /** diff --git a/admin/views/get_snippets/view.html.php b/admin/views/get_snippets/view.html.php index 7db336991..f8101e1ca 100644 --- a/admin/views/get_snippets/view.html.php +++ b/admin/views/get_snippets/view.html.php @@ -81,7 +81,7 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy $HeaderCheck = new componentbuilderHeaderCheck; // Add View JavaScript File - $this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/get_snippets.js"); + $this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/get_snippets.js", array("version" => "auto")); // Load uikit options. $uikit = $this->params->get('uikit_load'); @@ -93,12 +93,12 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css', array('version' => 'auto')); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js'); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', array('version' => 'auto')); } // Load the script to find all uikit components needed. @@ -124,13 +124,13 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. - $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', array('version' => 'auto')); } // check if the JavaScript file exists. if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. - $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', 'text/javascript', true); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); } } } @@ -256,7 +256,7 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy $this->document->addScriptDeclaration("var local_snippets = ". json_encode($local_snippets).";"); } // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/get_snippets.css'); + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/get_snippets.css', array('version' => 'auto')); } /** diff --git a/admin/views/help_document/view.html.php b/admin/views/help_document/view.html.php index aab64d181..d024aafd0 100644 --- a/admin/views/help_document/view.html.php +++ b/admin/views/help_document/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewHelp_document extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_HELP_DOCUMENT_NEW' : 'COM_COMPONENTBUILDER_HELP_DOCUMENT_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/help_document.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/help_document/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/help_document.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/help_document/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 84564396f..a80243164 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -302,7 +302,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENTS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/help_documents.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/help_documents.css", array('version' => 'auto')); } /** diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index b21750f40..67dbd61e5 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -197,28 +197,29 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_component.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_component.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css'); + $this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', array('version' => 'auto')); // Add the JavaScript for Footable (adding all funtions) - $this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js', array('version' => 'auto')); $footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});"; $this->document->addScriptDeclaration($footable); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js"); - // add JavaScripts - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' ); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', 'text/javascript', true); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', 'text/javascript', true); - // add the style sheets - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' ); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' ); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js", array('version' => 'auto')); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , array('version' => 'auto')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , array('version' => 'auto')); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , array('version' => 'auto')); // add var key $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); JText::script('view not acceptable. Error'); diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 44a19936e..4b51af409 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -273,7 +273,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENTS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_components.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_components.css", array('version' => 'auto')); } /** diff --git a/admin/views/language/view.html.php b/admin/views/language/view.html.php index e8b5a33d5..ccf0528a7 100644 --- a/admin/views/language/view.html.php +++ b/admin/views/language/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewLanguage extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LANGUAGE_NEW' : 'COM_COMPONENTBUILDER_LANGUAGE_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/language/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/language/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/language_translation/view.html.php b/admin/views/language_translation/view.html.php index 4eb23a8f1..8bd9cd8f4 100644 --- a/admin/views/language_translation/view.html.php +++ b/admin/views/language_translation/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_NEW' : 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translation.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translation.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/language_translation/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/language_translation/submitbutton.js", array('version' => 'auto')); // add JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' ); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', 'text/javascript', true); diff --git a/admin/views/language_translations/view.html.php b/admin/views/language_translations/view.html.php index 3d9c731db..f2679d14f 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -214,7 +214,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translations.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translations.css", array('version' => 'auto')); } /** diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index 2be9248be..74534d19c 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -214,7 +214,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LANGUAGES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/languages.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/languages.css", array('version' => 'auto')); } /** diff --git a/admin/views/layout/view.html.php b/admin/views/layout/view.html.php index 7e3bd3280..0a7a3e623 100644 --- a/admin/views/layout/view.html.php +++ b/admin/views/layout/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewLayout extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LAYOUT_NEW' : 'COM_COMPONENTBUILDER_LAYOUT_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layout.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layout.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 55ee825fc..00065de36 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -241,7 +241,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LAYOUTS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layouts.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layouts.css", array('version' => 'auto')); } /** diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 27e606bb6..21a0bc8fa 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -253,7 +253,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries.css", array('version' => 'auto')); } /** diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php index d42c1daaa..e08132b35 100644 --- a/admin/views/libraries_config/view.html.php +++ b/admin/views/libraries_config/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_config.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_config.css", array('version' => 'auto')); } /** diff --git a/admin/views/libraries_files_folders_urls/view.html.php b/admin/views/libraries_files_folders_urls/view.html.php index 295c09193..d844e28cc 100644 --- a/admin/views/libraries_files_folders_urls/view.html.php +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_files_folders_urls.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_files_folders_urls.css", array('version' => 'auto')); } /** diff --git a/admin/views/library/view.html.php b/admin/views/library/view.html.php index 476f9197e..cd051f29b 100644 --- a/admin/views/library/view.html.php +++ b/admin/views/library/view.html.php @@ -194,18 +194,19 @@ class ComponentbuilderViewLibrary extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js"); - // add JavaScripts - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' ); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', 'text/javascript', true); - $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', 'text/javascript', true); - // add the style sheets - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' ); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' ); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js", array('version' => 'auto')); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , array('version' => 'auto')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async')); + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , array('version' => 'auto')); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , array('version' => 'auto')); // add var key $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); JText::script('view not acceptable. Error'); diff --git a/admin/views/library_config/view.html.php b/admin/views/library_config/view.html.php index c930ec17e..63553e87b 100644 --- a/admin/views/library_config/view.html.php +++ b/admin/views/library_config/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewLibrary_config extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library_config.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library_config/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library_config.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library_config/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/library_files_folders_urls/view.html.php b/admin/views/library_files_folders_urls/view.html.php index d757f406e..7902ee4c5 100644 --- a/admin/views/library_files_folders_urls/view.html.php +++ b/admin/views/library_files_folders_urls/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library_files_folders_urls.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library_files_folders_urls/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library_files_folders_urls.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library_files_folders_urls/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/site_view/view.html.php b/admin/views/site_view/view.html.php index 08b6b8a0f..4f1628dc4 100644 --- a/admin/views/site_view/view.html.php +++ b/admin/views/site_view/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewSite_view extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SITE_VIEW_NEW' : 'COM_COMPONENTBUILDER_SITE_VIEW_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_view.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_view.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/site_view/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/site_view/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index 98ea4b2b1..85f9ea803 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -219,7 +219,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_SITE_VIEWS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_views.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_views.css", array('version' => 'auto')); } /** diff --git a/admin/views/snippet/view.html.php b/admin/views/snippet/view.html.php index bfd5e5098..951af94bb 100644 --- a/admin/views/snippet/view.html.php +++ b/admin/views/snippet/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewSnippet extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SNIPPET_NEW' : 'COM_COMPONENTBUILDER_SNIPPET_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/snippet/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/snippet/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/snippet_type/view.html.php b/admin/views/snippet_type/view.html.php index 0229f6dd0..a504420b3 100644 --- a/admin/views/snippet_type/view.html.php +++ b/admin/views/snippet_type/view.html.php @@ -194,9 +194,9 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SNIPPET_TYPE_NEW' : 'COM_COMPONENTBUILDER_SNIPPET_TYPE_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_type.css"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/snippet_type/submitbutton.js"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_type.css", array('version' => 'auto')); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/snippet_type/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php index 0b67d2238..b96b2e58f 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -204,7 +204,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_types.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_types.css", array('version' => 'auto')); } /** diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index 52124f103..057eef67c 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -268,7 +268,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_SNIPPETS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippets.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippets.css", array('version' => 'auto')); } /** diff --git a/admin/views/template/view.html.php b/admin/views/template/view.html.php index 403701292..7ebb4c903 100644 --- a/admin/views/template/view.html.php +++ b/admin/views/template/view.html.php @@ -194,11 +194,11 @@ class ComponentbuilderViewTemplate extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_TEMPLATE_NEW' : 'COM_COMPONENTBUILDER_TEMPLATE_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/template.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/template.css", array('version' => 'auto')); // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $this->document->addScript(JURI::root() . $this->script); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js"); + $this->document->addScript(JURI::root() . $this->script, array('version' => 'auto')); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js", array('version' => 'auto')); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 92d65c8e1..56137209b 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -219,7 +219,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy $this->document = JFactory::getDocument(); } $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_TEMPLATES')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/templates.css"); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/templates.css", array('version' => 'auto')); } /** diff --git a/componentbuilder.xml b/componentbuilder.xml index 86fdfa0e2..770dc991e 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 17th December, 2017 + 22nd December, 2017 Llewellyn van der Merwe joomla@vdm.io http://vdm.bz/component-builder diff --git a/site/views/api/view.html.php b/site/views/api/view.html.php index 3ad32aceb..006d29279 100644 --- a/site/views/api/view.html.php +++ b/site/views/api/view.html.php @@ -84,15 +84,15 @@ class ComponentbuilderViewApi extends JViewLegacy // The uikit css. if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css', array('version' => 'auto')); } // The uikit js. if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) { - $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js'); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', array('version' => 'auto')); } // add the document default css file - $this->document->addStyleSheet(JURI::root(true) .'/components/com_componentbuilder/assets/css/api.css'); + $this->document->addStyleSheet(JURI::root(true) .'/components/com_componentbuilder/assets/css/api.css', array('version' => 'auto')); } /**