diff --git a/README.md b/README.md index 256f8941b..2ee827e34 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.5) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.6) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -111,13 +111,13 @@ 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*: 21st November, 2017 -+ *Version*: 2.6.5 ++ *Last Build*: 12th December, 2017 ++ *Version*: 2.6.6 + *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*: **168387** -+ *File count*: **1073** -+ *Folder count*: **176** ++ *Line count*: **177938** ++ *File count*: **1142** ++ *Folder count*: **184** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) @@ -126,5 +126,5 @@ Component Builder is mapped as a component in itself on my local development env Come on buy me a coffee :) * PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm) - * Bitcoin: 1FLxiT6wyxgZ3boeviLkYJ1DRpp41uzpxa - * Ethereum: 0x243392daa3c9c8bc841fcacf7c7f72541cb16823 \ No newline at end of file + * Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf + * Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 \ No newline at end of file diff --git a/admin/README.txt b/admin/README.txt index 256f8941b..2ee827e34 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -10,7 +10,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.5) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.6) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -111,13 +111,13 @@ 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*: 21st November, 2017 -+ *Version*: 2.6.5 ++ *Last Build*: 12th December, 2017 ++ *Version*: 2.6.6 + *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*: **168387** -+ *File count*: **1073** -+ *Folder count*: **176** ++ *Line count*: **177938** ++ *File count*: **1142** ++ *Folder count*: **184** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) @@ -126,5 +126,5 @@ Component Builder is mapped as a component in itself on my local development env Come on buy me a coffee :) * PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm) - * Bitcoin: 1FLxiT6wyxgZ3boeviLkYJ1DRpp41uzpxa - * Ethereum: 0x243392daa3c9c8bc841fcacf7c7f72541cb16823 \ No newline at end of file + * Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf + * Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 \ No newline at end of file diff --git a/admin/access.xml b/admin/access.xml index 7f2d7b47f..9224fdb5d 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -229,6 +229,7 @@ + @@ -297,12 +298,35 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -418,6 +442,15 @@ +
+ + + + + + + +
@@ -619,14 +652,27 @@
-
- - - - - - - +
+ + + + + + + + + +
+
+ + + + + + + + +
diff --git a/admin/assets/css/custom_admin_view.css b/admin/assets/css/custom_admin_view.css index 97693c0d7..a6129ddb4 100644 --- a/admin/assets/css/custom_admin_view.css +++ b/admin/assets/css/custom_admin_view.css @@ -24,4 +24,22 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_main_get_chzn { +width: 100% !important; +} +.jform_main_get_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/css/layout.css b/admin/assets/css/layout.css index cdce5a733..62e6a7ebe 100644 --- a/admin/assets/css/layout.css +++ b/admin/assets/css/layout.css @@ -24,4 +24,16 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/css/libraries_config.css b/admin/assets/css/libraries_config.css new file mode 100644 index 000000000..7252bea7e --- /dev/null +++ b/admin/assets/css/libraries_config.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage libraries_config.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/libraries_files_folders_urls.css b/admin/assets/css/libraries_files_folders_urls.css new file mode 100644 index 000000000..e352c49b1 --- /dev/null +++ b/admin/assets/css/libraries_files_folders_urls.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage libraries_files_folders_urls.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/library_config.css b/admin/assets/css/library_config.css new file mode 100644 index 000000000..80a4b875b --- /dev/null +++ b/admin/assets/css/library_config.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library_config.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/library_files_folders_urls.css b/admin/assets/css/library_files_folders_urls.css new file mode 100644 index 000000000..21e162fa2 --- /dev/null +++ b/admin/assets/css/library_files_folders_urls.css @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library_files_folders_urls.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + +.control-group, .controls, .controls input[type="url"], .controls input[type="text"], .controls input[type="number"], .controls input[type="email"], .controls select, .controls textarea { + max-width: 100%; +} diff --git a/admin/assets/css/site_view.css b/admin/assets/css/site_view.css index ace4683bf..715277974 100644 --- a/admin/assets/css/site_view.css +++ b/admin/assets/css/site_view.css @@ -24,4 +24,22 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_main_get_chzn { +width: 100% !important; +} +.jform_main_get_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/css/template.css b/admin/assets/css/template.css index 553aabec9..f0d90485b 100644 --- a/admin/assets/css/template.css +++ b/admin/assets/css/template.css @@ -24,4 +24,16 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/images/icons/libraries.png b/admin/assets/images/icons/libraries.png new file mode 100644 index 000000000..3ad91662f Binary files /dev/null and b/admin/assets/images/icons/libraries.png differ diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index bd9407dd2..c1395b553 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -649,6 +649,31 @@ abstract class ###Component###Helper } return false; } + + /** + * Check if we are connected + * Thanks https://stackoverflow.com/a/4860432/1429677 + * + * @returns bool true on success + **/ + public static function isConnected() + { + // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? + $connected = @fsockopen("www.example.com", 80); + // website, port (try 80 or 443) + if ($connected) + { + //action when connected + $is_conn = true; + fclose($connected); + } + else + { + //action in connection failure + $is_conn = false; + } + return $is_conn; + } public static function mergeArrays($arrays) { diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index b309f3e79..be63428e1 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -644,6 +644,31 @@ abstract class ###Component###Helper } return false; } + + /** + * Check if we are connected + * Thanks https://stackoverflow.com/a/4860432/1429677 + * + * @returns bool true on success + **/ + public static function isConnected() + { + // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? + $connected = @fsockopen("www.example.com", 80); + // website, port (try 80 or 443) + if ($connected) + { + //action when connected + $is_conn = true; + fclose($connected); + } + else + { + //action in connection failure + $is_conn = false; + } + return $is_conn; + } public static function mergeArrays($arrays) { diff --git a/admin/compiler/joomla_3/JModelAdmin_site.php b/admin/compiler/joomla_3/JModelAdmin_site.php index 47374e011..4ac9a3908 100644 --- a/admin/compiler/joomla_3/JModelAdmin_site.php +++ b/admin/compiler/joomla_3/JModelAdmin_site.php @@ -82,7 +82,7 @@ class ###Component###Model###View### extends JModelAdmin {###LICENSE_LOCKED_CHECK### if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/compiler/joomla_3/JViewLegacy_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_custom_admin.php index a12aa0f86..a160e5cc2 100644 --- a/admin/compiler/joomla_3/JViewLegacy_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_custom_admin.php @@ -54,7 +54,7 @@ class ###Component###View###SView### extends JViewLegacy * Prepares the document */ protected function setDocument() - {###CUSTOM_ADMIN_DOCUMENT_METADATA### ###CUSTOM_ADMIN_UIKIT_LOADER### ###CUSTOM_ADMIN_GOOGLECHART_LOADER### ###CUSTOM_ADMIN_FOOTABLE_LOADER### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP### + {###CUSTOM_ADMIN_LIBRARIES_LOADER### ###CUSTOM_ADMIN_DOCUMENT_METADATA### ###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/###sview###.css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### } diff --git a/admin/compiler/joomla_3/JViewLegacy_edit.php b/admin/compiler/joomla_3/JViewLegacy_edit.php index 02c368cea..77adae305 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit.php @@ -117,11 +117,14 @@ class ###Component###View###View### extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP### + if (!isset($this->document)) + { + $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### 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 349a82e43..57fdca976 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit_site.php @@ -121,16 +121,19 @@ class ###Component###View###View### extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // we need this to fix the form display - $document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css"); - $document->addScript(JURI::root()."administrator/templates/isis/js/template.js"); + $this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css"); + $this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js"); // the default style of this view - $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");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS### // default javascript of this view - $document->addScript(JURI::root().$this->script); - $document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP### + $this->document->addScript(JURI::root().$this->script); + $this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js"); ###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 72dd08795..5246cdbf0 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -197,9 +197,12 @@ class ###Component###View###Views### extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_###COMPONENT###_###VIEWS###')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_###COMPONENT###_###VIEWS###')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css"); } /** diff --git a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php index 17f7e54b0..64bb5a5d5 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php @@ -54,7 +54,7 @@ class ###Component###View###SViews### extends JViewLegacy * Prepares the document */ protected function setDocument() - {###CUSTOM_ADMIN_UIKIT_LOADER### ###CUSTOM_ADMIN_GOOGLECHART_LOADER### ###CUSTOM_ADMIN_FOOTABLE_LOADER### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP### + {###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### } diff --git a/admin/compiler/joomla_3/JViewLegacy_list_site.php b/admin/compiler/joomla_3/JViewLegacy_list_site.php index c1e5c7823..6369af260 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_site.php @@ -52,7 +52,7 @@ class ###Component###View###SViews### extends JViewLegacy * Prepares the document */ protected function _prepareDocument() - {###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP### + {###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### } diff --git a/admin/compiler/joomla_3/JViewLegacy_site.php b/admin/compiler/joomla_3/JViewLegacy_site.php index 851377023..3752acb8c 100644 --- a/admin/compiler/joomla_3/JViewLegacy_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_site.php @@ -52,7 +52,7 @@ class ###Component###View###SView### extends JViewLegacy * Prepares the document */ protected function _prepareDocument() - {###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP### + {###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### } diff --git a/admin/config.xml b/admin/config.xml index 119c3cf2f..7f1f7f100 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -47,95 +47,78 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + +
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- - - - - - - - - - - - - - + + + + + + + + + + + + + +
'layouts', 'dynamic_get' => 'dynamic_gets', 'custom_code' => 'custom_codes', + 'library' => 'libraries', 'snippet' => 'snippets', 'field' => 'fields', 'fieldtype' => 'fieldtypes', @@ -115,7 +116,8 @@ class ComponentbuilderController extends JControllerLegacy 'component_dashboard' => 'components_dashboard', 'component_files_folders' => 'components_files_folders', 'snippet_type' => 'snippet_types', - 'library' => 'libraries' + 'library_config' => 'libraries_config', + 'library_files_folders_urls' => 'libraries_files_folders_urls' ); // check if this is a list view if (in_array($view,$views)) diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index fccde7093..f845eb1fc 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -52,6 +52,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getButton', 'ajax'); $this->registerTask('getButtonID', 'ajax'); $this->registerTask('getAjaxDisplay', 'ajax'); + $this->registerTask('getSnippets', 'ajax'); $this->registerTask('templateDetails', 'ajax'); $this->registerTask('getLayoutDetails', 'ajax'); $this->registerTask('dbTableColumns', 'ajax'); @@ -457,6 +458,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'getSnippets': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $librariesValue = $jinput->get('libraries', NULL, 'STRING'); + if($librariesValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getSnippets($librariesValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'templateDetails': try { diff --git a/admin/controllers/get_snippets.php b/admin/controllers/get_snippets.php index 1d65b8189..57d4df20a 100644 --- a/admin/controllers/get_snippets.php +++ b/admin/controllers/get_snippets.php @@ -52,11 +52,20 @@ class ComponentbuilderControllerGet_snippets extends JControllerAdmin return; } + public function openLibraries() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // redirect to the libraries + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries', false)); + return; + } + public function openSnippets() { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // redirect to the snippets admin view + // redirect to the snippets $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=snippets', false)); return; } @@ -65,7 +74,7 @@ class ComponentbuilderControllerGet_snippets extends JControllerAdmin { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // redirect to the snippets admin view + // redirect to the site views $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=site_views', false)); return; } @@ -74,7 +83,7 @@ class ComponentbuilderControllerGet_snippets extends JControllerAdmin { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // redirect to the snippets admin view + // redirect to the custom admin views $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=custom_admin_views', false)); return; } @@ -83,7 +92,7 @@ class ComponentbuilderControllerGet_snippets extends JControllerAdmin { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // redirect to the snippets admin view + // redirect to the templates $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=templates', false)); return; } @@ -92,7 +101,7 @@ class ComponentbuilderControllerGet_snippets extends JControllerAdmin { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // redirect to the snippets admin view + // redirect to the layouts $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=layouts', false)); return; } diff --git a/admin/controllers/libraries.php b/admin/controllers/libraries.php index 0e89c427e..6cb108050 100644 --- a/admin/controllers/libraries.php +++ b/admin/controllers/libraries.php @@ -44,5 +44,14 @@ class ComponentbuilderControllerLibraries extends JControllerAdmin $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; - } + } + + public function getSnippets() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // redirect to the import snippets custom admin view + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=get_snippets', false)); + return; + } } diff --git a/admin/controllers/libraries_config.php b/admin/controllers/libraries_config.php new file mode 100644 index 000000000..31fc0d49b --- /dev/null +++ b/admin/controllers/libraries_config.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Libraries_config Controller + */ +class ComponentbuilderControllerLibraries_config extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES_CONFIG'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Library_config', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/libraries_files_folders_urls.php b/admin/controllers/libraries_files_folders_urls.php new file mode 100644 index 000000000..61fc5d345 --- /dev/null +++ b/admin/controllers/libraries_files_folders_urls.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Libraries_files_folders_urls Controller + */ +class ComponentbuilderControllerLibraries_files_folders_urls extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Library_files_folders_urls', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/library.php b/admin/controllers/library.php index 025576ac8..e45db5475 100644 --- a/admin/controllers/library.php +++ b/admin/controllers/library.php @@ -320,6 +320,31 @@ class ComponentbuilderControllerLibrary extends JControllerForm */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { + // get the state object (Joomla\CMS\Object\CMSObject) + $state = $model->get('state'); + // if we save2copy we need to also copy linked tables found! + if ($state->task === 'save2copy' && $state->{'library.new'}) + { + // get new ID + $newID = $state->{'library.id'}; + // get old ID + $oldID = $this->input->get('id', 0, 'INT'); + // linked tables to update + $_tablesArray = array( + 'library_config', + 'library_files_folders_urls' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked ID + if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, 'library', 'id')) + { + // copy fields to new linked table + ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('library' => $newID)); + } + } + } + return; } diff --git a/admin/controllers/library_config.php b/admin/controllers/library_config.php new file mode 100644 index 000000000..2edb5eec0 --- /dev/null +++ b/admin/controllers/library_config.php @@ -0,0 +1,326 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Library_config Controller + */ +class ComponentbuilderControllerLibrary_config extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Libraries_config'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('library_config.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('library_config.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('library_config.access', 'com_componentbuilder.library_config.' . (int) $recordId) && $user->authorise('library_config.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library_config.edit', 'com_componentbuilder.library_config.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('library_config.edit.own', 'com_componentbuilder.library_config.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('library_config.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('library_config.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Library_config', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries_config' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/controllers/library_files_folders_urls.php b/admin/controllers/library_files_folders_urls.php new file mode 100644 index 000000000..b6061cfce --- /dev/null +++ b/admin/controllers/library_files_folders_urls.php @@ -0,0 +1,326 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Library_files_folders_urls Controller + */ +class ComponentbuilderControllerLibrary_files_folders_urls extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Libraries_files_folders_urls'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('library_files_folders_urls.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('library_files_folders_urls.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('library_files_folders_urls.access', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId) && $user->authorise('library_files_folders_urls.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library_files_folders_urls.edit', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('library_files_folders_urls.edit.own', 'com_componentbuilder.library_files_folders_urls.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('library_files_folders_urls.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('library_files_folders_urls.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Library_files_folders_urls', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries_files_folders_urls' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/custom/footable2/LICENSE b/admin/custom/footable-v2/LICENSE similarity index 100% rename from admin/custom/footable2/LICENSE rename to admin/custom/footable-v2/LICENSE diff --git a/admin/custom/footable2/css/fonts/footable.eot b/admin/custom/footable-v2/css/fonts/footable.eot similarity index 100% rename from admin/custom/footable2/css/fonts/footable.eot rename to admin/custom/footable-v2/css/fonts/footable.eot diff --git a/admin/custom/footable2/css/fonts/footable.svg b/admin/custom/footable-v2/css/fonts/footable.svg similarity index 100% rename from admin/custom/footable2/css/fonts/footable.svg rename to admin/custom/footable-v2/css/fonts/footable.svg diff --git a/admin/custom/footable2/css/fonts/footable.ttf b/admin/custom/footable-v2/css/fonts/footable.ttf similarity index 100% rename from admin/custom/footable2/css/fonts/footable.ttf rename to admin/custom/footable-v2/css/fonts/footable.ttf diff --git a/admin/custom/footable2/css/fonts/footable.woff b/admin/custom/footable-v2/css/fonts/footable.woff similarity index 100% rename from admin/custom/footable2/css/fonts/footable.woff rename to admin/custom/footable-v2/css/fonts/footable.woff diff --git a/admin/custom/footable2/css/fonts/index.html b/admin/custom/footable-v2/css/fonts/index.html similarity index 100% rename from admin/custom/footable2/css/fonts/index.html rename to admin/custom/footable-v2/css/fonts/index.html diff --git a/admin/custom/footable2/css/footable.core.css b/admin/custom/footable-v2/css/footable.core.css similarity index 100% rename from admin/custom/footable2/css/footable.core.css rename to admin/custom/footable-v2/css/footable.core.css diff --git a/admin/custom/footable2/css/footable.core.min.css b/admin/custom/footable-v2/css/footable.core.min.css similarity index 100% rename from admin/custom/footable2/css/footable.core.min.css rename to admin/custom/footable-v2/css/footable.core.min.css diff --git a/admin/custom/footable2/css/footable.metro.css b/admin/custom/footable-v2/css/footable.metro.css similarity index 100% rename from admin/custom/footable2/css/footable.metro.css rename to admin/custom/footable-v2/css/footable.metro.css diff --git a/admin/custom/footable2/css/footable.metro.min.css b/admin/custom/footable-v2/css/footable.metro.min.css similarity index 100% rename from admin/custom/footable2/css/footable.metro.min.css rename to admin/custom/footable-v2/css/footable.metro.min.css diff --git a/admin/custom/footable2/css/footable.standalone.css b/admin/custom/footable-v2/css/footable.standalone.css similarity index 100% rename from admin/custom/footable2/css/footable.standalone.css rename to admin/custom/footable-v2/css/footable.standalone.css diff --git a/admin/custom/footable2/css/footable.standalone.min.css b/admin/custom/footable-v2/css/footable.standalone.min.css similarity index 100% rename from admin/custom/footable2/css/footable.standalone.min.css rename to admin/custom/footable-v2/css/footable.standalone.min.css diff --git a/admin/custom/footable2/css/index.html b/admin/custom/footable-v2/css/index.html similarity index 100% rename from admin/custom/footable2/css/index.html rename to admin/custom/footable-v2/css/index.html diff --git a/admin/custom/footable2/dist/footable.all.min.js b/admin/custom/footable-v2/dist/footable.all.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.all.min.js rename to admin/custom/footable-v2/dist/footable.all.min.js diff --git a/admin/custom/footable2/dist/footable.bookmarkable.min.js b/admin/custom/footable-v2/dist/footable.bookmarkable.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.bookmarkable.min.js rename to admin/custom/footable-v2/dist/footable.bookmarkable.min.js diff --git a/admin/custom/footable2/dist/footable.filter.min.js b/admin/custom/footable-v2/dist/footable.filter.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.filter.min.js rename to admin/custom/footable-v2/dist/footable.filter.min.js diff --git a/admin/custom/footable2/dist/footable.grid.min.js b/admin/custom/footable-v2/dist/footable.grid.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.grid.min.js rename to admin/custom/footable-v2/dist/footable.grid.min.js diff --git a/admin/custom/footable2/dist/footable.min.js b/admin/custom/footable-v2/dist/footable.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.min.js rename to admin/custom/footable-v2/dist/footable.min.js diff --git a/admin/custom/footable2/dist/footable.paginate.min.js b/admin/custom/footable-v2/dist/footable.paginate.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.paginate.min.js rename to admin/custom/footable-v2/dist/footable.paginate.min.js diff --git a/admin/custom/footable2/dist/footable.sort.min.js b/admin/custom/footable-v2/dist/footable.sort.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.sort.min.js rename to admin/custom/footable-v2/dist/footable.sort.min.js diff --git a/admin/custom/footable2/dist/footable.striping.min.js b/admin/custom/footable-v2/dist/footable.striping.min.js similarity index 100% rename from admin/custom/footable2/dist/footable.striping.min.js rename to admin/custom/footable-v2/dist/footable.striping.min.js diff --git a/admin/custom/footable2/dist/index.html b/admin/custom/footable-v2/dist/index.html similarity index 100% rename from admin/custom/footable2/dist/index.html rename to admin/custom/footable-v2/dist/index.html diff --git a/admin/custom/footable2/icomoon/footable.json b/admin/custom/footable-v2/icomoon/footable.json similarity index 100% rename from admin/custom/footable2/icomoon/footable.json rename to admin/custom/footable-v2/icomoon/footable.json diff --git a/admin/custom/footable2/icomoon/index.html b/admin/custom/footable-v2/icomoon/index.html similarity index 100% rename from admin/custom/footable2/icomoon/index.html rename to admin/custom/footable-v2/icomoon/index.html diff --git a/admin/custom/footable2/index.html b/admin/custom/footable-v2/index.html similarity index 100% rename from admin/custom/footable2/index.html rename to admin/custom/footable-v2/index.html diff --git a/admin/custom/footable2/js/.jshintrc b/admin/custom/footable-v2/js/.jshintrc similarity index 100% rename from admin/custom/footable2/js/.jshintrc rename to admin/custom/footable-v2/js/.jshintrc diff --git a/admin/custom/footable2/js/footable.bookmarkable.js b/admin/custom/footable-v2/js/footable.bookmarkable.js similarity index 100% rename from admin/custom/footable2/js/footable.bookmarkable.js rename to admin/custom/footable-v2/js/footable.bookmarkable.js diff --git a/admin/custom/footable2/js/footable.filter.js b/admin/custom/footable-v2/js/footable.filter.js similarity index 100% rename from admin/custom/footable2/js/footable.filter.js rename to admin/custom/footable-v2/js/footable.filter.js diff --git a/admin/custom/footable2/js/footable.grid.js b/admin/custom/footable-v2/js/footable.grid.js similarity index 100% rename from admin/custom/footable2/js/footable.grid.js rename to admin/custom/footable-v2/js/footable.grid.js diff --git a/admin/custom/footable2/js/footable.js b/admin/custom/footable-v2/js/footable.js similarity index 100% rename from admin/custom/footable2/js/footable.js rename to admin/custom/footable-v2/js/footable.js diff --git a/admin/custom/footable2/js/footable.memory.js b/admin/custom/footable-v2/js/footable.memory.js similarity index 100% rename from admin/custom/footable2/js/footable.memory.js rename to admin/custom/footable-v2/js/footable.memory.js diff --git a/admin/custom/footable2/js/footable.paginate.js b/admin/custom/footable-v2/js/footable.paginate.js similarity index 100% rename from admin/custom/footable2/js/footable.paginate.js rename to admin/custom/footable-v2/js/footable.paginate.js diff --git a/admin/custom/footable2/js/footable.plugin.template.js b/admin/custom/footable-v2/js/footable.plugin.template.js similarity index 100% rename from admin/custom/footable2/js/footable.plugin.template.js rename to admin/custom/footable-v2/js/footable.plugin.template.js diff --git a/admin/custom/footable2/js/footable.sort.js b/admin/custom/footable-v2/js/footable.sort.js similarity index 100% rename from admin/custom/footable2/js/footable.sort.js rename to admin/custom/footable-v2/js/footable.sort.js diff --git a/admin/custom/footable2/js/footable.striping.js b/admin/custom/footable-v2/js/footable.striping.js similarity index 100% rename from admin/custom/footable2/js/footable.striping.js rename to admin/custom/footable-v2/js/footable.striping.js diff --git a/admin/custom/footable2/js/index.html b/admin/custom/footable-v2/js/index.html similarity index 100% rename from admin/custom/footable2/js/index.html rename to admin/custom/footable-v2/js/index.html diff --git a/admin/custom/footable3/LICENSE-GPLv3 b/admin/custom/footable-v3/LICENSE-GPLv3 similarity index 100% rename from admin/custom/footable3/LICENSE-GPLv3 rename to admin/custom/footable-v3/LICENSE-GPLv3 diff --git a/admin/custom/footable3/css/footable.bootstrap.css b/admin/custom/footable-v3/css/footable.bootstrap.css similarity index 100% rename from admin/custom/footable3/css/footable.bootstrap.css rename to admin/custom/footable-v3/css/footable.bootstrap.css diff --git a/admin/custom/footable3/css/footable.bootstrap.min.css b/admin/custom/footable-v3/css/footable.bootstrap.min.css similarity index 100% rename from admin/custom/footable3/css/footable.bootstrap.min.css rename to admin/custom/footable-v3/css/footable.bootstrap.min.css diff --git a/admin/custom/footable3/css/footable.core.bootstrap.css b/admin/custom/footable-v3/css/footable.core.bootstrap.css similarity index 100% rename from admin/custom/footable3/css/footable.core.bootstrap.css rename to admin/custom/footable-v3/css/footable.core.bootstrap.css diff --git a/admin/custom/footable3/css/footable.core.bootstrap.min.css b/admin/custom/footable-v3/css/footable.core.bootstrap.min.css similarity index 100% rename from admin/custom/footable3/css/footable.core.bootstrap.min.css rename to admin/custom/footable-v3/css/footable.core.bootstrap.min.css diff --git a/admin/custom/footable3/css/footable.core.standalone.css b/admin/custom/footable-v3/css/footable.core.standalone.css similarity index 100% rename from admin/custom/footable3/css/footable.core.standalone.css rename to admin/custom/footable-v3/css/footable.core.standalone.css diff --git a/admin/custom/footable3/css/footable.core.standalone.min.css b/admin/custom/footable-v3/css/footable.core.standalone.min.css similarity index 100% rename from admin/custom/footable3/css/footable.core.standalone.min.css rename to admin/custom/footable-v3/css/footable.core.standalone.min.css diff --git a/admin/custom/footable3/css/footable.editing.css b/admin/custom/footable-v3/css/footable.editing.css similarity index 100% rename from admin/custom/footable3/css/footable.editing.css rename to admin/custom/footable-v3/css/footable.editing.css diff --git a/admin/custom/footable3/css/footable.editing.min.css b/admin/custom/footable-v3/css/footable.editing.min.css similarity index 100% rename from admin/custom/footable3/css/footable.editing.min.css rename to admin/custom/footable-v3/css/footable.editing.min.css diff --git a/admin/custom/footable3/css/footable.filtering.css b/admin/custom/footable-v3/css/footable.filtering.css similarity index 100% rename from admin/custom/footable3/css/footable.filtering.css rename to admin/custom/footable-v3/css/footable.filtering.css diff --git a/admin/custom/footable3/css/footable.filtering.min.css b/admin/custom/footable-v3/css/footable.filtering.min.css similarity index 100% rename from admin/custom/footable3/css/footable.filtering.min.css rename to admin/custom/footable-v3/css/footable.filtering.min.css diff --git a/admin/custom/footable3/css/footable.paging.css b/admin/custom/footable-v3/css/footable.paging.css similarity index 100% rename from admin/custom/footable3/css/footable.paging.css rename to admin/custom/footable-v3/css/footable.paging.css diff --git a/admin/custom/footable3/css/footable.paging.min.css b/admin/custom/footable-v3/css/footable.paging.min.css similarity index 100% rename from admin/custom/footable3/css/footable.paging.min.css rename to admin/custom/footable-v3/css/footable.paging.min.css diff --git a/admin/custom/footable3/css/footable.sorting.css b/admin/custom/footable-v3/css/footable.sorting.css similarity index 100% rename from admin/custom/footable3/css/footable.sorting.css rename to admin/custom/footable-v3/css/footable.sorting.css diff --git a/admin/custom/footable3/css/footable.sorting.min.css b/admin/custom/footable-v3/css/footable.sorting.min.css similarity index 100% rename from admin/custom/footable3/css/footable.sorting.min.css rename to admin/custom/footable-v3/css/footable.sorting.min.css diff --git a/admin/custom/footable3/css/footable.standalone.css b/admin/custom/footable-v3/css/footable.standalone.css similarity index 100% rename from admin/custom/footable3/css/footable.standalone.css rename to admin/custom/footable-v3/css/footable.standalone.css diff --git a/admin/custom/footable3/css/footable.standalone.min.css b/admin/custom/footable-v3/css/footable.standalone.min.css similarity index 100% rename from admin/custom/footable3/css/footable.standalone.min.css rename to admin/custom/footable-v3/css/footable.standalone.min.css diff --git a/admin/custom/footable3/css/index.html b/admin/custom/footable-v3/css/index.html similarity index 100% rename from admin/custom/footable3/css/index.html rename to admin/custom/footable-v3/css/index.html diff --git a/admin/custom/footable3/index.html b/admin/custom/footable-v3/index.html similarity index 100% rename from admin/custom/footable3/index.html rename to admin/custom/footable-v3/index.html diff --git a/admin/custom/footable3/js/footable.core.js b/admin/custom/footable-v3/js/footable.core.js similarity index 100% rename from admin/custom/footable3/js/footable.core.js rename to admin/custom/footable-v3/js/footable.core.js diff --git a/admin/custom/footable3/js/footable.core.min.js b/admin/custom/footable-v3/js/footable.core.min.js similarity index 100% rename from admin/custom/footable3/js/footable.core.min.js rename to admin/custom/footable-v3/js/footable.core.min.js diff --git a/admin/custom/footable3/js/footable.editing.js b/admin/custom/footable-v3/js/footable.editing.js similarity index 100% rename from admin/custom/footable3/js/footable.editing.js rename to admin/custom/footable-v3/js/footable.editing.js diff --git a/admin/custom/footable3/js/footable.editing.min.js b/admin/custom/footable-v3/js/footable.editing.min.js similarity index 100% rename from admin/custom/footable3/js/footable.editing.min.js rename to admin/custom/footable-v3/js/footable.editing.min.js diff --git a/admin/custom/footable3/js/footable.filtering.js b/admin/custom/footable-v3/js/footable.filtering.js similarity index 100% rename from admin/custom/footable3/js/footable.filtering.js rename to admin/custom/footable-v3/js/footable.filtering.js diff --git a/admin/custom/footable3/js/footable.filtering.min.js b/admin/custom/footable-v3/js/footable.filtering.min.js similarity index 100% rename from admin/custom/footable3/js/footable.filtering.min.js rename to admin/custom/footable-v3/js/footable.filtering.min.js diff --git a/admin/custom/footable3/js/footable.min.js b/admin/custom/footable-v3/js/footable.min.js similarity index 100% rename from admin/custom/footable3/js/footable.min.js rename to admin/custom/footable-v3/js/footable.min.js diff --git a/admin/custom/footable3/js/footable.paging.js b/admin/custom/footable-v3/js/footable.paging.js similarity index 100% rename from admin/custom/footable3/js/footable.paging.js rename to admin/custom/footable-v3/js/footable.paging.js diff --git a/admin/custom/footable3/js/footable.paging.min.js b/admin/custom/footable-v3/js/footable.paging.min.js similarity index 100% rename from admin/custom/footable3/js/footable.paging.min.js rename to admin/custom/footable-v3/js/footable.paging.min.js diff --git a/admin/custom/footable3/js/footable.sorting.js b/admin/custom/footable-v3/js/footable.sorting.js similarity index 100% rename from admin/custom/footable3/js/footable.sorting.js rename to admin/custom/footable-v3/js/footable.sorting.js diff --git a/admin/custom/footable3/js/footable.sorting.min.js b/admin/custom/footable-v3/js/footable.sorting.min.js similarity index 100% rename from admin/custom/footable3/js/footable.sorting.min.js rename to admin/custom/footable-v3/js/footable.sorting.min.js diff --git a/admin/custom/footable3/js/footable.state.js b/admin/custom/footable-v3/js/footable.state.js similarity index 100% rename from admin/custom/footable3/js/footable.state.js rename to admin/custom/footable-v3/js/footable.state.js diff --git a/admin/custom/footable3/js/footable.state.min.js b/admin/custom/footable-v3/js/footable.state.min.js similarity index 100% rename from admin/custom/footable3/js/footable.state.min.js rename to admin/custom/footable-v3/js/footable.state.min.js diff --git a/admin/custom/footable3/js/index.html b/admin/custom/footable-v3/js/index.html similarity index 100% rename from admin/custom/footable3/js/index.html rename to admin/custom/footable-v3/js/index.html diff --git a/admin/custom/uikit/css/components/accordion.almost-flat.css b/admin/custom/uikit-v2/css/components/accordion.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/accordion.almost-flat.css rename to admin/custom/uikit-v2/css/components/accordion.almost-flat.css diff --git a/admin/custom/uikit/css/components/accordion.almost-flat.min.css b/admin/custom/uikit-v2/css/components/accordion.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/accordion.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/accordion.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/accordion.css b/admin/custom/uikit-v2/css/components/accordion.css similarity index 100% rename from admin/custom/uikit/css/components/accordion.css rename to admin/custom/uikit-v2/css/components/accordion.css diff --git a/admin/custom/uikit/css/components/accordion.gradient.css b/admin/custom/uikit-v2/css/components/accordion.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/accordion.gradient.css rename to admin/custom/uikit-v2/css/components/accordion.gradient.css diff --git a/admin/custom/uikit/css/components/accordion.gradient.min.css b/admin/custom/uikit-v2/css/components/accordion.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/accordion.gradient.min.css rename to admin/custom/uikit-v2/css/components/accordion.gradient.min.css diff --git a/admin/custom/uikit/css/components/accordion.min.css b/admin/custom/uikit-v2/css/components/accordion.min.css similarity index 100% rename from admin/custom/uikit/css/components/accordion.min.css rename to admin/custom/uikit-v2/css/components/accordion.min.css diff --git a/admin/custom/uikit/css/components/autocomplete.almost-flat.css b/admin/custom/uikit-v2/css/components/autocomplete.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/autocomplete.almost-flat.css rename to admin/custom/uikit-v2/css/components/autocomplete.almost-flat.css diff --git a/admin/custom/uikit/css/components/autocomplete.almost-flat.min.css b/admin/custom/uikit-v2/css/components/autocomplete.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/autocomplete.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/autocomplete.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/autocomplete.css b/admin/custom/uikit-v2/css/components/autocomplete.css similarity index 100% rename from admin/custom/uikit/css/components/autocomplete.css rename to admin/custom/uikit-v2/css/components/autocomplete.css diff --git a/admin/custom/uikit/css/components/autocomplete.gradient.css b/admin/custom/uikit-v2/css/components/autocomplete.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/autocomplete.gradient.css rename to admin/custom/uikit-v2/css/components/autocomplete.gradient.css diff --git a/admin/custom/uikit/css/components/autocomplete.gradient.min.css b/admin/custom/uikit-v2/css/components/autocomplete.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/autocomplete.gradient.min.css rename to admin/custom/uikit-v2/css/components/autocomplete.gradient.min.css diff --git a/admin/custom/uikit/css/components/autocomplete.min.css b/admin/custom/uikit-v2/css/components/autocomplete.min.css similarity index 100% rename from admin/custom/uikit/css/components/autocomplete.min.css rename to admin/custom/uikit-v2/css/components/autocomplete.min.css diff --git a/admin/custom/uikit/css/components/datepicker.almost-flat.css b/admin/custom/uikit-v2/css/components/datepicker.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/datepicker.almost-flat.css rename to admin/custom/uikit-v2/css/components/datepicker.almost-flat.css diff --git a/admin/custom/uikit/css/components/datepicker.almost-flat.min.css b/admin/custom/uikit-v2/css/components/datepicker.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/datepicker.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/datepicker.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/datepicker.css b/admin/custom/uikit-v2/css/components/datepicker.css similarity index 100% rename from admin/custom/uikit/css/components/datepicker.css rename to admin/custom/uikit-v2/css/components/datepicker.css diff --git a/admin/custom/uikit/css/components/datepicker.gradient.css b/admin/custom/uikit-v2/css/components/datepicker.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/datepicker.gradient.css rename to admin/custom/uikit-v2/css/components/datepicker.gradient.css diff --git a/admin/custom/uikit/css/components/datepicker.gradient.min.css b/admin/custom/uikit-v2/css/components/datepicker.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/datepicker.gradient.min.css rename to admin/custom/uikit-v2/css/components/datepicker.gradient.min.css diff --git a/admin/custom/uikit/css/components/datepicker.min.css b/admin/custom/uikit-v2/css/components/datepicker.min.css similarity index 100% rename from admin/custom/uikit/css/components/datepicker.min.css rename to admin/custom/uikit-v2/css/components/datepicker.min.css diff --git a/admin/custom/uikit/css/components/dotnav.almost-flat.css b/admin/custom/uikit-v2/css/components/dotnav.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/dotnav.almost-flat.css rename to admin/custom/uikit-v2/css/components/dotnav.almost-flat.css diff --git a/admin/custom/uikit/css/components/dotnav.almost-flat.min.css b/admin/custom/uikit-v2/css/components/dotnav.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/dotnav.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/dotnav.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/dotnav.css b/admin/custom/uikit-v2/css/components/dotnav.css similarity index 100% rename from admin/custom/uikit/css/components/dotnav.css rename to admin/custom/uikit-v2/css/components/dotnav.css diff --git a/admin/custom/uikit/css/components/dotnav.gradient.css b/admin/custom/uikit-v2/css/components/dotnav.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/dotnav.gradient.css rename to admin/custom/uikit-v2/css/components/dotnav.gradient.css diff --git a/admin/custom/uikit/css/components/dotnav.gradient.min.css b/admin/custom/uikit-v2/css/components/dotnav.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/dotnav.gradient.min.css rename to admin/custom/uikit-v2/css/components/dotnav.gradient.min.css diff --git a/admin/custom/uikit/css/components/dotnav.min.css b/admin/custom/uikit-v2/css/components/dotnav.min.css similarity index 100% rename from admin/custom/uikit/css/components/dotnav.min.css rename to admin/custom/uikit-v2/css/components/dotnav.min.css diff --git a/admin/custom/uikit/css/components/form-advanced.almost-flat.css b/admin/custom/uikit-v2/css/components/form-advanced.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/form-advanced.almost-flat.css rename to admin/custom/uikit-v2/css/components/form-advanced.almost-flat.css diff --git a/admin/custom/uikit/css/components/form-advanced.almost-flat.min.css b/admin/custom/uikit-v2/css/components/form-advanced.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-advanced.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/form-advanced.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/form-advanced.css b/admin/custom/uikit-v2/css/components/form-advanced.css similarity index 100% rename from admin/custom/uikit/css/components/form-advanced.css rename to admin/custom/uikit-v2/css/components/form-advanced.css diff --git a/admin/custom/uikit/css/components/form-advanced.gradient.css b/admin/custom/uikit-v2/css/components/form-advanced.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/form-advanced.gradient.css rename to admin/custom/uikit-v2/css/components/form-advanced.gradient.css diff --git a/admin/custom/uikit/css/components/form-advanced.gradient.min.css b/admin/custom/uikit-v2/css/components/form-advanced.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-advanced.gradient.min.css rename to admin/custom/uikit-v2/css/components/form-advanced.gradient.min.css diff --git a/admin/custom/uikit/css/components/form-advanced.min.css b/admin/custom/uikit-v2/css/components/form-advanced.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-advanced.min.css rename to admin/custom/uikit-v2/css/components/form-advanced.min.css diff --git a/admin/custom/uikit/css/components/form-file.almost-flat.css b/admin/custom/uikit-v2/css/components/form-file.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/form-file.almost-flat.css rename to admin/custom/uikit-v2/css/components/form-file.almost-flat.css diff --git a/admin/custom/uikit/css/components/form-file.almost-flat.min.css b/admin/custom/uikit-v2/css/components/form-file.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-file.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/form-file.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/form-file.css b/admin/custom/uikit-v2/css/components/form-file.css similarity index 100% rename from admin/custom/uikit/css/components/form-file.css rename to admin/custom/uikit-v2/css/components/form-file.css diff --git a/admin/custom/uikit/css/components/form-file.gradient.css b/admin/custom/uikit-v2/css/components/form-file.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/form-file.gradient.css rename to admin/custom/uikit-v2/css/components/form-file.gradient.css diff --git a/admin/custom/uikit/css/components/form-file.gradient.min.css b/admin/custom/uikit-v2/css/components/form-file.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-file.gradient.min.css rename to admin/custom/uikit-v2/css/components/form-file.gradient.min.css diff --git a/admin/custom/uikit/css/components/form-file.min.css b/admin/custom/uikit-v2/css/components/form-file.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-file.min.css rename to admin/custom/uikit-v2/css/components/form-file.min.css diff --git a/admin/custom/uikit/css/components/form-password.almost-flat.css b/admin/custom/uikit-v2/css/components/form-password.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/form-password.almost-flat.css rename to admin/custom/uikit-v2/css/components/form-password.almost-flat.css diff --git a/admin/custom/uikit/css/components/form-password.almost-flat.min.css b/admin/custom/uikit-v2/css/components/form-password.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-password.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/form-password.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/form-password.css b/admin/custom/uikit-v2/css/components/form-password.css similarity index 100% rename from admin/custom/uikit/css/components/form-password.css rename to admin/custom/uikit-v2/css/components/form-password.css diff --git a/admin/custom/uikit/css/components/form-password.gradient.css b/admin/custom/uikit-v2/css/components/form-password.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/form-password.gradient.css rename to admin/custom/uikit-v2/css/components/form-password.gradient.css diff --git a/admin/custom/uikit/css/components/form-password.gradient.min.css b/admin/custom/uikit-v2/css/components/form-password.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-password.gradient.min.css rename to admin/custom/uikit-v2/css/components/form-password.gradient.min.css diff --git a/admin/custom/uikit/css/components/form-password.min.css b/admin/custom/uikit-v2/css/components/form-password.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-password.min.css rename to admin/custom/uikit-v2/css/components/form-password.min.css diff --git a/admin/custom/uikit/css/components/form-select.almost-flat.css b/admin/custom/uikit-v2/css/components/form-select.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/form-select.almost-flat.css rename to admin/custom/uikit-v2/css/components/form-select.almost-flat.css diff --git a/admin/custom/uikit/css/components/form-select.almost-flat.min.css b/admin/custom/uikit-v2/css/components/form-select.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-select.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/form-select.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/form-select.css b/admin/custom/uikit-v2/css/components/form-select.css similarity index 100% rename from admin/custom/uikit/css/components/form-select.css rename to admin/custom/uikit-v2/css/components/form-select.css diff --git a/admin/custom/uikit/css/components/form-select.gradient.css b/admin/custom/uikit-v2/css/components/form-select.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/form-select.gradient.css rename to admin/custom/uikit-v2/css/components/form-select.gradient.css diff --git a/admin/custom/uikit/css/components/form-select.gradient.min.css b/admin/custom/uikit-v2/css/components/form-select.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-select.gradient.min.css rename to admin/custom/uikit-v2/css/components/form-select.gradient.min.css diff --git a/admin/custom/uikit/css/components/form-select.min.css b/admin/custom/uikit-v2/css/components/form-select.min.css similarity index 100% rename from admin/custom/uikit/css/components/form-select.min.css rename to admin/custom/uikit-v2/css/components/form-select.min.css diff --git a/admin/custom/uikit/css/components/htmleditor.almost-flat.css b/admin/custom/uikit-v2/css/components/htmleditor.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/htmleditor.almost-flat.css rename to admin/custom/uikit-v2/css/components/htmleditor.almost-flat.css diff --git a/admin/custom/uikit/css/components/htmleditor.almost-flat.min.css b/admin/custom/uikit-v2/css/components/htmleditor.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/htmleditor.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/htmleditor.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/htmleditor.css b/admin/custom/uikit-v2/css/components/htmleditor.css similarity index 100% rename from admin/custom/uikit/css/components/htmleditor.css rename to admin/custom/uikit-v2/css/components/htmleditor.css diff --git a/admin/custom/uikit/css/components/htmleditor.gradient.css b/admin/custom/uikit-v2/css/components/htmleditor.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/htmleditor.gradient.css rename to admin/custom/uikit-v2/css/components/htmleditor.gradient.css diff --git a/admin/custom/uikit/css/components/htmleditor.gradient.min.css b/admin/custom/uikit-v2/css/components/htmleditor.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/htmleditor.gradient.min.css rename to admin/custom/uikit-v2/css/components/htmleditor.gradient.min.css diff --git a/admin/custom/uikit/css/components/htmleditor.min.css b/admin/custom/uikit-v2/css/components/htmleditor.min.css similarity index 100% rename from admin/custom/uikit/css/components/htmleditor.min.css rename to admin/custom/uikit-v2/css/components/htmleditor.min.css diff --git a/admin/custom/uikit/css/components/index.html b/admin/custom/uikit-v2/css/components/index.html similarity index 100% rename from admin/custom/uikit/css/components/index.html rename to admin/custom/uikit-v2/css/components/index.html diff --git a/admin/custom/uikit/css/components/nestable.almost-flat.css b/admin/custom/uikit-v2/css/components/nestable.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/nestable.almost-flat.css rename to admin/custom/uikit-v2/css/components/nestable.almost-flat.css diff --git a/admin/custom/uikit/css/components/nestable.almost-flat.min.css b/admin/custom/uikit-v2/css/components/nestable.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/nestable.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/nestable.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/nestable.css b/admin/custom/uikit-v2/css/components/nestable.css similarity index 100% rename from admin/custom/uikit/css/components/nestable.css rename to admin/custom/uikit-v2/css/components/nestable.css diff --git a/admin/custom/uikit/css/components/nestable.gradient.css b/admin/custom/uikit-v2/css/components/nestable.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/nestable.gradient.css rename to admin/custom/uikit-v2/css/components/nestable.gradient.css diff --git a/admin/custom/uikit/css/components/nestable.gradient.min.css b/admin/custom/uikit-v2/css/components/nestable.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/nestable.gradient.min.css rename to admin/custom/uikit-v2/css/components/nestable.gradient.min.css diff --git a/admin/custom/uikit/css/components/nestable.min.css b/admin/custom/uikit-v2/css/components/nestable.min.css similarity index 100% rename from admin/custom/uikit/css/components/nestable.min.css rename to admin/custom/uikit-v2/css/components/nestable.min.css diff --git a/admin/custom/uikit/css/components/notify.almost-flat.css b/admin/custom/uikit-v2/css/components/notify.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/notify.almost-flat.css rename to admin/custom/uikit-v2/css/components/notify.almost-flat.css diff --git a/admin/custom/uikit/css/components/notify.almost-flat.min.css b/admin/custom/uikit-v2/css/components/notify.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/notify.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/notify.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/notify.css b/admin/custom/uikit-v2/css/components/notify.css similarity index 100% rename from admin/custom/uikit/css/components/notify.css rename to admin/custom/uikit-v2/css/components/notify.css diff --git a/admin/custom/uikit/css/components/notify.gradient.css b/admin/custom/uikit-v2/css/components/notify.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/notify.gradient.css rename to admin/custom/uikit-v2/css/components/notify.gradient.css diff --git a/admin/custom/uikit/css/components/notify.gradient.min.css b/admin/custom/uikit-v2/css/components/notify.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/notify.gradient.min.css rename to admin/custom/uikit-v2/css/components/notify.gradient.min.css diff --git a/admin/custom/uikit/css/components/notify.min.css b/admin/custom/uikit-v2/css/components/notify.min.css similarity index 100% rename from admin/custom/uikit/css/components/notify.min.css rename to admin/custom/uikit-v2/css/components/notify.min.css diff --git a/admin/custom/uikit/css/components/placeholder.almost-flat.css b/admin/custom/uikit-v2/css/components/placeholder.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/placeholder.almost-flat.css rename to admin/custom/uikit-v2/css/components/placeholder.almost-flat.css diff --git a/admin/custom/uikit/css/components/placeholder.almost-flat.min.css b/admin/custom/uikit-v2/css/components/placeholder.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/placeholder.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/placeholder.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/placeholder.css b/admin/custom/uikit-v2/css/components/placeholder.css similarity index 100% rename from admin/custom/uikit/css/components/placeholder.css rename to admin/custom/uikit-v2/css/components/placeholder.css diff --git a/admin/custom/uikit/css/components/placeholder.gradient.css b/admin/custom/uikit-v2/css/components/placeholder.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/placeholder.gradient.css rename to admin/custom/uikit-v2/css/components/placeholder.gradient.css diff --git a/admin/custom/uikit/css/components/placeholder.gradient.min.css b/admin/custom/uikit-v2/css/components/placeholder.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/placeholder.gradient.min.css rename to admin/custom/uikit-v2/css/components/placeholder.gradient.min.css diff --git a/admin/custom/uikit/css/components/placeholder.min.css b/admin/custom/uikit-v2/css/components/placeholder.min.css similarity index 100% rename from admin/custom/uikit/css/components/placeholder.min.css rename to admin/custom/uikit-v2/css/components/placeholder.min.css diff --git a/admin/custom/uikit/css/components/progress.almost-flat.css b/admin/custom/uikit-v2/css/components/progress.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/progress.almost-flat.css rename to admin/custom/uikit-v2/css/components/progress.almost-flat.css diff --git a/admin/custom/uikit/css/components/progress.almost-flat.min.css b/admin/custom/uikit-v2/css/components/progress.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/progress.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/progress.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/progress.css b/admin/custom/uikit-v2/css/components/progress.css similarity index 100% rename from admin/custom/uikit/css/components/progress.css rename to admin/custom/uikit-v2/css/components/progress.css diff --git a/admin/custom/uikit/css/components/progress.gradient.css b/admin/custom/uikit-v2/css/components/progress.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/progress.gradient.css rename to admin/custom/uikit-v2/css/components/progress.gradient.css diff --git a/admin/custom/uikit/css/components/progress.gradient.min.css b/admin/custom/uikit-v2/css/components/progress.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/progress.gradient.min.css rename to admin/custom/uikit-v2/css/components/progress.gradient.min.css diff --git a/admin/custom/uikit/css/components/progress.min.css b/admin/custom/uikit-v2/css/components/progress.min.css similarity index 100% rename from admin/custom/uikit/css/components/progress.min.css rename to admin/custom/uikit-v2/css/components/progress.min.css diff --git a/admin/custom/uikit/css/components/search.almost-flat.css b/admin/custom/uikit-v2/css/components/search.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/search.almost-flat.css rename to admin/custom/uikit-v2/css/components/search.almost-flat.css diff --git a/admin/custom/uikit/css/components/search.almost-flat.min.css b/admin/custom/uikit-v2/css/components/search.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/search.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/search.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/search.css b/admin/custom/uikit-v2/css/components/search.css similarity index 100% rename from admin/custom/uikit/css/components/search.css rename to admin/custom/uikit-v2/css/components/search.css diff --git a/admin/custom/uikit/css/components/search.gradient.css b/admin/custom/uikit-v2/css/components/search.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/search.gradient.css rename to admin/custom/uikit-v2/css/components/search.gradient.css diff --git a/admin/custom/uikit/css/components/search.gradient.min.css b/admin/custom/uikit-v2/css/components/search.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/search.gradient.min.css rename to admin/custom/uikit-v2/css/components/search.gradient.min.css diff --git a/admin/custom/uikit/css/components/search.min.css b/admin/custom/uikit-v2/css/components/search.min.css similarity index 100% rename from admin/custom/uikit/css/components/search.min.css rename to admin/custom/uikit-v2/css/components/search.min.css diff --git a/admin/custom/uikit/css/components/slidenav.almost-flat.css b/admin/custom/uikit-v2/css/components/slidenav.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/slidenav.almost-flat.css rename to admin/custom/uikit-v2/css/components/slidenav.almost-flat.css diff --git a/admin/custom/uikit/css/components/slidenav.almost-flat.min.css b/admin/custom/uikit-v2/css/components/slidenav.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/slidenav.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/slidenav.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/slidenav.css b/admin/custom/uikit-v2/css/components/slidenav.css similarity index 100% rename from admin/custom/uikit/css/components/slidenav.css rename to admin/custom/uikit-v2/css/components/slidenav.css diff --git a/admin/custom/uikit/css/components/slidenav.gradient.css b/admin/custom/uikit-v2/css/components/slidenav.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/slidenav.gradient.css rename to admin/custom/uikit-v2/css/components/slidenav.gradient.css diff --git a/admin/custom/uikit/css/components/slidenav.gradient.min.css b/admin/custom/uikit-v2/css/components/slidenav.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/slidenav.gradient.min.css rename to admin/custom/uikit-v2/css/components/slidenav.gradient.min.css diff --git a/admin/custom/uikit/css/components/slidenav.min.css b/admin/custom/uikit-v2/css/components/slidenav.min.css similarity index 100% rename from admin/custom/uikit/css/components/slidenav.min.css rename to admin/custom/uikit-v2/css/components/slidenav.min.css diff --git a/admin/custom/uikit/css/components/slider.almost-flat.css b/admin/custom/uikit-v2/css/components/slider.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/slider.almost-flat.css rename to admin/custom/uikit-v2/css/components/slider.almost-flat.css diff --git a/admin/custom/uikit/css/components/slider.almost-flat.min.css b/admin/custom/uikit-v2/css/components/slider.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/slider.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/slider.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/slider.css b/admin/custom/uikit-v2/css/components/slider.css similarity index 100% rename from admin/custom/uikit/css/components/slider.css rename to admin/custom/uikit-v2/css/components/slider.css diff --git a/admin/custom/uikit/css/components/slider.gradient.css b/admin/custom/uikit-v2/css/components/slider.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/slider.gradient.css rename to admin/custom/uikit-v2/css/components/slider.gradient.css diff --git a/admin/custom/uikit/css/components/slider.gradient.min.css b/admin/custom/uikit-v2/css/components/slider.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/slider.gradient.min.css rename to admin/custom/uikit-v2/css/components/slider.gradient.min.css diff --git a/admin/custom/uikit/css/components/slider.min.css b/admin/custom/uikit-v2/css/components/slider.min.css similarity index 100% rename from admin/custom/uikit/css/components/slider.min.css rename to admin/custom/uikit-v2/css/components/slider.min.css diff --git a/admin/custom/uikit/css/components/slideshow.almost-flat.css b/admin/custom/uikit-v2/css/components/slideshow.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/slideshow.almost-flat.css rename to admin/custom/uikit-v2/css/components/slideshow.almost-flat.css diff --git a/admin/custom/uikit/css/components/slideshow.almost-flat.min.css b/admin/custom/uikit-v2/css/components/slideshow.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/slideshow.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/slideshow.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/slideshow.css b/admin/custom/uikit-v2/css/components/slideshow.css similarity index 100% rename from admin/custom/uikit/css/components/slideshow.css rename to admin/custom/uikit-v2/css/components/slideshow.css diff --git a/admin/custom/uikit/css/components/slideshow.gradient.css b/admin/custom/uikit-v2/css/components/slideshow.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/slideshow.gradient.css rename to admin/custom/uikit-v2/css/components/slideshow.gradient.css diff --git a/admin/custom/uikit/css/components/slideshow.gradient.min.css b/admin/custom/uikit-v2/css/components/slideshow.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/slideshow.gradient.min.css rename to admin/custom/uikit-v2/css/components/slideshow.gradient.min.css diff --git a/admin/custom/uikit/css/components/slideshow.min.css b/admin/custom/uikit-v2/css/components/slideshow.min.css similarity index 100% rename from admin/custom/uikit/css/components/slideshow.min.css rename to admin/custom/uikit-v2/css/components/slideshow.min.css diff --git a/admin/custom/uikit/css/components/sortable.almost-flat.css b/admin/custom/uikit-v2/css/components/sortable.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/sortable.almost-flat.css rename to admin/custom/uikit-v2/css/components/sortable.almost-flat.css diff --git a/admin/custom/uikit/css/components/sortable.almost-flat.min.css b/admin/custom/uikit-v2/css/components/sortable.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/sortable.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/sortable.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/sortable.css b/admin/custom/uikit-v2/css/components/sortable.css similarity index 100% rename from admin/custom/uikit/css/components/sortable.css rename to admin/custom/uikit-v2/css/components/sortable.css diff --git a/admin/custom/uikit/css/components/sortable.gradient.css b/admin/custom/uikit-v2/css/components/sortable.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/sortable.gradient.css rename to admin/custom/uikit-v2/css/components/sortable.gradient.css diff --git a/admin/custom/uikit/css/components/sortable.gradient.min.css b/admin/custom/uikit-v2/css/components/sortable.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/sortable.gradient.min.css rename to admin/custom/uikit-v2/css/components/sortable.gradient.min.css diff --git a/admin/custom/uikit/css/components/sortable.min.css b/admin/custom/uikit-v2/css/components/sortable.min.css similarity index 100% rename from admin/custom/uikit/css/components/sortable.min.css rename to admin/custom/uikit-v2/css/components/sortable.min.css diff --git a/admin/custom/uikit/css/components/sticky.almost-flat.css b/admin/custom/uikit-v2/css/components/sticky.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/sticky.almost-flat.css rename to admin/custom/uikit-v2/css/components/sticky.almost-flat.css diff --git a/admin/custom/uikit/css/components/sticky.almost-flat.min.css b/admin/custom/uikit-v2/css/components/sticky.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/sticky.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/sticky.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/sticky.css b/admin/custom/uikit-v2/css/components/sticky.css similarity index 100% rename from admin/custom/uikit/css/components/sticky.css rename to admin/custom/uikit-v2/css/components/sticky.css diff --git a/admin/custom/uikit/css/components/sticky.gradient.css b/admin/custom/uikit-v2/css/components/sticky.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/sticky.gradient.css rename to admin/custom/uikit-v2/css/components/sticky.gradient.css diff --git a/admin/custom/uikit/css/components/sticky.gradient.min.css b/admin/custom/uikit-v2/css/components/sticky.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/sticky.gradient.min.css rename to admin/custom/uikit-v2/css/components/sticky.gradient.min.css diff --git a/admin/custom/uikit/css/components/sticky.min.css b/admin/custom/uikit-v2/css/components/sticky.min.css similarity index 100% rename from admin/custom/uikit/css/components/sticky.min.css rename to admin/custom/uikit-v2/css/components/sticky.min.css diff --git a/admin/custom/uikit/css/components/tooltip.almost-flat.css b/admin/custom/uikit-v2/css/components/tooltip.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/tooltip.almost-flat.css rename to admin/custom/uikit-v2/css/components/tooltip.almost-flat.css diff --git a/admin/custom/uikit/css/components/tooltip.almost-flat.min.css b/admin/custom/uikit-v2/css/components/tooltip.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/tooltip.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/tooltip.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/tooltip.css b/admin/custom/uikit-v2/css/components/tooltip.css similarity index 100% rename from admin/custom/uikit/css/components/tooltip.css rename to admin/custom/uikit-v2/css/components/tooltip.css diff --git a/admin/custom/uikit/css/components/tooltip.gradient.css b/admin/custom/uikit-v2/css/components/tooltip.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/tooltip.gradient.css rename to admin/custom/uikit-v2/css/components/tooltip.gradient.css diff --git a/admin/custom/uikit/css/components/tooltip.gradient.min.css b/admin/custom/uikit-v2/css/components/tooltip.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/tooltip.gradient.min.css rename to admin/custom/uikit-v2/css/components/tooltip.gradient.min.css diff --git a/admin/custom/uikit/css/components/tooltip.min.css b/admin/custom/uikit-v2/css/components/tooltip.min.css similarity index 100% rename from admin/custom/uikit/css/components/tooltip.min.css rename to admin/custom/uikit-v2/css/components/tooltip.min.css diff --git a/admin/custom/uikit/css/components/upload.almost-flat.css b/admin/custom/uikit-v2/css/components/upload.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/components/upload.almost-flat.css rename to admin/custom/uikit-v2/css/components/upload.almost-flat.css diff --git a/admin/custom/uikit/css/components/upload.almost-flat.min.css b/admin/custom/uikit-v2/css/components/upload.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/components/upload.almost-flat.min.css rename to admin/custom/uikit-v2/css/components/upload.almost-flat.min.css diff --git a/admin/custom/uikit/css/components/upload.css b/admin/custom/uikit-v2/css/components/upload.css similarity index 100% rename from admin/custom/uikit/css/components/upload.css rename to admin/custom/uikit-v2/css/components/upload.css diff --git a/admin/custom/uikit/css/components/upload.gradient.css b/admin/custom/uikit-v2/css/components/upload.gradient.css similarity index 100% rename from admin/custom/uikit/css/components/upload.gradient.css rename to admin/custom/uikit-v2/css/components/upload.gradient.css diff --git a/admin/custom/uikit/css/components/upload.gradient.min.css b/admin/custom/uikit-v2/css/components/upload.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/components/upload.gradient.min.css rename to admin/custom/uikit-v2/css/components/upload.gradient.min.css diff --git a/admin/custom/uikit/css/components/upload.min.css b/admin/custom/uikit-v2/css/components/upload.min.css similarity index 100% rename from admin/custom/uikit/css/components/upload.min.css rename to admin/custom/uikit-v2/css/components/upload.min.css diff --git a/admin/custom/uikit/css/index.html b/admin/custom/uikit-v2/css/index.html similarity index 100% rename from admin/custom/uikit/css/index.html rename to admin/custom/uikit-v2/css/index.html diff --git a/admin/custom/uikit/css/uikit.almost-flat.css b/admin/custom/uikit-v2/css/uikit.almost-flat.css similarity index 100% rename from admin/custom/uikit/css/uikit.almost-flat.css rename to admin/custom/uikit-v2/css/uikit.almost-flat.css diff --git a/admin/custom/uikit/css/uikit.almost-flat.min.css b/admin/custom/uikit-v2/css/uikit.almost-flat.min.css similarity index 100% rename from admin/custom/uikit/css/uikit.almost-flat.min.css rename to admin/custom/uikit-v2/css/uikit.almost-flat.min.css diff --git a/admin/custom/uikit/css/uikit.css b/admin/custom/uikit-v2/css/uikit.css similarity index 100% rename from admin/custom/uikit/css/uikit.css rename to admin/custom/uikit-v2/css/uikit.css diff --git a/admin/custom/uikit/css/uikit.gradient.css b/admin/custom/uikit-v2/css/uikit.gradient.css similarity index 100% rename from admin/custom/uikit/css/uikit.gradient.css rename to admin/custom/uikit-v2/css/uikit.gradient.css diff --git a/admin/custom/uikit/css/uikit.gradient.min.css b/admin/custom/uikit-v2/css/uikit.gradient.min.css similarity index 100% rename from admin/custom/uikit/css/uikit.gradient.min.css rename to admin/custom/uikit-v2/css/uikit.gradient.min.css diff --git a/admin/custom/uikit/css/uikit.min.css b/admin/custom/uikit-v2/css/uikit.min.css similarity index 100% rename from admin/custom/uikit/css/uikit.min.css rename to admin/custom/uikit-v2/css/uikit.min.css diff --git a/admin/custom/uikit/fonts/FontAwesome.otf b/admin/custom/uikit-v2/fonts/FontAwesome.otf similarity index 100% rename from admin/custom/uikit/fonts/FontAwesome.otf rename to admin/custom/uikit-v2/fonts/FontAwesome.otf diff --git a/admin/custom/uikit/fonts/fontawesome-webfont.ttf b/admin/custom/uikit-v2/fonts/fontawesome-webfont.ttf similarity index 100% rename from admin/custom/uikit/fonts/fontawesome-webfont.ttf rename to admin/custom/uikit-v2/fonts/fontawesome-webfont.ttf diff --git a/admin/custom/uikit/fonts/fontawesome-webfont.woff b/admin/custom/uikit-v2/fonts/fontawesome-webfont.woff similarity index 100% rename from admin/custom/uikit/fonts/fontawesome-webfont.woff rename to admin/custom/uikit-v2/fonts/fontawesome-webfont.woff diff --git a/admin/custom/uikit/fonts/fontawesome-webfont.woff2 b/admin/custom/uikit-v2/fonts/fontawesome-webfont.woff2 similarity index 100% rename from admin/custom/uikit/fonts/fontawesome-webfont.woff2 rename to admin/custom/uikit-v2/fonts/fontawesome-webfont.woff2 diff --git a/admin/custom/uikit/fonts/index.html b/admin/custom/uikit-v2/fonts/index.html similarity index 100% rename from admin/custom/uikit/fonts/index.html rename to admin/custom/uikit-v2/fonts/index.html diff --git a/admin/custom/uikit/index.html b/admin/custom/uikit-v2/index.html similarity index 100% rename from admin/custom/uikit/index.html rename to admin/custom/uikit-v2/index.html diff --git a/admin/custom/uikit/js/components/accordion.js b/admin/custom/uikit-v2/js/components/accordion.js similarity index 100% rename from admin/custom/uikit/js/components/accordion.js rename to admin/custom/uikit-v2/js/components/accordion.js diff --git a/admin/custom/uikit/js/components/accordion.min.js b/admin/custom/uikit-v2/js/components/accordion.min.js similarity index 100% rename from admin/custom/uikit/js/components/accordion.min.js rename to admin/custom/uikit-v2/js/components/accordion.min.js diff --git a/admin/custom/uikit/js/components/autocomplete.js b/admin/custom/uikit-v2/js/components/autocomplete.js similarity index 100% rename from admin/custom/uikit/js/components/autocomplete.js rename to admin/custom/uikit-v2/js/components/autocomplete.js diff --git a/admin/custom/uikit/js/components/autocomplete.min.js b/admin/custom/uikit-v2/js/components/autocomplete.min.js similarity index 100% rename from admin/custom/uikit/js/components/autocomplete.min.js rename to admin/custom/uikit-v2/js/components/autocomplete.min.js diff --git a/admin/custom/uikit/js/components/datepicker.js b/admin/custom/uikit-v2/js/components/datepicker.js similarity index 100% rename from admin/custom/uikit/js/components/datepicker.js rename to admin/custom/uikit-v2/js/components/datepicker.js diff --git a/admin/custom/uikit/js/components/datepicker.min.js b/admin/custom/uikit-v2/js/components/datepicker.min.js similarity index 100% rename from admin/custom/uikit/js/components/datepicker.min.js rename to admin/custom/uikit-v2/js/components/datepicker.min.js diff --git a/admin/custom/uikit/js/components/form-password.js b/admin/custom/uikit-v2/js/components/form-password.js similarity index 100% rename from admin/custom/uikit/js/components/form-password.js rename to admin/custom/uikit-v2/js/components/form-password.js diff --git a/admin/custom/uikit/js/components/form-password.min.js b/admin/custom/uikit-v2/js/components/form-password.min.js similarity index 100% rename from admin/custom/uikit/js/components/form-password.min.js rename to admin/custom/uikit-v2/js/components/form-password.min.js diff --git a/admin/custom/uikit/js/components/form-select.js b/admin/custom/uikit-v2/js/components/form-select.js similarity index 100% rename from admin/custom/uikit/js/components/form-select.js rename to admin/custom/uikit-v2/js/components/form-select.js diff --git a/admin/custom/uikit/js/components/form-select.min.js b/admin/custom/uikit-v2/js/components/form-select.min.js similarity index 100% rename from admin/custom/uikit/js/components/form-select.min.js rename to admin/custom/uikit-v2/js/components/form-select.min.js diff --git a/admin/custom/uikit/js/components/grid-parallax.js b/admin/custom/uikit-v2/js/components/grid-parallax.js similarity index 100% rename from admin/custom/uikit/js/components/grid-parallax.js rename to admin/custom/uikit-v2/js/components/grid-parallax.js diff --git a/admin/custom/uikit/js/components/grid-parallax.min.js b/admin/custom/uikit-v2/js/components/grid-parallax.min.js similarity index 100% rename from admin/custom/uikit/js/components/grid-parallax.min.js rename to admin/custom/uikit-v2/js/components/grid-parallax.min.js diff --git a/admin/custom/uikit/js/components/grid.js b/admin/custom/uikit-v2/js/components/grid.js similarity index 100% rename from admin/custom/uikit/js/components/grid.js rename to admin/custom/uikit-v2/js/components/grid.js diff --git a/admin/custom/uikit/js/components/grid.min.js b/admin/custom/uikit-v2/js/components/grid.min.js similarity index 100% rename from admin/custom/uikit/js/components/grid.min.js rename to admin/custom/uikit-v2/js/components/grid.min.js diff --git a/admin/custom/uikit/js/components/htmleditor.js b/admin/custom/uikit-v2/js/components/htmleditor.js similarity index 100% rename from admin/custom/uikit/js/components/htmleditor.js rename to admin/custom/uikit-v2/js/components/htmleditor.js diff --git a/admin/custom/uikit/js/components/htmleditor.min.js b/admin/custom/uikit-v2/js/components/htmleditor.min.js similarity index 100% rename from admin/custom/uikit/js/components/htmleditor.min.js rename to admin/custom/uikit-v2/js/components/htmleditor.min.js diff --git a/admin/custom/uikit/js/components/index.html b/admin/custom/uikit-v2/js/components/index.html similarity index 100% rename from admin/custom/uikit/js/components/index.html rename to admin/custom/uikit-v2/js/components/index.html diff --git a/admin/custom/uikit/js/components/lightbox.js b/admin/custom/uikit-v2/js/components/lightbox.js similarity index 100% rename from admin/custom/uikit/js/components/lightbox.js rename to admin/custom/uikit-v2/js/components/lightbox.js diff --git a/admin/custom/uikit/js/components/lightbox.min.js b/admin/custom/uikit-v2/js/components/lightbox.min.js similarity index 100% rename from admin/custom/uikit/js/components/lightbox.min.js rename to admin/custom/uikit-v2/js/components/lightbox.min.js diff --git a/admin/custom/uikit/js/components/nestable.js b/admin/custom/uikit-v2/js/components/nestable.js similarity index 100% rename from admin/custom/uikit/js/components/nestable.js rename to admin/custom/uikit-v2/js/components/nestable.js diff --git a/admin/custom/uikit/js/components/nestable.min.js b/admin/custom/uikit-v2/js/components/nestable.min.js similarity index 100% rename from admin/custom/uikit/js/components/nestable.min.js rename to admin/custom/uikit-v2/js/components/nestable.min.js diff --git a/admin/custom/uikit/js/components/notify.js b/admin/custom/uikit-v2/js/components/notify.js similarity index 100% rename from admin/custom/uikit/js/components/notify.js rename to admin/custom/uikit-v2/js/components/notify.js diff --git a/admin/custom/uikit/js/components/notify.min.js b/admin/custom/uikit-v2/js/components/notify.min.js similarity index 100% rename from admin/custom/uikit/js/components/notify.min.js rename to admin/custom/uikit-v2/js/components/notify.min.js diff --git a/admin/custom/uikit/js/components/pagination.js b/admin/custom/uikit-v2/js/components/pagination.js similarity index 100% rename from admin/custom/uikit/js/components/pagination.js rename to admin/custom/uikit-v2/js/components/pagination.js diff --git a/admin/custom/uikit/js/components/pagination.min.js b/admin/custom/uikit-v2/js/components/pagination.min.js similarity index 100% rename from admin/custom/uikit/js/components/pagination.min.js rename to admin/custom/uikit-v2/js/components/pagination.min.js diff --git a/admin/custom/uikit/js/components/parallax.js b/admin/custom/uikit-v2/js/components/parallax.js similarity index 100% rename from admin/custom/uikit/js/components/parallax.js rename to admin/custom/uikit-v2/js/components/parallax.js diff --git a/admin/custom/uikit/js/components/parallax.min.js b/admin/custom/uikit-v2/js/components/parallax.min.js similarity index 100% rename from admin/custom/uikit/js/components/parallax.min.js rename to admin/custom/uikit-v2/js/components/parallax.min.js diff --git a/admin/custom/uikit/js/components/search.js b/admin/custom/uikit-v2/js/components/search.js similarity index 100% rename from admin/custom/uikit/js/components/search.js rename to admin/custom/uikit-v2/js/components/search.js diff --git a/admin/custom/uikit/js/components/search.min.js b/admin/custom/uikit-v2/js/components/search.min.js similarity index 100% rename from admin/custom/uikit/js/components/search.min.js rename to admin/custom/uikit-v2/js/components/search.min.js diff --git a/admin/custom/uikit/js/components/slider.js b/admin/custom/uikit-v2/js/components/slider.js similarity index 100% rename from admin/custom/uikit/js/components/slider.js rename to admin/custom/uikit-v2/js/components/slider.js diff --git a/admin/custom/uikit/js/components/slider.min.js b/admin/custom/uikit-v2/js/components/slider.min.js similarity index 100% rename from admin/custom/uikit/js/components/slider.min.js rename to admin/custom/uikit-v2/js/components/slider.min.js diff --git a/admin/custom/uikit/js/components/slideset.js b/admin/custom/uikit-v2/js/components/slideset.js similarity index 100% rename from admin/custom/uikit/js/components/slideset.js rename to admin/custom/uikit-v2/js/components/slideset.js diff --git a/admin/custom/uikit/js/components/slideset.min.js b/admin/custom/uikit-v2/js/components/slideset.min.js similarity index 100% rename from admin/custom/uikit/js/components/slideset.min.js rename to admin/custom/uikit-v2/js/components/slideset.min.js diff --git a/admin/custom/uikit/js/components/slideshow-fx.js b/admin/custom/uikit-v2/js/components/slideshow-fx.js similarity index 100% rename from admin/custom/uikit/js/components/slideshow-fx.js rename to admin/custom/uikit-v2/js/components/slideshow-fx.js diff --git a/admin/custom/uikit/js/components/slideshow-fx.min.js b/admin/custom/uikit-v2/js/components/slideshow-fx.min.js similarity index 100% rename from admin/custom/uikit/js/components/slideshow-fx.min.js rename to admin/custom/uikit-v2/js/components/slideshow-fx.min.js diff --git a/admin/custom/uikit/js/components/slideshow.js b/admin/custom/uikit-v2/js/components/slideshow.js similarity index 100% rename from admin/custom/uikit/js/components/slideshow.js rename to admin/custom/uikit-v2/js/components/slideshow.js diff --git a/admin/custom/uikit/js/components/slideshow.min.js b/admin/custom/uikit-v2/js/components/slideshow.min.js similarity index 100% rename from admin/custom/uikit/js/components/slideshow.min.js rename to admin/custom/uikit-v2/js/components/slideshow.min.js diff --git a/admin/custom/uikit/js/components/sortable.js b/admin/custom/uikit-v2/js/components/sortable.js similarity index 100% rename from admin/custom/uikit/js/components/sortable.js rename to admin/custom/uikit-v2/js/components/sortable.js diff --git a/admin/custom/uikit/js/components/sortable.min.js b/admin/custom/uikit-v2/js/components/sortable.min.js similarity index 100% rename from admin/custom/uikit/js/components/sortable.min.js rename to admin/custom/uikit-v2/js/components/sortable.min.js diff --git a/admin/custom/uikit/js/components/sticky.js b/admin/custom/uikit-v2/js/components/sticky.js similarity index 100% rename from admin/custom/uikit/js/components/sticky.js rename to admin/custom/uikit-v2/js/components/sticky.js diff --git a/admin/custom/uikit/js/components/sticky.min.js b/admin/custom/uikit-v2/js/components/sticky.min.js similarity index 100% rename from admin/custom/uikit/js/components/sticky.min.js rename to admin/custom/uikit-v2/js/components/sticky.min.js diff --git a/admin/custom/uikit/js/components/timepicker.js b/admin/custom/uikit-v2/js/components/timepicker.js similarity index 100% rename from admin/custom/uikit/js/components/timepicker.js rename to admin/custom/uikit-v2/js/components/timepicker.js diff --git a/admin/custom/uikit/js/components/timepicker.min.js b/admin/custom/uikit-v2/js/components/timepicker.min.js similarity index 100% rename from admin/custom/uikit/js/components/timepicker.min.js rename to admin/custom/uikit-v2/js/components/timepicker.min.js diff --git a/admin/custom/uikit/js/components/tooltip.js b/admin/custom/uikit-v2/js/components/tooltip.js similarity index 100% rename from admin/custom/uikit/js/components/tooltip.js rename to admin/custom/uikit-v2/js/components/tooltip.js diff --git a/admin/custom/uikit/js/components/tooltip.min.js b/admin/custom/uikit-v2/js/components/tooltip.min.js similarity index 100% rename from admin/custom/uikit/js/components/tooltip.min.js rename to admin/custom/uikit-v2/js/components/tooltip.min.js diff --git a/admin/custom/uikit/js/components/upload.js b/admin/custom/uikit-v2/js/components/upload.js similarity index 100% rename from admin/custom/uikit/js/components/upload.js rename to admin/custom/uikit-v2/js/components/upload.js diff --git a/admin/custom/uikit/js/components/upload.min.js b/admin/custom/uikit-v2/js/components/upload.min.js similarity index 100% rename from admin/custom/uikit/js/components/upload.min.js rename to admin/custom/uikit-v2/js/components/upload.min.js diff --git a/admin/custom/uikit/js/core/alert.js b/admin/custom/uikit-v2/js/core/alert.js similarity index 100% rename from admin/custom/uikit/js/core/alert.js rename to admin/custom/uikit-v2/js/core/alert.js diff --git a/admin/custom/uikit/js/core/alert.min.js b/admin/custom/uikit-v2/js/core/alert.min.js similarity index 100% rename from admin/custom/uikit/js/core/alert.min.js rename to admin/custom/uikit-v2/js/core/alert.min.js diff --git a/admin/custom/uikit/js/core/button.js b/admin/custom/uikit-v2/js/core/button.js similarity index 100% rename from admin/custom/uikit/js/core/button.js rename to admin/custom/uikit-v2/js/core/button.js diff --git a/admin/custom/uikit/js/core/button.min.js b/admin/custom/uikit-v2/js/core/button.min.js similarity index 100% rename from admin/custom/uikit/js/core/button.min.js rename to admin/custom/uikit-v2/js/core/button.min.js diff --git a/admin/custom/uikit/js/core/core.js b/admin/custom/uikit-v2/js/core/core.js similarity index 100% rename from admin/custom/uikit/js/core/core.js rename to admin/custom/uikit-v2/js/core/core.js diff --git a/admin/custom/uikit/js/core/core.min.js b/admin/custom/uikit-v2/js/core/core.min.js similarity index 100% rename from admin/custom/uikit/js/core/core.min.js rename to admin/custom/uikit-v2/js/core/core.min.js diff --git a/admin/custom/uikit/js/core/cover.js b/admin/custom/uikit-v2/js/core/cover.js similarity index 100% rename from admin/custom/uikit/js/core/cover.js rename to admin/custom/uikit-v2/js/core/cover.js diff --git a/admin/custom/uikit/js/core/cover.min.js b/admin/custom/uikit-v2/js/core/cover.min.js similarity index 100% rename from admin/custom/uikit/js/core/cover.min.js rename to admin/custom/uikit-v2/js/core/cover.min.js diff --git a/admin/custom/uikit/js/core/dropdown.js b/admin/custom/uikit-v2/js/core/dropdown.js similarity index 100% rename from admin/custom/uikit/js/core/dropdown.js rename to admin/custom/uikit-v2/js/core/dropdown.js diff --git a/admin/custom/uikit/js/core/dropdown.min.js b/admin/custom/uikit-v2/js/core/dropdown.min.js similarity index 100% rename from admin/custom/uikit/js/core/dropdown.min.js rename to admin/custom/uikit-v2/js/core/dropdown.min.js diff --git a/admin/custom/uikit/js/core/grid.js b/admin/custom/uikit-v2/js/core/grid.js similarity index 100% rename from admin/custom/uikit/js/core/grid.js rename to admin/custom/uikit-v2/js/core/grid.js diff --git a/admin/custom/uikit/js/core/grid.min.js b/admin/custom/uikit-v2/js/core/grid.min.js similarity index 100% rename from admin/custom/uikit/js/core/grid.min.js rename to admin/custom/uikit-v2/js/core/grid.min.js diff --git a/admin/custom/uikit/js/core/index.html b/admin/custom/uikit-v2/js/core/index.html similarity index 100% rename from admin/custom/uikit/js/core/index.html rename to admin/custom/uikit-v2/js/core/index.html diff --git a/admin/custom/uikit/js/core/modal.js b/admin/custom/uikit-v2/js/core/modal.js similarity index 100% rename from admin/custom/uikit/js/core/modal.js rename to admin/custom/uikit-v2/js/core/modal.js diff --git a/admin/custom/uikit/js/core/modal.min.js b/admin/custom/uikit-v2/js/core/modal.min.js similarity index 100% rename from admin/custom/uikit/js/core/modal.min.js rename to admin/custom/uikit-v2/js/core/modal.min.js diff --git a/admin/custom/uikit/js/core/nav.js b/admin/custom/uikit-v2/js/core/nav.js similarity index 100% rename from admin/custom/uikit/js/core/nav.js rename to admin/custom/uikit-v2/js/core/nav.js diff --git a/admin/custom/uikit/js/core/nav.min.js b/admin/custom/uikit-v2/js/core/nav.min.js similarity index 100% rename from admin/custom/uikit/js/core/nav.min.js rename to admin/custom/uikit-v2/js/core/nav.min.js diff --git a/admin/custom/uikit/js/core/offcanvas.js b/admin/custom/uikit-v2/js/core/offcanvas.js similarity index 100% rename from admin/custom/uikit/js/core/offcanvas.js rename to admin/custom/uikit-v2/js/core/offcanvas.js diff --git a/admin/custom/uikit/js/core/offcanvas.min.js b/admin/custom/uikit-v2/js/core/offcanvas.min.js similarity index 100% rename from admin/custom/uikit/js/core/offcanvas.min.js rename to admin/custom/uikit-v2/js/core/offcanvas.min.js diff --git a/admin/custom/uikit/js/core/scrollspy.js b/admin/custom/uikit-v2/js/core/scrollspy.js similarity index 100% rename from admin/custom/uikit/js/core/scrollspy.js rename to admin/custom/uikit-v2/js/core/scrollspy.js diff --git a/admin/custom/uikit/js/core/scrollspy.min.js b/admin/custom/uikit-v2/js/core/scrollspy.min.js similarity index 100% rename from admin/custom/uikit/js/core/scrollspy.min.js rename to admin/custom/uikit-v2/js/core/scrollspy.min.js diff --git a/admin/custom/uikit/js/core/smooth-scroll.js b/admin/custom/uikit-v2/js/core/smooth-scroll.js similarity index 100% rename from admin/custom/uikit/js/core/smooth-scroll.js rename to admin/custom/uikit-v2/js/core/smooth-scroll.js diff --git a/admin/custom/uikit/js/core/smooth-scroll.min.js b/admin/custom/uikit-v2/js/core/smooth-scroll.min.js similarity index 100% rename from admin/custom/uikit/js/core/smooth-scroll.min.js rename to admin/custom/uikit-v2/js/core/smooth-scroll.min.js diff --git a/admin/custom/uikit/js/core/switcher.js b/admin/custom/uikit-v2/js/core/switcher.js similarity index 100% rename from admin/custom/uikit/js/core/switcher.js rename to admin/custom/uikit-v2/js/core/switcher.js diff --git a/admin/custom/uikit/js/core/switcher.min.js b/admin/custom/uikit-v2/js/core/switcher.min.js similarity index 100% rename from admin/custom/uikit/js/core/switcher.min.js rename to admin/custom/uikit-v2/js/core/switcher.min.js diff --git a/admin/custom/uikit/js/core/tab.js b/admin/custom/uikit-v2/js/core/tab.js similarity index 100% rename from admin/custom/uikit/js/core/tab.js rename to admin/custom/uikit-v2/js/core/tab.js diff --git a/admin/custom/uikit/js/core/tab.min.js b/admin/custom/uikit-v2/js/core/tab.min.js similarity index 100% rename from admin/custom/uikit/js/core/tab.min.js rename to admin/custom/uikit-v2/js/core/tab.min.js diff --git a/admin/custom/uikit/js/core/toggle.js b/admin/custom/uikit-v2/js/core/toggle.js similarity index 100% rename from admin/custom/uikit/js/core/toggle.js rename to admin/custom/uikit-v2/js/core/toggle.js diff --git a/admin/custom/uikit/js/core/toggle.min.js b/admin/custom/uikit-v2/js/core/toggle.min.js similarity index 100% rename from admin/custom/uikit/js/core/toggle.min.js rename to admin/custom/uikit-v2/js/core/toggle.min.js diff --git a/admin/custom/uikit/js/core/touch.js b/admin/custom/uikit-v2/js/core/touch.js similarity index 100% rename from admin/custom/uikit/js/core/touch.js rename to admin/custom/uikit-v2/js/core/touch.js diff --git a/admin/custom/uikit/js/core/touch.min.js b/admin/custom/uikit-v2/js/core/touch.min.js similarity index 100% rename from admin/custom/uikit/js/core/touch.min.js rename to admin/custom/uikit-v2/js/core/touch.min.js diff --git a/admin/custom/uikit/js/core/utility.js b/admin/custom/uikit-v2/js/core/utility.js similarity index 100% rename from admin/custom/uikit/js/core/utility.js rename to admin/custom/uikit-v2/js/core/utility.js diff --git a/admin/custom/uikit/js/core/utility.min.js b/admin/custom/uikit-v2/js/core/utility.min.js similarity index 100% rename from admin/custom/uikit/js/core/utility.min.js rename to admin/custom/uikit-v2/js/core/utility.min.js diff --git a/admin/custom/uikit/js/index.html b/admin/custom/uikit-v2/js/index.html similarity index 100% rename from admin/custom/uikit/js/index.html rename to admin/custom/uikit-v2/js/index.html diff --git a/admin/custom/uikit/js/uikit.js b/admin/custom/uikit-v2/js/uikit.js similarity index 100% rename from admin/custom/uikit/js/uikit.js rename to admin/custom/uikit-v2/js/uikit.js diff --git a/admin/custom/uikit/js/uikit.min.js b/admin/custom/uikit-v2/js/uikit.min.js similarity index 100% rename from admin/custom/uikit/js/uikit.min.js rename to admin/custom/uikit-v2/js/uikit.min.js diff --git a/admin/custom/uikit-3/css/uikit-rtl.css b/admin/custom/uikit-v3/css/uikit-rtl.css similarity index 100% rename from admin/custom/uikit-3/css/uikit-rtl.css rename to admin/custom/uikit-v3/css/uikit-rtl.css diff --git a/admin/custom/uikit-3/css/uikit-rtl.min.css b/admin/custom/uikit-v3/css/uikit-rtl.min.css similarity index 100% rename from admin/custom/uikit-3/css/uikit-rtl.min.css rename to admin/custom/uikit-v3/css/uikit-rtl.min.css diff --git a/admin/custom/uikit-3/css/uikit.css b/admin/custom/uikit-v3/css/uikit.css similarity index 100% rename from admin/custom/uikit-3/css/uikit.css rename to admin/custom/uikit-v3/css/uikit.css diff --git a/admin/custom/uikit-3/css/uikit.min.css b/admin/custom/uikit-v3/css/uikit.min.css similarity index 100% rename from admin/custom/uikit-3/css/uikit.min.css rename to admin/custom/uikit-v3/css/uikit.min.css diff --git a/admin/custom/uikit-3/js/uikit-icons.js b/admin/custom/uikit-v3/js/uikit-icons.js similarity index 100% rename from admin/custom/uikit-3/js/uikit-icons.js rename to admin/custom/uikit-v3/js/uikit-icons.js diff --git a/admin/custom/uikit-3/js/uikit-icons.min.js b/admin/custom/uikit-v3/js/uikit-icons.min.js similarity index 100% rename from admin/custom/uikit-3/js/uikit-icons.min.js rename to admin/custom/uikit-v3/js/uikit-icons.min.js diff --git a/admin/custom/uikit-3/js/uikit.js b/admin/custom/uikit-v3/js/uikit.js similarity index 100% rename from admin/custom/uikit-3/js/uikit.js rename to admin/custom/uikit-v3/js/uikit.js diff --git a/admin/custom/uikit-3/js/uikit.min.js b/admin/custom/uikit-v3/js/uikit.min.js similarity index 100% rename from admin/custom/uikit-3/js/uikit.min.js rename to admin/custom/uikit-v3/js/uikit.min.js diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 881a9bf6c..d28eeed03 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -497,6 +497,20 @@ class Get * @var array */ public $updateSQL = array(); + + /** + * The Library Manager + * + * @var array + */ + public $libManager = array(); + + /** + * The Libraries + * + * @var array + */ + public $libraries = array(); /*** * Constructor @@ -855,7 +869,7 @@ class Get unset($component->addcustom_admin_views); } - // ser the config data + // set the config data $component->addconfig = (isset($component->addconfig) && ComponentbuilderHelper::checkJson($component->addconfig)) ? json_decode($component->addconfig,true):null; if (ComponentbuilderHelper::checkArray($component->addconfig)) { @@ -1037,13 +1051,14 @@ class Get { $component->readme = ''; } + // set lang now + $nowLang = $this->lang; + $this->lang = 'admin'; // dashboard methods $component->dashboard_tab = (isset($component->dashboard_tab) && ComponentbuilderHelper::checkJson($component->dashboard_tab)) ? json_decode($component->dashboard_tab,true):null; if (ComponentbuilderHelper::checkArray($component->dashboard_tab)) - { - $nowLang = $this->lang; - $this->lang = 'admin'; + { $component->dashboard_tab = array_map( function($array) { $array['html'] = $this->setDynamicValues($array['html']); return $array; @@ -1058,13 +1073,13 @@ class Get { // load the php for the dashboard model $component->php_dashboard_methods = $this->setDynamicValues(base64_decode($component->php_dashboard_methods)); - // reset back to nowlang - $this->lang = $nowLang; } else { $component->php_dashboard_methods = ''; } + // reset back to nowlang + $this->lang = $nowLang; // add the update FTP server sig if ($component->add_update_server == 1 && is_numeric($component->update_server_ftp) && $component->update_server_ftp > 0) @@ -1612,7 +1627,46 @@ class Get // fix alias to use in code $view->code = $this->uniqueCode(ComponentbuilderHelper::safeString($view->codename)); $view->Code = ComponentbuilderHelper::safeString($view->code, 'F'); - $view->CODE = ComponentbuilderHelper::safeString($view->code, 'U'); + $view->CODE = ComponentbuilderHelper::safeString($view->code, 'U'); + // load the library + if (!isset($this->libManager[$this->target])) + { + $this->libManager[$this->target] = array(); + } + if (!isset($this->libManager[$this->target][$view->code])) + { + $this->libManager[$this->target][$view->code] = array(); + } + // make sure json become array + if (ComponentbuilderHelper::checkJson($view->libraries)) + { + $view->libraries = json_decode($view->libraries, true); + } + // if we have an array add it + if (ComponentbuilderHelper::checkArray($view->libraries)) + { + foreach ($view->libraries as $library) + { + if (!isset($this->libManager[$this->target][$view->code][$library])) + { + if ($this->getLibrary((int) $library)) + { + $this->libManager[$this->target][$view->code][(int) $library] = true; + } + } + } + } + elseif (is_numeric($view->libraries) && !isset($this->libManager[$this->target][$view->code][(int) $view->libraries])) + { + if ($this->getLibrary((int) $view->libraries)) + { + $this->libManager[$this->target][$view->code][(int) $view->libraries] = true; + } + } + // setup template array + $this->templateData[$this->target][$view->code] = array(); + // setup template and layout data + $this->setTemplateAndLayoutData($view->default,$view->code); // insure the uikit components are loaded if (2 == $this->uikit || 1 == $this->uikit) { @@ -1644,10 +1698,6 @@ class Get $this->getModule[$this->target][$view->code] = true; } } - // setup template array - $this->templateData[$this->target][$view->code] = array(); - // setup template and layout data - $this->setTemplateAndLayoutData($view->default,$view->code); // set the main get data $main_get = $this->setGetData(array($view->main_get),$view->code); $view->main_get = $main_get[0]; @@ -2726,7 +2776,7 @@ class Get * @return array The data found with the alias * */ - public function getDataWithAlias($n_ame,$table,$view) + public function getDataWithAlias($n_ame, $table, $view) { // Create a new query object. $query = $this->db->getQuery(true); @@ -2747,6 +2797,42 @@ class Get $php_view = $this->setDynamicValues(base64_decode($row->php_view)); } $contnent = $this->setDynamicValues(base64_decode($row->{$table})); + // load the library + if (!isset($this->libManager[$this->target])) + { + $this->libManager[$this->target] = array(); + } + if (!isset($this->libManager[$this->target][$view])) + { + $this->libManager[$this->target][$view] = array(); + } + // make sure json become array + if (ComponentbuilderHelper::checkJson($row->libraries)) + { + $row->libraries = json_decode($row->libraries, true); + } + // if we have an array add it + if (ComponentbuilderHelper::checkArray($row->libraries)) + { + foreach ($row->libraries as $library) + { + if (!isset($this->libManager[$this->target][$view][$library])) + { + if ($this->getLibrary((int) $library)) + { + $this->libManager[$this->target][$view][(int) $library] = true; + } + } + } + } + elseif (is_numeric($row->libraries) && !isset($this->libManager[$this->target][$view][(int) $row->libraries])) + { + if ($this->getLibrary((int) $row->libraries)) + { + $this->libManager[$this->target][$view][(int) $row->libraries] = true; + } + } + // load UIKIT if needed if (2 == $this->uikit || 1 == $this->uikit) { // set uikit to views @@ -2795,6 +2881,200 @@ class Get return false; } + /** + * Get Library Data and store globaly + * + * @param string $id the library id + * + * @return bool true on success + * + */ + protected function getLibrary($id) + { + + // check if the lib has already been set + if (!isset($this->libraries[$id])) + { + // make sure we should continue and that the lib is not already bein loaded + switch ($id) + { + case 1: // No Library + return false; + break; + case 3: // Uikit v3 + if (2 == $this->uikit || 3 == $this->uikit) + { + // already being loaded + $this->libraries[$id] = false; + } + break; + case 4: // Uikit v2 + if (2 == $this->uikit || 1 == $this->uikit) + { + // already being loaded + $this->libraries[$id] = false; + } + break; + case 5: // FooTable v2 + if (!isset($this->footableVersion) || 2 == $this->footableVersion) + { + // already being loaded + $this->libraries[$id] = false; + } + break; + case 6: // FooTable v3 + if (3 == $this->footableVersion) + { + // already being loaded + $this->libraries[$id] = false; + } + break; + } + } + // check if the lib has already been set + if (!isset($this->libraries[$id])) + { + $query = $this->db->getQuery(true); + + $query->select('a.*'); + $query->select( + $this->db->quoteName( + array( + 'a.id', + 'a.name', + 'a.how', + 'a.type', + 'a.addconditions', + 'b.addconfig', + 'c.addfiles', + 'c.addfolders', + 'c.addurls', + 'a.php_setdocument' + ), + array( + 'id', + 'name', + 'how', + 'type', + 'addconditions', + 'addconfig', + 'addfiles', + 'addfolders', + 'addurls', + 'php_setdocument' + ) + ) + ); + // from these tables + $query->from('#__componentbuilder_library AS a'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_library_config', 'b') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('b.library') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_library_files_folders_urls', 'c') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('c.library') . ')'); + $query->where($this->db->quoteName('a.id') . ' = '. (int) $id); + + // Reset the query using our newly populated query object. + $this->db->setQuery($query); + + // Load the results as a list of stdClass objects + $library = $this->db->loadObject(); + + // check if this lib uses build-in behaviour + if ($library->how == 4) + { + // fall back on build-in features + $buildin = array(3 => array('uikit' => 3), 4 => array('uikit' => 1), 5 => array('footableVersion' => 2, 'footable' => true), 6 => array('footableVersion' => 3, 'footable' => true)); + if (isset($buildin[$library->id]) && ComponentbuilderHelper::checkArray($buildin[$library->id])) + { + // set the lib switch + foreach ($buildin[$library->id] as $lib => $val) + { + $this->{$lib} = $val; + } + // since we are falling back on build-in feature + $library->how = 0; + } + else + { + // since we did not find build in behaviour we must load always. + $library->how = 1; + } + } + // check if this lib has dynamic behaviour + if ($library->how > 0) + { + // set the addfolders data + $library->addfolders = (isset($library->addfolders) && ComponentbuilderHelper::checkJson($library->addfolders)) ? json_decode($library->addfolders,true):null; + if (ComponentbuilderHelper::checkArray($library->addfolders)) + { + $library->folders = array_values($library->addfolders); + } + // set the addfiles data + $library->addfiles = (isset($library->addfiles) && ComponentbuilderHelper::checkJson($library->addfiles)) ? json_decode($library->addfiles,true):null; + if (ComponentbuilderHelper::checkArray($library->addfiles)) + { + $library->files = array_values($library->addfiles); + } + // set the addurls data + $library->addurls = (isset($library->addurls) && ComponentbuilderHelper::checkJson($library->addurls)) ? json_decode($library->addurls,true):null; + if (ComponentbuilderHelper::checkArray($library->addurls)) + { + $library->urls = array_values($library->addurls); + } + // add config fields only if needed + if ($library->how > 1) + { + // set the config data + $library->addconfig = (isset($library->addconfig) && ComponentbuilderHelper::checkJson($library->addconfig)) ? json_decode($library->addconfig,true):null; + if (ComponentbuilderHelper::checkArray($library->addconfig)) + { + $library->config = array_map(function($array) { + $array['alias'] = 0; + $array['title'] = 0; + $array['settings'] = $this->getFieldData($array['field']); + return $array; + }, array_values($library->addconfig)); + } + } + // if this lib is controlled by custom script + if (3 == $library->how) + { + // set Needed PHP + if (isset($library->php_setdocument) && ComponentbuilderHelper::checkString($library->php_setdocument)) + { + $library->document = $this->setDynamicValues(base64_decode($library->php_setdocument)); + } + } + // if this lib is controlled by conditions + elseif (2 == $library->how) + { + // set the addconditions data + $library->addconditions = (isset($library->addconditions) && ComponentbuilderHelper::checkJson($library->addconditions)) ? json_decode($library->addconditions,true):null; + if (ComponentbuilderHelper::checkArray($library->addconditions)) + { + $library->conditions = array_values($library->addconditions); + } + } + unset($library->php_setdocument); + unset($library->addconditions); + unset($library->addconfig); + unset($library->addfolders); + unset($library->addfiles); + unset($library->addurls); + // load to global lib + $this->libraries[$id] = $library; + } + else + { + $this->libraries[$id] = false; + } + } + // if set return + if (isset($this->libraries[$id])) + { + return $this->libraries[$id]; + } + return false; + } + /** * Set Language Place Holders * @@ -3233,7 +3513,7 @@ class Get } /** - * Check for getModules script + * Check for get Google Chart script * * @param string $content The content to check * diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 66d48de71..307156e86 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -327,10 +327,12 @@ class Structure extends Get $this->componentPath = $this->compilerPath.'/'.$this->componentFolderName; // set the template path for custom $this->templatePathCustom = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); - // set the Joomla Version Data - $this->joomlaVersionData = $this->setJoomlaVersionData(); // make sure there is no old build $this->removeFolder($this->componentPath); + // load the libraries files/folders and url's + $this->setLibaries(); + // set the Joomla Version Data + $this->joomlaVersionData = $this->setJoomlaVersionData(); // set the new folders if (!$this->setFolders()) { @@ -346,7 +348,6 @@ class Structure extends Get { return false; } - return true; } return false; @@ -369,6 +370,154 @@ class Structure extends Get return ''; } + /** + * Build the Libraries files, folders, url's and config + * + * @return void + * + */ + private function setLibaries() + { + if (ComponentbuilderHelper::checkArray($this->libraries)) + { + // creat the main component folder + if (!JFolder::exists($this->componentPath)) + { + JFolder::create($this->componentPath); + // count the folder created + $this->folderCount++; + $this->indexHTML(''); + } + // create media path if not set + if (!JFolder::exists( $this->componentPath . '/media')) + { + JFolder::create($this->componentPath . '/media'); + // count the folder created + $this->folderCount++; + $this->indexHTML('/media'); + } + foreach($this->libraries as $id => &$library) + { + if (ComponentbuilderHelper::checkObject($library)) + { + // check if this lib has files + if (isset($library->files) && ComponentbuilderHelper::checkArray($library->files)) + { + // add to component files + foreach ($library->files as $file) + { + $this->componentData->files[] = $file; + } + } + // check if this lib has folders + if (isset($library->folders) && ComponentbuilderHelper::checkArray($library->folders)) + { + // add to component folders + foreach ($library->folders as $folder) + { + $this->componentData->folders[] = $folder; + } + } + // check if this lib has urls + if (isset($library->urls) && ComponentbuilderHelper::checkArray($library->urls)) + { + // build media folder path + $libFolder = strtolower( preg_replace('/\s+/', '-', ComponentbuilderHelper::safeString($library->name, 'filename', ' ', false))); + $mediaPath = '/media/' . $libFolder; + // should we add the local folder + $addLocalFolder = false; + // add to component urls + foreach ($library->urls as $n => &$url) + { + if (isset($url['type']) && $url['type'] > 1 && isset($url['url']) && ComponentbuilderHelper::checkString($url['url'])) + { + // create media/lib path if not set + if (!JFolder::exists( $this->componentPath . $mediaPath)) + { + JFolder::create($this->componentPath . $mediaPath); + // count the folder created + $this->folderCount++; + $this->indexHTML($mediaPath); + } + // add local folder + $addLocalFolder = true; + // set file name + $fileName = basename($url['url']); + // get the file contents + $data = ComponentbuilderHelper::getFileContents($url['url']); + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + // create sub media path if not set + if (!JFolder::exists($this->componentPath . $mediaPath . $path)) + { + JFolder::create($this->componentPath . $mediaPath . $path); + // count the folder created + $this->folderCount++; + $this->indexHTML($mediaPath . $path); + } + // set the path to library file + $url['path'] = $mediaPath . $path . '/' . $fileName; // we need this for later + // set full path + $path = $this->componentPath . $url['path']; + // write data to path + $this->writeFile($path, $data); + // count the file created + $this->fileCount++; + } + } + // only add if local + if ($addLocalFolder) + { + // check if we sould add it to the media xml list + if (!isset($this->fileContentStatic['###EXSTRA_MEDIA_FOLDERS###'])) + { + $this->fileContentStatic['###EXSTRA_MEDIA_FOLDERS###'] = ''; + } + $this->fileContentStatic['###EXSTRA_MEDIA_FOLDERS###'] .= PHP_EOL."\t\t".$libFolder.""; + } + } + // if config fields are found load into component config (avoiding dublicates) + if (isset($library->how) && $library->how > 1 && isset($library->config) && ComponentbuilderHelper::checkArray($library->config)) + { + foreach ($library->config as $cofig) + { + $found = array_filter($this->componentData->config, function($item) use($cofig) { + return $item['field'] == $cofig['field']; + }); + // set the config data if not found + if (!ComponentbuilderHelper::checkArray($found)) + { + $this->componentData->config[] = $cofig; + } + } + } + } + } + } + } + + /** + * Write data to file + * + * @return bool true on success + * + */ + public function writeFile($path, $data) + { + return ComponentbuilderHelper::writeFile($path, $data); + } + /** * Build the Initial Folders * @@ -379,7 +528,7 @@ class Structure extends Get { if (ComponentbuilderHelper::checkObject($this->joomlaVersionData->create)) { - // creat the main componet folder + // creat the main component folder if (!JFolder::exists($this->componentPath)) { JFolder::create($this->componentPath); @@ -926,25 +1075,25 @@ class Structure extends Get if (2 == $this->uikit || 1 == $this->uikit) { // move the UIKIT Folder into place - $uikit = array( 'folder' => 'uikit', 'path' => 'media', 'rename' => 0); + $uikit = array( 'folder' => 'uikit-v2', 'path' => 'media', 'rename' => 0); $this->componentData->folders[] = $uikit; } if (2 == $this->uikit || 3 == $this->uikit) { // move the UIKIT-3 Folder into place - $uikit = array( 'folder' => 'uikit-3', 'path' => 'media', 'rename' => 0); + $uikit = array( 'folder' => 'uikit-v3', 'path' => 'media', 'rename' => 0); $this->componentData->folders[] = $uikit; } if ($this->footable && (!isset($this->footableVersion) || 2 == $this->footableVersion)) { // move the footable folder into place - $footable = array( 'folder' => 'footable2', 'path' => 'media/footable', 'rename' => 1); + $footable = array( 'folder' => 'footable-v2', 'path' => 'media', 'rename' => 0); $this->componentData->folders[] = $footable; } elseif ($this->footable && 3 == $this->footableVersion) { // move the footable folder into place - $footable = array( 'folder' => 'footable3', 'path' => 'media/footable', 'rename' => 1); + $footable = array( 'folder' => 'footable-v3', 'path' => 'media', 'rename' => 0); $this->componentData->folders[] = $footable; } diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 45e01d1bf..d7ec49808 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -1,5 +1,4 @@ placeholders['###View###'] = ucfirst($viewName); $this->placeholders['[[[view]]]'] = $this->placeholders['###view###']; $this->placeholders['[[[VIEW]]]'] = $this->placeholders['###VIEW###']; - $this->placeholders['[[[View]]]'] = $this->placeholders['###View###']; + $this->placeholders['[[[View]]]'] = $this->placeholders['###View###']; $this->placeholders['###views###'] = $listViewName; $this->placeholders['###VIEWS###'] = strtoupper($listViewName); $this->placeholders['###Views###'] = ucfirst($listViewName); @@ -413,10 +412,11 @@ class Fields extends Structure $this->accessBuilder[$viewName] = $viewName; } // set the read only - $readOnly = ""; + $readOnlyXML = array(); if ($view['settings']->type == 2) { - $readOnly = "\t\t\t" . 'readonly="true"' . PHP_EOL."\t\t\t" . 'disabled="true"'; + $readOnlyXML['readonly'] = true; + $readOnlyXML['disabled'] = true; } // main lang prefix $langView = $this->langPrefix . '_' . $this->placeholders['###VIEW###']; @@ -460,7 +460,7 @@ class Fields extends Structure $this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision"; $this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised."; $this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias."; - + // check if the same field is added multiple times foreach ($view['settings']->fields as $field) { @@ -468,220 +468,277 @@ class Fields extends Structure $this->setUniqueNameKeeper($field, $view['settings']->type, $name, $viewName); } // start adding dynamc fields - $dynamcfields = ''; + $dynamicFieldsXML = array(); $spacerCounter = 'a'; // set the custom table key $dbkey = 'g'; // TODO we should add the global and local view switch if field for front end foreach ($view['settings']->fields as $field) { - $dynamcfields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $viewName, $listViewName, $spacerCounter, $this->placeholders, $dbkey, true); + $dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $viewName, $listViewName, $spacerCounter, $this->placeholders, $dbkey, true); } - // set the defautl fields - $fieldSet = array(); - $fieldSet[] = '
'; - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t"; + // set the default fields + $XML = new simpleXMLElement(''); + $fieldSetXML = $XML->addChild('fieldset'); + $fieldSetXML->addAttribute('name', 'details'); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields."); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)"); // if id is not set if (!isset($this->fieldsNames[$viewName]['id'])) { - $fieldSet[] = "\t\t 'id', + 'type' => 'text', + 'class' => 'readonly', + 'label' => 'JGLOBAL_FIELD_ID_LABEL', + 'description' => 'JGLOBAL_FIELD_ID_DESC', + 'size' => 10, + 'default' => 0 + ); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // if created is not set if (!isset($this->fieldsNames[$viewName]['created'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t 'created', + 'type' => 'calendar', + 'label' => $langView . '_CREATED_DATE_LABEL', + 'description' => $langView . '_CREATED_DATE_DESC', + 'size' => 22, + 'format' => '%Y-%m-%d %H:%M:%S', + 'filter' => 'user_utc' + ); + $attributes = array_merge($attributes, $readOnlyXML); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // if created_by is not set if (!isset($this->fieldsNames[$viewName]['created_by'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t 'created_by', + 'type' => 'user', + 'label' => $langView . '_CREATED_BY_LABEL', + 'description' => $langView . '_CREATED_BY_DESC', + ); + $attributes = array_merge($attributes, $readOnlyXML); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // if published is not set if (!isset($this->fieldsNames[$viewName]['published'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t'; - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t"; + $attributes = array( + 'name' => 'published', + 'type' => 'list', + 'label' => 'JSTATUS' + ); + $attributes = array_merge($attributes, $readOnlyXML); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); + foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value) + { + $optionXML = $fieldXML->addChild('option'); + $optionXML->addAttribute('value', $value); + $optionXML[] = $text; + } } // if modified is not set if (!isset($this->fieldsNames[$viewName]['modified'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t" . ''; + $attributes = array( + 'name' => 'modified', + 'type' => 'calendar', + 'class' => 'readonly', + 'label' => $langView . '_MODIFIED_DATE_LABEL', + 'description' => $langView . '_MODIFIED_DATE_DESC', + 'size' => 22, + 'readonly' => "true", + 'format' => '%Y-%m-%d %H:%M:%S', + 'filter' => 'user_utc' + ); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // if modified_by is not set if (!isset($this->fieldsNames[$viewName]['modified_by'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t" . ' 'modified_by', + 'type' => 'user', + 'label' => $langView . '_MODIFIED_BY_LABEL', + 'description' => $langView . '_MODIFIED_BY_DESC', + 'class' => 'readonly', + 'readonly' => 'true', + 'filter' => 'unset' + ); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // check if view has access if (isset($this->accessBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName]) && !isset($this->fieldsNames[$viewName]['access'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t" . ' 'access', + 'type' => 'accesslevel', + 'label' => 'JFIELD_ACCESS_LABEL', + 'description' => 'JFIELD_ACCESS_DESC', + 'default' => 1, + 'required' => "false" + ); + $attributes = array_merge($attributes, $readOnlyXML); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // if ordering is not set if (!isset($this->fieldsNames[$viewName]['ordering'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t 'ordering', + 'type' => 'number', + 'class' => 'inputbox validate-ordering', + 'label' => $langView . '_ORDERING_LABEL', + 'description' => '', + 'default' => 0, + 'size' => 6, + 'required' => "false" + ); + $attributes = array_merge($attributes, $readOnlyXML); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // if version is not set if (!isset($this->fieldsNames[$viewName]['version'])) { - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t 'version', + 'type' => 'text', + 'class' => 'readonly', + 'label' => $langView . '_VERSION_LABEL', + 'description' => $langView . '_VERSION_DESC', + 'size' => 6, + 'readonly' => "true", + 'filter' => 'unset' + ); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // check if metadata is added to this view if (isset($this->metadataBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$viewName])) { // metakey - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\t 'metakey', + 'type' => 'textarea', + 'label' => 'JFIELD_META_KEYWORDS_LABEL', + 'description' => 'JFIELD_META_KEYWORDS_DESC', + 'rows' => 3, + 'cols' => 30 + ); + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); // metadesc - $fieldSet[] = "\t\t"; - $fieldSet[] = "\t\txmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + $this->xmlAddAttributes($fieldXML, $attributes); } // load the dynamic fields now - if (ComponentbuilderHelper::checkString($dynamcfields)) + if (count($dynamicFieldsXML)) { - $fieldSet[] = "\t\t" . $dynamcfields; + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields."); + foreach ($dynamicFieldsXML as $dynamicfield) + { + $this->xmlAppend($fieldSetXML, $dynamicfield); + } } - // close fieldset - $fieldSet[] = "\t
"; // check if metadata is added to this view if (isset($this->metadataBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$viewName])) { - $fieldSet[] = PHP_EOL."\t"; - $fieldSet[] = "\t'; - $fieldSet[] = "\t\t" . '
'; + $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields"); + $fieldsXML = $fieldSetXML->addChild('fields'); + $fieldsXML->addAttribute('name', 'metadata'); + $fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); + $fieldsFieldSetXML = $fieldsXML->addChild('fieldset'); + $fieldsFieldSetXML->addAttribute('name', 'vdmmetadata'); + $fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); // robots - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t\t" . ''; - $fieldSet[] = "\t\t\t\t" . ''; - $fieldSet[] = "\t\t\t\t" . ''; - $fieldSet[] = "\t\t\t\t" . ''; - $fieldSet[] = "\t\t\t\t" . ''; - $fieldSet[] = "\t\t\t\t" . ''; - $fieldSet[] = "\t\t\t" . ''; + $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)"); + $robots = $fieldsFieldSetXML->addChild('field'); + $attributes = array( + 'name' => 'robots', + 'type' => 'list', + 'label' => 'JFIELD_METADATA_ROBOTS_LABEL', + 'description' => 'JFIELD_METADATA_ROBOTS_DESC' + ); + $this->xmlAddAttributes($robots, $attributes); + $options = array( + 'JGLOBAL_USE_GLOBAL' => '', + 'JGLOBAL_INDEX_FOLLOW' => 'index, follow', + 'JGLOBAL_NOINDEX_FOLLOW' => 'noindex, follow', + 'JGLOBAL_INDEX_NOFOLLOW' => 'index, nofollow', + 'JGLOBAL_NOINDEX_NOFOLLOW' => 'noindex, nofollow', + ); + foreach ($options as $text => $value) + { + $option = $robots->addChild('option'); + $option->addAttribute('value', $value); + $option[] = $text; + } // author - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t\t" . 'xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)"); + $author = $fieldsFieldSetXML->addChild('field'); + $attributes = array( + 'name' => 'author', + 'type' => 'text', + 'label' => 'JAUTHOR', + 'description' => 'JFIELD_METADATA_AUTHOR_DESC', + 'size' => 20 + ); + $this->xmlAddAttributes($author, $attributes); // rights - $fieldSet[] = "\t\t\t"; - $fieldSet[] = "\t\t\t" . 'xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)"); + $rights = $fieldsFieldSetXML->addChild('field'); + $attributes = array( + 'name' => 'rights', + 'type' => 'textarea', + 'label' => 'JFIELD_META_RIGHTS_LABEL', + 'description' => 'JFIELD_META_RIGHTS_DESC', + 'required' => 'false', + 'filter' => 'string', + 'cols' => 30, + 'rows' => 2 + ); + $this->xmlAddAttributes($rights, $attributes); } // just to be safe, lets clear the view placeholders $this->clearFromPlaceHolders('view'); - // retunr the set - return implode(PHP_EOL, $fieldSet); + // return the set + return $this->xmlPrettyPrint($XML, 'fieldset'); } return ''; } - + /** * set Field Names - * + * * @param string $view View the field belongs to * @param string $name The name of the field * - * + * */ public function setFieldsNames(&$view, &$name) { @@ -690,7 +747,7 @@ class Fields extends Structure /** * set Dynamic field - * + * * @param array $field The field data * @param array $view The view data * @param int $viewType The view type @@ -702,21 +759,20 @@ class Fields extends Structure * @param string $dbkey The the custom table key * @param boolean $build The switch to set the build option * - * @return string The complete field in xml - * + * @return SimpleXMLElement The complete field in xml + * */ public function setDynamicField(&$field, &$view, &$viewType, &$langView, &$viewName, &$listViewName, &$spacerCounter, &$placeholders, &$dbkey, $build) { if (isset($field['settings']) && ComponentbuilderHelper::checkObject($field['settings'])) { - // reset some values + // reset some values $name = ComponentbuilderHelper::safeString($field['settings']->name); $typeName = ComponentbuilderHelper::safeString($field['settings']->type_name); $multiple = false; $langLabel = ''; - $taber = ''; $fieldSet = ''; - $fieldAttributes = array(); + $fieldAttributes = array(); // set field attributes $fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $spacerCounter, $listViewName, $viewName, $placeholders); // check if values were set @@ -724,13 +780,13 @@ class Fields extends Structure { // set the array of field names $this->setFieldsNames($viewName,$fieldAttributes['name']); - + if ($this->defaultField($typeName, 'option')) { //reset options array $optionArray = array(); // now add to the field set - $fieldSet .= $this->setField('option', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); + $xmlElement = $this->setField('option', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); if ($build) { // set builders @@ -745,7 +801,7 @@ class Fields extends Structure $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple); } // now add to the field set - $fieldSet .= $this->setField('plain', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); + $xmlElement = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); } elseif ($this->defaultField($typeName, 'spacer')) { @@ -765,7 +821,7 @@ class Fields extends Structure $this->setLayoutBuilder($viewName, $tabName, $name, $field); } // now add to the field set - $fieldSet .= $this->setField('spacer', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); + $xmlElement = $this->setField('spacer', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); // increment spacer counter if ($typeName === 'spacer') { @@ -783,7 +839,7 @@ class Fields extends Structure $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false); } // now add to the field set - $fieldSet .= $this->setField('special', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); + $xmlElement = $this->setField('special', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray); } } elseif (ComponentbuilderHelper::checkArray($fieldAttributes['custom'])) @@ -801,56 +857,56 @@ class Fields extends Structure $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, $custom); } // now add to the field set - $fieldSet .= $this->setField('custom', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray, $custom); + $xmlElement = $this->setField('custom', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray, $custom); } } - return $fieldSet; + return $xmlElement; } - return ''; + return false; } /** * set a field - * - * @param string $setType The set of fields type - * @param string $taber The tabs to add in layout - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $viewName The singel view name - * @param string $listViewName The list view name - * @param array $placeholders The place holder and replace values - * @param string $optionArray The option bucket array used to set the field options if needed. - * @param arra $custom Used when field is from config * - * @return string The field in xml - * + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $viewName The single view name + * @param string $listViewName The list view name + * @param array $placeholders The place holder and replace values + * @param string $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config + * + * @return SimpleXMLElement The field in xml + * */ - private function setField($setType, $taber, &$fieldAttributes, &$name, &$typeName, &$langView, &$viewName, &$listViewName, $placeholders, &$optionArray, $custom = null) + private function setField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$viewName, &$listViewName, $placeholders, &$optionArray, $custom = null) { - $fieldSet = ''; + $field = new stdClass(); if ($setType === 'option') { // now add to the field set - $fieldSet .= PHP_EOL."\t" . $taber . "\t"; - $fieldSet .= PHP_EOL."\t" . $taber . "\tfieldXML = new SimpleXMLElement(''); + $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; + foreach ($fieldAttributes as $property => $value) { if ($property != 'option') { - $fieldSet .= PHP_EOL."\t\t" . $taber . "\t" . $property . '="' . $value . '"'; + $field->fieldXML->addAttribute($property, $value); } elseif ($property === 'option') { - $optionSet = ''; + $this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set."); if (strpos($value, ',') !== false) { // mulitpal options $options = explode(',', $value); foreach ($options as $option) { + $optionXML = $field->fieldXML->addChild('option'); if (strpos($option, '|') !== false) { // has other value then text @@ -859,7 +915,7 @@ class Fields extends Structure // add to lang array $this->langContent[$this->lang][$langValue] = $t; // no add to option set - $optionSet .= PHP_EOL."\t" . $taber . "\t\t" . ''; + $optionXML->addAttribute('value', $v); $optionArray[$v] = $langValue; } else @@ -869,14 +925,16 @@ class Fields extends Structure // add to lang array $this->langContent[$this->lang][$langValue] = $option; // no add to option set - $optionSet .= PHP_EOL."\t\t" . $taber . "\t" . ''; + $optionXML->addAttribute('value', $option); $optionArray[$option] = $langValue; } + $optionXML[] = $langValue; } } else { // one option + $optionXML = $field->fieldXML->addChild('option'); if (strpos($value, '|') !== false) { // has other value then text @@ -885,7 +943,7 @@ class Fields extends Structure // add to lang array $this->langContent[$this->lang][$langValue] = $t; // no add to option set - $optionSet .= PHP_EOL."\t\t" . $taber . "\t" . ''; + $optionXML->addAttribute('value', $v); $optionArray[$v] = $langValue; } else @@ -895,58 +953,45 @@ class Fields extends Structure // add to lang array $this->langContent[$this->lang][$langValue] = $value; // no add to option set - $optionSet .= PHP_EOL."\t\t" . $taber . "\t" . ''; + $optionXML->addAttribute('value', $value); $optionArray[$value] = $langValue; } + $optionXML[] = $langValue; } } } - if (ComponentbuilderHelper::checkString($optionSet)) + if (!$field->fieldXML->count()) { - $fieldSet .= '>'; - $fieldSet .= PHP_EOL."\t\t\t" . $taber . ""; - $fieldSet .= $optionSet; - $fieldSet .= PHP_EOL."\t\t" . $taber . ""; - } - elseif ($typeName === 'sql') - { - $optionArray = false; - $fieldSet .= PHP_EOL."\t\t" . $taber . "/>"; - } - else - { - $optionArray = false; - $fieldSet .= PHP_EOL."\t\t\t" . $taber . ""; - $fieldSet .= PHP_EOL."\t\t" . $taber . "/>"; + $this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings."); } } elseif ($setType === 'plain') { // now add to the field set - $fieldSet .= PHP_EOL."\t\t" . $taber . ""; - $fieldSet .= PHP_EOL."\t\t" . $taber . "fieldXML = new SimpleXMLElement(''); + $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; + foreach ($fieldAttributes as $property => $value) { if ($property != 'option') { - $fieldSet .= PHP_EOL."\t\t" . $taber . "\t" . $property . '="' . $value . '"'; + $field->fieldXML->addAttribute($property, $value); } } - $fieldSet .= PHP_EOL."\t\t" . $taber . "/>"; } elseif ($setType === 'spacer') { // now add to the field set - $fieldSet .= PHP_EOL."\t\t"; - $fieldSet .= PHP_EOL."\t\tfieldXML = new SimpleXMLElement(''); + $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)"; + foreach ($fieldAttributes as $property => $value) { if ($property != 'option') { - $fieldSet .= " " . $property . '="' . $value . '"'; + $field->fieldXML->addAttribute($property, $value); } } - $fieldSet .= " />"; } elseif ($setType === 'special') { @@ -954,19 +999,24 @@ class Fields extends Structure if ($typeName === 'repeatable') { // now add to the field set - $fieldSet .= PHP_EOL."\t\t"; - $fieldSet .= PHP_EOL."\t\tfieldXML = new SimpleXMLElement(''); + $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)"; + foreach ($fieldAttributes as $property => $value) { if ($property != 'fields') { - $fieldSet .= PHP_EOL."\t\t\t" . $property . '="' . $value . '"'; + $field->fieldXML->addAttribute($property, $value); } } - $fieldSet .= ">"; - $fieldSet .= PHP_EOL."\t\t\t" . ''; - $fieldSet .= PHP_EOL."\t\t\t\t" . '"; - $fieldSet .= PHP_EOL."\t\t\t"; - $fieldSet .= PHP_EOL."\t\t"; } - // set the subform fields (it is a repeatable without the modal) + // set the subform fields (it is a repeatable without the modal) elseif ($typeName === 'subform') { // now add to the field set - $fieldSet .= PHP_EOL."\t\t"; - $fieldSet .= PHP_EOL."\t\tfieldXML = new SimpleXMLElement(''); + $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; + // add all properties foreach ($fieldAttributes as $property => $value) { - if ($property != 'fields') + if ($property != 'fields' && $property != 'formsource') { - $fieldSet .= PHP_EOL."\t\t\t" . $property . '="' . $value . '"'; + $field->fieldXML->addAttribute($property, $value); } } - $fieldSet .= ">"; - $fieldSet .= PHP_EOL."\t\t\t" . '"; - $fieldSet .= PHP_EOL."\t\t"; } } elseif ($setType === 'custom') { // now add to the field set - $fieldSet .= PHP_EOL."\t\t" . $taber . ""; - $fieldSet .= PHP_EOL."\t\t" . $taber . "fieldXML = new SimpleXMLElement(''); + $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)"; foreach ($fieldAttributes as $property => $value) { if ($property != 'option') { - $fieldSet .= PHP_EOL."\t\t" . $taber . "\t" . $property . '="' . $value . '"'; + $field->fieldXML->addAttribute($property, $value); } } - $fieldSet .= PHP_EOL."\t\t" . $taber . "/>"; // incase the field is in the config and has not been set if ('config' === $viewName && 'configs' === $listViewName) { @@ -1151,19 +1206,19 @@ class Fields extends Structure $this->setCustomFieldTypeFile($data, $listViewName, $viewName); } } - return $fieldSet; + return $field; } /** * set the layout builder - * + * * @param string $viewName The single edit view code name - * @param string $tabName The tab code name - * @param string $name The field code name - * @param array $field The field details + * @param string $tabName The tab code name + * @param string $name The field code name + * @param array $field The field details * * @return void - * + * */ public function setLayoutBuilder(&$viewName,&$tabName,&$name,&$field) { @@ -1182,7 +1237,7 @@ class Fields extends Structure } else { - $this->zeroOrderFix[$viewName][(int) $field['tab']]++; + $this->zeroOrderFix[$viewName][(int) $field['tab']] ++; } $field['order_edit'] = $this->zeroOrderFix[$viewName][(int) $field['tab']]; } @@ -1206,7 +1261,7 @@ class Fields extends Structure $this->movedPublishingFields[$viewName][$name] = $name; } } - elseif ($tabName === 'publishing' || $tabName === 'Publishing' ) + elseif ($tabName === 'publishing' || $tabName === 'Publishing') { if (!in_array($name, $this->defaultFields)) { @@ -1244,19 +1299,19 @@ class Fields extends Structure /** * build the site field data needed - * - * @param string $view The single edit view code name - * @param string $field The field name - * @param string $set The decoding set this field belongs to - * @param string $type The field type + * + * @param string $view The single edit view code name + * @param string $field The field name + * @param string $set The decoding set this field belongs to + * @param string $type The field type * * @return void - * + * */ public function buildSiteFieldData($view, $field, $set, $type) { $decode = array('json','base64','basic_encryption','advance_encryption'); - $uikit = array('textarea','editor'); + $textareas = array('textarea','editor'); if (isset($this->siteFields[$view][$field]) && ComponentbuilderHelper::checkArray($this->siteFields[$view][$field])) { foreach ($this->siteFields[$view][$field] as $code => $array) @@ -1267,17 +1322,22 @@ class Fields extends Structure $this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => $set, 'type' => $type); } // set the uikit checker - if ((2 == $this->uikit || 1 == $this->uikit) && in_array($type, $uikit)) + if ((2 == $this->uikit || 1 == $this->uikit) && in_array($type, $textareas)) { $this->siteFieldData['uikit'][$array['site']][$code][$array['as']][$array['key']] = $array; } + // set the textareas checker + if (in_array($type, $textareas)) + { + $this->siteFieldData['textareas'][$array['site']][$code][$array['as']][$array['key']] = $array; + } } } } /** * set field attributes - * + * * @param array $field The field data * @param int $viewType The view type * @param string $name The field name @@ -1292,11 +1352,11 @@ class Fields extends Structure * @param boolean $repeatable The repeatable field switch * * @return array The field attributes - * + * */ private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, &$multiple, &$langLabel, $langView, &$spacerCounter, $listViewName, $viewName, $placeholders, $repeatable = false) { - // reset array` + // reset array $fieldAttributes = array(); $setCustom = false; // setup joomla default fields @@ -1419,7 +1479,7 @@ class Fields extends Structure $name = $this->setPlaceholders($xmlValue, $placeholders); } } - elseif ($property['name'] === 'extension' || $property['name'] === 'directory') + elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource') { $xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"'); // replace the placeholders @@ -1528,7 +1588,7 @@ class Fields extends Structure // check if translatable if (ComponentbuilderHelper::checkString($xmlValue) && isset($property['translatable']) && $property['translatable'] == 1) { - // update lable if field use multiple times + // update label if field use multiple times if ($property['name'] === 'label') { if (isset($fieldAttributes['name']) && isset($this->uniqueNames[$viewName]['names'][$fieldAttributes['name']])) @@ -1622,14 +1682,14 @@ class Fields extends Structure /** * Keep track of the field names, to see if it used multiple times - * + * * @param array $field The field data * @param string $typeName The field type * @param string $name The field name * @param string $viewName The singel view name * * @return void - * + * */ protected function setUniqueNameKeeper(&$field, &$typeName, &$name, $viewName) { @@ -1681,15 +1741,15 @@ class Fields extends Structure } } } - + /** * Count how many times the same field is used per view - * + * * @param string $name The name of the field * @param string $view The name of the view * * @return void - * + * */ protected function setUniqueNameCounter($name, $view) { @@ -1708,15 +1768,15 @@ class Fields extends Structure $this->uniqueNames[$view]['counter'][$name]++; return; } - + /** * Naming each field with an unique name - * + * * @param string $name The name of the field * @param string $view The name of the view * * @return string the name - * + * */ protected function uniqueName($name, $view) { @@ -1737,10 +1797,10 @@ class Fields extends Structure return $name; } - + /** * set Builders - * + * * @param string $langLabel The language string for field label * @param string $langView The language string of the view * @param string $viewName The singel view name @@ -1754,7 +1814,7 @@ class Fields extends Structure * @param boolean $options The options switch * * @return void - * + * */ public function setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, $custom = false, $options = false) { @@ -1784,21 +1844,21 @@ class Fields extends Structure // don't use these as index or uniqe keys $textKeys = array('TEXT', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'TINYBLOB', 'MEDIUMBLOB', 'LONGBLOB'); // build the query values - $this->queryBuilder[$viewName][$name]['type'] = $field['settings']->datatype; - if (!in_array($field['settings']->datatype, $textKeys)) + $this->queryBuilder[$viewName][$name]['type'] = $field['settings']->datatype; + if (!in_array($field['settings']->datatype, $textKeys)) { - $this->queryBuilder[$viewName][$name]['lenght'] = $field['settings']->datalenght; - $this->queryBuilder[$viewName][$name]['lenght_other'] = $field['settings']->datalenght_other; - $this->queryBuilder[$viewName][$name]['default'] = $field['settings']->datadefault; - $this->queryBuilder[$viewName][$name]['other'] = $field['settings']->datadefault_other; - } - else - { - $this->queryBuilder[$viewName][$name]['default'] = 'EMPTY'; - } + $this->queryBuilder[$viewName][$name]['lenght'] = $field['settings']->datalenght; + $this->queryBuilder[$viewName][$name]['lenght_other'] = $field['settings']->datalenght_other; + $this->queryBuilder[$viewName][$name]['default'] = $field['settings']->datadefault; + $this->queryBuilder[$viewName][$name]['other'] = $field['settings']->datadefault_other; + } + else + { + $this->queryBuilder[$viewName][$name]['default'] = 'EMPTY'; + } // to identify the field - $this->queryBuilder[$viewName][$name]['ID'] = $field['settings']->id; - $this->queryBuilder[$viewName][$name]['null_switch'] = $field['settings']->null_switch; + $this->queryBuilder[$viewName][$name]['ID'] = $field['settings']->id; + $this->queryBuilder[$viewName][$name]['null_switch'] = $field['settings']->null_switch; // set index types if ($field['settings']->indexes == 1 && !in_array($field['settings']->datatype, $textKeys)) { @@ -2015,7 +2075,7 @@ class Fields extends Structure $this->getItemsMethodListStringFixBuilder[$viewName][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store); } } - + // if subform the values must revert to array if ('subform' === $typeName) { @@ -2028,7 +2088,7 @@ class Fields extends Structure $this->getItemsMethodEximportStringFixBuilder[$viewName][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store); } // check if field should be added to uikit - $this->buildSiteFieldData($viewName, $name, 'uikit', $typeName); + $this->buildSiteFieldData($viewName, $name, 'uikit', $typeName); // load the selection translation fix if (ComponentbuilderHelper::checkArray($options) && (isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform') { @@ -2042,7 +2102,7 @@ class Fields extends Structure // build the search values if (isset($field['search']) && $field['search'] == 1) { - $_list = (!isset($field['list'])) ? $field['list'] : 0; + $_list = (isset($field['list'])) ? $field['list'] : 0; $this->searchBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list); } // build the filter values @@ -2064,7 +2124,7 @@ class Fields extends Structure } $this->setLayoutBuilder($viewName, $tabName, $name, $field); } - + public function setCustomFieldTypeFile($data, $viewName_list, $viewName_single) { // make sure it is not already been build @@ -2072,11 +2132,11 @@ class Fields extends Structure { // first build the custom field type file $target = array('admin' => 'customfield'); - $this->buildDynamique($target,'field'.$data['custom']['extends'],$data['custom']['type']); + $this->buildDynamique($target,'field'.$data['custom']['extends'], $data['custom']['type']); // set tab and break replacements $tabBreak = array( - '\t' => "\t", - '\n' => PHP_EOL + '\t' => "\t", + '\n' => PHP_EOL ); // make field dynamic $replace = array( @@ -2140,7 +2200,7 @@ class Fields extends Structure } else { - $phpxCode .= PHP_EOL."\t\t".$this->setPlaceholders($code, $tabBreak); + $phpxCode .= PHP_EOL . "\t\t" . $this->setPlaceholders($code, $tabBreak); } } } @@ -2185,15 +2245,15 @@ class Fields extends Structure /** * default Fields - * + * * @param string $type The field type * @param boolean $option The field grouping * * @return boolean if the field was found - * + * */ public function defaultField($type, $option = 'default') - { + { // list of default fields // https://docs.joomla.org/Form_field $defaults = array( @@ -2235,4 +2295,121 @@ class Fields extends Structure return false; } + /** + * xmlComment + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param string $comment The comment to inject + * + * @return null + * + */ + public function xmlComment(&$xml, $comment) + { + $domXML = dom_import_simplexml($xml); + $domComment = new DOMComment($comment); + $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); + $domXML->appendChild($nodeTarget); + $xml = simplexml_import_dom($domXML); + } + + /** + * xmlAddAttributes + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $attributes The attributes to apply to the XML element + * + * @return null + * + */ + public function xmlAddAttributes(&$xml, $attributes = array()) + { + foreach ($attributes as $key => $value) + { + $xml->addAttribute($key, $value); + } + } + + /** + * xmlAppend + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement + * + * @return null + * + */ + public function xmlAppend(&$xml, $node) + { + if (!$node) + { // element was not returned + return; + } + switch (get_class($node)) + { + case 'stdClass': + if (property_exists($node, 'comment')) + { + $this->xmlComment($xml, $node->comment); + } + if (property_exists($node, 'fieldXML')) + { + $this->xmlAppend($xml, $node->fieldXML); + } + break; + case 'SimpleXMLElement': + $domXML = dom_import_simplexml($xml); + $domNode = dom_import_simplexml($node); + $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); + $xml = simplexml_import_dom($domXML); + break; + } + } + + /** + * xmlPrettyPrint + * + * @param SimpleXMLElement $xml The XML element containing a node to be output + * @param string $nodename node name of the input xml element to print out. this is done to omit the ownerDocument; + $dom->formatOutput = true; + $xmlString = $dom->saveXML($dom->getElementsByTagName($nodename)->item(0)); + $tidy = new Tidy(); + $tidy->parseString($xmlString,array('indent'=>true,'indent-spaces'=>8,'input-xml'=>true,'output-xml'=>true,'indent-attributes'=>true,'wrap-attributes'=>true,'wrap'=>false)); + $tidy->cleanRepair(); + return $this->xmlIndent((string)$tidy,' ',8,true,false); + } + + /** + * xmlIndent + * + * @param string $string The XML input + * @param string $char Character or characters to use as the repeated indent + * @param integer $depth number of times to repeat the indent character + * @param boolean $skipfirst Skip the first line of the input. + * @param boolean $skiplast Skip the last line of the input; + * + * @return string XML output + * + */ + public function xmlIndent($string,$char=' ',$depth=0,$skipfirst=false,$skiplast=false) + { + $output = array(); + $lines = explode("\n",$string); + $first = true; + $last = count($lines)-1; + foreach($lines as $i=>$line) + { + $output[] = (($first&&$skipfirst)||$i===$last&&$skiplast)?$line:str_repeat($char,$depth).$line; + $first = false; + } + return implode("\n",$output); + } + } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 9374bc27e..57641e0ce 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -184,6 +184,8 @@ class Interpretation extends Fields * @var array */ protected $hasIdRequest = array(); + + protected $libwarning = array(); /** * Constructor @@ -249,9 +251,9 @@ class Interpretation extends Fields { $_VDM = '_'.ComponentbuilderHelper::safeString($this->uniquekey(10),'U'); // add it to the system - $this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLincenseLock($_VDM,'site'); - $this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLincenseLock($_VDM,'admin'); - $this->fileContentStatic['###LICENSE_LOCKED_INT###'] = $this->setInitLincenseLock($_VDM); + $this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM,'site'); + $this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM,'admin'); + $this->fileContentStatic['###LICENSE_LOCKED_INT###'] = $this->setInitLicenseLock($_VDM); $this->fileContentStatic['###LICENSE_LOCKED_DEFINED###'] = PHP_EOL.PHP_EOL.'defined(\''.$_VDM.'\') or die(JText::_(\'NIE_REG_NIE\'));'; } } @@ -277,7 +279,7 @@ class Interpretation extends Fields $boolMethod = 'get'.ComponentbuilderHelper::safeString($this->uniquekey(3, false, 'ddd'), 'W'); $globalbool = 'set'.ComponentbuilderHelper::safeString($this->uniquekey(3), 'W'); // add it to the system - $this->fileContentDynamic[$view]['###LICENSE_LOCKED_SET_BOOL###'] = $this->setBoolLincenseLock($boolMethod,$globalbool); + $this->fileContentDynamic[$view]['###LICENSE_LOCKED_SET_BOOL###'] = $this->setBoolLicenseLock($boolMethod,$globalbool); $this->fileContentDynamic[$view]['###LICENSE_LOCKED_CHECK###'] = $this->checkStatmentLicenseLocked($boolMethod); $this->fileContentDynamic[$view]['###LICENSE_TABLE_LOCKED_CHECK###'] = $this->checkStatmentLicenseLocked($boolMethod, '$table'); $this->fileContentDynamic[$view]['###BOOLMETHOD###'] = $boolMethod; @@ -305,7 +307,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $statment); } - public function setBoolLincenseLock($boolMethod,$globalbool) + public function setBoolLicenseLock($boolMethod,$globalbool) { $bool[] = PHP_EOL.PHP_EOL."\t/**"; $bool[] = "\t* The private bool."; @@ -337,7 +339,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $bool); } - public function setHelperLincenseLock($_VDM,$target) + public function setHelperLicenseLock($_VDM,$target) { $helper[] = PHP_EOL.PHP_EOL."\t/**"; $helper[] = "\t* Check if this install has a license."; @@ -360,7 +362,7 @@ class Interpretation extends Fields return implode(PHP_EOL, $helper); } - public function setInitLincenseLock($_VDM) + public function setInitLicenseLock($_VDM) { $init[] = PHP_EOL."if (!defined('".$_VDM."'))"; $init[] = "{"; @@ -1650,6 +1652,34 @@ class Interpretation extends Fields return $fieldDecode; } + public function setCustomViewFieldonContentPrepareChecker(&$get, $checker, $string, $code, $tab = '') + { + $fieldPrepare = ''; + $runplugins = false; + $context = 'com_'.$this->fileContentStatic['###component###'].'.'.$code; + foreach ($checker as $field => $array) + { + if (strpos($get['selection']['select'], $field) !== false) + { + // build decoder string + if(!$runplugins) { + $runplugins = PHP_EOL.$tab."\t//".$this->setLine(__LINE__)." Load the JEvent Dispatcher"; + $runplugins .= PHP_EOL.$tab."\tJPluginHelper::importPlugin('content');"; + $runplugins .= PHP_EOL.$tab."\t".'$this->_dispatcher = JEventDispatcher::getInstance();'; + } + $fieldPrepare .= PHP_EOL."\t".$tab."\t//".$this->setLine(__LINE__)." Make sure the content prepare plugins fire on ".$field; + $fieldPrepare .= PHP_EOL."\t".$tab."\t\$_".$field." = new stdClass();"; + $fieldPrepare .= PHP_EOL."\t".$tab."\t\$_".$field.'->text =& '.$string.'->'.$field.'; //'.$this->setLine(__LINE__).' value must be in text'; + $fieldPrepare .= PHP_EOL."\t".$tab."\t//".$this->setLine(__LINE__)." Since all values are now in text (Joomla Limitation), we also add the field name (".$field.") to context"; + $fieldPrepare .= PHP_EOL."\t".$tab."\t".'$this->_dispatcher->trigger("onContentPrepare",array(\''.$context.'.'.$field.'\',&$_'.$field.',&$this->params));'; // we can improve the params later (TODO) + } + } + // load dispatcher + $this->JEventDispatcher = array('###DISPATCHER###' => ($runplugins?:'')); + // return content prepare fix + return $fieldPrepare; + } + public function setCustomViewFieldUikitChecker(&$get, $checker, $string, $code, $tab = '') { $fieldUikit = ''; @@ -1657,9 +1687,6 @@ class Interpretation extends Fields { if (strpos($get['selection']['select'], $field) !== false) { - // build decoder string - $fieldUikit .= PHP_EOL."\t".$tab."\t//".$this->setLine(__LINE__)." Make sure the content prepare plugins fire on ".$field." (TODO)"; - $fieldUikit .= PHP_EOL."\t".$tab."\t".$string."->".$field." = JHtml::_('content.prepare',".$string."->".$field.");"; // only load for uikit version 2 (TODO) we may need to add another check here if (2 == $this->uikit || 1 == $this->uikit) { @@ -1668,6 +1695,7 @@ class Interpretation extends Fields } } } + // return UIKIT fix return $fieldUikit; } @@ -2123,6 +2151,8 @@ class Interpretation extends Fields $getItem .= PHP_EOL."\t".$tab."\t\treturn false;"; } $getItem .= PHP_EOL."\t".$tab."\t}"; + // dispatcher placholder + $getItem .= "###DISPATCHER###"; if (ComponentbuilderHelper::checkArray($get->main_get)) { $asBucket = array(); @@ -2147,6 +2177,16 @@ class Interpretation extends Fields $getItem .= $this->setCustomViewFieldDecodeFilter($main_get,$decodeFilter,'$data','$data',$code,$tab); } } + + if (isset($this->siteFieldData['textareas'][$code][$main_get['key']][$main_get['as']])) + { + $contentprepareChecker = $this->siteFieldData['textareas'][$code][$main_get['key']][$main_get['as']]; + if (ComponentbuilderHelper::checkArray($contentprepareChecker)) + { + // set contentprepare checkers on needed fields + $getItem .= $this->setCustomViewFieldonContentPrepareChecker($main_get, $contentprepareChecker, '$data', $code, $tab); + } + } if (isset($this->siteFieldData['uikit'][$code][$main_get['key']][$main_get['as']])) { @@ -2203,7 +2243,8 @@ class Interpretation extends Fields $getItem .= PHP_EOL.PHP_EOL."\t".$tab."\t//".$this->setLine(__LINE__)." set data object to item."; $getItem .= PHP_EOL."\t".$tab."\t\$this->_item[\$pk] = \$data;"; } - return $getItem; + // check if the dispather should be added + return str_replace(array_keys($this->JEventDispatcher), array_values($this->JEventDispatcher), $getItem); } return PHP_EOL."\t".$tab."\t//".$this->setLine(__LINE__)."add your custom code here."; } @@ -2526,6 +2567,8 @@ class Interpretation extends Fields $methods .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." check if there was data returned"; $methods .= PHP_EOL."\t\tif (\$db->getNumRows())"; $methods .= PHP_EOL."\t\t{"; + // set dispatcher placeholder + $methods .= "###DISPATCHER###"; // set decoding of needed fields if (isset($this->siteFieldData['decode'][$default['code']][$get['key']][$default['as']])) { @@ -2541,12 +2584,18 @@ class Interpretation extends Fields { $uikitChecker = $this->siteFieldData['uikit'][$default['code']][$get['key']][$default['as']]; } + // set contnetprepare on needed fields + if (isset($this->siteFieldData['textareas'][$default['code']][$get['key']][$default['as']])) + { + $contentprepareChecker = $this->siteFieldData['textareas'][$default['code']][$get['key']][$default['as']]; + } // set joined values $placeholders = array('###TAB###' => "\t\t", '###STRING###' => '$item'); $joinedChecker = (isset($this->otherJoin[$this->target][$default['code']][$default['as']]) && ComponentbuilderHelper::checkArray($this->otherJoin[$this->target][$default['code']][$default['as']])) ? $this->otherJoin[$this->target][$default['code']][$default['as']] : ''; if ( (isset($decodeChecker) && ComponentbuilderHelper::checkArray($decodeChecker)) || (isset($uikitChecker) && ComponentbuilderHelper::checkArray($uikitChecker)) || (isset($decodeFilter) && ComponentbuilderHelper::checkArray($decodeFilter)) || + (isset($contentprepareChecker) && ComponentbuilderHelper::checkArray($contentprepareChecker)) || ComponentbuilderHelper::checkArray($joinedChecker)) { $decoder = ''; @@ -2560,6 +2609,11 @@ class Interpretation extends Fields { $decoder_filter = $this->setCustomViewFieldDecodeFilter($get,$decodeFilter,'$item','$items[$nr]',$default['code'],"\t\t"); } + $contentprepare = ''; + if (isset($contentprepareChecker) && ComponentbuilderHelper::checkArray($contentprepareChecker)) + { + $contentprepare = $this->setCustomViewFieldonContentPrepareChecker($get,$contentprepareChecker,'$item',$default['code'],"\t\t"); + } $uikit = ''; if (isset($uikitChecker) && ComponentbuilderHelper::checkArray($uikitChecker)) { @@ -2573,7 +2627,7 @@ class Interpretation extends Fields $joine .= $this->setPlaceholders($joinedString, $placeholders); } } - if (ComponentbuilderHelper::checkString($decoder) || ComponentbuilderHelper::checkString($uikit) || ComponentbuilderHelper::checkString($decoder_filter) || ComponentbuilderHelper::checkString($joine)) + if (ComponentbuilderHelper::checkString($decoder) || ComponentbuilderHelper::checkString($contentprepare) || ComponentbuilderHelper::checkString($uikit) || ComponentbuilderHelper::checkString($decoder_filter) || ComponentbuilderHelper::checkString($joine)) { $methods .= PHP_EOL."\t\t\t\$items = \$db->loadObjectList();"; $methods .= PHP_EOL.PHP_EOL."\t\t\t//".$this->setLine(__LINE__)." Convert the parameter fields into objects."; @@ -2587,6 +2641,10 @@ class Interpretation extends Fields { $methods .= $decoder_filter; } + if (ComponentbuilderHelper::checkString($contentprepare)) + { + $methods .= $contentprepare; + } if (ComponentbuilderHelper::checkString($uikit)) { $methods .= $uikit; @@ -2629,13 +2687,15 @@ class Interpretation extends Fields $script .= PHP_EOL."\t\t//".$this->setLine(__LINE__)." Get the encryption object."; $script .= PHP_EOL."\t\t\$advanced = new FOFEncryptAes(\$advancedkey, 256);".PHP_EOL; } - $methods = str_replace('###CRYPT###',$script,$methods); + $methods = str_replace('###CRYPT###', $script, $methods); } } + // insure the crypt placeholder is removed $methods = str_replace('###CRYPT###','',$methods); } } - return $methods.PHP_EOL; + // check if the dispatcher must be set + return str_replace(array_keys($this->JEventDispatcher), array_values($this->JEventDispatcher), $methods).PHP_EOL; } public function setCustomViewMethodDefaults($get,$code) @@ -2722,7 +2782,7 @@ class Interpretation extends Fields * @param $get * @param $code * @return string - */ + */ public function setCustomViewGetItems(&$get, $code) { $getItem = ''; @@ -2731,9 +2791,10 @@ class Interpretation extends Fields $Component = $this->fileContentStatic['###Component###']; if (ComponentbuilderHelper::checkObject($get)) { - $getItem .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." Convert the parameter fields into objects."; + $getItem .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." Insure all item fields are adapted where needed."; $getItem .= PHP_EOL."\t\tif (".$Component."Helper::checkArray(\$items))"; $getItem .= PHP_EOL."\t\t{"; + $getItem .= "###DISPATCHER###"; $getItem .= PHP_EOL."\t\t\tforeach (\$items as \$nr => &\$item)"; $getItem .= PHP_EOL."\t\t\t{"; $getItem .= PHP_EOL."\t\t\t\t//".$this->setLine(__LINE__)." Always create a slug for sef URL's"; @@ -2761,6 +2822,15 @@ class Interpretation extends Fields $getItem .= $this->setCustomViewFieldDecodeFilter($main_get,$decodeFilter,"\$item",'$items[$nr]',$code,"\t\t"); } } + if (isset($this->siteFieldData['textareas'][$code][$main_get['key']][$main_get['as']])) + { + $contentprepareChecker = $this->siteFieldData['textareas'][$code][$main_get['key']][$main_get['as']]; + if (ComponentbuilderHelper::checkArray($contentprepareChecker)) + { + // set contentprepare checkers on needed fields + $getItem .= $this->setCustomViewFieldonContentPrepareChecker($main_get,$contentprepareChecker,"\$item",$code,"\t\t"); + } + } if (isset($this->siteFieldData['uikit'][$code][$main_get['key']][$main_get['as']])) { $uikitChecker = $this->siteFieldData['uikit'][$code][$main_get['key']][$main_get['as']]; @@ -2773,6 +2843,8 @@ class Interpretation extends Fields $asBucket[] = $main_get['as']; } } + // check if we should load the dispatcher + $getItem = str_replace(array_keys($this->JEventDispatcher), array_values($this->JEventDispatcher), $getItem); // setup Globals $getItem .= $this->setCustomViewGlobals($get->global,'$item',$asBucket,"\t\t"); // setup the custom gets that returns multipal values @@ -2904,6 +2976,10 @@ class Interpretation extends Fields { // ensure correct target is set $TARGET = ComponentbuilderHelper::safeString($this->target,'U'); + + // set libraries ###'.$TARGET.'_LIBRARIES_LOADER### + $this->fileContentDynamic[$view['settings']->code]['###'.$TARGET.'_LIBRARIES_LOADER###'] = $this->setLibrariesLoader($view); + // set uikit ###'.$TARGET.'_UIKIT_LOADER### $this->fileContentDynamic[$view['settings']->code]['###'.$TARGET.'_UIKIT_LOADER###'] = $this->setUikitLoader($view); @@ -3266,7 +3342,7 @@ class Interpretation extends Fields { if (isset($this->footableScripts[$this->target][$view['settings']->code]) && $this->footableScripts[$this->target][$view['settings']->code]) { - return $this->setFootableScripts(false,'$this->document'); + return $this->setFootableScripts(false); } return ''; } @@ -3400,13 +3476,11 @@ class Interpretation extends Fields } return ''; } - - public function setUikitLoader(&$view) + + public function setLibrariesLoader($view) { - // reset buktes + // reset bucket $setter = ''; - $loader['css'] = array(); - $loader['js'] = array(); // allways load these in $setter .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." always make sure jquery is loaded."; $setter .= PHP_EOL."\t\tJHtml::_('jquery.framework');"; @@ -3421,6 +3495,229 @@ class Interpretation extends Fields } $setter .= PHP_EOL."\t\t//".$this->setLine(__LINE__)." Initialize the header checker."; $setter .= PHP_EOL."\t\t\$HeaderCheck = new ".$this->fileContentStatic['###component###']."HeaderCheck;"; + // check if this view should get libraries + if (isset($this->libManager[$this->target][$view['settings']->code]) + && ComponentbuilderHelper::checkArray($this->libManager[$this->target][$view['settings']->code])) + { + foreach ($this->libManager[$this->target][$view['settings']->code] as $id => $true) + { + if (isset($this->libraries[$id]) && ComponentbuilderHelper::checkObject($this->libraries[$id]) + && isset($this->libraries[$id]->document) && ComponentbuilderHelper::checkString($this->libraries[$id]->document)) + { + $setter .= PHP_EOL.PHP_EOL.$this->setPlaceholders( + str_replace('$document->', '$this->document->', $this->libraries[$id]->document), + $this->placeholders); + } + elseif (isset($this->libraries[$id]) && ComponentbuilderHelper::checkObject($this->libraries[$id]) + && isset($this->libraries[$id]->how)) + { + $setter .= $this->setLibraryDocument($id); + } + } + } + return $setter; + } + + protected function setLibraryDocument($id) + { + if (2 == $this->libraries[$id]->how && isset($this->libraries[$id]->conditions) + && ComponentbuilderHelper::checkArray($this->libraries[$id]->conditions)) + { + // build document with the conditions values + $this->setLibraryDocConditions($id, $this->setLibraryScripts($id, false)); + } + elseif (1 == $this->libraries[$id]->how) + { + // build document to allways add all files and urls + $this->setLibraryScripts($id); + } + // check if the document was build + if (isset($this->libraries[$id]->document) && ComponentbuilderHelper::checkString($this->libraries[$id]->document)) + { + return PHP_EOL.PHP_EOL.$this->libraries[$id]->document; + } + return ''; + } + + protected function setLibraryDocConditions($id, $scripts) + { + $document = ''; + // Start script builder for library files + if (!isset($this->libwarning[$id])) + { + $this->app->enqueueMessage(JText::sprintf('The conditional script builder for %s is not ready, will only be ready in the next update to v2.6.7', $this->libraries[$id]->name), 'warning'); + // set the warning only once + $this->libwarning[$id] = true; + } + // if there was any code added to document then set globaly + if (ComponentbuilderHelper::checkString($document)) + { + $this->libraries[$id]->document = $document; + } + } + + protected function setLibraryScripts($id, $buildDoc = true) + { + $scripts = array(); + // load the urls if found + if (isset($this->libraries[$id]->urls) && ComponentbuilderHelper::checkArray($this->libraries[$id]->urls)) + { + // set all the files + foreach ($this->libraries[$id]->urls as $url) + { + // if local path is set, then use it first + if (isset($url['path'])) + { + // update the root path + $path = $this->getScriptRootPath($url['path']); + // load document script + $scripts[md5($url['path'])] = $this->setIncludeLibScript($path); + // load url also if not building document + if (!$buildDoc) + { + // load document script + $scripts[md5($url['url'])] = $this->setIncludeLibScript($url['url'], false); + } + } + else + { + // load document script + $scripts[md5($url['url'])] = $this->setIncludeLibScript($url['url'], false); + } + } + } + // load the local files if found + if (isset($this->libraries[$id]->files) && ComponentbuilderHelper::checkArray($this->libraries[$id]->files)) + { + // set all the files + foreach ($this->libraries[$id]->files as $file) + { + $path = '/'.trim($file['path'], '/'); + // check if path has new file name (has extetion) + $pathInfo = pathinfo($path); + // update the root path + $_path = $this->getScriptRootPath($path); + if (isset($pathInfo['extension']) && $pathInfo['extension']) + { + // load document script + $scripts[md5($path)] = $this->setIncludeLibScript($_path, false, $pathInfo); + } + else + { + // load document script + $scripts[md5($path.'/'.trim($file['file'],'/'))] = $this->setIncludeLibScript($_path.'/'.trim($file['file'],'/')); + } + } + } + // load the local folders if found + if (isset($this->libraries[$id]->folders) && ComponentbuilderHelper::checkArray($this->libraries[$id]->folders)) + { + // get all the file paths + foreach ($this->libraries[$id]->folders as $folder) + { + if (isset($folder['path']) && isset($folder['folder'])) + { + $path = '/'.trim($folder['path'], '/'); + if (isset($folder['rename']) && 1 == $folder['rename']) + { + if ($_paths = ComponentbuilderHelper::getAllFilePaths($this->componentPath.$path)) + { + $files[$path] = $_paths; + } + } + else + { + $path = $path.'/'.trim($folder['folder'], '/'); + if ($_paths = ComponentbuilderHelper::getAllFilePaths($this->componentPath.$path)) + { + $files[$path] = $_paths; + } + } + } + } + // now load the script + foreach ($files as $root => $paths) + { + // update the root path + $_root = $this->getScriptRootPath($root); + // load per path + foreach($paths as $path) + { + $scripts[md5($root.'/'.trim($path, '/'))] = $this->setIncludeLibScript($_root.'/'.trim($path, '/')); + } + } + } + // if there was any code added to document then set globaly + if ($buildDoc && ComponentbuilderHelper::checkArray($scripts)) + { + $this->libraries[$id]->document = "\t\t//".$this->setLine(__LINE__)." always load these files.".PHP_EOL."\t\t".implode(PHP_EOL."\t\t", $scripts); + // success + return true; + } + elseif (ComponentbuilderHelper::checkArray($scripts)) + { + return $scripts; + } + return false; + } + + protected function setIncludeLibScript($path, $local = true, $pathInfo = false) + { + // insure we have the path info + if (!$pathInfo) + { + $pathInfo = pathinfo($path); + } + // set the local string + $JURI = ''; + if ($local) + { + $JURI = 'JURI::root(true) . '; + } + // use the path info to build the script + if (isset($pathInfo['extension']) && $pathInfo['extension']) + { + switch($pathInfo['extension']) + { + case 'js': + return '$this->document->addScript('.$JURI.'"'.$path.'");'; + break; + case 'css': + case 'less': + return '$this->document->addStyleSheet('.$JURI.'"'.$path.'");'; + break; + case 'php': + if (strpos($path, 'http') === false) + { + return 'require_once("'.$path.'");'; + } + break; + } + } + return ''; + } + + protected function getScriptRootPath($root) + { + if (strpos($root, '/media/') !== false && strpos($root, '/admin/') === false && strpos($root, '/site/') === false) + { + return str_replace('/media/', '/media/com_'.$this->fileContentStatic['###component###'] .'/', $root); + } + elseif (strpos($root, '/media/') === false && strpos($root, '/admin/') !== false && strpos($root, '/site/') === false) + { + return str_replace('/admin/', '/administrator/components/com_'.$this->fileContentStatic['###component###'] .'/', $root); + } + elseif (strpos($root, '/media/') === false && strpos($root, '/admin/') === false && strpos($root, '/site/') !== false) + { + return str_replace('/site/', '/components/com_'.$this->fileContentStatic['###component###'] .'/', $root); + } + return $root; + } + + public function setUikitLoader(&$view) + { + // reset setter + $setter = ''; // load the defaults needed if ($this->uikit > 0) { @@ -3449,12 +3746,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/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');"; $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/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');"; $setter .= PHP_EOL.$tabV."\t\t}"; } // load the components need @@ -3499,16 +3796,16 @@ class Interpretation extends Fields $setter .= PHP_EOL.$tabV."\t\t\t\tforeach (".$this->fileContentStatic['###Component###']."Helper::\$uk_components[\$class] as \$name)"; $setter .= PHP_EOL.$tabV."\t\t\t\t{"; $setter .= PHP_EOL.$tabV."\t\t\t\t\t//".$this->setLine(__LINE__)." check if the CSS file exists."; - $setter .= PHP_EOL.$tabV."\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_".$this->fileContentStatic['###component###']."/uikit/css/components/'.\$name.\$style.\$size.'.css'))"; + $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/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');"; $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/js/components/'.\$name.\$size.'.js'))"; + $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/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', 'text/javascript', true);"; $setter .= PHP_EOL.$tabV."\t\t\t\t\t}"; $setter .= PHP_EOL.$tabV."\t\t\t\t}"; $setter .= PHP_EOL.$tabV."\t\t\t}"; @@ -3528,16 +3825,16 @@ class Interpretation extends Fields $setter .= PHP_EOL.$tabV."\t\t\t\tforeach (".$this->fileContentStatic['###Component###']."Helper::\$uk_components[\$class] as \$name)"; $setter .= PHP_EOL.$tabV."\t\t\t\t{"; $setter .= PHP_EOL.$tabV."\t\t\t\t\t//".$this->setLine(__LINE__)." check if the CSS file exists."; - $setter .= PHP_EOL.$tabV."\t\t\t\t\tif (JFile::exists(JPATH_ROOT.'/media/com_".$this->fileContentStatic['###component###']."/uikit/css/components/'.\$name.\$style.\$size.'.css'))"; + $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/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');"; $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/js/components/'.\$name.\$size.'.js'))"; + $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/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', 'text/javascript', true);"; $setter .= PHP_EOL.$tabV."\t\t\t\t\t}"; $setter .= PHP_EOL.$tabV."\t\t\t\t}"; $setter .= PHP_EOL.$tabV."\t\t\t}"; @@ -3557,12 +3854,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-3/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');"; $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-3/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');"; $setter .= PHP_EOL.$tabV."\t\t}"; if (2 == $this->uikit) { @@ -3789,11 +4086,6 @@ class Interpretation extends Fields } } - public function writeFile($path, $data) - { - return ComponentbuilderHelper::writeFile($path, $data); - } - public function setMethodGetItem(&$view) { $script = ''; @@ -5475,6 +5767,7 @@ class Interpretation extends Fields $this->langContent['admin'][$this->langPrefix.'_SAVE_WARNING'] = "The value already existed so please select another."; $this->langContent['admin'][$this->langPrefix.'_HELP_MANAGER'] = "Help"; $this->langContent['admin'][$this->langPrefix.'_NEW'] = "New"; + $this->langContent['admin'][$this->langPrefix.'_CLOSE_NEW'] = "Close & New"; $this->langContent['admin'][$this->langPrefix.'_CREATE_NEW_S'] = "Create New %s"; $this->langContent['admin'][$this->langPrefix.'_EDIT_S'] = "Edit %s"; $this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_STATE'] = "- Keep Original State -"; @@ -5486,7 +5779,7 @@ class Interpretation extends Fields $this->langContent['admin'][$this->langPrefix.'_TRASHED'] = 'Trashed'; if ($this->componentData->add_license && $this->componentData->license_type == 3) { - $this->langContent['admin']['NIE_REG_NIE'] = "

Lincense not set for ".$componentName.".

Notify your administrator!
The lincense can be obtained from ".$this->componentData->companyname.".

"; + $this->langContent['admin']['NIE_REG_NIE'] = "

License not set for ".$componentName.".

Notify your administrator!
The license can be obtained from ".$this->componentData->companyname.".

"; } // add the langug files needed to import and export data if ($this->addEximport) @@ -5664,11 +5957,11 @@ class Interpretation extends Fields { foreach ($this->componentData->custom_admin_views as $custom_admin_view) { - if (ComponentbuilderHelper::checkArray($custom_admin_view['adminviews'])) + if (isset($custom_admin_view['adminviews']) && ComponentbuilderHelper::checkArray($custom_admin_view['adminviews'])) { foreach ($custom_admin_view['adminviews'] as $adminview) { - if ($view['adminview'] == $adminview) + if (isset($view['adminview']) && $view['adminview'] == $adminview) { // set the needed keys $setId = false; @@ -6793,18 +7086,27 @@ class Interpretation extends Fields } if (ComponentbuilderHelper::checkString($single) && ComponentbuilderHelper::checkString($list)) { - $head = $this->setListHeadLinked($single,$list,$addNewButon); - $body = $this->setListBodyLinked($single,$list,$viewName_single); + $head = $this->setListHeadLinked($single, $list, $addNewButon, $viewName_single); + $body = $this->setListBodyLinked($single, $list, $viewName_single); $functionName = ComponentbuilderHelper::safeString($codeName,'F'); // ###LAYOUTITEMSTABLE### <<>> $this->fileContentDynamic[$viewName_single.'_'.$layoutCodeName]['###LAYOUTITEMSTABLE###'] = $head.$body; // ###LAYOUTITEMSHEADER### <<>> - $headerscript = '$edit = "index.php?option=com_'.$this->fileContentStatic['###component###'].'&view='.$list.'&task='.$single.'.edit";'; - if ($addNewButon) + $headerscript = '$edit = "index.php?option=com_'.$this->fileContentStatic['###component###'].'&view='.$list.'&task='.$single.'.edit";'; + if ($addNewButon > 0) { - $headerscript .= PHP_EOL.'$ref = ($id) ? "&ref='.$viewName_single.'&refid=".$id : "";'; - $headerscript .= PHP_EOL.'$new = "index.php?option=com_'.$this->fileContentStatic['###component###'].'&view='.$single.'&layout=edit".$ref;'; - $headerscript .= PHP_EOL.'$can = '.$this->fileContentStatic['###Component###'].'Helper::getActions('."'".$single."'".');'; + // add the link for new + if ($addNewButon == 1 || $addNewButon == 2) + { + $headerscript .= PHP_EOL.'$ref = ($id) ? "&ref='.$viewName_single.'&refid=".$id : "";'; + $headerscript .= PHP_EOL.'$new = "index.php?option=com_'.$this->fileContentStatic['###component###'].'&view='.$single.'&layout=edit".$ref;'; + } + // and the link for close and new + if ($addNewButon == 2 || $addNewButon == 3) + { + $headerscript .= PHP_EOL.'$close_new = "index.php?option=com_'.$this->fileContentStatic['###component###'].'&view='.$single.'&layout=edit";'; + } + $headerscript .= PHP_EOL.'$can = '.$this->fileContentStatic['###Component###'].'Helper::getActions('."'".$single."'".');'; } $this->fileContentDynamic[$viewName_single.'_'.$layoutCodeName]['###LAYOUTITEMSHEADER###'] = $headerscript; // ###LINKEDVIEWITEMS### <<>> @@ -6865,48 +7167,47 @@ class Interpretation extends Fields /** * @param bool $init - * @param string $document * @return string - */ - public function setFootableScripts($init = true, $document = '$document') + */ + public function setFootableScripts($init = true) { 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".$document."->addStyleSheet(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/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');"; $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".$document."->addStyleSheet(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/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');"; $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".$document."->addStyleSheet(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/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');"; $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".$document."->addScript(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/js/footable.js');"; - $foo .= PHP_EOL."\t\t".$document."->addScript(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/js/footable.sort.js');"; - $foo .= PHP_EOL."\t\t".$document."->addScript(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/js/footable.filter.js');"; - $foo .= PHP_EOL."\t\t".$document."->addScript(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/js/footable.paginate.js');"; + $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');"; 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'".'); }";'; - $foo .= PHP_EOL."\t\t\$document->addScriptDeclaration(\$footable);".PHP_EOL; + $foo .= PHP_EOL."\t\t\$this->document->addScriptDeclaration(\$footable);".PHP_EOL; } } elseif (3 == $this->footableVersion) // loading version 3 { $foo = PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." Add the CSS for Footable"; - $foo .= PHP_EOL."\t\t".$document."->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');"; - $foo .= PHP_EOL."\t\t".$document."->addStyleSheet(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/css/footable.standalone.min.css');"; + $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->setLine(__LINE__)." Add the JavaScript for Footable (adding all funtions)"; - $foo .= PHP_EOL."\t\t".$document."->addScript(JURI::root() .'media/com_".$this->fileContentStatic['###component###']."/footable/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');"; if ($init) { $foo .= PHP_EOL.PHP_EOL."\t\t".'$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('."'.footable'".').footable();});});";'; - $foo .= PHP_EOL."\t\t\$document->addScriptDeclaration(\$footable);".PHP_EOL; + $foo .= PHP_EOL."\t\t\$this->document->addScriptDeclaration(\$footable);".PHP_EOL; } } return $foo; @@ -7221,7 +7522,7 @@ class Interpretation extends Fields return ''; } - public function setListHeadLinked($viewName_single,$viewName_list,$addNewButon) + public function setListHeadLinked($viewName_single, $viewName_list, $addNewButon, $refview) { if (isset($this->listBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->listBuilder[$viewName_list])) { @@ -7229,7 +7530,7 @@ class Interpretation extends Fields $Helper = $this->fileContentStatic['###Component###'].'Helper'; $head = ''; // only add new button if set - if ($addNewButon) + if ($addNewButon > 0) { // setup correct core target $coreLoad = false; @@ -7251,7 +7552,32 @@ class Interpretation extends Fields } // add a button for new $head = ''; - $head .= PHP_EOL."\t".'
langPrefix."_NEW'".'); ?>

'; + // make group button if needed + $tabB = ""; + if ($addNewButon == 2) + { + $head .= PHP_EOL."\t".'
'; + $tabB = "\t"; + } + // add the new buttons + if ($addNewButon == 1 || $addNewButon == 2) + { + $head .= PHP_EOL.$tabB."\t".' langPrefix."_NEW'".'); ?>'; + } + // add the close and new button + if ($addNewButon == 2 || $addNewButon == 3) + { + $head .= PHP_EOL.$tabB."\t".' langPrefix."_CLOSE_NEW'".'); ?>'; + } + // close group button if needed + if ($addNewButon == 2) + { + $head .= PHP_EOL."\t".'


'; + } + else + { + $head .= '

'; + } $head .= PHP_EOL.''.PHP_EOL; } $head .= ''; @@ -9337,7 +9663,7 @@ class Interpretation extends Fields if (isset($this->customScriptBuilder['token'][$view]) && $this->customScriptBuilder['token'][$view]) { $fix .= PHP_EOL."\t\t//".$this->setLine(__LINE__)." Add Ajax Token"; - $fix .= PHP_EOL."\t\t\$document->addScriptDeclaration(\"var token = '\".JSession::getFormToken().\"';\");"; + $fix .= PHP_EOL."\t\t\$this->document->addScriptDeclaration(\"var token = '\".JSession::getFormToken().\"';\");"; } return $fix; } @@ -12338,6 +12664,8 @@ class Interpretation extends Fields $nameList = ComponentbuilderHelper::safeString($menu['name']); $nameUpper = ComponentbuilderHelper::safeString($menu['name'], 'U'); $this->langContent['adminsys'][$lang.'_'.$nameUpper] = $menu['name']; + // urlencode + $menu['link'] = htmlspecialchars($menu['link'], ENT_XML1, 'UTF-8'); // add custom menu $customMenu .= PHP_EOL."\t\t\t".''.$lang.'_'.$nameUpper.''; } @@ -12357,6 +12685,8 @@ class Interpretation extends Fields $nameList = ComponentbuilderHelper::safeString($menu['name']); $nameUpper = ComponentbuilderHelper::safeString($menu['name'], 'U'); $this->langContent['adminsys'][$lang.'_'.$nameUpper] = $menu['name']; + // urlencode + $menu['link'] = htmlspecialchars($menu['link'], ENT_XML1, 'UTF-8'); // add custom menu $this->lastCustomMainMenu[$nr] = PHP_EOL."\t\t\t".''.$lang.'_'.$nameUpper.''; } @@ -12402,9 +12732,14 @@ class Interpretation extends Fields $dbkey = 'g'; foreach ($this->componentData->config as $field) { - $xmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $spacerCounter, $placeholders, $dbkey, false); - - if (ComponentbuilderHelper::checkString($xmlField)) + $newxmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $spacerCounter, $placeholders, $dbkey, false); + // tmp hack untill this whole area is also done in xml (TODO) + if (isset($newxmlField->fieldXML)) + { + $xmlField = dom_import_simplexml($newxmlField->fieldXML); + $xmlField = PHP_EOL."\t'.PHP_EOL."\t".$this->xmlPrettyPrint($xmlField, 'field'); + } + if (isset($xmlField) && ComponentbuilderHelper::checkString($xmlField)) { $this->configFieldSetsCustomField[$field['tabname']][] = $xmlField; // set global params to db on install diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 2ea8127ac..eea174690 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -318,6 +318,7 @@ class Infusion extends Interpretation && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_document'][$viewName_single])) { // ###DOCUMENT_CUSTOM_PHP### <<>> + $this->customScriptBuilder['php_document'][$viewName_single] = str_replace('$document->', '$this->document->', $this->customScriptBuilder['php_document'][$viewName_single]); $this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###'] = PHP_EOL.$this->setPlaceholders( $this->customScriptBuilder['php_document'][$viewName_single], diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 5e9f2d360..ee9060e1c 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -245,6 +245,11 @@ abstract class ComponentbuilderHelper return false; } + /** + * Locked Libraries (we can not have these change) + **/ + public static $libraryNames = array(1 => 'No Library', 2 => 'Bootstrap v4', 3 => 'Uikit v3', 4 => 'Uikit v2', 5 => 'FooTable v2', 6 => 'FooTable v3'); + /** * The global params **/ @@ -319,6 +324,203 @@ abstract class ComponentbuilderHelper return array('contributor_company' => self::$localCompany['company'] ,'contributor_name' => self::$localCompany['owner'], 'contributor_email' => self::$localCompany['email'], 'contributor_website' => self::$localCompany['website'], 'origin' => 'global'); } + /** + * Get the library files + * + * @param int $id The library id to target + * + * @return array On success the array of files that belong to this library + * + */ + public static function getLibraryFiles($id) + { + // get the library files, folders, and urls + $files = array(); + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('b.name','a.addurls','a.addfolders','a.addfiles'))); + $query->from($db->quoteName('#__componentbuilder_library_files_folders_urls','a')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'b') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('b.id') . ')'); + $query->where($db->quoteName('a.library') . ' = ' . (int) $id); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // prepare the files + $result = $db->loadObject(); + // first we load the URLs + if (self::checkJson($result->addurls)) + { + // convert to array + $result->addurls = json_decode($result->addurls, true); + // set urls + if (self::checkArray($result->addurls)) + { + // build media folder path + $mediaPath = '/media/' . strtolower( preg_replace('/\s+/', '-', self::safeString($result->name, 'filename', ' ', false))); + // load the urls + foreach($result->addurls as $url) + { + if (isset($url['url']) && self::checkString($url['url'])) + { + // set the path if needed + if (isset($url['type']) && $url['type'] > 1) + { + $fileName = basename($url['url']); + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + // set the path to library file + $url['path'] = $mediaPath . $path . '/' . $fileName; // we need this for later + } + // if local path is set, then use it first + if (isset($url['path'])) + { + // load document script + $files[md5($url['path'])] = '(' . JText::_('URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LOCAL'); + } + // load url also if not building document + $files[md5($url['url'])] = '(' . JText::_('URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LINK'); + } + } + } + } + // load the local files + if (self::checkJson($result->addfiles)) + { + // convert to array + $result->addfiles = json_decode($result->addfiles, true); + // set files + if (self::checkArray($result->addfiles)) + { + foreach($result->addfiles as $file) + { + if (isset($file['file']) && isset($file['path'])) + { + $path = '/'.trim($file['path'], '/'); + // check if path has new file name (has extetion) + $pathInfo = pathinfo($path); + if (isset($pathInfo['extension']) && $pathInfo['extension']) + { + // load document script + $files[md5($path)] = '(' . JText::_('COM_COMPONENTBUILDER_FILE') . ') ' . $file['file']; + } + else + { + // load document script + $files[md5($path.'/'.trim($file['file'],'/'))] = '(' . JText::_('COM_COMPONENTBUILDER_FILE') . ') ' . $file['file']; + } + } + } + } + } + // load the files in the folder + if (self::checkJson($result->addfolders)) + { + // convert to array + $result->addfolders = json_decode($result->addfolders, true); + // set folder + if (self::checkArray($result->addfolders)) + { + // get the global settings + if (!self::checkObject(self::$params)) + { + self::$params = JComponentHelper::getParams('com_componentbuilder'); + } + // reset bucket + $bucket = array(); + // get custom folder path + $customPath = '/'.trim(self::$params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'), '/'); + // get all the file paths + foreach ($result->addfolders as $folder) + { + if (isset($folder['path']) && isset($folder['folder'])) + { + $_path = '/'.trim($folder['path'], '/'); + $customFolder = '/'.trim($folder['folder'], '/'); + if (isset($folder['rename']) && 1 == $folder['rename']) + { + if ($_paths = self::getAllFilePaths($customPath.$customFolder)) + { + $bucket[$_path] = $_paths; + } + } + else + { + $path = $_path.$customFolder; + if ($_paths = self::getAllFilePaths($customPath.$customFolder)) + { + $bucket[$path] = $_paths; + } + } + } + } + // now load the script + if (self::checkArray($bucket)) + { + foreach ($bucket as $root => $paths) + { + // load per path + foreach($paths as $path) + { + $files[md5($root.'/'.trim($path, '/'))] = '(' . JText::_('COM_COMPONENTBUILDER_FOLDER') . ') ' . basename($path); + } + } + } + } + } + // return files if found + if (self::checkArray($files)) + { + return $files; + } + } + return false; + } + + /** + * get all the file paths in folder and sub folders + * + * @param string $folder The local path to parse + * @param array $fileTypes The type of files to get + * + * @return void + * + */ + public static function getAllFilePaths($folder, $fileTypes = array('\.php', '\.js', '\.css', '\.less')) + { + if (JFolder::exists($folder)) + { + // we must first store the current woking directory + $joomla = getcwd(); + // we are changing the working directory to the componet path + chdir($folder); + // get the files + foreach ($fileTypes as $type) + { + // get a list of files in the current directory tree + $files[] = JFolder::files('.', $type, true, true); + } + // change back to Joomla working directory + chdir($joomla); + // return array of files + return array_map( function($file) { return str_replace('./', '/', $file); }, (array) self::mergeArrays($files)); + } + return false; + } + /** * get all component IDs */ @@ -1802,6 +2004,10 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_CUSTOM_CODES'), 'index.php?option=com_componentbuilder&view=custom_codes', $submenu === 'custom_codes'); } + if ($user->authorise('library.access', 'com_componentbuilder') && $user->authorise('library.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_LIBRARIES'), 'index.php?option=com_componentbuilder&view=libraries', $submenu === 'libraries'); + } if ($user->authorise('snippet.access', 'com_componentbuilder') && $user->authorise('snippet.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_SNIPPETS'), 'index.php?option=com_componentbuilder&view=snippets', $submenu === 'snippets'); @@ -2671,6 +2877,31 @@ abstract class ComponentbuilderHelper } return false; } + + /** + * Check if we are connected + * Thanks https://stackoverflow.com/a/4860432/1429677 + * + * @returns bool true on success + **/ + public static function isConnected() + { + // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? + $connected = @fsockopen("www.example.com", 80); + // website, port (try 80 or 443) + if ($connected) + { + //action when connected + $is_conn = true; + fclose($connected); + } + else + { + //action in connection failure + $is_conn = false; + } + return $is_conn; + } public static function mergeArrays($arrays) { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index b2e960a7f..3c58621a3 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -186,7 +186,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date" COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields" COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE="None" -COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, date_created, modified_by, date_modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)
For more help please watch this tutorial." +COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, created, modified_by, modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)
For more help please watch this tutorial." COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views." COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_DESCRIPTION="Order in relation to tab & alignment of admin and site." @@ -271,7 +271,8 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD="Add" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS="Addlinked Views" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_DESCRIPTION="Setup the linked views for this view." COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_LABEL="Linked Views" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDNEW_LABEL="Add New Button" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADDNEW_DESCRIPTION="in tab" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADDNEW_LABEL="Top Button" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDPERMISSIONS="Addpermissions" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDPERMISSIONS_DESCRIPTION="Set permissions for this view" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDPERMISSIONS_LABEL="Permissions" @@ -301,6 +302,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FILE="Add Javascript View Fi COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FILE_LABEL="Add JavaScript (view-file)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER="Add Javascript View Footer" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL="Add JavaScript (view-footer)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_BUTTON="Add New Button" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_CLOSE_BUTTON="Add New & Close Button" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_NEW_CLOSE_BUTTON="Add New + New & Close Button" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE="Add Php After Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL="Add PHP (script - after delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH="Add Php After Publish" @@ -585,6 +589,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NEW_TAB="New Tab" COM_COMPONENTBUILDER_ADMIN_VIEW_NEW_TAB_TWO="New Tab 2" COM_COMPONENTBUILDER_ADMIN_VIEW_NEXT="Next" COM_COMPONENTBUILDER_ADMIN_VIEW_NO="No" +COM_COMPONENTBUILDER_ADMIN_VIEW_NONE="None" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION="

The scripts that are automatic added to the input fields below is identical to the default import scripts used. Adapt them to your own custom needs.

" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL="Advanced notice." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="

Please do not change this area unless you would like to add special import to this view that goes beyond the default import concept that Component Builder already does automatic if this view is set to have import & export in the component area where this view is linked to the component.

" @@ -864,6 +869,7 @@ COM_COMPONENTBUILDER_ALL="All" COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME="All is good, there in no notice at this time." COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" +COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add" COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. (Make SURE to move this zipped backup package out of the tmp folder before doing an import)
If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers!" COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED="An error has occurred" @@ -878,6 +884,7 @@ COM_COMPONENTBUILDER_AUTHOR_EMAIL="Author Email" COM_COMPONENTBUILDER_AUTHOR_NAME="Author Name" COM_COMPONENTBUILDER_AUTHOR_WEBSITE="Author Website" COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" +COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES="Available Libraries" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" COM_COMPONENTBUILDER_BACK="Back" @@ -885,6 +892,7 @@ COM_COMPONENTBUILDER_BACKUP="Backup" COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First" COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" +COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries" COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method" COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: %s" COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION="Custom files not move to correct location!" @@ -901,6 +909,7 @@ COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="%s could not be imported COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="%s component details" COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="%s has been imported!" COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="%s has been updated!" +COM_COMPONENTBUILDER_BUILDIN="Build-in" COM_COMPONENTBUILDER_BULK="Bulk" COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets" COM_COMPONENTBUILDER_BULK_TOOLS="Bulk Tools" @@ -912,6 +921,7 @@ COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_ COM_COMPONENTBUILDER_CHAIN="Chain" COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" +COM_COMPONENTBUILDER_CLOSE_NEW="Close & New" COM_COMPONENTBUILDER_COMPANY="Company" COM_COMPONENTBUILDER_COMPANY_NAME="Company Name" COM_COMPONENTBUILDER_COMPANY_S="Company: %s" @@ -1561,7 +1571,7 @@ COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_BY_DESC="The user that created thi COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_DATE_DESC="The date this Component Config was created." COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_DATE_LABEL="Created Date" -COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_DESCRIPTION="Enter custom value in needed" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_DESCRIPTION="Enter custom value if needed" COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_HINT="Custom Value Here" COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_LABEL="Custom Value" COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT="Editing the Component Config" @@ -1973,7 +1983,7 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_LABEL="Adding Cust COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION="Should file be updated." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL="Update" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled file to see the structure. " +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure. " COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_HINT="Target Path Here" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_LABEL="Target Path" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_MESSAGE="Error! Please add target path." @@ -2107,6 +2117,7 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_MESSAGE="Error! Please add some t COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE="Version Update" COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!" COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_LABEL="Version Updates" +COM_COMPONENTBUILDER_CONDITIONS="Conditions" COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active" COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call." @@ -2392,6 +2403,7 @@ COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors" COM_COMPONENTBUILDER_COPYRIGHT="Copyright" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_CREATE="Create" +COM_COMPONENTBUILDER_CREATE_A_SNIPPET="create a snippet" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View" @@ -2620,6 +2632,9 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_LABEL="Custom Script (Documen COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_KEY="Key" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LAMP="Lamp" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LAST="Last" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LINK="Link" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIST="List" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIST_TWO="List 2" @@ -2657,6 +2672,8 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEXT="Next" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO="No" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_UIKIT_SNIPPET_LABEL="Snippet Details" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTIFICATION="Notification" @@ -2740,6 +2757,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SMILEY_SAD="Smiley Sad" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SMILEY_SAD_TWO="Smiley Sad 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SMILEY_TWO="Smiley 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET="Snippet" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review." COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL="Select a Snippet" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SQUARE="Square" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_STACK="Stack" @@ -2984,6 +3002,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_NOTE_PLACEHOLDERS_EXPLAINED_DESCRIPTION=" + @@ -3020,6 +3039,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_DESCRIPTION="How To Add the Code to the fi COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL="Add Type" COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_DESC="A count of the number of times this Custom Code has been revised." COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_CUSTOM_SCRIPT="Custom Script" COM_COMPONENTBUILDER_DASH="Dashboard" COM_COMPONENTBUILDER_DASHBOARD="Component Builder Dashboard" COM_COMPONENTBUILDER_DASHBOARD_ADD_RECORD="Dashboard (add record)" @@ -3045,6 +3065,7 @@ COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENT_ADD="Add Joomla Component If you want to support this project, please consider donating:
* PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm)
- * Bitcoin: 1FLxiT6wyxgZ3boeviLkYJ1DRpp41uzpxa
- * Ethereum: 0x243392daa3c9c8bc841fcacf7c7f72541cb16823 + * Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
+ * Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 " COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_LABEL="Demo README (with all place-holders)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_DESCRIPTION="During compilation the file will be moved to the FTP folder. You still need to point the above update server url to the xml file on your FTP server for it to work correctly." @@ -4420,8 +4450,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_TWO_NUMBER_OF_GLOBAL_VERSIO COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_VIEW_VERSION_DATE="Use View Version & Date" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_DESC="A count of the number of times this Joomla Component has been revised." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_LABEL="Revision" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VTHREE="V3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VTWO="V2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE="Website" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com" @@ -4681,6 +4709,9 @@ COM_COMPONENTBUILDER_LAYOUT_ID="Id" COM_COMPONENTBUILDER_LAYOUT_LAYOUT="Layout" COM_COMPONENTBUILDER_LAYOUT_LAYOUT_HINT="// Add the layout code here. $displayData is the Object that is used inside the layout file to build displayed output" COM_COMPONENTBUILDER_LAYOUT_LAYOUT_LABEL="Layout" +COM_COMPONENTBUILDER_LAYOUT_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_LAYOUT_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." +COM_COMPONENTBUILDER_LAYOUT_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_LAYOUT_MODIFIED_BY_DESC="The last user that modified this Layout." COM_COMPONENTBUILDER_LAYOUT_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_LAYOUT_MODIFIED_DATE_DESC="The date this Layout was modified." @@ -4694,6 +4725,8 @@ COM_COMPONENTBUILDER_LAYOUT_NEW="A New Layout" COM_COMPONENTBUILDER_LAYOUT_NO="No" COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>" COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String" +COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." +COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" COM_COMPONENTBUILDER_LAYOUT_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage" COM_COMPONENTBUILDER_LAYOUT_NOTE_UIKIT_SNIPPET_LABEL="Snippet Details" COM_COMPONENTBUILDER_LAYOUT_NOT_REQUIRED="Not Required" @@ -4706,6 +4739,7 @@ COM_COMPONENTBUILDER_LAYOUT_PHP_VIEW_LABEL="Custom Script" COM_COMPONENTBUILDER_LAYOUT_PUBLISHING="Publishing" COM_COMPONENTBUILDER_LAYOUT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Layout to customise the alias." COM_COMPONENTBUILDER_LAYOUT_SNIPPET="Snippet" +COM_COMPONENTBUILDER_LAYOUT_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review." COM_COMPONENTBUILDER_LAYOUT_SNIPPET_LABEL="Select a Snippet" COM_COMPONENTBUILDER_LAYOUT_STATUS="Status" COM_COMPONENTBUILDER_LAYOUT_VERSION_DESC="A count of the number of times this Layout has been revised." @@ -4720,8 +4754,50 @@ COM_COMPONENTBUILDER_LIBRARIES_BATCH_OPTIONS="Batch process the selected Librari COM_COMPONENTBUILDER_LIBRARIES_BATCH_TIP="All changes will be applied to all selected Libraries" COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE="Libraries Batch Use" COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch libraries" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG="Libraries Config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS="Libraries Config Access" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS_DESC="Allows the users in this group to access access libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_OPTIONS="Batch process the selected Libraries Config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_TIP="All changes will be applied to all selected Libraries Config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_USE="Libraries Config Batch Use" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE="Libraries Config Create" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE_DESC="Allows the users in this group to create create libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE="Libraries Config Delete" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE_DESC="Allows the users in this group to delete delete libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT="Libraries Config Edit" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY="Libraries Config Edit Created By" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE="Libraries Config Edit Created Date" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_DESC="Allows the users in this group to edit the library config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN="Libraries Config Edit Own" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN_DESC="Allows the users in this group to edit edit own libraries config created by them" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE="Libraries Config Edit State" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE_DESC="Allows the users in this group to update the state of the library config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION="Libraries Config Edit Version" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION_DESC="Allows users in this group to edit versions of version libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_ARCHIVED="%s Libraries Config archived." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_ARCHIVED_1="%s Library Config archived." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_CHECKED_IN_0="No Library Config successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_CHECKED_IN_1="%d Library Config successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_CHECKED_IN_MORE="%d Libraries Config successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_DELETED="%s Libraries Config deleted." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_DELETED_1="%s Library Config deleted." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_FEATURED="%s Libraries Config featured." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_FEATURED_1="%s Library Config featured." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_PUBLISHED="%s Libraries Config published." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_PUBLISHED_1="%s Library Config published." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_TRASHED="%s Libraries Config trashed." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_TRASHED_1="%s Library Config trashed." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_UNFEATURED="%s Libraries Config unfeatured." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_UNFEATURED_1="%s Library Config unfeatured." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_UNPUBLISHED="%s Libraries Config unpublished." +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_N_ITEMS_UNPUBLISHED_1="%s Library Config unpublished." COM_COMPONENTBUILDER_LIBRARIES_CREATE="Libraries Create" COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC="Allows the users in this group to create create libraries" +COM_COMPONENTBUILDER_LIBRARIES_DASHBOARD_LIST="Libraries Dashboard List" +COM_COMPONENTBUILDER_LIBRARIES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the library" COM_COMPONENTBUILDER_LIBRARIES_DELETE="Libraries Delete" COM_COMPONENTBUILDER_LIBRARIES_DELETE_DESC="Allows the users in this group to delete delete libraries" COM_COMPONENTBUILDER_LIBRARIES_EDIT="Libraries Edit" @@ -4732,6 +4808,46 @@ COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE="Libraries Edit State" COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the library" COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION="Libraries Edit Version" COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version libraries" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS="Libraries Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS="Libraries Files Folders Urls Access" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS_DESC="Allows the users in this group to access access libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_OPTIONS="Batch process the selected Libraries Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_TIP="All changes will be applied to all selected Libraries Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_USE="Libraries Files Folders Urls Batch Use" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE="Libraries Files Folders Urls Create" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE_DESC="Allows the users in this group to create create libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE="Libraries Files Folders Urls Delete" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE_DESC="Allows the users in this group to delete delete libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT="Libraries Files Folders Urls Edit" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY="Libraries Files Folders Urls Edit Created By" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE="Libraries Files Folders Urls Edit Created Date" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_DESC="Allows the users in this group to edit the library files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN="Libraries Files Folders Urls Edit Own" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN_DESC="Allows the users in this group to edit edit own libraries files folders urls created by them" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE="Libraries Files Folders Urls Edit State" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE_DESC="Allows the users in this group to update the state of the library files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION="Libraries Files Folders Urls Edit Version" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_ARCHIVED="%s Libraries Files, Folders & URLs archived." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_ARCHIVED_1="%s Library Files, Folders & URLs archived." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_CHECKED_IN_0="No Library Files, Folders & URLs successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_CHECKED_IN_1="%d Library Files, Folders & URLs successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_CHECKED_IN_MORE="%d Libraries Files, Folders & URLs successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_DELETED="%s Libraries Files, Folders & URLs deleted." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_DELETED_1="%s Library Files, Folders & URLs deleted." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_FEATURED="%s Libraries Files, Folders & URLs featured." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_FEATURED_1="%s Library Files, Folders & URLs featured." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_PUBLISHED="%s Libraries Files, Folders & URLs published." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_PUBLISHED_1="%s Library Files, Folders & URLs published." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_TRASHED="%s Libraries Files, Folders & URLs trashed." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_TRASHED_1="%s Library Files, Folders & URLs trashed." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_UNFEATURED="%s Libraries Files, Folders & URLs unfeatured." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_UNFEATURED_1="%s Library Files, Folders & URLs unfeatured." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_UNPUBLISHED="%s Libraries Files, Folders & URLs unpublished." +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_N_ITEMS_UNPUBLISHED_1="%s Library Files, Folders & URLs unpublished." COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_ARCHIVED="%s Libraries archived." COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_ARCHIVED_1="%s Library archived." COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_CHECKED_IN_0="No Library successfully checked in." @@ -4749,22 +4865,153 @@ COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_UNFEATURED="%s Libraries unfeatured." COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_UNFEATURED_1="%s Library unfeatured." COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_UNPUBLISHED="%s Libraries unpublished." COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_UNPUBLISHED_1="%s Library unpublished." +COM_COMPONENTBUILDER_LIBRARIES_SUBMENU="Libraries Submenu" +COM_COMPONENTBUILDER_LIBRARIES_SUBMENU_DESC="Allows the users in this group to update the submenu of the library" COM_COMPONENTBUILDER_LIBRARY="Library" -COM_COMPONENTBUILDER_LIBRARY_ASC="Library (Asc)" +COM_COMPONENTBUILDER_LIBRARY_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS="Addconditions" +COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_DESCRIPTION="Conditional setup for the the library behaviour." +COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_LABEL="Conditions" +COM_COMPONENTBUILDER_LIBRARY_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" +COM_COMPONENTBUILDER_LIBRARY_BEHAVIOUR="Behaviour" +COM_COMPONENTBUILDER_LIBRARY_BUNDLE="Bundle" +COM_COMPONENTBUILDER_LIBRARY_CHAIN="Chain" +COM_COMPONENTBUILDER_LIBRARY_CONFIG="Library Config" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG="Addconfig" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION="Setup config fields." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_LABEL="Config" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_BY_DESC="The user that created this Library Config." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_DATE_DESC="The date this Library Config was created." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CUSTOM_VALUE_DESCRIPTION="Enter custom value if needed" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CUSTOM_VALUE_HINT="Custom Value Here" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_CUSTOM_VALUE_LABEL="Custom Value" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_EDIT="Editing the Library Config" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_ERROR_UNIQUE_ALIAS="Another Library Config has the same alias." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_FIELD="Field" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_FIELD_DESCRIPTION="Select a field" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_FIELD_LABEL="Field" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_ID="Id" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_LIBRARY="Library" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_LIBRARY_DESCRIPTION="Select a library." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_LIBRARY_LABEL="Library" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_BY_DESC="The last user that modified this Library Config." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_DATE_DESC="The date this Library Config was modified." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_NEW="A New Library Config" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_PERMISSION="Permissions" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Library Config to customise the alias." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_STATUS="Status" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_DESCRIPTION="The name of the tab this field belongs to." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_HINT="Global" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_LABEL="Tab Name" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_MESSAGE="Error! Please add tab name here." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_TWEAKS="Tweaks" +COM_COMPONENTBUILDER_LIBRARY_CONFIG_VERSION_DESC="A count of the number of times this Library Config has been revised." +COM_COMPONENTBUILDER_LIBRARY_CONFIG_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LIBRARY_CREATED_BY_DESC="The user that created this Library." COM_COMPONENTBUILDER_LIBRARY_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_LIBRARY_CREATED_DATE_DESC="The date this Library was created." COM_COMPONENTBUILDER_LIBRARY_CREATED_DATE_LABEL="Created Date" -COM_COMPONENTBUILDER_LIBRARY_DESC="Library (Desc)" COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION="Description" COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_DESCRIPTION="Enter some description" COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_HINT="Description Here" COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_MESSAGE="Error! Please add description here." -COM_COMPONENTBUILDER_LIBRARY_DETAILS="Details" COM_COMPONENTBUILDER_LIBRARY_EDIT="Editing the Library" COM_COMPONENTBUILDER_LIBRARY_ERROR_UNIQUE_ALIAS="Another Library has the same alias." +COM_COMPONENTBUILDER_LIBRARY_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_EXCLUDE="exclude" +COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_HINT="Options here" +COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_LABEL="Field Options" +COM_COMPONENTBUILDER_LIBRARY_FILE="File" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Library Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES="Addfiles" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES_DESCRIPTION="Add custom files to this component." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES_LABEL="Files" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS="Addfolders" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS_DESCRIPTION="Add custom folder to this component." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS_LABEL="Folder" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS="Addurls" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS_DESCRIPTION="Add urls for this library." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS_LABEL="URLs" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_BY_DESC="The user that created this Library Files, Folders & URLs." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_DATE_DESC="The date this Library Files, Folders & URLs was created." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_DEFAULT_LINK="Default (link)" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_EDIT="Editing the Library Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ERROR_UNIQUE_ALIAS="Another Library Files, Folders & URLs has the same alias." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FILE="File" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FILE_DESCRIPTION="Add the files to custom folder" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FILE_LABEL="File" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FOLDER="Folder" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FOLDER_DESCRIPTION="Add the folder to custom folder" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FOLDER_LABEL="Folder" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ID="Id" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LIBRARY="Library" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LIBRARY_DESCRIPTION="Select a library." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LIBRARY_LABEL="Library" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LINK_LOCAL_DYNAMIC="Link & Local (dynamic)" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LOCAL_GET="Local (get)" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_BY_DESC="The last user that modified this Library Files, Folders & URLs." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_DATE_DESC="The date this Library Files, Folders & URLs was modified." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NEW="A New Library Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FILES_DESCRIPTION="You can add custom files to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FILES_LABEL="Adding Custom Files" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FOLDERS_DESCRIPTION="You can add custom folders to the component, simply add the folders to the administrator/components/com_componentbuilder/custom folder and then select them here." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FOLDERS_LABEL="Adding Custom Folders" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_URLS_DESCRIPTION="You can add urls here, and it can be used in three ways. As a direct link (default) or to get the file content and add it to the component (get) or as both local and link (dynamic)" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_URLS_LABEL="Adding Urls" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_DESCRIPTION="Should file be updated." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_LABEL="Update" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure. " +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_HINT="Target Path Here" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_LABEL="Target Path" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_MESSAGE="Error! Please add target path." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_RENAME_LABEL="Rename" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Library Files, Folders & URLs to customise the alias." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_SETTINGS="Settings" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_STATUS="Status" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_TYPE_DESCRIPTION="way url is used" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_TYPE_LABEL="Type" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_DESCRIPTION="Enter URL to library file." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_HINT="http://www.example.com/lib.js" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_LABEL="URL" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_MESSAGE="Error! Please add url here." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_VERSION_DESC="A count of the number of times this Library Files, Folders & URLs has been revised." +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_LIBRARY_FILE_DESCRIPTION="to library" +COM_COMPONENTBUILDER_LIBRARY_FILE_LABEL="Target File Linked" +COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Button Access" +COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_LIBRARY_HOW="How" +COM_COMPONENTBUILDER_LIBRARY_HOW_DESCRIPTION="Select how you want to control the behaviour of the library file inclusion." +COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL="File Behaviour" COM_COMPONENTBUILDER_LIBRARY_ID="Id" +COM_COMPONENTBUILDER_LIBRARY_INCLUDE="include" +COM_COMPONENTBUILDER_LIBRARY_ISOLATE="Isolate" +COM_COMPONENTBUILDER_LIBRARY_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)" +COM_COMPONENTBUILDER_LIBRARY_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)" +COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ALL_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word All case-insensitive (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ALL_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word All case-sensitive (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ANY_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word Any case-insensitive (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ANY_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word Any case-sensitive (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_LIBRARY_LIBRARIES_DESCRIPTION="Select the libraries you want to bundle here." +COM_COMPONENTBUILDER_LIBRARY_LIBRARIES_LABEL="Libraries" +COM_COMPONENTBUILDER_LIBRARY_MAIN="Main" +COM_COMPONENTBUILDER_LIBRARY_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)" +COM_COMPONENTBUILDER_LIBRARY_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)" COM_COMPONENTBUILDER_LIBRARY_MODIFIED_BY_DESC="The last user that modified this Library." COM_COMPONENTBUILDER_LIBRARY_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_LIBRARY_MODIFIED_DATE_DESC="The date this Library was modified." @@ -4775,18 +5022,57 @@ COM_COMPONENTBUILDER_LIBRARY_NAME_HINT="Name Here" COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL="Name" COM_COMPONENTBUILDER_LIBRARY_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_LIBRARY_NEW="A New Library" +COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_ONE_DESCRIPTION="This library will be loaded based on the JCB build-in behaviour." +COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_ONE_LABEL="Build-in Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_THREE_DESCRIPTION="This library will be loaded based on the JCB build-in behaviour." +COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_THREE_LABEL="Build-in Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_TWO_DESCRIPTION="This library will be loaded based on the JCB build-in behaviour." +COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_TWO_LABEL="Build-in Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_DISPLAY_LIBRARY_CONFIG_DESCRIPTION="

Linked Config Fields

Display of the config fields will load here!
" +COM_COMPONENTBUILDER_LIBRARY_NOTE_DISPLAY_LIBRARY_FILES_FOLDERS_URLS_DESCRIPTION="

Linked Files, Folders & URLs

Display of the files, folders & urls will load here!
" +COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_DESCRIPTION="There is no behaviour set for this library. This means JCB will not add any files unless you custom code it in somewhere." +COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_LABEL="No Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_DESCRIPTION="There is no behaviour set for this library. This means JCB will not add any files unless you custom code it in somewhere." +COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_LABEL="No Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_DESCRIPTION="There is no behaviour set for this library. This means JCB will not add any files unless you custom code it in somewhere." +COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_LABEL="No Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_DESCRIPTION="All the library files linked to this library will always be added to a view if linked to the view." +COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_LABEL="Set Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_TWO_DESCRIPTION="All the library files linked to this library will always be added to a view if linked to the view." +COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_TWO_LABEL="Set Behaviour" +COM_COMPONENTBUILDER_LIBRARY_NOT_REQUIRED="Not Required" +COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_DESCRIPTION="Select the option field behaviour." +COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_LABEL="Option Behaviour" +COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD="Option Field" +COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_DESCRIPTION="Select the global option field." +COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_LABEL="Option Field" COM_COMPONENTBUILDER_LIBRARY_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_LIBRARY_PERMISSION="Permissions" +COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT="Php Setdocument" +COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_DESCRIPTION="Add your PHP here! [Do not add the php tags]" +COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_HINT="// PHP Here that should run in the setDocument() & _prepareDocument() Method (to load the lib files). The document is accessed via $this->document-> like $this->document->addScript();" +COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_LABEL="PHP - setDocument()" COM_COMPONENTBUILDER_LIBRARY_PUBLISHING="Publishing" COM_COMPONENTBUILDER_LIBRARY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Library to customise the alias." COM_COMPONENTBUILDER_LIBRARY_STATUS="Status" +COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_DESCRIPTION="Select the target behavior." +COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_LABEL="Target Behavior" +COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_DESCRIPTION="Select the target file/s relation to other of the same target file/s." +COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_LABEL="Target Relation" +COM_COMPONENTBUILDER_LIBRARY_TYPE="Type" +COM_COMPONENTBUILDER_LIBRARY_TYPE_DESCRIPTION="Select what type of library this should be." +COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL="Type" +COM_COMPONENTBUILDER_LIBRARY_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_LIBRARY_VERSION_DESC="A count of the number of times this Library has been revised." COM_COMPONENTBUILDER_LIBRARY_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LICENSE="License" COM_COMPONENTBUILDER_LICENSE_S="License: %s" COM_COMPONENTBUILDER_LINK="Link" +COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC="Link & Local (dynamic)" COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR="Link to the contributor" COM_COMPONENTBUILDER_LOADING="loading" +COM_COMPONENTBUILDER_LOCAL="Local" +COM_COMPONENTBUILDER_LOCAL_GET="Local (get)" COM_COMPONENTBUILDER_LOCAL_SNIPPET="Local snippet" COM_COMPONENTBUILDER_MAIN_MENU="Main Menu" COM_COMPONENTBUILDER_MATCH_BEHAVIOR="Match Behavior" @@ -4810,16 +5096,19 @@ COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested." +COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked" COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found" COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version" COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!" COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found" COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here." +COM_COMPONENTBUILDER_NO_TYPE="No Type" COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPENED="opened" COM_COMPONENTBUILDER_OPENED_THIS="opened this" +COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets" COM_COMPONENTBUILDER_OPEN_ON_GITHUB="Open on Github" COM_COMPONENTBUILDER_OPTIONS="Options" COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before" @@ -4840,11 +5129,13 @@ COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile." COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later" COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder" +COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading" COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access" COM_COMPONENTBUILDER_PUBLISHED="Published" COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_RELEASED_THIS="released this" +COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github" COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets" @@ -4854,6 +5145,7 @@ COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs" COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved." COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another." COM_COMPONENTBUILDER_SEARCHABLE="Searchable" +COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet" COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile" COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets" COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code." @@ -5110,6 +5402,9 @@ COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_LABEL="Custom Script (Document)" COM_COMPONENTBUILDER_SITE_VIEW_KEY="Key" COM_COMPONENTBUILDER_SITE_VIEW_LAMP="Lamp" COM_COMPONENTBUILDER_SITE_VIEW_LAST="Last" +COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." +COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_SITE_VIEW_LINK="Link" COM_COMPONENTBUILDER_SITE_VIEW_LIST="List" COM_COMPONENTBUILDER_SITE_VIEW_LIST_TWO="List 2" @@ -5153,6 +5448,8 @@ COM_COMPONENTBUILDER_SITE_VIEW_NONE="None" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body [[[SITE_TOOLBAR]]] to add the custom position of the toolbar." +COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." +COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_UIKIT_SNIPPET_LABEL="Snippet Details" COM_COMPONENTBUILDER_SITE_VIEW_NOTIFICATION="Notification" @@ -5243,6 +5540,7 @@ COM_COMPONENTBUILDER_SITE_VIEW_SMILEY_SAD="Smiley Sad" COM_COMPONENTBUILDER_SITE_VIEW_SMILEY_SAD_TWO="Smiley Sad 2" COM_COMPONENTBUILDER_SITE_VIEW_SMILEY_TWO="Smiley 2" COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET="Snippet" +COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review." COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_LABEL="Select a Snippet" COM_COMPONENTBUILDER_SITE_VIEW_SQUARE="Square" COM_COMPONENTBUILDER_SITE_VIEW_STACK="Stack" @@ -5520,6 +5818,7 @@ COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS="Joomla Components" COM_COMPONENTBUILDER_SUBMENU_LANGUAGES="Languages" COM_COMPONENTBUILDER_SUBMENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts" +COM_COMPONENTBUILDER_SUBMENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates" @@ -5530,6 +5829,7 @@ COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED="%s, please w COM_COMPONENTBUILDER_TAB="Tab" COM_COMPONENTBUILDER_TARGET_BEHAVIOR="Target Behavior" COM_COMPONENTBUILDER_TARGET_FIELDS="Target Field/s" +COM_COMPONENTBUILDER_TARGET_PATH="Target Path" COM_COMPONENTBUILDER_TARGET_RELATION="Target Relation" COM_COMPONENTBUILDER_TEMPLATE="Template" COM_COMPONENTBUILDER_TEMPLATES="Templates" @@ -5606,6 +5906,9 @@ COM_COMPONENTBUILDER_TEMPLATE_ERROR_UNIQUE_ALIAS="Another Template has the same COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets Button Access" COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_TEMPLATE_ID="Id" +COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." +COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_TEMPLATE_MODIFIED_BY_DESC="The last user that modified this Template." COM_COMPONENTBUILDER_TEMPLATE_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_TEMPLATE_MODIFIED_DATE_DESC="The date this Template was modified." @@ -5619,6 +5922,8 @@ COM_COMPONENTBUILDER_TEMPLATE_NEW="A New Template" COM_COMPONENTBUILDER_TEMPLATE_NO="No" COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>" COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String" +COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." +COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" COM_COMPONENTBUILDER_TEMPLATE_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage" COM_COMPONENTBUILDER_TEMPLATE_NOTE_UIKIT_SNIPPET_LABEL="Snippet Details" COM_COMPONENTBUILDER_TEMPLATE_NOT_REQUIRED="Not Required" @@ -5631,6 +5936,7 @@ COM_COMPONENTBUILDER_TEMPLATE_PHP_VIEW_LABEL="Custom Script" COM_COMPONENTBUILDER_TEMPLATE_PUBLISHING="Publishing" COM_COMPONENTBUILDER_TEMPLATE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Template to customise the alias." COM_COMPONENTBUILDER_TEMPLATE_SNIPPET="Snippet" +COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review." COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_LABEL="Select a Snippet" COM_COMPONENTBUILDER_TEMPLATE_STATUS="Status" COM_COMPONENTBUILDER_TEMPLATE_TEMPLATE="Template" @@ -5647,6 +5953,7 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME="There are no new sn COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are no out of date snippets at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time" COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!" +COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The %s library can not be deleted, or things will break." COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views" COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config" COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus" @@ -5657,12 +5964,12 @@ COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks" COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views" COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates" COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package." +COM_COMPONENTBUILDER_THE_NAME_OF_THIS_LIBRARY_BSB_CAN_NOT_BE_CHANGED_TO_BSB_OR_THINGS_WILL_BREAK="The name of this library (%s) can not be changed to %s or things will break." COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: %s" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s" COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading" COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local names of either or the snippet, library or snippet types in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to keep to the community naming to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected." -COM_COMPONENTBUILDER_THE_SNIPPETS_IS="The snippets is" COM_COMPONENTBUILDER_THE_SNIPPETS_WERE_SUCCESSFULLY_EXPORTED="The Snippets Were Successfully Exported!" COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Successfully Exported!" COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading" @@ -5682,6 +5989,7 @@ COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)" COM_COMPONENTBUILDER_TYPE_ERROR="Type Error" COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs" +COM_COMPONENTBUILDER_UPDATE="Update" COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_SNIPPETS="Update All Diverged Snippets" COM_COMPONENTBUILDER_UPDATE_ALL_OUT_DATED_SNIPPETS="Update All Out Dated Snippets" COM_COMPONENTBUILDER_UP_TO_DATE="Up to date" diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index 640d97e1c..34db21cf3 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -446,6 +446,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button." COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access" COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button." +COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS="Get Snippets Libraries Button Access" +COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the libraries button." COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Views Button Access" COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button." COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access" @@ -594,8 +596,30 @@ COM_COMPONENTBUILDER_LIBRARIES_ACCESS="Libraries Access" COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC="Allows the users in this group to access access libraries" COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE="Libraries Batch Use" COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch libraries" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS="Libraries Config Access" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS_DESC="Allows the users in this group to access access libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_USE="Libraries Config Batch Use" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE="Libraries Config Create" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE_DESC="Allows the users in this group to create create libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE="Libraries Config Delete" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE_DESC="Allows the users in this group to delete delete libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT="Libraries Config Edit" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY="Libraries Config Edit Created By" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE="Libraries Config Edit Created Date" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created libraries config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_DESC="Allows the users in this group to edit the library config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN="Libraries Config Edit Own" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN_DESC="Allows the users in this group to edit edit own libraries config created by them" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE="Libraries Config Edit State" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE_DESC="Allows the users in this group to update the state of the library config" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION="Libraries Config Edit Version" +COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION_DESC="Allows users in this group to edit versions of version libraries config" COM_COMPONENTBUILDER_LIBRARIES_CREATE="Libraries Create" COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC="Allows the users in this group to create create libraries" +COM_COMPONENTBUILDER_LIBRARIES_DASHBOARD_LIST="Libraries Dashboard List" +COM_COMPONENTBUILDER_LIBRARIES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the library" COM_COMPONENTBUILDER_LIBRARIES_DELETE="Libraries Delete" COM_COMPONENTBUILDER_LIBRARIES_DELETE_DESC="Allows the users in this group to delete delete libraries" COM_COMPONENTBUILDER_LIBRARIES_EDIT="Libraries Edit" @@ -606,6 +630,30 @@ COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE="Libraries Edit State" COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the library" COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION="Libraries Edit Version" COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version libraries" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS="Libraries Files Folders Urls Access" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS_DESC="Allows the users in this group to access access libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_USE="Libraries Files Folders Urls Batch Use" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE="Libraries Files Folders Urls Create" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE_DESC="Allows the users in this group to create create libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE="Libraries Files Folders Urls Delete" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE_DESC="Allows the users in this group to delete delete libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT="Libraries Files Folders Urls Edit" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY="Libraries Files Folders Urls Edit Created By" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE="Libraries Files Folders Urls Edit Created Date" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_DESC="Allows the users in this group to edit the library files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN="Libraries Files Folders Urls Edit Own" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN_DESC="Allows the users in this group to edit edit own libraries files folders urls created by them" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE="Libraries Files Folders Urls Edit State" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE_DESC="Allows the users in this group to update the state of the library files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION="Libraries Files Folders Urls Edit Version" +COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version libraries files folders urls" +COM_COMPONENTBUILDER_LIBRARIES_SUBMENU="Libraries Submenu" +COM_COMPONENTBUILDER_LIBRARIES_SUBMENU_DESC="Allows the users in this group to update the submenu of the library" +COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Button Access" +COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_MENU="» Component Builder" COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_MENU_COMPILER="Compiler" @@ -618,6 +666,7 @@ COM_COMPONENTBUILDER_MENU_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS="Joomla Components" COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts" +COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates" diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index 6c422bc54..1a572bf4e 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'default' ); diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index ff3c7fd86..67dfa2a56 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'codename', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index 32cf0e554..6eec871a4 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -31,7 +31,9 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'icon', - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index fdfa5539b..71b6b89dc 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -28,13 +28,13 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzufields; +$items = $displayData->vzwfields; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; -$ref = ($id) ? "&ref=fieldtype&refid=".$id : ""; -$new = "index.php?option=com_componentbuilder&view=field&layout=edit".$ref; -$can = ComponentbuilderHelper::getActions('field'); +$edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; +$ref = ($id) ? "&ref=fieldtype&refid=".$id : ""; +$new = "index.php?option=com_componentbuilder&view=field&layout=edit".$ref; +$can = ComponentbuilderHelper::getActions('field'); ?>
diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/ftp/linked_components_fullwidth.php index f2557f52e..cb7feed10 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/ftp/linked_components_fullwidth.php @@ -28,10 +28,10 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzvlinked_components; +$items = $displayData->vzxlinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; +$edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; ?>
diff --git a/admin/layouts/joomla_component/translation_fullwidth.php b/admin/layouts/joomla_component/translation_fullwidth.php index 745e1c411..9eac4eec1 100644 --- a/admin/layouts/joomla_component/translation_fullwidth.php +++ b/admin/layouts/joomla_component/translation_fullwidth.php @@ -31,7 +31,7 @@ defined('_JEXEC') or die('Restricted access'); $items = $displayData->vwmtranslation; $user = JFactory::getUser(); $id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=language_translations&task=language_translation.edit"; +$edit = "index.php?option=com_componentbuilder&view=language_translations&task=language_translation.edit"; ?>
diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index a2258aef9..649984a09 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'layout' ); diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index 35ea371dc..352879ab6 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'alias', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index 4665583e1..d5039e115 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/library/behaviour_above.php b/admin/layouts/library/behaviour_above.php new file mode 100644 index 000000000..31b448755 --- /dev/null +++ b/admin/layouts/library/behaviour_above.php @@ -0,0 +1,43 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'name', + 'how', + 'type' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library/behaviour_fullwidth.php b/admin/layouts/library/behaviour_fullwidth.php new file mode 100644 index 000000000..f4bf449d0 --- /dev/null +++ b/admin/layouts/library/behaviour_fullwidth.php @@ -0,0 +1,52 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_no_behaviour_one', + 'note_yes_behaviour_one', + 'note_build_in_behaviour_one', + 'addconditions', + 'php_setdocument' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/library/details_left.php b/admin/layouts/library/behaviour_left.php similarity index 95% rename from admin/layouts/library/details_left.php rename to admin/layouts/library/behaviour_left.php index 892f7233e..c34288a0d 100644 --- a/admin/layouts/library/details_left.php +++ b/admin/layouts/library/behaviour_left.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage details_left.php + @subpackage behaviour_left.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'name' + 'libraries' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/library/details_right.php b/admin/layouts/library/behaviour_right.php similarity index 96% rename from admin/layouts/library/details_right.php rename to admin/layouts/library/behaviour_right.php index 92112f79b..9371a467f 100644 --- a/admin/layouts/library/details_right.php +++ b/admin/layouts/library/behaviour_right.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage details_right.php + @subpackage behaviour_right.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved diff --git a/admin/layouts/library/behaviour_under.php b/admin/layouts/library/behaviour_under.php new file mode 100644 index 000000000..bb1c12abc --- /dev/null +++ b/admin/layouts/library/behaviour_under.php @@ -0,0 +1,41 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'not_required' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library/config_fullwidth.php b/admin/layouts/library/config_fullwidth.php new file mode 100644 index 000000000..5bc068efe --- /dev/null +++ b/admin/layouts/library/config_fullwidth.php @@ -0,0 +1,51 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_no_behaviour_two', + 'note_yes_behaviour_two', + 'note_build_in_behaviour_two', + 'note_display_library_config' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/library/files_folders_urls_fullwidth.php b/admin/layouts/library/files_folders_urls_fullwidth.php new file mode 100644 index 000000000..d4d23f6a6 --- /dev/null +++ b/admin/layouts/library/files_folders_urls_fullwidth.php @@ -0,0 +1,50 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_no_behaviour_three', + 'note_build_in_behaviour_three', + 'note_display_library_files_folders_urls' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/media/footable/css/index.html b/admin/layouts/library_config/index.html similarity index 100% rename from media/footable/css/index.html rename to admin/layouts/library_config/index.html diff --git a/admin/layouts/library_config/publishing.php b/admin/layouts/library_config/publishing.php new file mode 100644 index 000000000..13d13ed74 --- /dev/null +++ b/admin/layouts/library_config/publishing.php @@ -0,0 +1,58 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_config/publlshing.php b/admin/layouts/library_config/publlshing.php new file mode 100644 index 000000000..c982db556 --- /dev/null +++ b/admin/layouts/library_config/publlshing.php @@ -0,0 +1,60 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_config/tweaks_above.php b/admin/layouts/library_config/tweaks_above.php new file mode 100644 index 000000000..4c71d79d6 --- /dev/null +++ b/admin/layouts/library_config/tweaks_above.php @@ -0,0 +1,41 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'library' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library_config/tweaks_fullwidth.php b/admin/layouts/library_config/tweaks_fullwidth.php new file mode 100644 index 000000000..e832119f3 --- /dev/null +++ b/admin/layouts/library_config/tweaks_fullwidth.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'addconfig' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/media/footable/index.html b/admin/layouts/library_files_folders_urls/index.html similarity index 100% rename from media/footable/index.html rename to admin/layouts/library_files_folders_urls/index.html diff --git a/admin/layouts/library_files_folders_urls/publishing.php b/admin/layouts/library_files_folders_urls/publishing.php new file mode 100644 index 000000000..13d13ed74 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/publishing.php @@ -0,0 +1,58 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_files_folders_urls/publlshing.php b/admin/layouts/library_files_folders_urls/publlshing.php new file mode 100644 index 000000000..c982db556 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/publlshing.php @@ -0,0 +1,60 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_files_folders_urls/settings_above.php b/admin/layouts/library_files_folders_urls/settings_above.php new file mode 100644 index 000000000..dbfce2d87 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/settings_above.php @@ -0,0 +1,41 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'library' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library_files_folders_urls/settings_fullwidth.php b/admin/layouts/library_files_folders_urls/settings_fullwidth.php new file mode 100644 index 000000000..db6dbca1c --- /dev/null +++ b/admin/layouts/library_files_folders_urls/settings_fullwidth.php @@ -0,0 +1,53 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_add_urls', + 'addurls', + 'note_add_files', + 'addfiles', + 'note_add_folders', + 'addfolders' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 6c422bc54..1a572bf4e 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'default' ); diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index ff3c7fd86..67dfa2a56 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'codename', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index 4665583e1..d5039e115 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 682164c24..f8b5ac35b 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'template' ); diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index 35ea371dc..352879ab6 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'alias', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index 4665583e1..d5039e115 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index e12ddf256..1027be741 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -79,7 +79,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index 51ba6843c..147f91bd9 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -79,7 +79,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 1e3eb3c26..395766bba 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -84,7 +84,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/ajax.php b/admin/models/ajax.php index c474abcd9..4f23a046f 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -211,6 +211,8 @@ class ComponentbuilderModelAjax extends JModelList } protected $buttonArray = array( + 'library_config' => 'libraries_config', + 'library_files_folders_urls' => 'libraries_files_folders_urls', 'admin_fields' => 'admins_fields', 'admin_fields_conditions' => 'admins_fields_conditions', 'field' => 'fields', @@ -338,6 +340,10 @@ class ComponentbuilderModelAjax extends JModelList } protected $functionArray = array( + // Library + 'rename' => 'setYesNo', + 'update' => 'setYesNo', + 'type' => 'setURLType', // Admin View 'field' => 'setItemNames', 'list' => 'setYesNo', @@ -379,6 +385,10 @@ class ComponentbuilderModelAjax extends JModelList protected function getLanguage($key) { $language = array( + // Library (folder file url) + 'rename' => JText::_('COM_COMPONENTBUILDER_RENAME'), + 'path' => JText::_('COM_COMPONENTBUILDER_TARGET_PATH'), + 'update' => JText::_('COM_COMPONENTBUILDER_UPDATE'), // Admin View (fields) 'field' => JText::_('COM_COMPONENTBUILDER_FIELD'), 'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_LIST'), @@ -546,11 +556,17 @@ class ComponentbuilderModelAjax extends JModelList protected $ref; protected $fieldsArray = array( + 'library_config' => 'addconfig', + 'library_files_folders_urls' => array('addurls','addfiles','addfolders'), 'admin_fields' => 'addfields', 'admin_fields_conditions' => 'addconditions', 'component_admin_views' => 'addadmin_views', 'component_site_views' => 'addsite_views', 'component_custom_admin_views' => 'addcustom_admin_views'); + protected $allowedViewsArray = array( + 'admin_view', + 'joomla_component', + 'library'); public function getAjaxDisplay($type) { @@ -561,28 +577,39 @@ class ComponentbuilderModelAjax extends JModelList // get the view name & id $values = $this->getViewID(); // check if we are in the correct view. - if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && ($values['a_view'] === 'admin_view' || $values['a_view'] === 'joomla_component')) + if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && in_array($values['a_view'], $this->allowedViewsArray)) { $this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; - // get the field data - if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $values['a_id'], $values['a_view'], $this->fieldsArray[$type])) + // load the results + $result = array(); + // return field table + if (ComponentbuilderHelper::checkArray($this->fieldsArray[$type])) { - // check repeatable conversion - $this->checkRepeatableConversion($fieldsData, $type, $values['a_id'], $values['a_view']); - // get the table - $table = $this->getSubformTable($type, $fieldsData); - // set notice of bad practice - $notice = ''; - if ($values['a_view'] === 'admin_view' && isset($this->rowNumber) && $this->rowNumber > 50) + foreach ($this->fieldsArray[$type] as $fieldName) { - $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '
'; + if ($table = $this->getFieldTable($type, $values['a_id'], $values['a_view'], $fieldName, $typeName)) + { + $result[] = $table; + } } - elseif ($values['a_view'] === 'admin_view' && isset($this->rowNumber)) + } + elseif (ComponentbuilderHelper::checkString($this->fieldsArray[$type])) + { + if ($table = $this->getFieldTable($type, $values['a_id'], $values['a_view'], $this->fieldsArray[$type], $typeName)) { - $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '
'; + $result[] = $table; } - // return table - return $notice.$table; + } + // check if we have results + if (ComponentbuilderHelper::checkArray($result) && count($result) == 1) + { + // return the display + return implode('', $result); + } + elseif (ComponentbuilderHelper::checkArray($result)) + { + // return the display + return '
' . implode('
', $result) . '
'; } } return '
' . JText::sprintf('COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE', $typeName) . '
'; @@ -590,6 +617,31 @@ class ComponentbuilderModelAjax extends JModelList return '

' . JText::_('COM_COMPONENTBUILDER_TYPE_ERROR') . '

' . JText::_('COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST') . '

'; } + protected function getFieldTable($type, $id, $idName, $fieldName, $typeName) + { + // get the field data + if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $id, $idName, $fieldName)) + { + // check repeatable conversion + $this->checkRepeatableConversion($fieldsData, $fieldName, $id, $idName); + // get the table + $table = $this->getSubformTable($type, $fieldsData); + // set notice of bad practice + $notice = ''; + if ($idName === 'admin_view' && isset($this->rowNumber) && $this->rowNumber > 50) + { + $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '
'; + } + elseif ($idName === 'admin_view' && isset($this->rowNumber)) + { + $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '
'; + } + // return table + return $notice.$table; + } + return false; + } + protected $conversionCheck = array( 'addfields' => 'field', 'addconditions' => 'target_field', @@ -601,26 +653,26 @@ class ComponentbuilderModelAjax extends JModelList 'sql_tweak' => 'adminview', 'version_update' => 'version'); - protected function checkRepeatableConversion(&$fieldsData, $type, $id, $linked_id_name) + protected function checkRepeatableConversion(&$fieldsData, $fieldsArrayType, $id, $linked_id_name) { - if (ComponentbuilderHelper::checkJson($fieldsData)) + if (ComponentbuilderHelper::checkJson($fieldsData) && isset($this->conversionCheck[$fieldsArrayType])) { $fieldsData = json_decode($fieldsData, true); - if (isset($fieldsData[$this->conversionCheck[$this->fieldsArray[$type]]])) + if (isset($fieldsData[$this->conversionCheck[$fieldsArrayType]])) { $bucket = array(); foreach($fieldsData as $option => $values) { foreach($values as $nr => $value) { - $bucket[$this->fieldsArray[$type].$nr][$option] = $value; + $bucket[$fieldsArrayType.$nr][$option] = $value; } } $fieldsData = json_encode($bucket); // update the fields $objectUpdate = new stdClass(); $objectUpdate->{$linked_id_name} = (int) $id; - $objectUpdate->{$this->fieldsArray[$type]} = $fieldsData; + $objectUpdate->{$fieldsArrayType} = $fieldsData; JFactory::getDbo()->updateObject('#__componentbuilder_'.$type, $objectUpdate, 'admin_view'); } } @@ -715,6 +767,23 @@ class ComponentbuilderModelAjax extends JModelList return JText::_('COM_COMPONENTBUILDER_NO_ITEM_FOUND'); } + protected function setURLType($header, $value) + { + switch ($value) + { + case 1: + return JText::_('COM_COMPONENTBUILDER_DEFAULT_LINK'); + break; + case 2: + return JText::_('COM_COMPONENTBUILDER_LOCAL_GET'); + break; + case 3: + return JText::_('COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC'); + break; + } + return JText::_('COM_COMPONENTBUILDER_NOT_SET'); + } + protected function setIcoMoon($header, $value) { if (ComponentbuilderHelper::checkString($value)) @@ -1003,6 +1072,92 @@ class ComponentbuilderModelAjax extends JModelList return false; } + // Used in site_view + + public function getSnippets($libraries) + { + if (ComponentbuilderHelper::checkJson($libraries)) + { + $libraries = json_decode($libraries, true); + } + // check if we have an array + if (ComponentbuilderHelper::checkArray($libraries)) + { + // insure we only have int values + if ($libraries = $this->checkLibraries($libraries)) + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName( array('a.id') )); + $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); + $query->where($db->quoteName('a.published') . ' = 1'); + // check for country and region + $query->where($db->quoteName('a.library') . ' IN ('. implode(',',$libraries) .')'); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadColumn(); + } + } + } + return false; + } + + protected function checkLibraries($libraries) + { + $bucket = array(); + $libraries = array_map( function($id) use (&$bucket) { + // now get bundled libraries + $type = ComponentbuilderHelper::getVar('library', (int) $id, 'id', 'type'); + if (2 == $type && $bundled = ComponentbuilderHelper::getVar('library', (int) $id, 'id', 'libraries')) + { + // make sure we have an array if it was json + if (ComponentbuilderHelper::checkJson($bundled)) + { + $bundled = json_decode($bundled, true); + } + // load in the values if we have an array + if (ComponentbuilderHelper::checkArray($bundled)) + { + foreach ($bundled as $lib) + { + $bucket[$lib] = $lib; + } + } + elseif (is_numeric($bundled)) + { + $bucket[(int) $bundled] = (int) $bundled; + } + } + else + { + return (int) $id; + } + }, $libraries); + // check if we have any bundled libraries + if (ComponentbuilderHelper::checkArray($bucket)) + { + foreach ($bucket as $lib) + { + $libraries[] = (int) $lib; + } + } + // check that we have libraries + if (ComponentbuilderHelper::checkArray($libraries)) + { + $libraries = array_values(array_unique(array_filter($libraries, function($id){return is_int($id);}))); + // check if we have any libraries remaining + if (ComponentbuilderHelper::checkArray($libraries)) + { + return $libraries; + } + } + return false; + } + // Used in template public function getTemplateDetails($id) { @@ -1692,6 +1847,14 @@ class ComponentbuilderModelAjax extends JModelList $query['i']['not_base64'] = array('dashboard_tab' => 'json'); $query['i']['name'] = 'joomla_component->id:joomla_component.system_name'; + // #__componentbuilder_library as j + $query['j'] = array(); + $query['j']['table'] = 'library'; + $query['j']['view'] = 'libraries'; + $query['j']['select'] = array('id', 'name', 'php_setdocument'); + $query['j']['not_base64'] = array(); + $query['j']['name'] = 'name'; + // return the query string to search if (isset($query[$target])) { diff --git a/admin/models/compiler.php b/admin/models/compiler.php index b6611e5c2..ab7ce803c 100644 --- a/admin/models/compiler.php +++ b/admin/models/compiler.php @@ -110,15 +110,21 @@ class ComponentbuilderModelCompiler extends JModelList // Get the global params $globalParams = JComponentHelper::getParams('com_componentbuilder', true); - // Convert the parameter fields into objects. + // Insure all item fields are adapted where needed. if (ComponentbuilderHelper::checkArray($items)) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); foreach ($items as $nr => &$item) { // Always create a slug for sef URL's $item->slug = (isset($item->alias) && isset($item->id)) ? $item->id.':'.$item->alias : $item->id; - // Make sure the content prepare plugins fire on copyright (TODO) - $item->copyright = JHtml::_('content.prepare',$item->copyright); + // Make sure the content prepare plugins fire on copyright + $_copyright = new stdClass(); + $_copyright->text =& $item->copyright; // value must be in text + // Since all values are now in text (Joomla Limitation), we also add the field name (copyright) to context + $this->_dispatcher->trigger("onContentPrepare",array('com_componentbuilder.compiler.copyright',&$_copyright,&$this->params)); // Checking if copyright has uikit components that must be loaded. $this->uikitComp = ComponentbuilderHelper::getUikitComp($item->copyright,$this->uikitComp); } diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php index d0a7acf18..2ca81fed2 100644 --- a/admin/models/component_admin_views.php +++ b/admin/models/component_admin_views.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_config.php b/admin/models/component_config.php index 4fa5e7b26..5c2fd0bb4 100644 --- a/admin/models/component_config.php +++ b/admin/models/component_config.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_custom_admin_menus.php b/admin/models/component_custom_admin_menus.php index e7932e9e1..8c5900497 100644 --- a/admin/models/component_custom_admin_menus.php +++ b/admin/models/component_custom_admin_menus.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php index b8f91cbac..7046d87c5 100644 --- a/admin/models/component_custom_admin_views.php +++ b/admin/models/component_custom_admin_views.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index f25db9e09..a23ff3456 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php index b6d2db167..a01e64894 100644 --- a/admin/models/component_files_folders.php +++ b/admin/models/component_files_folders.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_mysql_tweaks.php b/admin/models/component_mysql_tweaks.php index 3d7148880..dbf351d42 100644 --- a/admin/models/component_mysql_tweaks.php +++ b/admin/models/component_mysql_tweaks.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_site_views.php b/admin/models/component_site_views.php index 25170119f..3ac82dcb3 100644 --- a/admin/models/component_site_views.php +++ b/admin/models/component_site_views.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_updates.php b/admin/models/component_updates.php index 36e30aaeb..a3b4df547 100644 --- a/admin/models/component_updates.php +++ b/admin/models/component_updates.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 03f328d15..1f40523fe 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -43,7 +43,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.ftps', 'png.help_document.add', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.ftps', 'png.help_document.add', 'png.help_documents') ); // view access array $viewAccess = array( @@ -92,6 +92,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'custom_code.access' => 'custom_code.access', 'custom_codes.submenu' => 'custom_code.submenu', 'custom_codes.dashboard_list' => 'custom_code.dashboard_list', + 'library.create' => 'library.create', + 'libraries.access' => 'library.access', + 'library.access' => 'library.access', + 'libraries.submenu' => 'library.submenu', + 'libraries.dashboard_list' => 'library.dashboard_list', 'snippets.access' => 'snippet.access', 'snippet.access' => 'snippet.access', 'snippets.submenu' => 'snippet.submenu', @@ -165,9 +170,12 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'snippet_type.create' => 'snippet_type.create', 'snippet_types.access' => 'snippet_type.access', 'snippet_type.access' => 'snippet_type.access', - 'library.create' => 'library.create', - 'libraries.access' => 'library.access', - 'library.access' => 'library.access'); + 'library_config.create' => 'library_config.create', + 'libraries_config.access' => 'library_config.access', + 'library_config.access' => 'library_config.access', + 'library_files_folders_urls.create' => 'library_files_folders_urls.create', + 'libraries_files_folders_urls.access' => 'library_files_folders_urls.access', + 'library_files_folders_urls.access' => 'library_files_folders_urls.access'); foreach($viewGroups as $group => $views) { $i = 0; diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index 18cbbf214..7c91fe535 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -79,7 +79,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -95,12 +95,12 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->custom_get)) + if (!empty($item->libraries)) { - // Convert the custom_get field to an array. - $custom_get = new Registry; - $custom_get->loadString($item->custom_get); - $item->custom_get = $custom_get->toArray(); + // Convert the libraries field to an array. + $libraries = new Registry; + $libraries->loadString($item->libraries); + $item->libraries = $libraries->toArray(); } if (!empty($item->custom_button)) @@ -111,6 +111,14 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->custom_button = $custom_button->toArray(); } + if (!empty($item->custom_get)) + { + // Convert the custom_get field to an array. + $custom_get = new Registry; + $custom_get->loadString($item->custom_get); + $item->custom_get = $custom_get->toArray(); + } + if (!empty($item->php_controller)) { // base64 Decode php_controller. @@ -915,17 +923,20 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['metadata'] = (string) $metadata; } - // Set the custom_get items to data. - if (isset($data['custom_get']) && is_array($data['custom_get'])) + // always reset the snippets + $data['snippet'] = 0; + + // Set the libraries items to data. + if (isset($data['libraries']) && is_array($data['libraries'])) { - $custom_get = new JRegistry; - $custom_get->loadArray($data['custom_get']); - $data['custom_get'] = (string) $custom_get; + $libraries = new JRegistry; + $libraries->loadArray($data['libraries']); + $data['libraries'] = (string) $libraries; } - elseif (!isset($data['custom_get'])) + elseif (!isset($data['libraries'])) { - // Set the empty custom_get to data - $data['custom_get'] = ''; + // Set the empty libraries to data + $data['libraries'] = ''; } // Set the custom_button items to data. @@ -941,6 +952,19 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['custom_button'] = ''; } + // Set the custom_get items to data. + if (isset($data['custom_get']) && is_array($data['custom_get'])) + { + $custom_get = new JRegistry; + $custom_get->loadArray($data['custom_get']); + $data['custom_get'] = (string) $custom_get; + } + elseif (!isset($data['custom_get'])) + { + // Set the empty custom_get to data + $data['custom_get'] = ''; + } + // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 74ee3fe32..074986b1a 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -79,7 +79,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index 641a322f7..4a127f876 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -280,7 +280,7 @@ class ComponentbuilderModelCustom_codes extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.component LIKE '.$search.' OR a.path LIKE '.$search.' OR a.comment_type LIKE '.$search.' OR a.function_name LIKE '.$search.' OR a.system_name LIKE '.$search.')'); + $query->where('(a.component LIKE '.$search.' OR g.system_name LIKE '.$search.' OR a.path LIKE '.$search.' OR a.comment_type LIKE '.$search.' OR a.function_name LIKE '.$search.' OR a.system_name LIKE '.$search.')'); } } diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index bb8b6bb43..17483f157 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -79,7 +79,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/field.php b/admin/models/field.php index c8b932bbb..a057ede2a 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -79,7 +79,7 @@ class ComponentbuilderModelField extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/fields.php b/admin/models/fields.php index a76b382ad..eee123dd6 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -312,7 +312,7 @@ class ComponentbuilderModelFields extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.xml LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.xml LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.')'); } } diff --git a/admin/models/fields/adminviewsreadonly.php b/admin/models/fields/adminviewsreadonly.php new file mode 100644 index 000000000..ff5e67b1c --- /dev/null +++ b/admin/models/fields/adminviewsreadonly.php @@ -0,0 +1,170 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsreadonly Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsreadonly extends JFormFieldList +{ + /** + * The adminviewsreadonly field type. + * + * @var string + */ + public $type = 'adminviewsreadonly'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create admin_view + if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit admin_view + if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for admin_view field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','admin_view_system_name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->admin_view_system_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/filebehaviour.php b/admin/models/fields/filebehaviour.php new file mode 100644 index 000000000..7c5732a18 --- /dev/null +++ b/admin/models/fields/filebehaviour.php @@ -0,0 +1,168 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Filebehaviour Form Field class for the Componentbuilder component + */ +class JFormFieldFilebehaviour extends JFormFieldList +{ + /** + * The filebehaviour field type. + * + * @var string + */ + public $type = 'filebehaviour'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create + if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit + if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the library id + $libID = $jinput->getInt('id', 0); + $options[] = JHtml::_('select.option', '1', JText::_('COM_COMPONENTBUILDER_ALWAYS_ADD')); + // add build in option for some libraries + $buildin = array(3 => 'Uikit v3', 4 => 'Uikit v2', 5 => 'FooTable v2', 6 => 'FooTable v3'); + if (isset($buildin[$libID])) + { + $options[] = JHtml::_('select.option', '4', JText::_('COM_COMPONENTBUILDER_BUILDIN')); + } + $options[] = JHtml::_('select.option', '2', JText::_('COM_COMPONENTBUILDER_CONDITIONS')); + $options[] = JHtml::_('select.option', '3', JText::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT')); + $options[] = JHtml::_('select.option', '0', JText::_('COM_COMPONENTBUILDER_DO_NOT_ADD')); + return $options; + } +} diff --git a/admin/models/fields/joomlacomponents.php b/admin/models/fields/joomlacomponents.php index 2401e1bc8..76db53a39 100644 --- a/admin/models/fields/joomlacomponents.php +++ b/admin/models/fields/joomlacomponents.php @@ -153,7 +153,6 @@ class JFormFieldJoomlacomponents extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','joomla_component_system_name'))); $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.system_name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); diff --git a/admin/models/fields/libconfigfield.php b/admin/models/fields/libconfigfield.php new file mode 100644 index 000000000..61674254b --- /dev/null +++ b/admin/models/fields/libconfigfield.php @@ -0,0 +1,206 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libconfigfield Form Field class for the Componentbuilder component + */ +class JFormFieldLibconfigfield extends JFormFieldList +{ + /** + * The libconfigfield field type. + * + * @var string + */ + public $type = 'libconfigfield'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create field + if ($user->authorise('field.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit field + if (($buttonName === 'field' || $buttonName === 'fields') && $user->authorise('field.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=fields&task=field.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for field field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // load the db opbject + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $ID = $jinput->getInt('id', 0); + // rest the fields ids + $fieldIds = array(); + if (is_numeric($ID) && $ID >= 1) + { + // get all the fields linked to the library config + if ($addconfig = ComponentbuilderHelper::getVar('library_config', (int) $ID, 'library', 'addconfig')) + { + if (ComponentbuilderHelper::checkJson($addconfig)) + { + $addconfig = json_decode($addconfig, true); + if (ComponentbuilderHelper::checkArray($addconfig)) + { + foreach($addconfig as $field) + { + if (isset($field['field'])) + { + $fieldIds[] = (int) $field['field']; + } + } + } + } + } + } + // check if we have ids, since we should not show any fields that are not part of this config + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','name'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->name); + } + return $options; + } + } + return array(JHtml::_('select.option', '', 'No config fields linked')); + } +} diff --git a/admin/models/fields/libraries.php b/admin/models/fields/libraries.php new file mode 100644 index 000000000..9eda09545 --- /dev/null +++ b/admin/models/fields/libraries.php @@ -0,0 +1,170 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libraries Form Field class for the Componentbuilder component + */ +class JFormFieldLibraries extends JFormFieldList +{ + /** + * The libraries field type. + * + * @var string + */ + public $type = 'libraries'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create library + if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit library + if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for library field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','libraries_name'))); + $query->from($db->quoteName('#__componentbuilder_library', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->libraries_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/librariesx.php b/admin/models/fields/librariesx.php new file mode 100644 index 000000000..e46f771ed --- /dev/null +++ b/admin/models/fields/librariesx.php @@ -0,0 +1,178 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Librariesx Form Field class for the Componentbuilder component + */ +class JFormFieldLibrariesx extends JFormFieldList +{ + /** + * The librariesx field type. + * + * @var string + */ + public $type = 'librariesx'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create library + if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit library + if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for library field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the library id + $libID = $jinput->getInt('id', 0); + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','libraries_name'))); + $query->from($db->quoteName('#__componentbuilder_library', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + if ($libID > 0) + { + $query->where($db->quoteName('a.id') . ' != ' . (int) $libID); + } + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->libraries_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/library.php b/admin/models/fields/library.php index 2c2d744cf..feaa47928 100644 --- a/admin/models/fields/library.php +++ b/admin/models/fields/library.php @@ -153,7 +153,8 @@ class JFormFieldLibrary extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','library_name'))); $query->from($db->quoteName('#__componentbuilder_library', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->where($db->quoteName('a.type') . ' = 1'); $query->order('a.name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); diff --git a/admin/models/fields/libraryfiles.php b/admin/models/fields/libraryfiles.php new file mode 100644 index 000000000..747d71611 --- /dev/null +++ b/admin/models/fields/libraryfiles.php @@ -0,0 +1,171 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libraryfiles Form Field class for the Componentbuilder component + */ +class JFormFieldLibraryfiles extends JFormFieldList +{ + /** + * The libraryfiles field type. + * + * @var string + */ + public $type = 'libraryfiles'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create + if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit + if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the library id + $id = $jinput->getInt('id', 0); + // get custom the files + $files = ComponentbuilderHelper::getLibraryFiles($id); + // set the default + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NO_FILES_LINKED')); + // now check if there are files in the folder + if (ComponentbuilderHelper::checkArray($files)) + { + $options = array(); + foreach ($files as $file => $name) + { + $options[] = JHtml::_('select.option', $file, $name); + } + } + return $options; + } +} diff --git a/admin/models/fields/libraryreadonly.php b/admin/models/fields/libraryreadonly.php new file mode 100644 index 000000000..71c7099b6 --- /dev/null +++ b/admin/models/fields/libraryreadonly.php @@ -0,0 +1,170 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libraryreadonly Form Field class for the Componentbuilder component + */ +class JFormFieldLibraryreadonly extends JFormFieldList +{ + /** + * The libraryreadonly field type. + * + * @var string + */ + public $type = 'libraryreadonly'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create library + if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit library + if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for library field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','library_name'))); + $query->from($db->quoteName('#__componentbuilder_library', 'a')); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->library_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index e0495c20d..86f27c189 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -165,11 +165,11 @@ class JFormFieldSnippets extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { - $lib = (ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :''; - $options[] = JHtml::_('select.option', $item->id, $item->type . ' - ' . $item->snippet_name . $lib ); + $lib = (isset($item->library) && ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :''; + $type = (isset($item->type) && ComponentbuilderHelper::checkString($item->type)) ? $item->type :JText::_('COM_COMPONENTBUILDER_NO_TYPE'); + $options[] = JHtml::_('select.option', $item->id, $type . ' - ' . $item->snippet_name . $lib ); } } return $options; diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 592749075..b7a7378e4 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -79,7 +79,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -139,7 +139,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVzufields() + public function getVzwfields() { // Get the user object. $user = JFactory::getUser(); @@ -223,13 +223,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVzufields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVzwfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVzufields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVzwfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVzufields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVzwfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVzufields($item->store, 'store'); + $item->store = $this->selectionTranslationVzwfields($item->store, 'store'); } } @@ -243,7 +243,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVzufields($value,$name) + public function selectionTranslationVzwfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index 032492169..1b4cb4744 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -4,282 +4,242 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/admin_fields_conditions.js b/admin/models/forms/admin_fields_conditions.js index e9a56a2b8..2e704b8da 100644 --- a/admin/models/forms/admin_fields_conditions.js +++ b/admin/models/forms/admin_fields_conditions.js @@ -38,17 +38,17 @@ function getFieldSelectOptions_server(fieldId){ }); } -function getFieldSelectOptions(fieldKey, table_, nr_){ +function getFieldSelectOptions(fieldKey){ // first check if the field is set - if(jQuery("#jform_addconditions"+table_+"_addconditions"+fieldKey+nr_+"_match_field").length) { - var fieldId = jQuery("#jform_addconditions"+table_+"_addconditions"+fieldKey+nr_+"_match_field option:selected").val(); + if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length) { + var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field option:selected").val(); getFieldSelectOptions_server(fieldId).done(function(result) { if(result){ - jQuery('textarea#jform_addconditions'+table_+'_addconditions'+fieldKey+nr_+'_match_options').val(result); + jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(result); } else { - jQuery('textarea#jform_addconditions'+table_+'_addconditions'+fieldKey+nr_+'_match_options').val(''); + jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(''); } }); } diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index fbcb058b1..9b12880c8 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -4,224 +4,193 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index a66fd53b3..14de9cdd7 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -4,1891 +4,1477 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_admin_views.xml b/admin/models/forms/component_admin_views.xml index 6e594faac..b4bde7cb4 100644 --- a/admin/models/forms/component_admin_views.xml +++ b/admin/models/forms/component_admin_views.xml @@ -4,682 +4,440 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_config.xml b/admin/models/forms/component_config.xml index 95ad86f3b..febbb04bd 100644 --- a/admin/models/forms/component_config.xml +++ b/admin/models/forms/component_config.xml @@ -4,161 +4,142 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_custom_admin_menus.xml b/admin/models/forms/component_custom_admin_menus.xml index 8ef92a663..d9df673b0 100644 --- a/admin/models/forms/component_custom_admin_menus.xml +++ b/admin/models/forms/component_custom_admin_menus.xml @@ -4,216 +4,188 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml index ea982aa31..2e6afb936 100644 --- a/admin/models/forms/component_custom_admin_views.xml +++ b/admin/models/forms/component_custom_admin_views.xml @@ -4,638 +4,404 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_dashboard.xml b/admin/models/forms/component_dashboard.xml index a7c1cea49..f38f2a228 100644 --- a/admin/models/forms/component_dashboard.xml +++ b/admin/models/forms/component_dashboard.xml @@ -4,175 +4,155 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_files_folders.xml b/admin/models/forms/component_files_folders.xml index ea611a7e5..f493ebff6 100644 --- a/admin/models/forms/component_files_folders.xml +++ b/admin/models/forms/component_files_folders.xml @@ -4,210 +4,197 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_mysql_tweaks.xml b/admin/models/forms/component_mysql_tweaks.xml index 51cfa9b31..d59cc300b 100644 --- a/admin/models/forms/component_mysql_tweaks.xml +++ b/admin/models/forms/component_mysql_tweaks.xml @@ -4,177 +4,154 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_site_views.xml b/admin/models/forms/component_site_views.xml index dbdc2a004..7a2f87ec0 100644 --- a/admin/models/forms/component_site_views.xml +++ b/admin/models/forms/component_site_views.xml @@ -4,184 +4,165 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/component_updates.xml b/admin/models/forms/component_updates.xml index a481f4f28..eff539617 100644 --- a/admin/models/forms/component_updates.xml +++ b/admin/models/forms/component_updates.xml @@ -4,162 +4,144 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index 336263547..f9e24be51 100644 --- a/admin/models/forms/custom_admin_view.js +++ b/admin/models/forms/custom_admin_view.js @@ -493,4 +493,76 @@ function getTemplateDetails(id){ }); } }) +} + +// set snippets that are on the page +var snippetIds = []; +var snippets = {}; +var snippet = 0; +jQuery(document).ready(function($) +{ + jQuery("#jform_snippet option").each(function() + { + var key = jQuery(this).val(); + var text = jQuery(this).text(); + snippets[key] = text; + snippetIds.push(key); + }); + snippet = jQuery("#jform_snippet").val(); + getSnippets(); +}); + +function getSnippets_server(libraries){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json"; + if(token.length > 0 && libraries.length > 0){ + var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getSnippets(){ + jQuery("#loading").show(); + // clear the selection + jQuery('#jform_snippet').find('option').remove().end(); + jQuery('#jform_snippet').trigger('liszt:updated'); + // get country value if set + var libraries = jQuery("#jform_libraries").val(); + if (libraries) { + getSnippets_server(libraries).done(function(result) { + setSnippets(result); + jQuery("#loading").hide(); + if (typeof snippetButton !== 'undefined') { + // ensure button is correct + var snippet = jQuery('#jform_snippet').val(); + snippetButton(snippet); + } + }); + } + else + { + // load all snippets in none is selected + setSnippets(snippetIds); + jQuery("#loading").hide(); + } +} +function setSnippets(array){ + if (array) { + jQuery('#jform_snippet').append(''); + jQuery.each( array, function( i, id ) { + if (id in snippets) { + jQuery('#jform_snippet').append(''); + } + if (id == snippet) { + jQuery('#jform_snippet').val(id); + } + }); + } else { + jQuery('#jform_snippet').append(''); + } + jQuery('#jform_snippet').trigger('liszt:updated'); } diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml index 65d36a555..f127649a2 100644 --- a/admin/models/forms/custom_admin_view.xml +++ b/admin/models/forms/custom_admin_view.xml @@ -4,960 +4,699 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js index 35c655160..397eddabe 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -317,7 +317,7 @@ function usedin(functioName, ide) { jQuery('#note-usedin-not').hide(); jQuery('#note-usedin-found').hide(); jQuery('#loading-usedin').show(); - var targets = ['a','b','c','d','e','f','g','h','i']; + var targets = ['a','b','c','d','e','f','g','h','i','j']; var run = 0; var usedinChecker = setInterval(function(){ var target = targets[run]; @@ -339,7 +339,7 @@ function usedin(functioName, ide) { } } }); - if (run == 8) { + if (run == 9) { clearInterval(usedinChecker); } run++; diff --git a/admin/models/forms/custom_code.xml b/admin/models/forms/custom_code.xml index 3d842d7f2..bff5e93a4 100644 --- a/admin/models/forms/custom_code.xml +++ b/admin/models/forms/custom_code.xml @@ -4,264 +4,234 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index eea328deb..8ccb137d3 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -4,1338 +4,1009 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index eba2c6df0..2242df424 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -23,171 +23,171 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvzuvzm_required = false; -jform_vvvvvzvvzn_required = false; -jform_vvvvvzwvzo_required = false; -jform_vvvvvzxvzp_required = false; -jform_vvvvwaavzq_required = false; -jform_vvvvwabvzr_required = false; -jform_vvvvwacvzs_required = false; -jform_vvvvwadvzt_required = false; +jform_vvvvwacvzo_required = false; +jform_vvvvwadvzp_required = false; +jform_vvvvwaevzq_required = false; +jform_vvvvwafvzr_required = false; +jform_vvvvwaivzs_required = false; +jform_vvvvwajvzt_required = false; +jform_vvvvwakvzu_required = false; +jform_vvvvwalvzv_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvvzu = jQuery("#jform_datalenght").val(); - vvvvvzu(datalenght_vvvvvzu); + var datalenght_vvvvwac = jQuery("#jform_datalenght").val(); + vvvvwac(datalenght_vvvvwac); - var datadefault_vvvvvzv = jQuery("#jform_datadefault").val(); - vvvvvzv(datadefault_vvvvvzv); + var datadefault_vvvvwad = jQuery("#jform_datadefault").val(); + vvvvwad(datadefault_vvvvwad); - var datatype_vvvvvzw = jQuery("#jform_datatype").val(); - vvvvvzw(datatype_vvvvvzw); + var datatype_vvvvwae = jQuery("#jform_datatype").val(); + vvvvwae(datatype_vvvvwae); - var datatype_vvvvvzx = jQuery("#jform_datatype").val(); - vvvvvzx(datatype_vvvvvzx); + var datatype_vvvvwaf = jQuery("#jform_datatype").val(); + vvvvwaf(datatype_vvvvwaf); - var store_vvvvvzy = jQuery("#jform_store").val(); - var datatype_vvvvvzy = jQuery("#jform_datatype").val(); - vvvvvzy(store_vvvvvzy,datatype_vvvvvzy); + var store_vvvvwag = jQuery("#jform_store").val(); + var datatype_vvvvwag = jQuery("#jform_datatype").val(); + vvvvwag(store_vvvvwag,datatype_vvvvwag); - var add_css_view_vvvvwaa = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwaa(add_css_view_vvvvwaa); + var add_css_view_vvvvwai = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwai(add_css_view_vvvvwai); - var add_css_views_vvvvwab = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwab(add_css_views_vvvvwab); + var add_css_views_vvvvwaj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwaj(add_css_views_vvvvwaj); - var add_javascript_view_footer_vvvvwac = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwac(add_javascript_view_footer_vvvvwac); + var add_javascript_view_footer_vvvvwak = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwak(add_javascript_view_footer_vvvvwak); - var add_javascript_views_footer_vvvvwad = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwad(add_javascript_views_footer_vvvvwad); + var add_javascript_views_footer_vvvvwal = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwal(add_javascript_views_footer_vvvvwal); }); -// the vvvvvzu function -function vvvvvzu(datalenght_vvvvvzu) +// the vvvvwac function +function vvvvwac(datalenght_vvvvwac) { - if (isSet(datalenght_vvvvvzu) && datalenght_vvvvvzu.constructor !== Array) + if (isSet(datalenght_vvvvwac) && datalenght_vvvvwac.constructor !== Array) { - var temp_vvvvvzu = datalenght_vvvvvzu; - var datalenght_vvvvvzu = []; - datalenght_vvvvvzu.push(temp_vvvvvzu); + var temp_vvvvwac = datalenght_vvvvwac; + var datalenght_vvvvwac = []; + datalenght_vvvvwac.push(temp_vvvvwac); } - else if (!isSet(datalenght_vvvvvzu)) + else if (!isSet(datalenght_vvvvwac)) { - var datalenght_vvvvvzu = []; + var datalenght_vvvvwac = []; } - var datalenght = datalenght_vvvvvzu.some(datalenght_vvvvvzu_SomeFunc); + var datalenght = datalenght_vvvvwac.some(datalenght_vvvvwac_SomeFunc); // set this function logic if (datalenght) { jQuery('#jform_datalenght_other').closest('.control-group').show(); - if (jform_vvvvvzuvzm_required) + if (jform_vvvvwacvzo_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvvzuvzm_required = false; + jform_vvvvwacvzo_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); - if (!jform_vvvvvzuvzm_required) + if (!jform_vvvvwacvzo_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvvzuvzm_required = true; + jform_vvvvwacvzo_required = true; } } } -// the vvvvvzu Some function -function datalenght_vvvvvzu_SomeFunc(datalenght_vvvvvzu) +// the vvvvwac Some function +function datalenght_vvvvwac_SomeFunc(datalenght_vvvvwac) { // set the function logic - if (datalenght_vvvvvzu == 'Other') + if (datalenght_vvvvwac == 'Other') { return true; } return false; } -// the vvvvvzv function -function vvvvvzv(datadefault_vvvvvzv) +// the vvvvwad function +function vvvvwad(datadefault_vvvvwad) { - if (isSet(datadefault_vvvvvzv) && datadefault_vvvvvzv.constructor !== Array) + if (isSet(datadefault_vvvvwad) && datadefault_vvvvwad.constructor !== Array) { - var temp_vvvvvzv = datadefault_vvvvvzv; - var datadefault_vvvvvzv = []; - datadefault_vvvvvzv.push(temp_vvvvvzv); + var temp_vvvvwad = datadefault_vvvvwad; + var datadefault_vvvvwad = []; + datadefault_vvvvwad.push(temp_vvvvwad); } - else if (!isSet(datadefault_vvvvvzv)) + else if (!isSet(datadefault_vvvvwad)) { - var datadefault_vvvvvzv = []; + var datadefault_vvvvwad = []; } - var datadefault = datadefault_vvvvvzv.some(datadefault_vvvvvzv_SomeFunc); + var datadefault = datadefault_vvvvwad.some(datadefault_vvvvwad_SomeFunc); // set this function logic if (datadefault) { jQuery('#jform_datadefault_other').closest('.control-group').show(); - if (jform_vvvvvzvvzn_required) + if (jform_vvvvwadvzp_required) { updateFieldRequired('datadefault_other',0); jQuery('#jform_datadefault_other').prop('required','required'); jQuery('#jform_datadefault_other').attr('aria-required',true); jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvvzvvzn_required = false; + jform_vvvvwadvzp_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); - if (!jform_vvvvvzvvzn_required) + if (!jform_vvvvwadvzp_required) { updateFieldRequired('datadefault_other',1); jQuery('#jform_datadefault_other').removeAttr('required'); jQuery('#jform_datadefault_other').removeAttr('aria-required'); jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvvzvvzn_required = true; + jform_vvvvwadvzp_required = true; } } } -// the vvvvvzv Some function -function datadefault_vvvvvzv_SomeFunc(datadefault_vvvvvzv) +// the vvvvwad Some function +function datadefault_vvvvwad_SomeFunc(datadefault_vvvvwad) { // set the function logic - if (datadefault_vvvvvzv == 'Other') + if (datadefault_vvvvwad == 'Other') { return true; } return false; } -// the vvvvvzw function -function vvvvvzw(datatype_vvvvvzw) +// the vvvvwae function +function vvvvwae(datatype_vvvvwae) { - if (isSet(datatype_vvvvvzw) && datatype_vvvvvzw.constructor !== Array) + if (isSet(datatype_vvvvwae) && datatype_vvvvwae.constructor !== Array) { - var temp_vvvvvzw = datatype_vvvvvzw; - var datatype_vvvvvzw = []; - datatype_vvvvvzw.push(temp_vvvvvzw); + var temp_vvvvwae = datatype_vvvvwae; + var datatype_vvvvwae = []; + datatype_vvvvwae.push(temp_vvvvwae); } - else if (!isSet(datatype_vvvvvzw)) + else if (!isSet(datatype_vvvvwae)) { - var datatype_vvvvvzw = []; + var datatype_vvvvwae = []; } - var datatype = datatype_vvvvvzw.some(datatype_vvvvvzw_SomeFunc); + var datatype = datatype_vvvvwae.some(datatype_vvvvwae_SomeFunc); // set this function logic @@ -196,13 +196,13 @@ function vvvvvzw(datatype_vvvvvzw) jQuery('#jform_datadefault').closest('.control-group').show(); jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); - if (jform_vvvvvzwvzo_required) + if (jform_vvvvwaevzq_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvvzwvzo_required = false; + jform_vvvvwaevzq_required = false; } } @@ -211,109 +211,109 @@ function vvvvvzw(datatype_vvvvvzw) jQuery('#jform_datadefault').closest('.control-group').hide(); jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); - if (!jform_vvvvvzwvzo_required) + if (!jform_vvvvwaevzq_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvvzwvzo_required = true; + jform_vvvvwaevzq_required = true; } } } -// the vvvvvzw Some function -function datatype_vvvvvzw_SomeFunc(datatype_vvvvvzw) +// the vvvvwae Some function +function datatype_vvvvwae_SomeFunc(datatype_vvvvwae) { // set the function logic - if (datatype_vvvvvzw == 'CHAR' || datatype_vvvvvzw == 'VARCHAR' || datatype_vvvvvzw == 'DATETIME' || datatype_vvvvvzw == 'DATE' || datatype_vvvvvzw == 'TIME' || datatype_vvvvvzw == 'INT' || datatype_vvvvvzw == 'TINYINT' || datatype_vvvvvzw == 'BIGINT' || datatype_vvvvvzw == 'FLOAT' || datatype_vvvvvzw == 'DECIMAL' || datatype_vvvvvzw == 'DOUBLE') + if (datatype_vvvvwae == 'CHAR' || datatype_vvvvwae == 'VARCHAR' || datatype_vvvvwae == 'DATETIME' || datatype_vvvvwae == 'DATE' || datatype_vvvvwae == 'TIME' || datatype_vvvvwae == 'INT' || datatype_vvvvwae == 'TINYINT' || datatype_vvvvwae == 'BIGINT' || datatype_vvvvwae == 'FLOAT' || datatype_vvvvwae == 'DECIMAL' || datatype_vvvvwae == 'DOUBLE') { return true; } return false; } -// the vvvvvzx function -function vvvvvzx(datatype_vvvvvzx) +// the vvvvwaf function +function vvvvwaf(datatype_vvvvwaf) { - if (isSet(datatype_vvvvvzx) && datatype_vvvvvzx.constructor !== Array) + if (isSet(datatype_vvvvwaf) && datatype_vvvvwaf.constructor !== Array) { - var temp_vvvvvzx = datatype_vvvvvzx; - var datatype_vvvvvzx = []; - datatype_vvvvvzx.push(temp_vvvvvzx); + var temp_vvvvwaf = datatype_vvvvwaf; + var datatype_vvvvwaf = []; + datatype_vvvvwaf.push(temp_vvvvwaf); } - else if (!isSet(datatype_vvvvvzx)) + else if (!isSet(datatype_vvvvwaf)) { - var datatype_vvvvvzx = []; + var datatype_vvvvwaf = []; } - var datatype = datatype_vvvvvzx.some(datatype_vvvvvzx_SomeFunc); + var datatype = datatype_vvvvwaf.some(datatype_vvvvwaf_SomeFunc); // set this function logic if (datatype) { jQuery('#jform_store').closest('.control-group').show(); - if (jform_vvvvvzxvzp_required) + if (jform_vvvvwafvzr_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); - jform_vvvvvzxvzp_required = false; + jform_vvvvwafvzr_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); - if (!jform_vvvvvzxvzp_required) + if (!jform_vvvvwafvzr_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); - jform_vvvvvzxvzp_required = true; + jform_vvvvwafvzr_required = true; } } } -// the vvvvvzx Some function -function datatype_vvvvvzx_SomeFunc(datatype_vvvvvzx) +// the vvvvwaf Some function +function datatype_vvvvwaf_SomeFunc(datatype_vvvvwaf) { // set the function logic - if (datatype_vvvvvzx == 'CHAR' || datatype_vvvvvzx == 'VARCHAR' || datatype_vvvvvzx == 'TEXT' || datatype_vvvvvzx == 'MEDIUMTEXT' || datatype_vvvvvzx == 'LONGTEXT') + if (datatype_vvvvwaf == 'CHAR' || datatype_vvvvwaf == 'VARCHAR' || datatype_vvvvwaf == 'TEXT' || datatype_vvvvwaf == 'MEDIUMTEXT' || datatype_vvvvwaf == 'LONGTEXT') { return true; } return false; } -// the vvvvvzy function -function vvvvvzy(store_vvvvvzy,datatype_vvvvvzy) +// the vvvvwag function +function vvvvwag(store_vvvvwag,datatype_vvvvwag) { - if (isSet(store_vvvvvzy) && store_vvvvvzy.constructor !== Array) + if (isSet(store_vvvvwag) && store_vvvvwag.constructor !== Array) { - var temp_vvvvvzy = store_vvvvvzy; - var store_vvvvvzy = []; - store_vvvvvzy.push(temp_vvvvvzy); + var temp_vvvvwag = store_vvvvwag; + var store_vvvvwag = []; + store_vvvvwag.push(temp_vvvvwag); } - else if (!isSet(store_vvvvvzy)) + else if (!isSet(store_vvvvwag)) { - var store_vvvvvzy = []; + var store_vvvvwag = []; } - var store = store_vvvvvzy.some(store_vvvvvzy_SomeFunc); + var store = store_vvvvwag.some(store_vvvvwag_SomeFunc); - if (isSet(datatype_vvvvvzy) && datatype_vvvvvzy.constructor !== Array) + if (isSet(datatype_vvvvwag) && datatype_vvvvwag.constructor !== Array) { - var temp_vvvvvzy = datatype_vvvvvzy; - var datatype_vvvvvzy = []; - datatype_vvvvvzy.push(temp_vvvvvzy); + var temp_vvvvwag = datatype_vvvvwag; + var datatype_vvvvwag = []; + datatype_vvvvwag.push(temp_vvvvwag); } - else if (!isSet(datatype_vvvvvzy)) + else if (!isSet(datatype_vvvvwag)) { - var datatype_vvvvvzy = []; + var datatype_vvvvwag = []; } - var datatype = datatype_vvvvvzy.some(datatype_vvvvvzy_SomeFunc); + var datatype = datatype_vvvvwag.some(datatype_vvvvwag_SomeFunc); // set this function logic @@ -327,148 +327,148 @@ function vvvvvzy(store_vvvvvzy,datatype_vvvvvzy) } } -// the vvvvvzy Some function -function store_vvvvvzy_SomeFunc(store_vvvvvzy) +// the vvvvwag Some function +function store_vvvvwag_SomeFunc(store_vvvvwag) { // set the function logic - if (store_vvvvvzy == 4) + if (store_vvvvwag == 4) { return true; } return false; } -// the vvvvvzy Some function -function datatype_vvvvvzy_SomeFunc(datatype_vvvvvzy) +// the vvvvwag Some function +function datatype_vvvvwag_SomeFunc(datatype_vvvvwag) { // set the function logic - if (datatype_vvvvvzy == 'CHAR' || datatype_vvvvvzy == 'VARCHAR' || datatype_vvvvvzy == 'TEXT' || datatype_vvvvvzy == 'MEDIUMTEXT' || datatype_vvvvvzy == 'LONGTEXT') + if (datatype_vvvvwag == 'CHAR' || datatype_vvvvwag == 'VARCHAR' || datatype_vvvvwag == 'TEXT' || datatype_vvvvwag == 'MEDIUMTEXT' || datatype_vvvvwag == 'LONGTEXT') { return true; } return false; } -// the vvvvwaa function -function vvvvwaa(add_css_view_vvvvwaa) +// the vvvvwai function +function vvvvwai(add_css_view_vvvvwai) { // set the function logic - if (add_css_view_vvvvwaa == 1) + if (add_css_view_vvvvwai == 1) { jQuery('#jform_css_view').closest('.control-group').show(); - if (jform_vvvvwaavzq_required) + if (jform_vvvvwaivzs_required) { updateFieldRequired('css_view',0); jQuery('#jform_css_view').prop('required','required'); jQuery('#jform_css_view').attr('aria-required',true); jQuery('#jform_css_view').addClass('required'); - jform_vvvvwaavzq_required = false; + jform_vvvvwaivzs_required = false; } } else { jQuery('#jform_css_view').closest('.control-group').hide(); - if (!jform_vvvvwaavzq_required) + if (!jform_vvvvwaivzs_required) { updateFieldRequired('css_view',1); jQuery('#jform_css_view').removeAttr('required'); jQuery('#jform_css_view').removeAttr('aria-required'); jQuery('#jform_css_view').removeClass('required'); - jform_vvvvwaavzq_required = true; + jform_vvvvwaivzs_required = true; } } } -// the vvvvwab function -function vvvvwab(add_css_views_vvvvwab) +// the vvvvwaj function +function vvvvwaj(add_css_views_vvvvwaj) { // set the function logic - if (add_css_views_vvvvwab == 1) + if (add_css_views_vvvvwaj == 1) { jQuery('#jform_css_views').closest('.control-group').show(); - if (jform_vvvvwabvzr_required) + if (jform_vvvvwajvzt_required) { updateFieldRequired('css_views',0); jQuery('#jform_css_views').prop('required','required'); jQuery('#jform_css_views').attr('aria-required',true); jQuery('#jform_css_views').addClass('required'); - jform_vvvvwabvzr_required = false; + jform_vvvvwajvzt_required = false; } } else { jQuery('#jform_css_views').closest('.control-group').hide(); - if (!jform_vvvvwabvzr_required) + if (!jform_vvvvwajvzt_required) { updateFieldRequired('css_views',1); jQuery('#jform_css_views').removeAttr('required'); jQuery('#jform_css_views').removeAttr('aria-required'); jQuery('#jform_css_views').removeClass('required'); - jform_vvvvwabvzr_required = true; + jform_vvvvwajvzt_required = true; } } } -// the vvvvwac function -function vvvvwac(add_javascript_view_footer_vvvvwac) +// the vvvvwak function +function vvvvwak(add_javascript_view_footer_vvvvwak) { // set the function logic - if (add_javascript_view_footer_vvvvwac == 1) + if (add_javascript_view_footer_vvvvwak == 1) { jQuery('#jform_javascript_view_footer').closest('.control-group').show(); - if (jform_vvvvwacvzs_required) + if (jform_vvvvwakvzu_required) { updateFieldRequired('javascript_view_footer',0); jQuery('#jform_javascript_view_footer').prop('required','required'); jQuery('#jform_javascript_view_footer').attr('aria-required',true); jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvwacvzs_required = false; + jform_vvvvwakvzu_required = false; } } else { jQuery('#jform_javascript_view_footer').closest('.control-group').hide(); - if (!jform_vvvvwacvzs_required) + if (!jform_vvvvwakvzu_required) { updateFieldRequired('javascript_view_footer',1); jQuery('#jform_javascript_view_footer').removeAttr('required'); jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); jQuery('#jform_javascript_view_footer').removeClass('required'); - jform_vvvvwacvzs_required = true; + jform_vvvvwakvzu_required = true; } } } -// the vvvvwad function -function vvvvwad(add_javascript_views_footer_vvvvwad) +// the vvvvwal function +function vvvvwal(add_javascript_views_footer_vvvvwal) { // set the function logic - if (add_javascript_views_footer_vvvvwad == 1) + if (add_javascript_views_footer_vvvvwal == 1) { jQuery('#jform_javascript_views_footer').closest('.control-group').show(); - if (jform_vvvvwadvzt_required) + if (jform_vvvvwalvzv_required) { updateFieldRequired('javascript_views_footer',0); jQuery('#jform_javascript_views_footer').prop('required','required'); jQuery('#jform_javascript_views_footer').attr('aria-required',true); jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvwadvzt_required = false; + jform_vvvvwalvzv_required = false; } } else { jQuery('#jform_javascript_views_footer').closest('.control-group').hide(); - if (!jform_vvvvwadvzt_required) + if (!jform_vvvvwalvzv_required) { updateFieldRequired('javascript_views_footer',1); jQuery('#jform_javascript_views_footer').removeAttr('required'); jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvwadvzt_required = true; + jform_vvvvwalvzv_required = true; } } } diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml index d1044fa1c..25cf5c3f1 100644 --- a/admin/models/forms/field.xml +++ b/admin/models/forms/field.xml @@ -4,444 +4,364 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml index 6f98b95a5..e3bd628f6 100644 --- a/admin/models/forms/fieldtype.xml +++ b/admin/models/forms/fieldtype.xml @@ -4,233 +4,208 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/ftp.xml b/admin/models/forms/ftp.xml index 30a96666c..e82c0dfca 100644 --- a/admin/models/forms/ftp.xml +++ b/admin/models/forms/ftp.xml @@ -4,126 +4,116 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 1f1d3bb4c..b27dbb1af 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -23,289 +23,289 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvwaevzw_required = false; -jform_vvvvwafvzx_required = false; -jform_vvvvwagvzy_required = false; -jform_vvvvwahvzz_required = false; -jform_vvvvwaiwaa_required = false; -jform_vvvvwajwab_required = false; +jform_vvvvwamvzy_required = false; +jform_vvvvwanvzz_required = false; +jform_vvvvwaowaa_required = false; +jform_vvvvwapwab_required = false; +jform_vvvvwaqwac_required = false; +jform_vvvvwarwad_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwae = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwae(location_vvvvwae); + var location_vvvvwam = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwam(location_vvvvwam); - var location_vvvvwaf = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwaf(location_vvvvwaf); + var location_vvvvwan = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwan(location_vvvvwan); - var type_vvvvwag = jQuery("#jform_type").val(); - vvvvwag(type_vvvvwag); + var type_vvvvwao = jQuery("#jform_type").val(); + vvvvwao(type_vvvvwao); - var type_vvvvwah = jQuery("#jform_type").val(); - vvvvwah(type_vvvvwah); + var type_vvvvwap = jQuery("#jform_type").val(); + vvvvwap(type_vvvvwap); - var type_vvvvwai = jQuery("#jform_type").val(); - vvvvwai(type_vvvvwai); + var type_vvvvwaq = jQuery("#jform_type").val(); + vvvvwaq(type_vvvvwaq); - var target_vvvvwaj = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwaj(target_vvvvwaj); + var target_vvvvwar = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwar(target_vvvvwar); }); -// the vvvvwae function -function vvvvwae(location_vvvvwae) +// the vvvvwam function +function vvvvwam(location_vvvvwam) { // set the function logic - if (location_vvvvwae == 1) + if (location_vvvvwam == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); - if (jform_vvvvwaevzw_required) + if (jform_vvvvwamvzy_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwaevzw_required = false; + jform_vvvvwamvzy_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); - if (!jform_vvvvwaevzw_required) + if (!jform_vvvvwamvzy_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwaevzw_required = true; + jform_vvvvwamvzy_required = true; } } } -// the vvvvwaf function -function vvvvwaf(location_vvvvwaf) +// the vvvvwan function +function vvvvwan(location_vvvvwan) { // set the function logic - if (location_vvvvwaf == 2) + if (location_vvvvwan == 2) { jQuery('#jform_site_view').closest('.control-group').show(); - if (jform_vvvvwafvzx_required) + if (jform_vvvvwanvzz_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwafvzx_required = false; + jform_vvvvwanvzz_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); - if (!jform_vvvvwafvzx_required) + if (!jform_vvvvwanvzz_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); - jform_vvvvwafvzx_required = true; + jform_vvvvwanvzz_required = true; } } } -// the vvvvwag function -function vvvvwag(type_vvvvwag) +// the vvvvwao function +function vvvvwao(type_vvvvwao) { - if (isSet(type_vvvvwag) && type_vvvvwag.constructor !== Array) + if (isSet(type_vvvvwao) && type_vvvvwao.constructor !== Array) { - var temp_vvvvwag = type_vvvvwag; - var type_vvvvwag = []; - type_vvvvwag.push(temp_vvvvwag); + var temp_vvvvwao = type_vvvvwao; + var type_vvvvwao = []; + type_vvvvwao.push(temp_vvvvwao); } - else if (!isSet(type_vvvvwag)) + else if (!isSet(type_vvvvwao)) { - var type_vvvvwag = []; + var type_vvvvwao = []; } - var type = type_vvvvwag.some(type_vvvvwag_SomeFunc); + var type = type_vvvvwao.some(type_vvvvwao_SomeFunc); // set this function logic if (type) { jQuery('#jform_url').closest('.control-group').show(); - if (jform_vvvvwagvzy_required) + if (jform_vvvvwaowaa_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwagvzy_required = false; + jform_vvvvwaowaa_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); - if (!jform_vvvvwagvzy_required) + if (!jform_vvvvwaowaa_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwagvzy_required = true; + jform_vvvvwaowaa_required = true; } } } -// the vvvvwag Some function -function type_vvvvwag_SomeFunc(type_vvvvwag) +// the vvvvwao Some function +function type_vvvvwao_SomeFunc(type_vvvvwao) { // set the function logic - if (type_vvvvwag == 3) + if (type_vvvvwao == 3) { return true; } return false; } -// the vvvvwah function -function vvvvwah(type_vvvvwah) +// the vvvvwap function +function vvvvwap(type_vvvvwap) { - if (isSet(type_vvvvwah) && type_vvvvwah.constructor !== Array) + if (isSet(type_vvvvwap) && type_vvvvwap.constructor !== Array) { - var temp_vvvvwah = type_vvvvwah; - var type_vvvvwah = []; - type_vvvvwah.push(temp_vvvvwah); + var temp_vvvvwap = type_vvvvwap; + var type_vvvvwap = []; + type_vvvvwap.push(temp_vvvvwap); } - else if (!isSet(type_vvvvwah)) + else if (!isSet(type_vvvvwap)) { - var type_vvvvwah = []; + var type_vvvvwap = []; } - var type = type_vvvvwah.some(type_vvvvwah_SomeFunc); + var type = type_vvvvwap.some(type_vvvvwap_SomeFunc); // set this function logic if (type) { jQuery('#jform_article').closest('.control-group').show(); - if (jform_vvvvwahvzz_required) + if (jform_vvvvwapwab_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwahvzz_required = false; + jform_vvvvwapwab_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); - if (!jform_vvvvwahvzz_required) + if (!jform_vvvvwapwab_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwahvzz_required = true; + jform_vvvvwapwab_required = true; } } } -// the vvvvwah Some function -function type_vvvvwah_SomeFunc(type_vvvvwah) +// the vvvvwap Some function +function type_vvvvwap_SomeFunc(type_vvvvwap) { // set the function logic - if (type_vvvvwah == 1) + if (type_vvvvwap == 1) { return true; } return false; } -// the vvvvwai function -function vvvvwai(type_vvvvwai) +// the vvvvwaq function +function vvvvwaq(type_vvvvwaq) { - if (isSet(type_vvvvwai) && type_vvvvwai.constructor !== Array) + if (isSet(type_vvvvwaq) && type_vvvvwaq.constructor !== Array) { - var temp_vvvvwai = type_vvvvwai; - var type_vvvvwai = []; - type_vvvvwai.push(temp_vvvvwai); + var temp_vvvvwaq = type_vvvvwaq; + var type_vvvvwaq = []; + type_vvvvwaq.push(temp_vvvvwaq); } - else if (!isSet(type_vvvvwai)) + else if (!isSet(type_vvvvwaq)) { - var type_vvvvwai = []; + var type_vvvvwaq = []; } - var type = type_vvvvwai.some(type_vvvvwai_SomeFunc); + var type = type_vvvvwaq.some(type_vvvvwaq_SomeFunc); // set this function logic if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - if (jform_vvvvwaiwaa_required) + if (jform_vvvvwaqwac_required) { updateFieldRequired('content',0); jQuery('#jform_content').prop('required','required'); jQuery('#jform_content').attr('aria-required',true); jQuery('#jform_content').addClass('required'); - jform_vvvvwaiwaa_required = false; + jform_vvvvwaqwac_required = false; } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - if (!jform_vvvvwaiwaa_required) + if (!jform_vvvvwaqwac_required) { updateFieldRequired('content',1); jQuery('#jform_content').removeAttr('required'); jQuery('#jform_content').removeAttr('aria-required'); jQuery('#jform_content').removeClass('required'); - jform_vvvvwaiwaa_required = true; + jform_vvvvwaqwac_required = true; } } } -// the vvvvwai Some function -function type_vvvvwai_SomeFunc(type_vvvvwai) +// the vvvvwaq Some function +function type_vvvvwaq_SomeFunc(type_vvvvwaq) { // set the function logic - if (type_vvvvwai == 2) + if (type_vvvvwaq == 2) { return true; } return false; } -// the vvvvwaj function -function vvvvwaj(target_vvvvwaj) +// the vvvvwar function +function vvvvwar(target_vvvvwar) { // set the function logic - if (target_vvvvwaj == 1) + if (target_vvvvwar == 1) { jQuery('#jform_groups').closest('.control-group').show(); - if (jform_vvvvwajwab_required) + if (jform_vvvvwarwad_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwajwab_required = false; + jform_vvvvwarwad_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); - if (!jform_vvvvwajwab_required) + if (!jform_vvvvwarwad_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwajwab_required = true; + jform_vvvvwarwad_required = true; } } } diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml index d7e4ec687..048c43be9 100644 --- a/admin/models/forms/help_document.xml +++ b/admin/models/forms/help_document.xml @@ -4,238 +4,198 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index 7b16b3087..029b737f3 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -4,1257 +4,1189 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - - - - - - - - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/language.xml b/admin/models/forms/language.xml index 76ae13df1..fae90ae83 100644 --- a/admin/models/forms/language.xml +++ b/admin/models/forms/language.xml @@ -4,122 +4,107 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/language_translation.xml b/admin/models/forms/language_translation.xml index aa50d7b1f..4d505ccb3 100644 --- a/admin/models/forms/language_translation.xml +++ b/admin/models/forms/language_translation.xml @@ -4,156 +4,138 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index 228bdb051..0734423a5 100644 --- a/admin/models/forms/layout.js +++ b/admin/models/forms/layout.js @@ -200,4 +200,76 @@ function getLayoutDetails(id){ }); } }) +} + +// set snippets that are on the page +var snippetIds = []; +var snippets = {}; +var snippet = 0; +jQuery(document).ready(function($) +{ + jQuery("#jform_snippet option").each(function() + { + var key = jQuery(this).val(); + var text = jQuery(this).text(); + snippets[key] = text; + snippetIds.push(key); + }); + snippet = jQuery("#jform_snippet").val(); + getSnippets(); +}); + +function getSnippets_server(libraries){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json"; + if(token.length > 0 && libraries.length > 0){ + var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getSnippets(){ + jQuery("#loading").show(); + // clear the selection + jQuery('#jform_snippet').find('option').remove().end(); + jQuery('#jform_snippet').trigger('liszt:updated'); + // get country value if set + var libraries = jQuery("#jform_libraries").val(); + if (libraries) { + getSnippets_server(libraries).done(function(result) { + setSnippets(result); + jQuery("#loading").hide(); + if (typeof snippetButton !== 'undefined') { + // ensure button is correct + var snippet = jQuery('#jform_snippet').val(); + snippetButton(snippet); + } + }); + } + else + { + // load all snippets in none is selected + setSnippets(snippetIds); + jQuery("#loading").hide(); + } +} +function setSnippets(array){ + if (array) { + jQuery('#jform_snippet').append(''); + jQuery.each( array, function( i, id ) { + if (id in snippets) { + jQuery('#jform_snippet').append(''); + } + if (id == snippet) { + jQuery('#jform_snippet').val(id); + } + }); + } else { + jQuery('#jform_snippet').append(''); + } + jQuery('#jform_snippet').trigger('liszt:updated'); } diff --git a/admin/models/forms/layout.xml b/admin/models/forms/layout.xml index 420513859..a012c85e5 100644 --- a/admin/models/forms/layout.xml +++ b/admin/models/forms/layout.xml @@ -4,211 +4,217 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js index 7a1b7e267..a5a960a54 100644 --- a/admin/models/forms/library.js +++ b/admin/models/forms/library.js @@ -22,4 +22,503 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ - +// Some Global Values +jform_vvvvvzvvzm_required = false; +jform_vvvvwabvzn_required = false; + +// Initial Script +jQuery(document).ready(function() +{ + var how_vvvvvzu = jQuery("#jform_how").val(); + vvvvvzu(how_vvvvvzu); + + var how_vvvvvzv = jQuery("#jform_how").val(); + vvvvvzv(how_vvvvvzv); + + var how_vvvvvzw = jQuery("#jform_how").val(); + vvvvvzw(how_vvvvvzw); + + var how_vvvvvzx = jQuery("#jform_how").val(); + vvvvvzx(how_vvvvvzx); + + var how_vvvvvzy = jQuery("#jform_how").val(); + vvvvvzy(how_vvvvvzy); + + var how_vvvvvzz = jQuery("#jform_how").val(); + vvvvvzz(how_vvvvvzz); + + var how_vvvvwaa = jQuery("#jform_how").val(); + vvvvwaa(how_vvvvwaa); + + var type_vvvvwab = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvwab(type_vvvvwab); +}); + +// the vvvvvzu function +function vvvvvzu(how_vvvvvzu) +{ + if (isSet(how_vvvvvzu) && how_vvvvvzu.constructor !== Array) + { + var temp_vvvvvzu = how_vvvvvzu; + var how_vvvvvzu = []; + how_vvvvvzu.push(temp_vvvvvzu); + } + else if (!isSet(how_vvvvvzu)) + { + var how_vvvvvzu = []; + } + var how = how_vvvvvzu.some(how_vvvvvzu_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('#jform_addconditions-lbl').closest('.control-group').show(); + } + else + { + jQuery('#jform_addconditions-lbl').closest('.control-group').hide(); + } +} + +// the vvvvvzu Some function +function how_vvvvvzu_SomeFunc(how_vvvvvzu) +{ + // set the function logic + if (how_vvvvvzu == 2) + { + return true; + } + return false; +} + +// the vvvvvzv function +function vvvvvzv(how_vvvvvzv) +{ + if (isSet(how_vvvvvzv) && how_vvvvvzv.constructor !== Array) + { + var temp_vvvvvzv = how_vvvvvzv; + var how_vvvvvzv = []; + how_vvvvvzv.push(temp_vvvvvzv); + } + else if (!isSet(how_vvvvvzv)) + { + var how_vvvvvzv = []; + } + var how = how_vvvvvzv.some(how_vvvvvzv_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('#jform_php_setdocument').closest('.control-group').show(); + if (jform_vvvvvzvvzm_required) + { + updateFieldRequired('php_setdocument',0); + jQuery('#jform_php_setdocument').prop('required','required'); + jQuery('#jform_php_setdocument').attr('aria-required',true); + jQuery('#jform_php_setdocument').addClass('required'); + jform_vvvvvzvvzm_required = false; + } + + } + else + { + jQuery('#jform_php_setdocument').closest('.control-group').hide(); + if (!jform_vvvvvzvvzm_required) + { + updateFieldRequired('php_setdocument',1); + jQuery('#jform_php_setdocument').removeAttr('required'); + jQuery('#jform_php_setdocument').removeAttr('aria-required'); + jQuery('#jform_php_setdocument').removeClass('required'); + jform_vvvvvzvvzm_required = true; + } + } +} + +// the vvvvvzv Some function +function how_vvvvvzv_SomeFunc(how_vvvvvzv) +{ + // set the function logic + if (how_vvvvvzv == 3) + { + return true; + } + return false; +} + +// the vvvvvzw function +function vvvvvzw(how_vvvvvzw) +{ + if (isSet(how_vvvvvzw) && how_vvvvvzw.constructor !== Array) + { + var temp_vvvvvzw = how_vvvvvzw; + var how_vvvvvzw = []; + how_vvvvvzw.push(temp_vvvvvzw); + } + else if (!isSet(how_vvvvvzw)) + { + var how_vvvvvzw = []; + } + var how = how_vvvvvzw.some(how_vvvvvzw_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('.note_display_library_config').closest('.control-group').show(); + } + else + { + jQuery('.note_display_library_config').closest('.control-group').hide(); + } +} + +// the vvvvvzw Some function +function how_vvvvvzw_SomeFunc(how_vvvvvzw) +{ + // set the function logic + if (how_vvvvvzw == 2 || how_vvvvvzw == 3) + { + return true; + } + return false; +} + +// the vvvvvzx function +function vvvvvzx(how_vvvvvzx) +{ + if (isSet(how_vvvvvzx) && how_vvvvvzx.constructor !== Array) + { + var temp_vvvvvzx = how_vvvvvzx; + var how_vvvvvzx = []; + how_vvvvvzx.push(temp_vvvvvzx); + } + else if (!isSet(how_vvvvvzx)) + { + var how_vvvvvzx = []; + } + var how = how_vvvvvzx.some(how_vvvvvzx_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('.note_display_library_files_folders_urls').closest('.control-group').show(); + } + else + { + jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide(); + } +} + +// the vvvvvzx Some function +function how_vvvvvzx_SomeFunc(how_vvvvvzx) +{ + // set the function logic + if (how_vvvvvzx == 1 || how_vvvvvzx == 2 || how_vvvvvzx == 3) + { + return true; + } + return false; +} + +// the vvvvvzy function +function vvvvvzy(how_vvvvvzy) +{ + if (isSet(how_vvvvvzy) && how_vvvvvzy.constructor !== Array) + { + var temp_vvvvvzy = how_vvvvvzy; + var how_vvvvvzy = []; + how_vvvvvzy.push(temp_vvvvvzy); + } + else if (!isSet(how_vvvvvzy)) + { + var how_vvvvvzy = []; + } + var how = how_vvvvvzy.some(how_vvvvvzy_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('.note_no_behaviour_one').closest('.control-group').show(); + jQuery('.note_no_behaviour_three').closest('.control-group').show(); + jQuery('.note_no_behaviour_two').closest('.control-group').show(); + } + else + { + jQuery('.note_no_behaviour_one').closest('.control-group').hide(); + jQuery('.note_no_behaviour_three').closest('.control-group').hide(); + jQuery('.note_no_behaviour_two').closest('.control-group').hide(); + } +} + +// the vvvvvzy Some function +function how_vvvvvzy_SomeFunc(how_vvvvvzy) +{ + // set the function logic + if (how_vvvvvzy == 0) + { + return true; + } + return false; +} + +// the vvvvvzz function +function vvvvvzz(how_vvvvvzz) +{ + if (isSet(how_vvvvvzz) && how_vvvvvzz.constructor !== Array) + { + var temp_vvvvvzz = how_vvvvvzz; + var how_vvvvvzz = []; + how_vvvvvzz.push(temp_vvvvvzz); + } + else if (!isSet(how_vvvvvzz)) + { + var how_vvvvvzz = []; + } + var how = how_vvvvvzz.some(how_vvvvvzz_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('.note_yes_behaviour_one').closest('.control-group').show(); + jQuery('.note_yes_behaviour_two').closest('.control-group').show(); + } + else + { + jQuery('.note_yes_behaviour_one').closest('.control-group').hide(); + jQuery('.note_yes_behaviour_two').closest('.control-group').hide(); + } +} + +// the vvvvvzz Some function +function how_vvvvvzz_SomeFunc(how_vvvvvzz) +{ + // set the function logic + if (how_vvvvvzz == 1) + { + return true; + } + return false; +} + +// the vvvvwaa function +function vvvvwaa(how_vvvvwaa) +{ + if (isSet(how_vvvvwaa) && how_vvvvwaa.constructor !== Array) + { + var temp_vvvvwaa = how_vvvvwaa; + var how_vvvvwaa = []; + how_vvvvwaa.push(temp_vvvvwaa); + } + else if (!isSet(how_vvvvwaa)) + { + var how_vvvvwaa = []; + } + var how = how_vvvvwaa.some(how_vvvvwaa_SomeFunc); + + + // set this function logic + if (how) + { + jQuery('.note_build_in_behaviour_one').closest('.control-group').show(); + jQuery('.note_build_in_behaviour_three').closest('.control-group').show(); + jQuery('.note_build_in_behaviour_two').closest('.control-group').show(); + } + else + { + jQuery('.note_build_in_behaviour_one').closest('.control-group').hide(); + jQuery('.note_build_in_behaviour_three').closest('.control-group').hide(); + jQuery('.note_build_in_behaviour_two').closest('.control-group').hide(); + } +} + +// the vvvvwaa Some function +function how_vvvvwaa_SomeFunc(how_vvvvwaa) +{ + // set the function logic + if (how_vvvvwaa == 4) + { + return true; + } + return false; +} + +// the vvvvwab function +function vvvvwab(type_vvvvwab) +{ + // set the function logic + if (type_vvvvwab == 2) + { + jQuery('#jform_libraries').closest('.control-group').show(); + if (jform_vvvvwabvzn_required) + { + updateFieldRequired('libraries',0); + jQuery('#jform_libraries').prop('required','required'); + jQuery('#jform_libraries').attr('aria-required',true); + jQuery('#jform_libraries').addClass('required'); + jform_vvvvwabvzn_required = false; + } + + } + else + { + jQuery('#jform_libraries').closest('.control-group').hide(); + if (!jform_vvvvwabvzn_required) + { + updateFieldRequired('libraries',1); + jQuery('#jform_libraries').removeAttr('required'); + jQuery('#jform_libraries').removeAttr('aria-required'); + jQuery('#jform_libraries').removeClass('required'); + jform_vvvvwabvzn_required = true; + } + } +} + +// update required fields +function updateFieldRequired(name,status) +{ + var not_required = jQuery('#jform_not_required').val(); + + if(status == 1) + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required+','+name; + } + else + { + not_required = ','+name; + } + } + else + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required.replace(','+name,''); + } + } + + jQuery('#jform_not_required').val(not_required); +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} + +jQuery(document).ready(function() +{ + // now load the displays + getAjaxDisplay('library_config'); + getAjaxDisplay('library_files_folders_urls'); +}); + +function addData(result,where){ + jQuery(result).insertAfter(jQuery(where).closest('.control-group')); +} + +function addButtonID_server(type, size){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod); + if(token.length > 0 && type.length > 0 && size > 0){ + var request = 'token='+token+'&type='+type+'&size='+size; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButtonID(type, where, size){ + addButtonID_server(type, size).done(function(result) { + if(result){ + if (2 == size) { + jQuery('#'+where).html(result); + } else { + addData(result, '#jform_'+where); + } + } + }); +} + +function addButton_server(type){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod); + if(token.length > 0 && type.length > 0){ + var request = 'token='+token+'&type='+type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButton(type,where){ + addButton_server(type).done(function(result) { + if(result){ + addData(result,'#jform_'+where); + } + }) +} + +function getAjaxDisplay(type){ + getAjaxDisplay_server(type).done(function(result) { + if (result) { + jQuery('#display_'+type).html(result); + } + // set button + addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button + }); +} + +function getAjaxDisplay_server(type){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod; + if (token.length > 0 && type.length > 0) { + var request = 'token='+token+'&type=' + type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getFieldSelectOptions_server(fieldId){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"; + if (token.length > 0 && fieldId > 0) { + var request = 'token='+token+'&id='+fieldId; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getFieldSelectOptions(fieldKey){ + // first check if the field is set + if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field").length) { + var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field option:selected").val(); + getFieldSelectOptions_server(fieldId).done(function(result) { + if(result) { + jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(result); + } else { + jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(''); + } + }); + } +} diff --git a/admin/models/forms/library.xml b/admin/models/forms/library.xml index 36633167e..48118df14 100644 --- a/admin/models/forms/library.xml +++ b/admin/models/forms/library.xml @@ -4,125 +4,317 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/library_config.js b/admin/models/forms/library_config.js new file mode 100644 index 000000000..ca982d159 --- /dev/null +++ b/admin/models/forms/library_config.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library_config.js + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + + diff --git a/admin/models/forms/library_config.xml b/admin/models/forms/library_config.xml new file mode 100644 index 000000000..7b1f5e582 --- /dev/null +++ b/admin/models/forms/library_config.xml @@ -0,0 +1,165 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/library_files_folders_urls.js b/admin/models/forms/library_files_folders_urls.js new file mode 100644 index 000000000..4c1191714 --- /dev/null +++ b/admin/models/forms/library_files_folders_urls.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library_files_folders_urls.js + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + + diff --git a/admin/models/forms/library_files_folders_urls.xml b/admin/models/forms/library_files_folders_urls.xml new file mode 100644 index 000000000..d56483e57 --- /dev/null +++ b/admin/models/forms/library_files_folders_urls.xml @@ -0,0 +1,269 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index d478b641c..f69c61d46 100644 --- a/admin/models/forms/site_view.js +++ b/admin/models/forms/site_view.js @@ -571,4 +571,76 @@ function getTemplateDetails(id){ }); } }) +} + +// set snippets that are on the page +var snippetIds = []; +var snippets = {}; +var snippet = 0; +jQuery(document).ready(function($) +{ + jQuery("#jform_snippet option").each(function() + { + var key = jQuery(this).val(); + var text = jQuery(this).text(); + snippets[key] = text; + snippetIds.push(key); + }); + snippet = jQuery("#jform_snippet").val(); + getSnippets(); +}); + +function getSnippets_server(libraries){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json"; + if(token.length > 0 && libraries.length > 0){ + var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getSnippets(){ + jQuery("#loading").show(); + // clear the selection + jQuery('#jform_snippet').find('option').remove().end(); + jQuery('#jform_snippet').trigger('liszt:updated'); + // get country value if set + var libraries = jQuery("#jform_libraries").val(); + if (libraries) { + getSnippets_server(libraries).done(function(result) { + setSnippets(result); + jQuery("#loading").hide(); + if (typeof snippetButton !== 'undefined') { + // ensure button is correct + var snippet = jQuery('#jform_snippet').val(); + snippetButton(snippet); + } + }); + } + else + { + // load all snippets in none is selected + setSnippets(snippetIds); + jQuery("#loading").hide(); + } +} +function setSnippets(array){ + if (array) { + jQuery('#jform_snippet').append(''); + jQuery.each( array, function( i, id ) { + if (id in snippets) { + jQuery('#jform_snippet').append(''); + } + if (id == snippet) { + jQuery('#jform_snippet').val(id); + } + }); + } else { + jQuery('#jform_snippet').append(''); + } + jQuery('#jform_snippet').trigger('liszt:updated'); } diff --git a/admin/models/forms/site_view.xml b/admin/models/forms/site_view.xml index e5e832db4..5423c5db0 100644 --- a/admin/models/forms/site_view.xml +++ b/admin/models/forms/site_view.xml @@ -4,1138 +4,847 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/snippet.xml b/admin/models/forms/snippet.xml index ef404c887..d49bffcdf 100644 --- a/admin/models/forms/snippet.xml +++ b/admin/models/forms/snippet.xml @@ -4,255 +4,225 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/snippet_type.xml b/admin/models/forms/snippet_type.xml index b4e2b660d..27562a661 100644 --- a/admin/models/forms/snippet_type.xml +++ b/admin/models/forms/snippet_type.xml @@ -4,125 +4,110 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index 38175e572..7f0985f3e 100644 --- a/admin/models/forms/template.js +++ b/admin/models/forms/template.js @@ -226,4 +226,76 @@ function getTemplateDetails(id){ }); } }) +} + +// set snippets that are on the page +var snippetIds = []; +var snippets = {}; +var snippet = 0; +jQuery(document).ready(function($) +{ + jQuery("#jform_snippet option").each(function() + { + var key = jQuery(this).val(); + var text = jQuery(this).text(); + snippets[key] = text; + snippetIds.push(key); + }); + snippet = jQuery("#jform_snippet").val(); + getSnippets(); +}); + +function getSnippets_server(libraries){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json"; + if(token.length > 0 && libraries.length > 0){ + var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getSnippets(){ + jQuery("#loading").show(); + // clear the selection + jQuery('#jform_snippet').find('option').remove().end(); + jQuery('#jform_snippet').trigger('liszt:updated'); + // get country value if set + var libraries = jQuery("#jform_libraries").val(); + if (libraries) { + getSnippets_server(libraries).done(function(result) { + setSnippets(result); + jQuery("#loading").hide(); + if (typeof snippetButton !== 'undefined') { + // ensure button is correct + var snippet = jQuery('#jform_snippet').val(); + snippetButton(snippet); + } + }); + } + else + { + // load all snippets in none is selected + setSnippets(snippetIds); + jQuery("#loading").hide(); + } +} +function setSnippets(array){ + if (array) { + jQuery('#jform_snippet').append(''); + jQuery.each( array, function( i, id ) { + if (id in snippets) { + jQuery('#jform_snippet').append(''); + } + if (id == snippet) { + jQuery('#jform_snippet').val(id); + } + }); + } else { + jQuery('#jform_snippet').append(''); + } + jQuery('#jform_snippet').trigger('liszt:updated'); } diff --git a/admin/models/forms/template.xml b/admin/models/forms/template.xml index 888d7d360..8fcb6cc0c 100644 --- a/admin/models/forms/template.xml +++ b/admin/models/forms/template.xml @@ -4,211 +4,217 @@ addfieldpath="/administrator/components/com_componentbuilder/models/fields" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/admin/models/ftp.php b/admin/models/ftp.php index 296b92f4b..d211bc03f 100644 --- a/admin/models/ftp.php +++ b/admin/models/ftp.php @@ -79,7 +79,7 @@ class ComponentbuilderModelFtp extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -122,7 +122,7 @@ class ComponentbuilderModelFtp extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVzvlinked_components() + public function getVzxlinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/models/get_snippets.php b/admin/models/get_snippets.php index 94c43d24e..08c99d6c3 100644 --- a/admin/models/get_snippets.php +++ b/admin/models/get_snippets.php @@ -118,9 +118,12 @@ class ComponentbuilderModelGet_snippets extends JModelList // Get the global params $globalParams = JComponentHelper::getParams('com_componentbuilder', true); - // Convert the parameter fields into objects. + // Insure all item fields are adapted where needed. if (ComponentbuilderHelper::checkArray($items)) { + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); foreach ($items as $nr => &$item) { // Always create a slug for sef URL's diff --git a/admin/models/help_document.php b/admin/models/help_document.php index 0317a5f88..a4be227e6 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -79,7 +79,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index bde57f22c..5c6071299 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -266,7 +266,7 @@ class ComponentbuilderModelHelp_documents extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR a.site_view LIKE '.$search.')'); + $query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR g. LIKE '.$search.' OR a.site_view LIKE '.$search.' OR h. LIKE '.$search.')'); } } diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index c3c8d212f..eb3b8aaa8 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -84,7 +84,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/language.php b/admin/models/language.php index c12db441e..7f03bca0e 100644 --- a/admin/models/language.php +++ b/admin/models/language.php @@ -79,7 +79,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/language_translation.php b/admin/models/language_translation.php index 7126dacf2..d032e5ec7 100644 --- a/admin/models/language_translation.php +++ b/admin/models/language_translation.php @@ -84,7 +84,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/layout.php b/admin/models/layout.php index b5ad302bf..a249304f6 100644 --- a/admin/models/layout.php +++ b/admin/models/layout.php @@ -79,7 +79,7 @@ class ComponentbuilderModelLayout extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -95,6 +95,14 @@ class ComponentbuilderModelLayout extends JModelAdmin $item->metadata = $registry->toArray(); } + if (!empty($item->libraries)) + { + // Convert the libraries field to an array. + $libraries = new Registry; + $libraries->loadString($item->libraries); + $item->libraries = $libraries->toArray(); + } + if (!empty($item->layout)) { // base64 Decode layout. @@ -830,6 +838,22 @@ class ComponentbuilderModelLayout extends JModelAdmin $data['metadata'] = (string) $metadata; } + // always reset the snippets + $data['snippet'] = 0; + + // Set the libraries items to data. + if (isset($data['libraries']) && is_array($data['libraries'])) + { + $libraries = new JRegistry; + $libraries->loadArray($data['libraries']); + $data['libraries'] = (string) $libraries; + } + elseif (!isset($data['libraries'])) + { + // Set the empty libraries to data + $data['libraries'] = ''; + } + // Set the layout string to base64 string. if (isset($data['layout'])) { diff --git a/admin/models/layouts.php b/admin/models/layouts.php index e4e6a12f1..e6d055d84 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -195,7 +195,7 @@ class ComponentbuilderModelLayouts extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.' OR g.name LIKE '.$search.')'); } } diff --git a/admin/models/libraries.php b/admin/models/libraries.php index 7184969fb..f72192f38 100644 --- a/admin/models/libraries.php +++ b/admin/models/libraries.php @@ -45,7 +45,9 @@ class ComponentbuilderModelLibraries extends JModelList 'a.created_by','created_by', 'a.modified_by','modified_by', 'a.name','name', - 'a.description','description' + 'a.description','description', + 'a.type','type', + 'a.how','how' ); } @@ -70,7 +72,13 @@ class ComponentbuilderModelLibraries extends JModelList $this->setState('filter.name', $name); $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + $this->setState('filter.description', $description); + + $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); + $this->setState('filter.type', $type); + + $how = $this->getUserStateFromRequest($this->context . '.filter.how', 'filter_how'); + $this->setState('filter.how', $how); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $this->setState('filter.sorting', $sorting); @@ -122,10 +130,66 @@ class ComponentbuilderModelLibraries extends JModelList } } - } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert type + $item->type = $this->selectionTranslation($item->type, 'type'); + + // convert how + $item->how = $this->selectionTranslation($item->how, 'how'); + + } + } + // return items return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of type language strings + if ($name === 'type') + { + $typeArray = array( + 1 => 'COM_COMPONENTBUILDER_LIBRARY_MAIN', + 2 => 'COM_COMPONENTBUILDER_LIBRARY_BUNDLE' + ); + // Now check if value is found in this array + if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value])) + { + return $typeArray[$value]; + } + } + + // Array of how language strings + if ($name === 'how') + { + $howArray = array( + 1 => 'COM_COMPONENTBUILDER_ALWAYS_ADD', + 2 => 'COM_COMPONENTBUILDER_CONDITIONS', + 3 => 'COM_COMPONENTBUILDER_CUSTOM_SCRIPT', + 4 => 'COM_COMPONENTBUILDER_BUILDIN', + 0 => 'COM_COMPONENTBUILDER_DO_NOT_ADD' + ); + // Now check if value is found in this array + if (isset($howArray[$value]) && ComponentbuilderHelper::checkString($howArray[$value])) + { + return JText::_($howArray[$value]); + } + } + + return $value; } /** @@ -187,6 +251,16 @@ class ComponentbuilderModelLibraries extends JModelList } } + // Filter by how. + if ($how = $this->getState('filter.how')) + { + $query->where('a.how = ' . $db->quote($db->escape($how))); + } + // Filter by Type. + if ($type = $this->getState('filter.type')) + { + $query->where('a.type = ' . $db->quote($db->escape($type))); + } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); @@ -215,7 +289,9 @@ class ComponentbuilderModelLibraries extends JModelList $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); $id .= ':' . $this->getState('filter.name'); - $id .= ':' . $this->getState('filter.description'); + $id .= ':' . $this->getState('filter.description'); + $id .= ':' . $this->getState('filter.type'); + $id .= ':' . $this->getState('filter.how'); return parent::getStoreId($id); } diff --git a/admin/models/libraries_config.php b/admin/models/libraries_config.php new file mode 100644 index 000000000..5fd5cd2e5 --- /dev/null +++ b/admin/models/libraries_config.php @@ -0,0 +1,256 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * Libraries_config Model + */ +class ComponentbuilderModelLibraries_config extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('library_config.access', 'com_componentbuilder.library_config.' . (int) $item->id) && $user->authorise('library_config.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // return items + return $items; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the componentbuilder_item table + $query->from($db->quoteName('#__componentbuilder_library_config', 'a')); + + // From the componentbuilder_library table. + $query->select($db->quoteName('g.name','library_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'g') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_library_config')); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Get Yesterdays date + $date = JFactory::getDate()->modify($time)->toSql(); + // reset query + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table + $query->update($db->quoteName('#__componentbuilder_library_config'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/libraries_files_folders_urls.php b/admin/models/libraries_files_folders_urls.php new file mode 100644 index 000000000..6f385caf1 --- /dev/null +++ b/admin/models/libraries_files_folders_urls.php @@ -0,0 +1,256 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * Libraries_files_folders_urls Model + */ +class ComponentbuilderModelLibraries_files_folders_urls extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('library_files_folders_urls.access', 'com_componentbuilder.library_files_folders_urls.' . (int) $item->id) && $user->authorise('library_files_folders_urls.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // return items + return $items; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the componentbuilder_item table + $query->from($db->quoteName('#__componentbuilder_library_files_folders_urls', 'a')); + + // From the componentbuilder_library table. + $query->select($db->quoteName('g.name','library_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'g') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_library_files_folders_urls')); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Get Yesterdays date + $date = JFactory::getDate()->modify($time)->toSql(); + // reset query + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table + $query->update($db->quoteName('#__componentbuilder_library_files_folders_urls'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/library.php b/admin/models/library.php index 68fb7fc8d..1e78fa36b 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -64,6 +64,11 @@ class ComponentbuilderModelLibrary extends JModelAdmin public function getTable($type = 'library', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); + } + + public function getVDM() + { + return $this->vastDevMod; } /** @@ -79,7 +84,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -93,7 +98,50 @@ class ComponentbuilderModelLibrary extends JModelAdmin $registry = new Registry; $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); + } + + if (!empty($item->addconditions)) + { + // Convert the addconditions field to an array. + $addconditions = new Registry; + $addconditions->loadString($item->addconditions); + $item->addconditions = $addconditions->toArray(); + } + + if (!empty($item->libraries)) + { + // Convert the libraries field to an array. + $libraries = new Registry; + $libraries->loadString($item->libraries); + $item->libraries = $libraries->toArray(); + } + + if (!empty($item->php_setdocument)) + { + // base64 Decode php_setdocument. + $item->php_setdocument = base64_decode($item->php_setdocument); + } + + + if (empty($item->id)) + { + $id = 0; } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('library__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id); + ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod); + } if (!empty($item->id)) { @@ -348,6 +396,42 @@ class ComponentbuilderModelLibrary extends JModelAdmin } return $data; + } + + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ + public function validate($form, $data, $group = null) + { + // check if the not_required field is set + if (ComponentbuilderHelper::checkString($data['not_required'])) + { + $requiredFields = (array) explode(',',(string) $data['not_required']); + $requiredFields = array_unique($requiredFields); + // now change the required field attributes value + foreach ($requiredFields as $requiredField) + { + // make sure there is a string value + if (ComponentbuilderHelper::checkString($requiredField)) + { + // change to false + $form->setFieldAttribute($requiredField, 'required', 'false'); + // also clear the data set + $data[$requiredField] = ''; + } + } + } + return parent::validate($form, $data, $group); } /** @@ -359,7 +443,9 @@ class ComponentbuilderModelLibrary extends JModelAdmin */ protected function getUniqeFields() { - return false; + + return array('name'); + } /** @@ -372,10 +458,49 @@ class ComponentbuilderModelLibrary extends JModelAdmin * @since 12.2 */ public function delete(&$pks) - { + { + // insure the locked library are not deleted + $app = JFactory::getApplication(); + foreach ($pks as $nr => $pk) + { + // remove if it is a locked library + if ($pk > 0 && isset(ComponentbuilderHelper::$libraryNames[$pk])) + { + // do not allow delete + unset($pks[$nr]); + // set a message to remind them not to delete these libraries (since they are locked) + $app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK', ComponentbuilderHelper::$libraryNames[$pk]), 'warning'); + } + } + // check if we can still continue + if (!ComponentbuilderHelper::checkArray($pks)) + { + return false; + } if (!parent::delete($pks)) { return false; + } + + // we must also delete the linked tables found + if (ComponentbuilderHelper::checkArray($pks)) + { + $_tablesArray = array( + 'snippet', + 'library_config', + 'library_files_folders_urls' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'library', 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->delete($_pks); + } + } } return true; @@ -396,6 +521,27 @@ class ComponentbuilderModelLibrary extends JModelAdmin if (!parent::publish($pks, $value)) { return false; + } + + // we must also update all linked tables + if (ComponentbuilderHelper::checkArray($pks)) + { + $_tablesArray = array( + 'snippet', + 'library_config', + 'library_files_folders_urls' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'library', 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->publish($_pks, $value); + } + } } return true; @@ -780,7 +926,61 @@ class ComponentbuilderModelLibrary extends JModelAdmin $metadata = new JRegistry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; - } + } + + // Set the addconditions items to data. + if (isset($data['addconditions']) && is_array($data['addconditions'])) + { + $addconditions = new JRegistry; + $addconditions->loadArray($data['addconditions']); + $data['addconditions'] = (string) $addconditions; + } + elseif (!isset($data['addconditions'])) + { + // Set the empty addconditions to data + $data['addconditions'] = ''; + } + + // Set the libraries items to data. + if (isset($data['libraries']) && is_array($data['libraries'])) + { + $libraries = new JRegistry; + $libraries->loadArray($data['libraries']); + $data['libraries'] = (string) $libraries; + } + elseif (!isset($data['libraries'])) + { + // Set the empty libraries to data + $data['libraries'] = ''; + } + + // Set the php_setdocument string to base64 string. + if (isset($data['php_setdocument'])) + { + $data['php_setdocument'] = base64_encode($data['php_setdocument']); + } + + // insure the locked library names are not changed + if ($data['id'] > 0 && isset(ComponentbuilderHelper::$libraryNames[$data['id']])) + { + // check if it has or is being changed + if (ComponentbuilderHelper::$libraryNames[$data['id']] !== $data['name']) + { + // the wrong name + $name_ = $data['name']; + // change it back + $data['name'] = ComponentbuilderHelper::$libraryNames[$data['id']]; + // give a notice that the name can not be changed + JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_THE_NAME_OF_THIS_LIBRARY_BSB_CAN_NOT_BE_CHANGED_TO_BSB_OR_THINGS_WILL_BREAK', $data['name'], $name_), 'warning'); + } + // always insure they remain set a main libraries + $data['type'] = 1; + } + // also check to insure these names are not used again + if (!isset(ComponentbuilderHelper::$libraryNames[$data['id']]) && in_array($data['name'], ComponentbuilderHelper::$libraryNames)) + { + $data['name'] = $this->generateUniqe('name', $data['name']); + } // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) diff --git a/admin/models/library_config.php b/admin/models/library_config.php new file mode 100644 index 000000000..8cfc4ac10 --- /dev/null +++ b/admin/models/library_config.php @@ -0,0 +1,882 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla modelform library +jimport('joomla.application.component.modeladmin'); + +/** + * Componentbuilder Library_config Model + */ +class ComponentbuilderModelLibrary_config extends JModelAdmin +{ + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_componentbuilder.library_config'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'library_config', $prefix = 'ComponentbuilderTable', $config = array()) + { + return JTable::getInstance($type, $prefix, $config); + } + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params) && !is_array($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->addconfig)) + { + // Convert the addconfig field to an array. + $addconfig = new Registry; + $addconfig->loadString($item->addconfig); + $item->addconfig = $addconfig->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.library_config'); + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_componentbuilder.library_config', 'library_config', array('control' => 'jform', 'load_data' => $loadData)); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('library_config.edit.state', 'com_componentbuilder.library_config.' . (int) $id)) + || ($id == 0 && !$user->authorise('library_config.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('library_config.edit.created_by', 'com_componentbuilder.library_config.' . (int) $id)) + || ($id == 0 && !$user->authorise('library_config.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('library_config.edit.created', 'com_componentbuilder.library_config.' . (int) $id)) + || ($id == 0 && !$user->authorise('library_config.edit.created', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'administrator/components/com_componentbuilder/models/forms/library_config.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('library_config.delete', 'com_componentbuilder.library_config.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library_config.edit.state', 'com_componentbuilder.library_config.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('library_config.edit.state', 'com_componentbuilder'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('library_config.edit', 'com_componentbuilder.library_config.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('library_config.edit', 'com_componentbuilder'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__componentbuilder_library_config')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.library_config.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqeFields() + { + return false; + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + return true; + } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } + + /** + * Method to perform batch operations on an item or a set of items. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + JArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library_config'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library_config'); + } + + if (!$this->canDo->get('library_config.create') && !$this->canDo->get('library_config.batch')) + { + return false; + } + + // get list of uniqe fields + $uniqeFields = $this->getUniqeFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('library_config.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + + if (!$this->user->authorise('library_config.edit', $contexts[$pk])) + + { + + // Not fatal error + + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + + continue; + + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + $this->table->library = $this->generateUniqe('library',$this->table->library); + + // insert all set values + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library_config'); + } + + if (!$this->canDo->get('library_config.edit') && !$this->canDo->get('library_config.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('library_config.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('library_config.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' === $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // Set the addconfig items to data. + if (isset($data['addconfig']) && is_array($data['addconfig'])) + { + $addconfig = new JRegistry; + $addconfig->loadArray($data['addconfig']); + $data['addconfig'] = (string) $addconfig; + } + elseif (!isset($data['addconfig'])) + { + // Set the empty addconfig to data + $data['addconfig'] = ''; + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the uniqe field for save as copy + if ($input->get('task') === 'save2copy') + { + // Automatic handling of other uniqe fields + $uniqeFields = $this->getUniqeFields(); + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUniqe($field,$value) + { + + // set field value uniqe + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = JString::increment($value); + } + + return $value; + } + + /** + * Method to change the title & alias. + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = JString::increment($title); + } + + return $title; + } +} diff --git a/admin/models/library_files_folders_urls.php b/admin/models/library_files_folders_urls.php new file mode 100644 index 000000000..180b7d5c5 --- /dev/null +++ b/admin/models/library_files_folders_urls.php @@ -0,0 +1,924 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla modelform library +jimport('joomla.application.component.modeladmin'); + +/** + * Componentbuilder Library_files_folders_urls Model + */ +class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin +{ + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_componentbuilder.library_files_folders_urls'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'library_files_folders_urls', $prefix = 'ComponentbuilderTable', $config = array()) + { + return JTable::getInstance($type, $prefix, $config); + } + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params) && !is_array($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->addurls)) + { + // Convert the addurls field to an array. + $addurls = new Registry; + $addurls->loadString($item->addurls); + $item->addurls = $addurls->toArray(); + } + + if (!empty($item->addfolders)) + { + // Convert the addfolders field to an array. + $addfolders = new Registry; + $addfolders->loadString($item->addfolders); + $item->addfolders = $addfolders->toArray(); + } + + if (!empty($item->addfiles)) + { + // Convert the addfiles field to an array. + $addfiles = new Registry; + $addfiles->loadString($item->addfiles); + $item->addfiles = $addfiles->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.library_files_folders_urls'); + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_componentbuilder.library_files_folders_urls', 'library_files_folders_urls', array('control' => 'jform', 'load_data' => $loadData)); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('library_files_folders_urls.edit.state', 'com_componentbuilder.library_files_folders_urls.' . (int) $id)) + || ($id == 0 && !$user->authorise('library_files_folders_urls.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('library_files_folders_urls.edit.created_by', 'com_componentbuilder.library_files_folders_urls.' . (int) $id)) + || ($id == 0 && !$user->authorise('library_files_folders_urls.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('library_files_folders_urls.edit.created', 'com_componentbuilder.library_files_folders_urls.' . (int) $id)) + || ($id == 0 && !$user->authorise('library_files_folders_urls.edit.created', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'administrator/components/com_componentbuilder/models/forms/library_files_folders_urls.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('library_files_folders_urls.delete', 'com_componentbuilder.library_files_folders_urls.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library_files_folders_urls.edit.state', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('library_files_folders_urls.edit.state', 'com_componentbuilder'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('library_files_folders_urls.edit', 'com_componentbuilder.library_files_folders_urls.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('library_files_folders_urls.edit', 'com_componentbuilder'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__componentbuilder_library_files_folders_urls')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.library_files_folders_urls.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqeFields() + { + return false; + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + return true; + } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } + + /** + * Method to perform batch operations on an item or a set of items. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + JArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls'); + } + + if (!$this->canDo->get('library_files_folders_urls.create') && !$this->canDo->get('library_files_folders_urls.batch')) + { + return false; + } + + // get list of uniqe fields + $uniqeFields = $this->getUniqeFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('library_files_folders_urls.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + + if (!$this->user->authorise('library_files_folders_urls.edit', $contexts[$pk])) + + { + + // Not fatal error + + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + + continue; + + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + $this->table->library = $this->generateUniqe('library',$this->table->library); + + // insert all set values + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls'); + } + + if (!$this->canDo->get('library_files_folders_urls.edit') && !$this->canDo->get('library_files_folders_urls.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('library_files_folders_urls.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('library_files_folders_urls.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' === $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // Set the addurls items to data. + if (isset($data['addurls']) && is_array($data['addurls'])) + { + $addurls = new JRegistry; + $addurls->loadArray($data['addurls']); + $data['addurls'] = (string) $addurls; + } + elseif (!isset($data['addurls'])) + { + // Set the empty addurls to data + $data['addurls'] = ''; + } + + // Set the addfolders items to data. + if (isset($data['addfolders']) && is_array($data['addfolders'])) + { + $addfolders = new JRegistry; + $addfolders->loadArray($data['addfolders']); + $data['addfolders'] = (string) $addfolders; + } + elseif (!isset($data['addfolders'])) + { + // Set the empty addfolders to data + $data['addfolders'] = ''; + } + + // Set the addfiles items to data. + if (isset($data['addfiles']) && is_array($data['addfiles'])) + { + $addfiles = new JRegistry; + $addfiles->loadArray($data['addfiles']); + $data['addfiles'] = (string) $addfiles; + } + elseif (!isset($data['addfiles'])) + { + // Set the empty addfiles to data + $data['addfiles'] = ''; + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the uniqe field for save as copy + if ($input->get('task') === 'save2copy') + { + // Automatic handling of other uniqe fields + $uniqeFields = $this->getUniqeFields(); + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUniqe($field,$value) + { + + // set field value uniqe + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = JString::increment($value); + } + + return $value; + } + + /** + * Method to change the title & alias. + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = JString::increment($title); + } + + return $title; + } +} diff --git a/admin/models/site_view.php b/admin/models/site_view.php index 8c7263221..ab413b249 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -79,7 +79,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -95,6 +95,14 @@ class ComponentbuilderModelSite_view extends JModelAdmin $item->metadata = $registry->toArray(); } + if (!empty($item->libraries)) + { + // Convert the libraries field to an array. + $libraries = new Registry; + $libraries->loadString($item->libraries); + $item->libraries = $libraries->toArray(); + } + if (!empty($item->custom_get)) { // Convert the custom_get field to an array. @@ -119,42 +127,48 @@ class ComponentbuilderModelSite_view extends JModelAdmin $item->custom_button = $custom_button->toArray(); } - if (!empty($item->css)) - { - // base64 Decode css. - $item->css = base64_decode($item->css); - } - if (!empty($item->js_document)) { // base64 Decode js_document. $item->js_document = base64_decode($item->js_document); } + if (!empty($item->css)) + { + // base64 Decode css. + $item->css = base64_decode($item->css); + } + if (!empty($item->css_document)) { // base64 Decode css_document. $item->css_document = base64_decode($item->css_document); } - if (!empty($item->default)) - { - // base64 Decode default. - $item->default = base64_decode($item->default); - } - if (!empty($item->php_ajaxmethod)) { // base64 Decode php_ajaxmethod. $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); } + if (!empty($item->default)) + { + // base64 Decode default. + $item->default = base64_decode($item->default); + } + if (!empty($item->php_model)) { // base64 Decode php_model. $item->php_model = base64_decode($item->php_model); } + if (!empty($item->php_controller)) + { + // base64 Decode php_controller. + $item->php_controller = base64_decode($item->php_controller); + } + if (!empty($item->php_document)) { // base64 Decode php_document. @@ -173,12 +187,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin $item->php_jview_display = base64_decode($item->php_jview_display); } - if (!empty($item->php_controller)) - { - // base64 Decode php_controller. - $item->php_controller = base64_decode($item->php_controller); - } - if (!empty($item->php_jview)) { // base64 Decode php_jview. @@ -947,6 +955,22 @@ class ComponentbuilderModelSite_view extends JModelAdmin $data['metadata'] = (string) $metadata; } + // always reset the snippets + $data['snippet'] = 0; + + // Set the libraries items to data. + if (isset($data['libraries']) && is_array($data['libraries'])) + { + $libraries = new JRegistry; + $libraries->loadArray($data['libraries']); + $data['libraries'] = (string) $libraries; + } + elseif (!isset($data['libraries'])) + { + // Set the empty libraries to data + $data['libraries'] = ''; + } + // Set the custom_get items to data. if (isset($data['custom_get']) && is_array($data['custom_get'])) { @@ -986,42 +1010,48 @@ class ComponentbuilderModelSite_view extends JModelAdmin $data['custom_button'] = ''; } - // Set the css string to base64 string. - if (isset($data['css'])) - { - $data['css'] = base64_encode($data['css']); - } - // Set the js_document string to base64 string. if (isset($data['js_document'])) { $data['js_document'] = base64_encode($data['js_document']); } + // Set the css string to base64 string. + if (isset($data['css'])) + { + $data['css'] = base64_encode($data['css']); + } + // Set the css_document string to base64 string. if (isset($data['css_document'])) { $data['css_document'] = base64_encode($data['css_document']); } - // Set the default string to base64 string. - if (isset($data['default'])) - { - $data['default'] = base64_encode($data['default']); - } - // Set the php_ajaxmethod string to base64 string. if (isset($data['php_ajaxmethod'])) { $data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']); } + // Set the default string to base64 string. + if (isset($data['default'])) + { + $data['default'] = base64_encode($data['default']); + } + // Set the php_model string to base64 string. if (isset($data['php_model'])) { $data['php_model'] = base64_encode($data['php_model']); } + // Set the php_controller string to base64 string. + if (isset($data['php_controller'])) + { + $data['php_controller'] = base64_encode($data['php_controller']); + } + // Set the php_document string to base64 string. if (isset($data['php_document'])) { @@ -1040,12 +1070,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin $data['php_jview_display'] = base64_encode($data['php_jview_display']); } - // Set the php_controller string to base64 string. - if (isset($data['php_controller'])) - { - $data['php_controller'] = base64_encode($data['php_controller']); - } - // Set the php_jview string to base64 string. if (isset($data['php_jview'])) { diff --git a/admin/models/site_views.php b/admin/models/site_views.php index 016b8c7b8..06f0e3599 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -266,26 +266,26 @@ class ComponentbuilderModelSite_views extends JModelList continue; } - // decode css - $item->css = base64_decode($item->css); // decode js_document $item->js_document = base64_decode($item->js_document); + // decode css + $item->css = base64_decode($item->css); // decode css_document $item->css_document = base64_decode($item->css_document); - // decode default - $item->default = base64_decode($item->default); // decode php_ajaxmethod $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); + // decode default + $item->default = base64_decode($item->default); // decode php_model $item->php_model = base64_decode($item->php_model); + // decode php_controller + $item->php_controller = base64_decode($item->php_controller); // decode php_document $item->php_document = base64_decode($item->php_document); // decode php_view $item->php_view = base64_decode($item->php_view); // decode php_jview_display $item->php_jview_display = base64_decode($item->php_jview_display); - // decode php_controller - $item->php_controller = base64_decode($item->php_controller); // decode php_jview $item->php_jview = base64_decode($item->php_jview); // unset the values we don't want exported. diff --git a/admin/models/snippet.php b/admin/models/snippet.php index cdc62bd98..2145db412 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -79,7 +79,7 @@ class ComponentbuilderModelSnippet extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/snippet_type.php b/admin/models/snippet_type.php index 131a60d17..08c2c5f6d 100644 --- a/admin/models/snippet_type.php +++ b/admin/models/snippet_type.php @@ -79,7 +79,7 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/snippets.php b/admin/models/snippets.php index b312c9980..972eb27d0 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -317,7 +317,7 @@ class ComponentbuilderModelSnippets extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.url LIKE '.$search.' OR a.type LIKE '.$search.' OR a.heading LIKE '.$search.' OR a.library LIKE '.$search.' OR a.description LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.url LIKE '.$search.' OR a.type LIKE '.$search.' OR g.name LIKE '.$search.' OR a.heading LIKE '.$search.' OR a.library LIKE '.$search.' OR h.name LIKE '.$search.' OR a.description LIKE '.$search.')'); } } diff --git a/admin/models/template.php b/admin/models/template.php index 7a28966ba..eb901d4c6 100644 --- a/admin/models/template.php +++ b/admin/models/template.php @@ -79,7 +79,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -95,6 +95,14 @@ class ComponentbuilderModelTemplate extends JModelAdmin $item->metadata = $registry->toArray(); } + if (!empty($item->libraries)) + { + // Convert the libraries field to an array. + $libraries = new Registry; + $libraries->loadString($item->libraries); + $item->libraries = $libraries->toArray(); + } + if (!empty($item->template)) { // base64 Decode template. @@ -830,6 +838,22 @@ class ComponentbuilderModelTemplate extends JModelAdmin $data['metadata'] = (string) $metadata; } + // always reset the snippets + $data['snippet'] = 0; + + // Set the libraries items to data. + if (isset($data['libraries']) && is_array($data['libraries'])) + { + $libraries = new JRegistry; + $libraries->loadArray($data['libraries']); + $data['libraries'] = (string) $libraries; + } + elseif (!isset($data['libraries'])) + { + // Set the empty libraries to data + $data['libraries'] = ''; + } + // Set the template string to base64 string. if (isset($data['template'])) { diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 5e2054418..07e98b49b 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -272,6 +272,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( `dynamic_get` INT(11) NOT NULL DEFAULT 0, `icon` CHAR(64) NOT NULL DEFAULT '', `js_document` TEXT NOT NULL, + `libraries` TEXT NOT NULL, `main_get` INT(11) NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL DEFAULT '', `not_required` INT(1) NOT NULL DEFAULT 0, @@ -304,12 +305,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( KEY `idx_name` (`name`), KEY `idx_codename` (`codename`), KEY `idx_add_php_jview` (`add_php_jview`), - KEY `idx_add_php_view` (`add_php_view`), KEY `idx_add_css_document` (`add_css_document`), + KEY `idx_add_php_document` (`add_php_document`), KEY `idx_add_php_jview_display` (`add_php_jview_display`), KEY `idx_add_js_document` (`add_js_document`), KEY `idx_add_css` (`add_css`), - KEY `idx_add_php_document` (`add_php_document`), + KEY `idx_add_php_view` (`add_php_view`), KEY `idx_main_get` (`main_get`), KEY `idx_dynamic_get` (`dynamic_get`), KEY `idx_add_custom_button` (`add_custom_button`) @@ -338,6 +339,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( `description` VARCHAR(255) NOT NULL DEFAULT '', `dynamic_get` INT(11) NOT NULL DEFAULT 0, `js_document` TEXT NOT NULL, + `libraries` TEXT NOT NULL, `main_get` INT(11) NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL DEFAULT '', `not_required` INT(1) NOT NULL DEFAULT 0, @@ -375,10 +377,10 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( KEY `idx_add_php_view` (`add_php_view`), KEY `idx_add_php_jview` (`add_php_jview`), KEY `idx_add_js_document` (`add_js_document`), - KEY `idx_main_get` (`main_get`), KEY `idx_add_css_document` (`add_css_document`), - KEY `idx_dynamic_get` (`dynamic_get`), + KEY `idx_main_get` (`main_get`), KEY `idx_add_css` (`add_css`), + KEY `idx_dynamic_get` (`dynamic_get`), KEY `idx_add_php_ajax` (`add_php_ajax`), KEY `idx_add_custom_button` (`add_custom_button`), KEY `idx_button_position` (`button_position`) @@ -391,6 +393,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_template` ( `alias` VARCHAR(255) NOT NULL DEFAULT '', `description` VARCHAR(255) NOT NULL DEFAULT '', `dynamic_get` INT(11) NOT NULL DEFAULT 0, + `libraries` TEXT NOT NULL, `name` VARCHAR(255) NOT NULL DEFAULT '', `not_required` INT(1) NOT NULL DEFAULT 0, `php_view` MEDIUMTEXT NOT NULL, @@ -428,6 +431,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_layout` ( `description` VARCHAR(255) NOT NULL DEFAULT '', `dynamic_get` INT(11) NOT NULL DEFAULT 0, `layout` TEXT NOT NULL, + `libraries` TEXT NOT NULL, `name` VARCHAR(255) NOT NULL DEFAULT '', `not_required` INT(1) NOT NULL DEFAULT 0, `php_view` MEDIUMTEXT NOT NULL, @@ -560,6 +564,39 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_code` ( KEY `idx_from_line` (`from_line`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconditions` MEDIUMTEXT NOT NULL, + `description` VARCHAR(255) NOT NULL DEFAULT '', + `how` TINYINT(1) NOT NULL DEFAULT 1, + `libraries` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `not_required` INT(1) NOT NULL DEFAULT 0, + `php_setdocument` MEDIUMTEXT NOT NULL, + `type` TINYINT(1) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_name` (`name`), + KEY `idx_how` (`how`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', @@ -1119,11 +1156,11 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( KEY `idx_name` (`name`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( +CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_config` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `description` VARCHAR(255) NOT NULL DEFAULT '', - `name` VARCHAR(255) NOT NULL DEFAULT '', + `addconfig` TEXT NOT NULL, + `library` INT(11) NOT NULL DEFAULT 0, `params` text NOT NULL DEFAULT '', `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -1142,7 +1179,35 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), - KEY `idx_name` (`name`) + KEY `idx_library` (`library`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addfiles` TEXT NOT NULL, + `addfolders` TEXT NOT NULL, + `addurls` TEXT NOT NULL, + `library` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_library` (`library`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; -- @@ -1166,8 +1231,8 @@ INSERT INTO `#__componentbuilder_admin_view` (`id`, `add_css_view`, `add_css_vie -- INSERT INTO `#__componentbuilder_site_view` (`id`, `add_css_document`, `add_css`, `add_js_document`, `add_php_document`, `add_php_jview`, `add_php_jview_display`, `add_php_view`, `add_php_ajax`, `add_custom_button`, `custom_button`, `button_position`, `php_controller`, `php_model`, `ajax_input`, `php_ajaxmethod`, `codename`, `css_document`, `css`, `custom_get`, `default`, `description`, `dynamic_get`, `js_document`, `main_get`, `name`, `system_name`, `not_required`, `php_document`, `php_jview`, `php_jview_display`, `php_view`, `snippet`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES -(23, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'looks', '', '', '', 'PHRhYmxlIGNsYXNzPSJ1ay10YWJsZSB1ay10YWJsZS1ob3ZlciI+DQogICAgPGNhcHRpb24+PD9waHAgZWNobyBKVGV4dDo6XygnTGlzdCBvZiBhbGwgbG9va3MnKTsgPz48L2NhcHRpb24+DQogICAgPHRoZWFkPg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGg+PD9waHAgZWNobyBKVGV4dDo6XygnTmFtZScpOyA/PjwvdGg+DQogICAgICAgICAgICA8dGg+PD9waHAgZWNobyBKVGV4dDo6XygnRGVzY3JpcHRpb24nKTsgPz48L3RoPg0KICAgICAgICA8L3RyPg0KICAgIDwvdGhlYWQ+DQogICAgPHRib2R5Pg0KICAgICAgICA8P3BocCBmb3JlYWNoICgkdGhpcy0+aXRlbXMgYXMgJGl0ZW0pOiA/Pg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGQ+PGEgaHJlZj0iPD9waHAgZWNobyAgW1tbQ29tcG9uZW50XV1dSGVscGVyUm91dGU6OmdldExvb2tpbmdSb3V0ZSgkaXRlbS0+c2x1Zyk7ID8+IiA+PD9waHAgZWNobyAkaXRlbS0+bmFtZTsgPz48L2E+PC90ZD4NCiAgICAgICAgICAgIDx0ZD48P3BocCBlY2hvICR0aGlzLT5lc2NhcGUoJGl0ZW0tPmRlc2NyaXB0aW9uLCB0cnVlLCAxMjApOyA/Pjw/cGhwIGVjaG8gJGl0ZW0tPmVkaXRMaW5rOyA/PjwvdGQ+DQogICAgICAgIDwvdHI+DQogICAgICAgIDw/cGhwIGVuZGZvcmVhY2g7ID8+DQogICAgPC90Ym9keT4NCjwvdGFibGU+', 'The List of all published looks', 36, '', 36, 'Looks', 'Looks', '', '', '', '', '', 20, '', 1, '2016-04-05 14:31:59', '2016-10-20 15:57:24', 9, '', 14), -(25, '', '', '', '', 1, 1, '', '', '', '', 1, '', '', '', '', 'looking', '', '', '', 'PGFydGljbGUgY2xhc3M9InVrLWNvbW1lbnQiPg0KICAgIDxoZWFkZXIgY2xhc3M9InVrLWNvbW1lbnQtaGVhZGVyIj4NCiAgICAgICAgPGltZyBjbGFzcz0idWstY29tbWVudC1hdmF0YXIiIHNyYz0ie2ltYWdldXJsfSIgYWx0PSIiPg0KICAgICAgICA8aDQgY2xhc3M9InVrLWNvbW1lbnQtdGl0bGUiPjw/cGhwIGVjaG8gJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+bmFtZSk7ID8+PC9oND4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstY29tbWVudC1tZXRhIj48P3BocCBlY2hvIEpUZXh0OjpfKCdIaXRzJyk7ID8+OiA8P3BocCBlY2hvICR0aGlzLT5pdGVtLT5oaXRzOyA/PjwvZGl2Pg0KICAgIDwvaGVhZGVyPg0KICAgIDxkaXYgY2xhc3M9InVrLWNvbW1lbnQtYm9keSI+DQogICAgICAgIDw/cGhwIGVjaG8gJHRoaXMtPml0ZW0tPmRlc2NyaXB0aW9uOyA/Pg0KICAgICAgICA8P3BocCBpZiAoJHRoaXMtPml0ZW0tPmFkZCk6ID8+DQogICAgICAgICAgICA8YnIgLz4NCiAgICAgICAgICAgIDwhLS0gVGhpcyBpcyBhIGJ1dHRvbiB0b2dnbGluZyB0aGUgbW9kYWwgLS0+DQogICAgICAgICAgICA8YnV0dG9uIGNsYXNzPSJ1ay1idXR0b24iIGRhdGEtdWstbW9kYWw9Int0YXJnZXQ6JyNtb3JlLWRldGFpbHMtMDkwJ30iPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ01vcmUgRGV0YWlscycpOyA/PjwvYnV0dG9uPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICA8L2Rpdj4NCjwvYXJ0aWNsZT4NCjw/cGhwIGlmICgkdGhpcy0+aXRlbS0+YWRkKTogPz4NCjwhLS0gVGhpcyBpcyB0aGUgbW9kYWwgLS0+DQo8ZGl2IGlkPSJtb3JlLWRldGFpbHMtMDkwIiBjbGFzcz0idWstbW9kYWwiPg0KICAgIDxkaXYgY2xhc3M9InVrLW1vZGFsLWRpYWxvZyI+DQogICAgICAgIDxhIGNsYXNzPSJ1ay1tb2RhbC1jbG9zZSB1ay1jbG9zZSI+PC9hPg0KICAgICAgICA8ZGwgY2xhc3M9InVrLWRlc2NyaXB0aW9uLWxpc3QtaG9yaXpvbnRhbCI+DQogICAgICAgIDw/cGhwIGlmIChbW1tDb21wb25lbnRdXV1IZWxwZXI6OmNoZWNrU3RyaW5nKCR0aGlzLT5pdGVtLT5kYXRlb2ZiaXJ0aCkpOiA/Pg0KICAgICAgICAgICAgPGR0Pjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ0JpcnRoIGRheScpOyA/PjwvZHQ+PGRkPjw/cGhwIGVjaG8gW1tbQ29tcG9uZW50XV1dSGVscGVyOjpmYW5jeURhdGUoJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+ZGF0ZW9mYmlydGgpKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPD9waHAgaWYgKFtbW0NvbXBvbmVudF1dXUhlbHBlcjo6Y2hlY2tTdHJpbmcoJHRoaXMtPml0ZW0tPmVtYWlsKSk6ID8+DQogICAgICAgICAgICA8ZHQ+PD9waHAgZWNobyBKVGV4dDo6XygnRW1haWwnKTsgPz48L2R0PjxkZD48P3BocCBlY2hvICR0aGlzLT5lc2NhcGUoJHRoaXMtPml0ZW0tPmVtYWlsKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPD9waHAgaWYgKFtbW0NvbXBvbmVudF1dXUhlbHBlcjo6Y2hlY2tTdHJpbmcoJHRoaXMtPml0ZW0tPm1vYmlsZV9waG9uZSkpOiA/Pg0KICAgICAgICAgICAgPGR0Pjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ01vYmlsZScpOyA/PjwvZHQ+PGRkPjw/cGhwIGVjaG8gJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+bW9iaWxlX3Bob25lKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPD9waHAgaWYgKFtbW0NvbXBvbmVudF1dXUhlbHBlcjo6Y2hlY2tTdHJpbmcoJHRoaXMtPml0ZW0tPndlYnNpdGUpKTogPz4NCiAgICAgICAgICAgIDxkdD48P3BocCBlY2hvIEpUZXh0OjpfKCdXZWJzaXRlJyk7ID8+PC9kdD48ZGQ+PD9waHAgZWNobyAkdGhpcy0+ZXNjYXBlKCR0aGlzLT5pdGVtLT53ZWJzaXRlKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPC9kbD4NCiAgICA8L2Rpdj4NCjwvZGl2Pg0KPD9waHAgZW5kaWY7ID8+', 'Looking at a look', 39, '', 39, 'Looking', 'Looking', '', '', 'CSAvKioNCgkgKiBJbmNyZW1lbnQgdGhlIGhpdCBjb3VudGVyIGZvciB0aGUgcHJlYWNoZXIuDQoJICoNCgkgKiBAcGFyYW0gICBpbnRlZ2VyICAkcGsgIFByaW1hcnkga2V5IG9mIHRoZSBwcmVhY2hlciB0byBpbmNyZW1lbnQuDQoJICoNCgkgKiBAcmV0dXJuICBib29sZWFuICBUcnVlIGlmIHN1Y2Nlc3NmdWw7DQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGhpdCgkcGsgPSAwKQ0KCXsNCgkJaWYgKCRwaykNCgkJew0KCQkJJGRiID0gSkZhY3Rvcnk6OmdldERibygpOw0KCQkJJHF1ZXJ5ID0gJGRiLT5nZXRRdWVyeSh0cnVlKTsNCg0KCQkJLy8gRmllbGRzIHRvIHVwZGF0ZS4NCgkJCSRmaWVsZHMgPSBhcnJheSgNCgkJCSAgICAkZGItPnF1b3RlTmFtZSgnaGl0cycpIC4gJyA9ICcuJGRiLT5xdW90ZU5hbWUoJ2hpdHMnKS4nICsgMScNCgkJCSk7DQoNCgkJCS8vIENvbmRpdGlvbnMgZm9yIHdoaWNoIHJlY29yZHMgc2hvdWxkIGJlIHVwZGF0ZWQuDQoJCQkkY29uZGl0aW9ucyA9IGFycmF5KA0KCQkJICAgICRkYi0+cXVvdGVOYW1lKCdpZCcpIC4gJyA9ICcgLiAkcGsNCgkJCSk7DQoNCgkJCSRxdWVyeS0+dXBkYXRlKCRkYi0+cXVvdGVOYW1lKCcjX19bW1tjb21wb25lbnRdXV1fbG9vaycpKS0+c2V0KCRmaWVsZHMpLT53aGVyZSgkY29uZGl0aW9ucyk7DQoNCgkJCSRkYi0+c2V0UXVlcnkoJHF1ZXJ5KTsNCgkJCXJldHVybiAkZGItPmV4ZWN1dGUoKTsNCgkJfQ0KCQlyZXR1cm4gZmFsc2U7DQoJfQ==', 'Ly8gYWRkIGEgaGl0IHRvIHRoZSBsb29rDQppZiAoJHRoaXMtPmhpdCgkdGhpcy0+aXRlbS0+aWQpKQ0Kew0KCSR0aGlzLT5pdGVtLT5oaXRzKys7DQp9', '', 19, '', 1, '2016-10-20 15:11:29', '2016-10-20 17:10:58', 16, '', 14); +(23, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'looks', '', '', '', 'PHRhYmxlIGNsYXNzPSJ1ay10YWJsZSB1ay10YWJsZS1ob3ZlciI+DQogICAgPGNhcHRpb24+PD9waHAgZWNobyBKVGV4dDo6XygnTGlzdCBvZiBhbGwgbG9va3MnKTsgPz48L2NhcHRpb24+DQogICAgPHRoZWFkPg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGg+PD9waHAgZWNobyBKVGV4dDo6XygnTmFtZScpOyA/PjwvdGg+DQogICAgICAgICAgICA8dGg+PD9waHAgZWNobyBKVGV4dDo6XygnRGVzY3JpcHRpb24nKTsgPz48L3RoPg0KICAgICAgICA8L3RyPg0KICAgIDwvdGhlYWQ+DQogICAgPHRib2R5Pg0KICAgICAgICA8P3BocCBmb3JlYWNoICgkdGhpcy0+aXRlbXMgYXMgJGl0ZW0pOiA/Pg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGQ+PGEgaHJlZj0iPD9waHAgZWNobyAgW1tbQ29tcG9uZW50XV1dSGVscGVyUm91dGU6OmdldExvb2tpbmdSb3V0ZSgkaXRlbS0+c2x1Zyk7ID8+IiA+PD9waHAgZWNobyAkaXRlbS0+bmFtZTsgPz48L2E+PC90ZD4NCiAgICAgICAgICAgIDx0ZD48P3BocCBlY2hvICR0aGlzLT5lc2NhcGUoJGl0ZW0tPmRlc2NyaXB0aW9uLCB0cnVlLCAxMjApOyA/Pjw/cGhwIGVjaG8gJGl0ZW0tPmVkaXRMaW5rOyA/PjwvdGQ+DQogICAgICAgIDwvdHI+DQogICAgICAgIDw/cGhwIGVuZGZvcmVhY2g7ID8+DQogICAgPC90Ym9keT4NCjwvdGFibGU+', 'The List of all published looks', 36, '', 36, 'Looks', 'Looks', '', '', '', '', '', '', '', 1, '2016-04-05 14:31:59', '2016-10-20 15:57:24', 9, '', 14), +(25, '', '', '', '', 1, 1, '', '', '', '', 1, '', '', '', '', 'looking', '', '', '', 'PGFydGljbGUgY2xhc3M9InVrLWNvbW1lbnQiPg0KICAgIDxoZWFkZXIgY2xhc3M9InVrLWNvbW1lbnQtaGVhZGVyIj4NCiAgICAgICAgPGltZyBjbGFzcz0idWstY29tbWVudC1hdmF0YXIiIHNyYz0ie2ltYWdldXJsfSIgYWx0PSIiPg0KICAgICAgICA8aDQgY2xhc3M9InVrLWNvbW1lbnQtdGl0bGUiPjw/cGhwIGVjaG8gJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+bmFtZSk7ID8+PC9oND4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstY29tbWVudC1tZXRhIj48P3BocCBlY2hvIEpUZXh0OjpfKCdIaXRzJyk7ID8+OiA8P3BocCBlY2hvICR0aGlzLT5pdGVtLT5oaXRzOyA/PjwvZGl2Pg0KICAgIDwvaGVhZGVyPg0KICAgIDxkaXYgY2xhc3M9InVrLWNvbW1lbnQtYm9keSI+DQogICAgICAgIDw/cGhwIGVjaG8gJHRoaXMtPml0ZW0tPmRlc2NyaXB0aW9uOyA/Pg0KICAgICAgICA8P3BocCBpZiAoJHRoaXMtPml0ZW0tPmFkZCk6ID8+DQogICAgICAgICAgICA8YnIgLz4NCiAgICAgICAgICAgIDwhLS0gVGhpcyBpcyBhIGJ1dHRvbiB0b2dnbGluZyB0aGUgbW9kYWwgLS0+DQogICAgICAgICAgICA8YnV0dG9uIGNsYXNzPSJ1ay1idXR0b24iIGRhdGEtdWstbW9kYWw9Int0YXJnZXQ6JyNtb3JlLWRldGFpbHMtMDkwJ30iPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ01vcmUgRGV0YWlscycpOyA/PjwvYnV0dG9uPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICA8L2Rpdj4NCjwvYXJ0aWNsZT4NCjw/cGhwIGlmICgkdGhpcy0+aXRlbS0+YWRkKTogPz4NCjwhLS0gVGhpcyBpcyB0aGUgbW9kYWwgLS0+DQo8ZGl2IGlkPSJtb3JlLWRldGFpbHMtMDkwIiBjbGFzcz0idWstbW9kYWwiPg0KICAgIDxkaXYgY2xhc3M9InVrLW1vZGFsLWRpYWxvZyI+DQogICAgICAgIDxhIGNsYXNzPSJ1ay1tb2RhbC1jbG9zZSB1ay1jbG9zZSI+PC9hPg0KICAgICAgICA8ZGwgY2xhc3M9InVrLWRlc2NyaXB0aW9uLWxpc3QtaG9yaXpvbnRhbCI+DQogICAgICAgIDw/cGhwIGlmIChbW1tDb21wb25lbnRdXV1IZWxwZXI6OmNoZWNrU3RyaW5nKCR0aGlzLT5pdGVtLT5kYXRlb2ZiaXJ0aCkpOiA/Pg0KICAgICAgICAgICAgPGR0Pjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ0JpcnRoIGRheScpOyA/PjwvZHQ+PGRkPjw/cGhwIGVjaG8gW1tbQ29tcG9uZW50XV1dSGVscGVyOjpmYW5jeURhdGUoJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+ZGF0ZW9mYmlydGgpKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPD9waHAgaWYgKFtbW0NvbXBvbmVudF1dXUhlbHBlcjo6Y2hlY2tTdHJpbmcoJHRoaXMtPml0ZW0tPmVtYWlsKSk6ID8+DQogICAgICAgICAgICA8ZHQ+PD9waHAgZWNobyBKVGV4dDo6XygnRW1haWwnKTsgPz48L2R0PjxkZD48P3BocCBlY2hvICR0aGlzLT5lc2NhcGUoJHRoaXMtPml0ZW0tPmVtYWlsKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPD9waHAgaWYgKFtbW0NvbXBvbmVudF1dXUhlbHBlcjo6Y2hlY2tTdHJpbmcoJHRoaXMtPml0ZW0tPm1vYmlsZV9waG9uZSkpOiA/Pg0KICAgICAgICAgICAgPGR0Pjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ01vYmlsZScpOyA/PjwvZHQ+PGRkPjw/cGhwIGVjaG8gJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+bW9iaWxlX3Bob25lKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPD9waHAgaWYgKFtbW0NvbXBvbmVudF1dXUhlbHBlcjo6Y2hlY2tTdHJpbmcoJHRoaXMtPml0ZW0tPndlYnNpdGUpKTogPz4NCiAgICAgICAgICAgIDxkdD48P3BocCBlY2hvIEpUZXh0OjpfKCdXZWJzaXRlJyk7ID8+PC9kdD48ZGQ+PD9waHAgZWNobyAkdGhpcy0+ZXNjYXBlKCR0aGlzLT5pdGVtLT53ZWJzaXRlKTsgPz48L2RkPg0KICAgICAgICA8P3BocCBlbmRpZjsgPz4NCiAgICAgICAgPC9kbD4NCiAgICA8L2Rpdj4NCjwvZGl2Pg0KPD9waHAgZW5kaWY7ID8+', 'Looking at a look', 39, '', 39, 'Looking', 'Looking', '', '', 'CSAvKioNCgkgKiBJbmNyZW1lbnQgdGhlIGhpdCBjb3VudGVyIGZvciB0aGUgcHJlYWNoZXIuDQoJICoNCgkgKiBAcGFyYW0gICBpbnRlZ2VyICAkcGsgIFByaW1hcnkga2V5IG9mIHRoZSBwcmVhY2hlciB0byBpbmNyZW1lbnQuDQoJICoNCgkgKiBAcmV0dXJuICBib29sZWFuICBUcnVlIGlmIHN1Y2Nlc3NmdWw7DQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGhpdCgkcGsgPSAwKQ0KCXsNCgkJaWYgKCRwaykNCgkJew0KCQkJJGRiID0gSkZhY3Rvcnk6OmdldERibygpOw0KCQkJJHF1ZXJ5ID0gJGRiLT5nZXRRdWVyeSh0cnVlKTsNCg0KCQkJLy8gRmllbGRzIHRvIHVwZGF0ZS4NCgkJCSRmaWVsZHMgPSBhcnJheSgNCgkJCSAgICAkZGItPnF1b3RlTmFtZSgnaGl0cycpIC4gJyA9ICcuJGRiLT5xdW90ZU5hbWUoJ2hpdHMnKS4nICsgMScNCgkJCSk7DQoNCgkJCS8vIENvbmRpdGlvbnMgZm9yIHdoaWNoIHJlY29yZHMgc2hvdWxkIGJlIHVwZGF0ZWQuDQoJCQkkY29uZGl0aW9ucyA9IGFycmF5KA0KCQkJICAgICRkYi0+cXVvdGVOYW1lKCdpZCcpIC4gJyA9ICcgLiAkcGsNCgkJCSk7DQoNCgkJCSRxdWVyeS0+dXBkYXRlKCRkYi0+cXVvdGVOYW1lKCcjX19bW1tjb21wb25lbnRdXV1fbG9vaycpKS0+c2V0KCRmaWVsZHMpLT53aGVyZSgkY29uZGl0aW9ucyk7DQoNCgkJCSRkYi0+c2V0UXVlcnkoJHF1ZXJ5KTsNCgkJCXJldHVybiAkZGItPmV4ZWN1dGUoKTsNCgkJfQ0KCQlyZXR1cm4gZmFsc2U7DQoJfQ==', 'Ly8gYWRkIGEgaGl0IHRvIHRoZSBsb29rDQppZiAoJHRoaXMtPmhpdCgkdGhpcy0+aXRlbS0+aWQpKQ0Kew0KCSR0aGlzLT5pdGVtLT5oaXRzKys7DQp9', '', '', '', 1, '2016-10-20 15:11:29', '2016-10-20 17:10:58', 16, '', 14); @@ -1184,103 +1249,16 @@ INSERT INTO `#__componentbuilder_dynamic_get` (`id`, `add_php_after_getitem`, `a -- --- Dumping data for table `#__componentbuilder_snippet` +-- Dumping data for table `#__componentbuilder_library` -- -INSERT INTO `#__componentbuilder_snippet` (`id`, `description`, `library`, `heading`, `name`, `snippet`, `type`, `url`, `usage`, `params`, `published`, `version`, `hits`, `ordering`, `contributor_company`, `contributor_email`, `contributor_name`, `contributor_website`) VALUES -(1, 'The grid system of UIkit follows the mobile-first approach and accomodates up to 10 grid columns. It uses units with predefined classes inside each grid, which define the column width. It is also possible to combine the grid with classes from the Flex component, although it works only in modern browsers.', 4, 'Create a fully responsive, fluid and nestable grid layout.', 'Grid', 'PGRpdiBkYXRhLXVrLWdyaWQtbWFyZ2luPSIiIGNsYXNzPSJ0bS1ncmlkLXRydW5jYXRlIHVrLWdyaWQgdWstZ3JpZC1kaXZpZGVyIHVrLXRleHQtY2VudGVyIj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1tZWRpdW0tMS0zIj4NCiAgICAJPGRpdiBjbGFzcz0idWstcGFuZWwgdWstcGFuZWwtYm94Ij4NCiAgICAgICAgCXtjb250ZW50fQ0KICAgICAgICA8L2Rpdj4NCiAgICA8L2Rpdj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1tZWRpdW0tMS0zIj4NCiAgICAJPGRpdiBjbGFzcz0idWstcGFuZWwgdWstcGFuZWwtYm94Ij4NCiAgICAgICAgCXtjb250ZW50fQ0KICAgICAgICA8L2Rpdj4NCiAgICA8L2Rpdj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1tZWRpdW0tMS0zIj4NCiAgICAJPGRpdiBjbGFzcz0idWstcGFuZWwgdWstcGFuZWwtYm94Ij4NCiAgICAgICAgCXtjb250ZW50fQ0KICAgICAgICA8L2Rpdj4NCiAgICA8L2Rpdj4NCjwvZGl2Pg==', 1, 'http://getuikit.com/docs/grid.html', 'To create the grid container, add the .uk-grid class to a parent element. Add one of the .uk-width-* classes to child elements to determine, how the units shall be sized. The grid supports 1, 2, 3, 4, 5, 6 and 10 unit divisions. This table gives you an overview of the uk-width-* classes that can be applied to units.', '', 1, 73, '', 1, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(2, 'UIkit uses panels to outline certain sections of your content, which can be styled differently. Typically, panels are arranged in grid columns from the Grid component.', 4, 'Create layout boxes with different styles.', 'Panel', 'PGRpdiBkYXRhLXVrLWdyaWQtbWFyZ2luPSIiIGNsYXNzPSJ1ay1ncmlkIj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1tZWRpdW0tMS0yIj4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstcGFuZWwgdWstcGFuZWwtYm94Ij4NCiAgICAgICAgICAgIDxoMyBjbGFzcz0idWstcGFuZWwtdGl0bGUiPnt0aXRsZX08L2gzPg0KICAgICAgICAgICAge2NvbnRlbnR9DQogICAgICAgIDwvZGl2Pg0KICAgIDwvZGl2Pg0KICAgIDxkaXYgY2xhc3M9InVrLXdpZHRoLW1lZGl1bS0xLTIiPg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1wYW5lbCB1ay1wYW5lbC1ib3giPg0KICAgICAgICAgICAgPGgzIGNsYXNzPSJ1ay1wYW5lbC10aXRsZSI+e3RpdGxlfTwvaDM+DQogICAgICAgICAgICB7Y29udGVudH0NCiAgICAgICAgPC9kaXY+DQogICAgPC9kaXY+DQo8L2Rpdj4=', 1, 'http://getuikit.com/docs/panel.html', 'The Panel component consists of the panel itself, the panel title and a panel badge. To prevent redundant white space, top and bottom margins are removed from the panel\'s content.', '', 1, 67, '', 1, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(3, '', 4, 'Separate content sections by bundling them in blocks with different styles.', 'Block', 'PGRpdiBjbGFzcz0idWstYmxvY2sgdWstYmxvY2stcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+', 1, 'http://getuikit.com/docs/block.html', 'To apply this component, just add the .uk-block class to a container element.', '', 1, 56, '', 2, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(4, '', 4, 'Create articles within your page.', 'Article', 'PGFydGljbGUgY2xhc3M9InVrLWFydGljbGUiPg0KICAgIDxoMSBjbGFzcz0idWstYXJ0aWNsZS10aXRsZSI+e3RpdGxlfTwvaDE+DQogICAgPHAgY2xhc3M9InVrLWFydGljbGUtbWV0YSI+e21ldGF9PC9wPg0KICAgIDxwIGNsYXNzPSJ1ay1hcnRpY2xlLWxlYWQiPntjb250ZW50fTwvcD4NCiAgICB7Y29udGVudH0NCiAgICA8aHIgY2xhc3M9InVrLWFydGljbGUtZGl2aWRlciI+DQogICAge2NvbnRlbnR9DQo8L2FydGljbGU+', 1, 'http://getuikit.com/docs/article.html', 'The article component consists of the article itself, a title, meta data, an opening paragraph and dividers.', '', 1, 53, '', 3, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(5, '', 4, 'Create comments, for example about articles.', 'Comment', 'PGFydGljbGUgY2xhc3M9InVrLWNvbW1lbnQiPg0KICAgIDxoZWFkZXIgY2xhc3M9InVrLWNvbW1lbnQtaGVhZGVyIj4NCiAgICAgICAgPGltZyBjbGFzcz0idWstY29tbWVudC1hdmF0YXIiIHNyYz0ie2ltYWdldXJsfSIgYWx0PSIiPg0KICAgICAgICA8aDQgY2xhc3M9InVrLWNvbW1lbnQtdGl0bGUiPnt0aXRsZX08L2g0Pg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1jb21tZW50LW1ldGEiPnttZXRhfTwvZGl2Pg0KICAgIDwvaGVhZGVyPg0KICAgIDxkaXYgY2xhc3M9InVrLWNvbW1lbnQtYm9keSI+e3RpdGxlfTwvZGl2Pg0KPC9hcnRpY2xlPg==', 1, 'http://getuikit.com/docs/comment.html', 'The Comment component consists of a comment header, including an avatar, a title and meta data, and a comment body.', '', 1, 54, '', 4, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(6, '', 4, 'A collection of useful utility classes to style your content.', 'Utility Container', 'PGRpdiBjbGFzcz0idWstd2lkdGgtbWVkaXVtLTEtMiB1ay1jb250YWluZXItY2VudGVyIj57Y29udGVudH08L2Rpdj4=', 1, 'http://getuikit.com/docs/utility.html', 'Add the .uk-container class to a block element to give it a max-width and wrap the main content of your website. For large screens it applies a different max-width.\r\n\r\nTo center the container, use the .uk-container-center class. For any other block element, you additionally need to apply a width.', '', 1, 54, '', 5, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(7, '', 4, 'A collection of useful utility classes to style your content.', 'Utility Clearing and floating', 'PGRpdiBjbGFzcz0idWstY2xlYXJmaXgiPg0KICAgIDxkaXYgY2xhc3M9InVrLWZsb2F0LXJpZ2h0Ij57Y29udGVudH08L2Rpdj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay1mbG9hdC1sZWZ0Ij57Y29udGVudH08L2Rpdj4NCjwvZGl2Pg==', 1, 'http://getuikit.com/docs/utility.html', 'Floating is fundamental for creating all kinds of layouts. But floats need to be cleared or in the worst case, you might end up with a scrambled site. The following classes will help you to setup basic layouts.', '', 1, 54, '', 5, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(8, 'This component uses Flexbox, a concept that is still quite new but extremely powerful for creating layouts.', 4, 'Utilize the power of Flexbox to create a wide range of layouts.', 'Flex', 'PGRpdiBjbGFzcz0idWstZmxleCB1ay1mbGV4LXdyYXAgdWstZmxleC13cmFwLXJldmVyc2UgdWstZmxleC13cmFwLXNwYWNlLWFyb3VuZCI+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0yIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSB1ay1tYXJnaW4tbGVmdCI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSB1ay1tYXJnaW4tbGVmdCI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0yIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSI+e2NvbnRlbnR9PC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtMS0zIHVrLXBhbmVsIHVrLXBhbmVsLWJveCB1ay1wYW5lbC1ib3gtcHJpbWFyeSB1ay1tYXJnaW4tbGVmdCI+e2NvbnRlbnR9PC9kaXY+DQo8L2Rpdj4=', 1, 'http://getuikit.com/docs/flex.html', 'To apply this component, just add the .uk-flex class to a element. This will create the flex container. By default, all flex items will be aligned to the left and equally matched in height and width.', '', 1, 55, '', 5, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(9, 'This component allows you to create fullscreen teasers using images, objects or even iframes. Regardless what kind of element, it will always be centered vertically and horizontally and cover its container without losing its proportions. You can also place additional content, like text or an image, on top of the image or video.', 4, 'Expand images or videos to cover their entire container.', 'Cover', 'PGRpdiBjbGFzcz0idWstY292ZXIiPg0KICAgIDx2aWRlbyBjbGFzcz0idWstY292ZXItb2JqZWN0IiB3aWR0aD0iIiBoZWlnaHQ9IiI+DQogICAgICAgIDxzb3VyY2Ugc3JjPSIiIHR5cGU9IiI+DQogICAgPC92aWRlbz4NCjwvZGl2Pg0KDQo8ZGl2IGNsYXNzPSJ1ay1jb3Zlci1iYWNrZ3JvdW5kIj4NCiAgICA8aW1nIGNsYXNzPSJ1ay1pbnZpc2libGUiIHNyYz0iIiB3aWR0aD0iIiBoZWlnaHQ9IiIgYWx0PSIiPg0KPC9kaXY+DQoNCjxkaXYgY2xhc3M9InVrLWNvdmVyIHVrLXBvc2l0aW9uLXJlbGF0aXZlIj4NCiAgICA8aW1nIGNsYXNzPSJ1ay1pbnZpc2libGUiIHNyYz0iIiB3aWR0aD0iIiBoZWlnaHQ9IiIgYWx0PSIiPg0KICAgIDx2aWRlbyBjbGFzcz0idWstY292ZXItb2JqZWN0IHVrLXBvc2l0aW9uLWFic29sdXRlIiB3aWR0aD0iIiBoZWlnaHQ9IiI+DQogICAgICAgIDxzb3VyY2Ugc3JjPSIiIHR5cGU9IiI+DQogICAgPC92aWRlbz4NCjwvZGl2Pg0KDQo8ZGl2IGNsYXNzPSJ1ay1jb3Zlci1iYWNrZ3JvdW5kIHVrLXBvc2l0aW9uLXJlbGF0aXZlIj4NCiAgICA8aW1nIGNsYXNzPSJ1ay1pbnZpc2libGUiIHNyYz0iIiB3aWR0aD0iIiBoZWlnaHQ9IiIgYWx0PSIiPg0KICAgIDxkaXYgY2xhc3M9InVrLXBvc2l0aW9uLWNvdmVyIHVrLWZsZXggdWstZmxleC1jZW50ZXIgdWstZmxleC1taWRkbGUiPntjb250ZW50fTwvZGl2Pg0KPC9kaXY+', 1, 'http://getuikit.com/docs/cover.html', 'The Cover component is applied differently, depending on whether you are using a background image, an object or an iframe. The simplest way is to add the .uk-cover-background class to a element with a background image.', '', 1, 54, '', 5, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(10, 'The Dynamic Grid component allows you to create a dynamic and responsive grid layout utilizing the Grid component. Grid items will arrange themselves fluently and seamlessly for a gap-free multi-column layout on all device sizes.', 4, 'Create a multi-column, dynamic grid layout whose items can be sorted and filtered.', 'Dynamic Grid', 'PCEtLSBUaGlzIGlzIGEgZ3JpZCB1c2luZyB1ay13aWR0aC0qIG9uIGVhY2ggaXRlbSAtLT4NCjxkaXYgZGF0YS11ay1ncmlkPg0KICAgIDxkaXYgY2xhc3M9InVrLXdpZHRoLXNtYWxsLTEtMiB1ay13aWR0aC1tZWRpdW0tMS00Ij57Y29udGVudH08L2Rpdj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1zbWFsbC0xLTIgdWstd2lkdGgtbWVkaXVtLTEtNCI+e2NvbnRlbnR9PC9kaXY+DQo8L2Rpdj4NCg0KPCEtLSBUaGlzIGlzIGEgZ3JpZCB1c2luZyB1ay1ncmlkLXdpZHRoLSogb24gdGhlIGdyaWQgaXRzZWxmIC0tPg0KPGRpdiBjbGFzcz0idWstZ3JpZC13aWR0aC1zbWFsbC0xLTIgdWstZ3JpZC13aWR0aC1tZWRpdW0tMS00IiBkYXRhLXVrLWdyaWQ+DQogICAgPGRpdj57Y29udGVudH08L2Rpdj4NCiAgICA8ZGl2Pntjb250ZW50fTwvZGl2Pg0KPC9kaXY+DQoNCjwhLS0gRmlsdGVyIENvbnRyb2xzIC0tPg0KPHVsIGlkPSJteS1pZCIgY2xhc3M9InVrLXN1Ym5hdiI+DQogICAgPGxpIGRhdGEtdWstZmlsdGVyPSIiPjxhIGhyZWY9IiI+QWxsPC9hPjwvbGk+DQogICAgPGxpIGRhdGEtdWstZmlsdGVyPSJmaWx0ZXItYSI+PGEgaHJlZj0iIj5BIEZpbHRlcjwvYT48L2xpPg0KICAgIDxsaSBkYXRhLXVrLWZpbHRlcj0iZmlsdGVyLWIiPjxhIGhyZWY9IiI+YiBGaWx0ZXI8L2E+PC9saT4NCjwvdWw+DQo8IS0tIER5bmFtaWMgR3JpZCAtLT4NCjxkaXYgZGF0YS11ay1ncmlkPSJ7Y29udHJvbHM6ICcjbXktaWQnfSI+DQogICAgPGRpdiBkYXRhLXVrLWZpbHRlcj0iZmlsdGVyLWEiPntjb250ZW50fTwvZGl2Pg0KICAgIDxkaXYgZGF0YS11ay1maWx0ZXI9ImZpbHRlci1iIj57Y29udGVudH08L2Rpdj4NCjwvZGl2Pg==', 1, 'http://getuikit.com/docs/grid-js.html', 'To apply this component, add the data-uk-grid attribute to the container element. Set the width of the grid items by using the uk-width-* or .uk-grid-width-* classes from the Grid component.', '', 1, 53, '', 5, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(11, '', 4, 'Defines different styles for list navigations.', 'Nav', 'PHVsIGNsYXNzPSJ1ay1uYXYgdWstbmF2LXNpZGUiPg0KICAgIDxsaSBjbGFzcz0idWstYWN0aXZlIj48YSBocmVmPSIjIj5BY3RpdmU8L2E+PC9saT4NCiAgICA8bGk+PGEgaHJlZj0iIyI+SXRlbTwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIjIj5JdGVtPC9hPjwvbGk+DQo8L3VsPg==', 2, 'http://getuikit.com/docs/nav.html', 'To apply this component, add the .uk-nav class to an element. Use elements as menu items within the list. To apply an active state to a menu item, just add the .uk-active class.', '', 1, 53, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(12, '', 4, 'Defines different styles for the navigation bar.', 'Navbar', 'PG5hdiBjbGFzcz0idWstbmF2YmFyIj4NCiAgICA8dWwgY2xhc3M9InVrLW5hdmJhci1uYXYiPg0KICAgICAgICA8bGkgY2xhc3M9InVrLWFjdGl2ZSI+PGEgaHJlZj0iIj5BY3RpdmU8L2E+PC9saT4NCiAgICAgICAgPGxpPjxhIGhyZWY9IiI+SXRlbTwvYT48L2xpPg0KICAgICAgICA8bGkgZGF0YS11ay1kcm9wZG93bj0iIiBjbGFzcz0idWstcGFyZW50IiBhcmlhLWhhc3BvcHVwPSJ0cnVlIiBhcmlhLWV4cGFuZGVkPSJmYWxzZSI+DQogICAgICAgICAgICA8YSBocmVmPSIiPlBhcmVudDwvYT4NCiAgICANCiAgICAgICAgICAgIDxkaXYgY2xhc3M9InVrLWRyb3Bkb3duIHVrLWRyb3Bkb3duLW5hdmJhciIgc3R5bGU9IiI+DQogICAgICAgICAgICAgICAgPHVsIGNsYXNzPSJ1ay1uYXYgdWstbmF2LW5hdmJhciI+DQogICAgICAgICAgICAgICAgICAgIDxsaT48YSBocmVmPSIjIj5JdGVtPC9hPjwvbGk+DQogICAgICAgICAgICAgICAgICAgIDxsaT48YSBocmVmPSIjIj5Bbm90aGVyIGl0ZW08L2E+PC9saT4NCiAgICAgICAgICAgICAgICAgICAgPGxpIGNsYXNzPSJ1ay1uYXYtaGVhZGVyIj5IZWFkZXI8L2xpPg0KICAgICAgICAgICAgICAgICAgICA8bGk+PGEgaHJlZj0iIyI+SXRlbTwvYT48L2xpPg0KICAgICAgICAgICAgICAgICAgICA8bGk+PGEgaHJlZj0iIyI+QW5vdGhlciBpdGVtPC9hPjwvbGk+DQogICAgICAgICAgICAgICAgICAgIDxsaSBjbGFzcz0idWstbmF2LWRpdmlkZXIiPjwvbGk+DQogICAgICAgICAgICAgICAgICAgIDxsaT48YSBocmVmPSIjIj5TZXBhcmF0ZWQgaXRlbTwvYT48L2xpPg0KICAgICAgICAgICAgICAgIDwvdWw+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICANCiAgICAgICAgPC9saT4NCiAgICA8L3VsPg0KPC9uYXY+', 2, 'http://getuikit.com/docs/navbar.html', 'The Navbar component consists of the navbar itself and one or more navigations.', '', 1, 53, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(13, '', 4, 'Defines different styles for a sub navigation.', 'Subnav', 'PHVsIGNsYXNzPSJ1ay1zdWJuYXYgdWstc3VibmF2LXBpbGwiPg0KICAgIDxsaSBjbGFzcz0idWstYWN0aXZlIj48YSBocmVmPSIjIj5BY3RpdmU8L2E+PC9saT4NCiAgICA8bGk+PGEgaHJlZj0iIyI+SXRlbTwvYT48L2xpPg0KICAgIDxsaSBjbGFzcz0idWstZGlzYWJsZWQiPjxhIGhyZWY9IiMiPkRpc2FibGVkPC9hPjwvbGk+DQogICAgPGxpIGRhdGEtdWstZHJvcGRvd249Inttb2RlOidjbGljayd9Ij4NCiAgICAgICAgPGEgaHJlZj0iIyI+TW9yZSA8aSBjbGFzcz0idWstaWNvbi1jYXJldC1kb3duIj48L2k+PC9hPg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1kcm9wZG93biB1ay1kcm9wZG93bi1zbWFsbCI+DQogICAgICAgICAgICA8dWwgY2xhc3M9InVrLW5hdiB1ay1uYXYtZHJvcGRvd24iPg0KICAgICAgICAgICAgICAgIDxsaT48YSBocmVmPSIjIj5JdGVtPC9hPjwvbGk+DQogICAgICAgICAgICAgICAgPGxpPjxhIGhyZWY9IiMiPkFub3RoZXIgaXRlbTwvYT48L2xpPg0KICAgICAgICAgICAgICAgIDxsaSBjbGFzcz0idWstbmF2LWhlYWRlciI+SGVhZGVyPC9saT4NCiAgICAgICAgICAgICAgICA8bGk+PGEgaHJlZj0iIyI+SXRlbTwvYT48L2xpPg0KICAgICAgICAgICAgICAgIDxsaT48YSBocmVmPSIjIj5Bbm90aGVyIGl0ZW08L2E+PC9saT4NCiAgICAgICAgICAgICAgICA8bGkgY2xhc3M9InVrLW5hdi1kaXZpZGVyIj48L2xpPg0KICAgICAgICAgICAgICAgIDxsaT48YSBocmVmPSIjIj5TZXBhcmF0ZWQgaXRlbTwvYT48L2xpPg0KICAgICAgICAgICAgPC91bD4NCiAgICAgICAgPC9kaXY+DQogICAgPC9saT4NCjwvdWw+', 2, 'http://getuikit.com/docs/subnav.html', 'To apply this component, use the following classes. To align a subnav, for example to horizontally center it, you can use the Flex component.', '', 1, 53, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(14, '', 4, 'Create breadcrumbs to show users their location within a website.', 'Breadcrumb', 'PHVsIGNsYXNzPSJ1ay1icmVhZGNydW1iIj4NCiAgICA8bGk+PGEgaHJlZj0iIyI+SG9tZTwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIjIj5CbG9nPC9hPjwvbGk+DQogICAgPGxpPjxzcGFuPkNhdGVnb3J5PC9zcGFuPjwvbGk+DQogICAgPGxpIGNsYXNzPSJ1ay1hY3RpdmUiPjxzcGFuPlBvc3Q8L3NwYW4+PC9saT4NCjwvdWw+', 2, 'http://getuikit.com/docs/breadcrumb.html', 'The Breadcrumb component consists of links which are aligned side by side and separated by a divider.', '', 1, 53, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(15, '', 4, 'Easlily create a nicely looking pagination to navigate through pages.', 'Pagination', 'PHVsIGNsYXNzPSJ1ay1wYWdpbmF0aW9uIj4NCiAgICA8bGk+PGEgaHJlZj0iIyI+MTwvYT48L2xpPg0KICAgIDxsaT48c3Bhbj4uLi48L3NwYW4+PC9saT4NCiAgICA8bGk+PGEgaHJlZj0iIyI+ODwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIjIj45PC9hPjwvbGk+DQogICAgPGxpIGNsYXNzPSJ1ay1hY3RpdmUiPjxzcGFuPjEwPC9zcGFuPjwvbGk+DQogICAgPGxpPjxhIGhyZWY9IiMiPjExPC9hPjwvbGk+DQogICAgPGxpPjxhIGhyZWY9IiMiPjEyPC9hPjwvbGk+DQogICAgPGxpPjxzcGFuPi4uLjwvc3Bhbj48L2xpPg0KICAgIDxsaT48YSBocmVmPSIjIj4yMDwvYT48L2xpPg0KPC91bD4=', 2, 'http://getuikit.com/docs/pagination.html', 'The Pagination component consists of button-like styled links, that are aligned side by side.', '', 1, 53, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(16, '', 4, 'Create a tabbed navigation with different styles.', 'Tab', 'PHVsIGNsYXNzPSJ1ay10YWIiIGRhdGEtdWstdGFiPg0KICAgIDxsaSBjbGFzcz0idWstYWN0aXZlIj48YSBocmVmPSIiPkFjdGl2ZTwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIiPkl0ZW08L2E+PC9saT4NCiAgICA8bGk+PGEgaHJlZj0iIj5JdGVtPC9hPjwvbGk+DQogICAgPGxpIGNsYXNzPSJ1ay1kaXNhYmxlZCI+PGEgaHJlZj0iIj5EaXNhYmxlZDwvYT48L2xpPg0KPC91bD4=', 2, 'http://getuikit.com/docs/tab.html', 'The Tab component consists of clickable tabs, that are aligned side by side.\r\n\r\nThe data-uk-tab attribute is required for two purposes. Firstly, it enables the responsive behaviour. If the parent container is too small to accomodate all tabs, they will be combined into a dropdown, toggled by a single tab, which represents the active tab item. This also requires the Dropdown component in order to work.\r\n\r\nAnd secondly, its functionality is coupled to the Switcher component, which is necessary to dynamically transition through different contents using tabbed navigation.', '', 1, 55, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(17, '', 4, 'Create a tabbed navigation with different styles.', 'Thumbnav', 'PHVsIGNsYXNzPSJ1ay10aHVtYm5hdiI+DQogICAgPGxpIGNsYXNzPSJ1ay1hY3RpdmUiPjxhIGhyZWY9IiI+PGltZyBzcmM9IiIgYWx0PSIiPjwvYT48L2xpPg0KICAgIDxsaT48YSBocmVmPSIiPjxpbWcgc3JjPSIiIGFsdD0iIj48L2E+PC9saT4NCjwvdWw+', 2, 'http://getuikit.com/docs/thumbnav.html', 'To apply this component, add the .uk-thumbnav class to an element and nest your thumbnail images inside elements within the list items. The thumbnav will wrap into several rows, if it is wider than its container and automatically applies a gutter. Add the .uk-active class to create an active state.\r\n\r\nTo align a subnav, for example to horizontally center it, you can use the Flex component.', '', 1, 54, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(18, 'Modifiers\r\n\r\nTo display the list in a different style, just add a modifier class to the the .uk-list class. The modifiers of the List component are not combinable with each other.', 4, 'Easily create nicely looking lists, which come in different styles.', 'List', 'PHVsIGNsYXNzPSJ1ay1saXN0IHVrLWxpc3Qtc3RyaXBlZCI+DQogICAgPGxpPi4uLjwvbGk+DQogICAgPGxpPi4uLjwvbGk+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 3, 'http://getuikit.com/docs/list.html', 'To apply this component, add the .uk-list class to an unordered or ordered list. The list will now display without any spacing or list-style. [uk-list-line] [uk-list-space]', '', 1, 54, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(19, 'Add the .uk-description-list-horizontal class to display terms and descriptions side by side.', 4, 'Easily create nicely looking description lists, which come in different styles.', 'Description list', 'PGRsIGNsYXNzPSJ1ay1kZXNjcmlwdGlvbi1saXN0LWhvcml6b250YWwiPg0KICAgIDxkdD4uLi48L2R0Pg0KICAgIDxkZD4uLi48L2RkPg0KPC9kbD4=', 3, 'http://getuikit.com/docs/description-list.html', 'There is no component class necessary to create a description list, but UIkit provides a couple of modifier classes to display the list in a different style. The modifiers of the Description list component are not combinable with each other. [uk-description-list-line]', '', 1, 54, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(20, '', 4, 'Easily create nicely looking tables, which come in different styles.', 'Table', 'PHRhYmxlIGNsYXNzPSJ1ay10YWJsZSB1ay10YWJsZS1ob3ZlciI+DQogICAgPGNhcHRpb24+Li4uPC9jYXB0aW9uPg0KICAgIDx0aGVhZD4NCiAgICAgICAgPHRyPg0KICAgICAgICAgICAgPHRoPi4uLjwvdGg+DQogICAgICAgIDwvdHI+DQogICAgPC90aGVhZD4NCiAgICA8dGZvb3Q+DQogICAgICAgIDx0cj4NCiAgICAgICAgICAgIDx0ZD4uLi48L3RkPg0KICAgICAgICA8L3RyPg0KICAgIDwvdGZvb3Q+DQogICAgPHRib2R5Pg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGQ+Li4uPC90ZD4NCiAgICAgICAgPC90cj4NCiAgICA8L3Rib2R5Pg0KPC90YWJsZT4=', 3, 'http://getuikit.com/docs/table.html', 'To apply this component, add the .uk-table class to a element.', '', 1, 53, '', 6, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(21, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button href', 'PGEgY2xhc3M9InVrLWJ1dHRvbiB1ay1idXR0b24tcHJpbWFyeSIgaHJlZj0iIj4uLi48L2E+', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 11, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(22, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button primary', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLWJ1dHRvbi1wcmltYXJ5IiB0eXBlPSJidXR0b24iPi4uLjwvYnV0dG9uPg==', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(23, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button disabled', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIiB0eXBlPSJidXR0b24iIGRpc2FibGVkPi4uLjwvYnV0dG9uPg==', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(24, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button success', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLWJ1dHRvbi1zdWNjZXNzIiB0eXBlPSJidXR0b24iPi4uLjwvYnV0dG9uPg==', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(25, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button danger', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLWJ1dHRvbi1kYW5nZXIiIHR5cGU9ImJ1dHRvbiI+Li4uPC9idXR0b24+', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(26, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button mini', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLWJ1dHRvbi1wcmltYXJ5IHVrLWJ1dHRvbi1taW5pIiB0eXBlPSJidXR0b24iPi4uLjwvYnV0dG9uPg==', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(27, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button small', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLWJ1dHRvbi1zdWNjZXNzIHVrLWJ1dHRvbi1zbWFsbCIgdHlwZT0iYnV0dG9uIj4uLi48L2J1dHRvbj4=', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(28, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button large', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLWJ1dHRvbi1sYXJnZSIgdHlwZT0iYnV0dG9uIj4uLi48L2J1dHRvbj4=', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(29, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button full width', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIHVrLXdpZHRoLTEtMSB1ay1tYXJnaW4tc21hbGwtYm90dG9tIiB0eXBlPSJidXR0b24iPi4uLjwvYnV0dG9uPg==', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(30, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button group', 'PGRpdiBjbGFzcz0idWstYnV0dG9uLWdyb3VwIj4NCiAgICA8YSBjbGFzcz0idWstYnV0dG9uIiBocmVmPSIiPi4uLjwvYT4NCiAgICA8YnV0dG9uIGNsYXNzPSJ1ay1idXR0b24iPi4uLjwvYnV0dG9uPg0KICAgIDxidXR0b24gY2xhc3M9InVrLWJ1dHRvbiI+Li4uPC9idXR0b24+DQo8L2Rpdj4=', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(31, '', 4, 'Easily create nicely looking buttons, which come in different styles.', 'Button dropdowns', 'PCEtLSBUaGlzIGlzIHRoZSBjb250YWluZXIgZW5hYmxpbmcgdGhlIEphdmFTY3JpcHQgLS0+DQo8ZGl2IGNsYXNzPSJ1ay1idXR0b24tZHJvcGRvd24iIGRhdGEtdWstZHJvcGRvd24+DQoNCiAgICA8IS0tIFRoaXMgaXMgdGhlIGJ1dHRvbiB0b2dnbGluZyB0aGUgZHJvcGRvd24gLS0+DQogICAgPGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIj4uLi48L2J1dHRvbj4NCg0KICAgIDwhLS0gVGhpcyBpcyB0aGUgZHJvcGRvd24gLS0+DQogICAgPGRpdiBjbGFzcz0idWstZHJvcGRvd24gdWstZHJvcGRvd24tc21hbGwiPg0KICAgICAgICA8dWwgY2xhc3M9InVrLW5hdiB1ay1uYXYtZHJvcGRvd24iPg0KICAgICAgICAgICAgPGxpPjxhIGhyZWY9IiI+Li4uPC9hPjwvbGk+DQogICAgICAgICAgICA8bGk+PGEgaHJlZj0iIj4uLi48L2E+PC9saT4NCiAgICAgICAgPC91bD4NCiAgICA8L2Rpdj4NCg0KPC9kaXY+', 4, 'http://getuikit.com/docs/button.html', 'To apply this component, add the .uk-button class to an or element. Now you have created a button. Add the disabled attribute to a element to disable the button.', '', 1, 10, '', 7, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(32, 'This component is using the fantastic Font Awesome icon font, a project by Dave Gandy. Altogether Font Awesome provides more than 300 symbols and glyphs for web-related actions. Icon fonts are great, because they enable you to easily change color, size and more via CSS. They are scalable vector graphics, which means that they look great on high-resolution displays.', 4, 'Place vector icons anywhere using an icon font.', 'Icon', 'PGkgY2xhc3M9InVrLWljb24tY29nIj48L2k+', 4, 'http://getuikit.com/docs/icon.html', 'To apply this component, add any .uk-icon-* class to an or element. Et voilà, you have a vector icon, which inherits size and color just like your text does.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(33, '', 4, 'Easlily create nicely looking badges to label and highlight your content.', 'Badge', 'PGRpdiBjbGFzcz0idWstYmFkZ2UiPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/badge.html', 'To create a badge, just add the .uk-badge class to a or element.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(34, '', 4, 'Defines styles for success, warning and error messages.', 'Alert', 'PGRpdiBjbGFzcz0idWstYWxlcnQgdWstYWxlcnQtc3VjY2VzcyIgZGF0YS11ay1hbGVydD4NCiAgICA8YSBocmVmPSIiIGNsYXNzPSJ1ay1hbGVydC1jbG9zZSB1ay1jbG9zZSI+PC9hPg0KICAgIDxwPi4uLjwvcD4NCjwvZGl2Pg==', 4, 'http://getuikit.com/docs/badge.html', 'To apply this component, add the .uk-alert class to a block element.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(35, '', 4, 'A collection of useful text utility classes to style your content.', 'Text small', 'PHNwYW4gY2xhc3M9InVrLXRleHQtc21hbGwiPkFkZCB0aGlzIGNsYXNzIHRvIGRlY3JlYXNlIHRoZSBmb250IHNpemUuPC9zcGFuPg==', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(36, '', 4, 'A collection of useful text utility classes to style your content.', 'Text large', 'PHNwYW4gY2xhc3M9InVrLXRleHQtbGFyZ2UiPkFkZCB0aGlzIGNsYXNzIHRvIGRlY3JlYXNlIHRoZSBmb250IHNpemUuPC9zcGFuPg==', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(37, '', 4, 'A collection of useful text utility classes to style your content.', 'Text bold', 'PHNwYW4gY2xhc3M9InVrLXRleHQtYm9sZCI+QWRkIHRoaXMgY2xhc3MgdG8gZGVjcmVhc2UgdGhlIGZvbnQgc2l6ZS48L3NwYW4+', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(38, '', 4, 'A collection of useful text utility classes to style your content.', 'Text muted', 'PHNwYW4gY2xhc3M9InVrLXRleHQtbXV0ZWQiPkFkZCB0aGlzIGNsYXNzIHRvIGRlY3JlYXNlIHRoZSBmb250IHNpemUuPC9zcGFuPg==', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(39, '', 4, 'A collection of useful text utility classes to style your content.', 'Text primary', 'PHNwYW4gY2xhc3M9InVrLXRleHQtcHJpbWFyeSI+QWRkIHRoaXMgY2xhc3MgdG8gZGVjcmVhc2UgdGhlIGZvbnQgc2l6ZS48L3NwYW4+', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(40, '', 4, 'A collection of useful text utility classes to style your content.', 'Text success', 'PHNwYW4gY2xhc3M9InVrLXRleHQtc3VjY2VzcyI+QWRkIHRoaXMgY2xhc3MgdG8gZGVjcmVhc2UgdGhlIGZvbnQgc2l6ZS48L3NwYW4+', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(41, '', 4, 'A collection of useful text utility classes to style your content.', 'Text warning', 'PHNwYW4gY2xhc3M9InVrLXRleHQtd2FybmluZyI+QWRkIHRoaXMgY2xhc3MgdG8gZGVjcmVhc2UgdGhlIGZvbnQgc2l6ZS48L3NwYW4+', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(42, '', 4, 'A collection of useful text utility classes to style your content.', 'Text danger', 'PHNwYW4gY2xhc3M9InVrLXRleHQtZGFuZ2VyIj5BZGQgdGhpcyBjbGFzcyB0byBkZWNyZWFzZSB0aGUgZm9udCBzaXplLjwvc3Bhbj4=', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(43, '', 4, 'A collection of useful text utility classes to style your content.', 'Text contrast', 'PHNwYW4gY2xhc3M9InVrLXRleHQtY29udHJhc3QiPkFkZCB0aGlzIGNsYXNzIHRvIGRlY3JlYXNlIHRoZSBmb250IHNpemUuPC9zcGFuPg==', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(44, '', 4, 'A collection of useful text utility classes to style your content.', 'Text right', 'PHNwYW4gY2xhc3M9InVrLXRleHQtcmlnaHQiPkFkZCB0aGlzIGNsYXNzIHRvIGRlY3JlYXNlIHRoZSBmb250IHNpemUuPC9zcGFuPg==', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(45, '', 4, 'A collection of useful text utility classes to style your content.', 'Text center', 'PHNwYW4gY2xhc3M9InVrLXRleHQtY2VudGVyIj5BZGQgdGhpcyBjbGFzcyB0byBkZWNyZWFzZSB0aGUgZm9udCBzaXplLjwvc3Bhbj4=', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(46, '', 4, 'A collection of useful text utility classes to style your content.', 'Text justify', 'PHNwYW4gY2xhc3M9InVrLXRleHQtanVzdGlmeSI+QWRkIHRoaXMgY2xhc3MgdG8gZGVjcmVhc2UgdGhlIGZvbnQgc2l6ZS48L3NwYW4+', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(47, '', 4, 'A collection of useful text utility classes to style your content.', 'Text truncate', 'PHNwYW4gY2xhc3M9InVrLXRleHQtdHJ1bmNhdGUiPkFkZCB0aGlzIGNsYXNzIHRvIGRlY3JlYXNlIHRoZSBmb250IHNpemUuPC9zcGFuPg==', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(48, '', 4, 'A collection of useful text utility classes to style your content.', 'Text nowrap', 'PHNwYW4gY2xhc3M9InVrLXRleHQtbm93cmFwIj5BZGQgdGhpcyBjbGFzcyB0byBkZWNyZWFzZSB0aGUgZm9udCBzaXplLjwvc3Bhbj4=', 4, 'http://getuikit.com/docs/text.html', 'UIkit offers various text utlities to style your text. ', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(49, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation fade', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLWZhZGUiPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(50, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation scale-up', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNjYWxlLXVwIj4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(51, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation scale-down', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNjYWxlLWRvd24iPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(52, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-top', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLXRvcCI+Li4uPC9kaXY+', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(53, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-bottom', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLWJvdHRvbSI+Li4uPC9kaXY+', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(54, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-left', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLWxlZnQiPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(55, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-right', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLXJpZ2h0Ij4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(56, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation shake', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNoYWtlIj4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(57, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation scale', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNjYWxlIj4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(58, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation fade reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLWZhZGUgdWstYW5pbWF0aW9uLXJldmVyc2UiPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 11, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(59, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation scale-up reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNjYWxlLXVwIHVrLWFuaW1hdGlvbi1yZXZlcnNlIj4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(60, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation scale-down reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNjYWxlLWRvd24gdWstYW5pbWF0aW9uLXJldmVyc2UiPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(61, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-top reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLXRvcCB1ay1hbmltYXRpb24tcmV2ZXJzZSI+Li4uPC9kaXY+', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(62, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-bottom reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLWJvdHRvbSB1ay1hbmltYXRpb24tcmV2ZXJzZSI+Li4uPC9kaXY+', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(63, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-left reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLWxlZnQgdWstYW5pbWF0aW9uLXJldmVyc2UiPi4uLjwvZGl2Pg==', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(64, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation slide-right reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNsaWRlLXJpZ2h0IHVrLWFuaW1hdGlvbi1yZXZlcnNlIj4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(65, '', 4, 'A basic collection of smooth animations to use within your page.', 'Animation scale reverse', 'PGRpdiBjbGFzcz0idWstYW5pbWF0aW9uLXNjYWxlIHVrLWFuaW1hdGlvbi1yZXZlcnNlIj4uLi48L2Rpdj4=', 4, 'http://getuikit.com/docs/animation.html', 'To apply this component, add any .uk-animation-* class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(66, '', 4, 'Create modal dialogs with different styles and transitions.', 'Modal default', 'PCEtLSBUaGlzIGlzIGEgYnV0dG9uIHRvZ2dsaW5nIHRoZSBtb2RhbCAtLT4NCjxidXR0b24gY2xhc3M9InVrLWJ1dHRvbiIgZGF0YS11ay1tb2RhbD0ie3RhcmdldDonI215LWlkJ30iPi4uLjwvYnV0dG9uPg0KDQo8IS0tIFRoaXMgaXMgdGhlIG1vZGFsIC0tPg0KPGRpdiBpZD0ibXktaWQiIGNsYXNzPSJ1ay1tb2RhbCI+DQogICAgPGRpdiBjbGFzcz0idWstbW9kYWwtZGlhbG9nIj4NCiAgICAgICAgPGEgY2xhc3M9InVrLW1vZGFsLWNsb3NlIHVrLWNsb3NlIj48L2E+DQogICAgICAgIC4uLg0KICAgIDwvZGl2Pg0KPC9kaXY+', 5, 'http://getuikit.com/docs/modal.html', 'The modal component consists of an overlay, a dialog and a close button.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(67, '', 4, 'Create modal dialogs with different styles and transitions.', 'Modal header-footer', 'PCEtLSBUaGlzIGlzIGEgYnV0dG9uIHRvZ2dsaW5nIHRoZSBtb2RhbCAtLT4NCjxidXR0b24gY2xhc3M9InVrLWJ1dHRvbiIgZGF0YS11ay1tb2RhbD0ie3RhcmdldDonI215LWlkJ30iPi4uLjwvYnV0dG9uPg0KDQo8IS0tIFRoaXMgaXMgdGhlIG1vZGFsIC0tPg0KPGRpdiBpZD0ibXktaWQiIGNsYXNzPSJ1ay1tb2RhbCI+DQogICAgPGRpdiBjbGFzcz0idWstbW9kYWwtZGlhbG9nIj4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstbW9kYWwtaGVhZGVyIj4uLi48L2Rpdj4NCiAgICAgICAgLi4uDQogICAgICAgIDxkaXYgY2xhc3M9InVrLW1vZGFsLWZvb3RlciI+Li4uPC9kaXY+DQogICAgPC9kaXY+DQo8L2Rpdj4=', 5, 'http://getuikit.com/docs/modal.html', 'The modal component consists of an overlay, a dialog and a close button.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(68, '', 4, 'Create modal dialogs with different styles and transitions.', 'Modal image', 'PCEtLSBUaGlzIGlzIGEgYnV0dG9uIHRvZ2dsaW5nIHRoZSBtb2RhbCAtLT4NCjxidXR0b24gY2xhc3M9InVrLWJ1dHRvbiIgZGF0YS11ay1tb2RhbD0ie3RhcmdldDonI215LWlkJ30iPi4uLjwvYnV0dG9uPg0KDQo8IS0tIFRoaXMgaXMgdGhlIG1vZGFsIC0tPg0KPGRpdiBpZD0ibXktaWQiIGNsYXNzPSJ1ay1tb2RhbCI+DQogICAgPGRpdiBjbGFzcz0idWstbW9kYWwtZGlhbG9nIHVrLW1vZGFsLWRpYWxvZy1saWdodGJveCI+DQogICAgICAgIDxhIGhyZWY9IiIgY2xhc3M9InVrLW1vZGFsLWNsb3NlIHVrLWNsb3NlIHVrLWNsb3NlLWFsdCI+PC9hPg0KICAgICAgICA8aW1nIHNyYz0iIiBhbHQ9IiI+DQogICAgPC9kaXY+DQo8L2Rpdj4=', 5, 'http://getuikit.com/docs/modal.html', 'The modal component consists of an overlay, a dialog and a close button.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(69, 'The Off-canvas component is perfect for building a mobile navigation, similar to those which are popular with many native mobile apps, where a single button in the upper left corner toggles an off-canvas sidebar with a menu.', 4, 'Create a smooth off-canvas sidebar that slides in and out of the page.', 'Off-canvas default', 'PCEtLSBUaGlzIGlzIGEgYnV0dG9uIHRvZ2dsaW5nIHRoZSBvZmYtY2FudmFzIHNpZGViYXIgLS0+DQo8YnV0dG9uIGNsYXNzPSJ1ay1idXR0b24iIGRhdGEtdWstb2ZmY2FudmFzPSJ7dGFyZ2V0OicjbXktaWQnfSI+Li4uPC9idXR0b24+DQoNCjwhLS0gVGhpcyBpcyB0aGUgb2ZmLWNhbnZhcyBzaWRlYmFyIC0tPg0KPGRpdiBpZD0ibXktaWQiIGNsYXNzPSJ1ay1vZmZjYW52YXMiPg0KICAgIDxkaXYgY2xhc3M9InVrLW9mZmNhbnZhcy1iYXIiPi4uLjwvZGl2Pg0KPC9kaXY+', 5, 'http://getuikit.com/docs/offcanvas.html', 'The Off-canvas component consists of an overlay and an off-canvas bar.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(70, 'The Off-canvas component is perfect for building a mobile navigation, similar to those which are popular with many native mobile apps, where a single button in the upper left corner toggles an off-canvas sidebar with a menu.', 4, 'Create a smooth off-canvas sidebar that slides in and out of the page.', 'Off-canvas right', 'PCEtLSBUaGlzIGlzIGEgYnV0dG9uIHRvZ2dsaW5nIHRoZSBvZmYtY2FudmFzIHNpZGViYXIgLS0+DQo8YnV0dG9uIGNsYXNzPSJ1ay1idXR0b24iIGRhdGEtdWstb2ZmY2FudmFzPSJ7dGFyZ2V0OicjbXktaWQnfSI+Li4uPC9idXR0b24+DQoNCjwhLS0gVGhpcyBpcyB0aGUgb2ZmLWNhbnZhcyBzaWRlYmFyIC0tPg0KPGRpdiBpZD0ibXktaWQiIGNsYXNzPSJ1ay1vZmZjYW52YXMiPg0KICAgIDxkaXYgY2xhc3M9InVrLW9mZmNhbnZhcy1iYXIgdWstb2ZmY2FudmFzLWJhci1mbGlwIj4uLi48L2Rpdj4NCjwvZGl2Pg==', 5, 'http://getuikit.com/docs/offcanvas.html', 'The Off-canvas component consists of an overlay and an off-canvas bar.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(71, '', 4, 'Dynamically transition through different content panes.', 'Switcher default', 'PCEtLSBUaGlzIGlzIHRoZSBjb250YWluZXIgb2YgdGhlIHRvZ2dsaW5nIGVsZW1lbnRzIC0tPg0KPHVsIGRhdGEtdWstc3dpdGNoZXI9Intjb25uZWN0OicjbXktaWQnfSI+DQogICAgPGxpPjxhIGhyZWY9IiI+Li4uPC9hPjwvbGk+DQo8L3VsPg0KDQo8IS0tIFRoaXMgaXMgdGhlIGNvbnRhaW5lciBvZiB0aGUgY29udGVudCBpdGVtcyAtLT4NCjx1bCBpZD0ibXktaWQiIGNsYXNzPSJ1ay1zd2l0Y2hlciI+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(72, 'In some cases you want to switch to another content section from within the active content. This is possible using the data-uk-switcher-item attribute. To target the items, you need to set the data attribute to the number of the respective content item.', 4, 'Dynamically transition through different content panes.', 'Switcher in-content', 'PCEtLSBUaGlzIGlzIHRoZSBuYXYgY29udGFpbmluZyB0aGUgdG9nZ2xpbmcgZWxlbWVudHMgLS0+DQo8dWwgZGF0YS11ay1zd2l0Y2hlcj0ie2Nvbm5lY3Q6JyNteS1pZCd9Ij4NCiAgICA8bGk+PGEgaHJlZj0iIj4uLi48L2E+PC9saT4NCjwvdWw+DQoNCjwhLS0gVGhpcyBpcyB0aGUgY29udGFpbmVyIG9mIHRoZSBjb250ZW50IGl0ZW1zIC0tPg0KPHVsIGlkPSJteS1pZCIgY2xhc3M9InVrLXN3aXRjaGVyIj4NCiAgICA8bGk+IC4uLiA8YSBocmVmPSIiIGRhdGEtdWstc3dpdGNoZXItaXRlbT0iMCI+Li4uPC9hPjwvbGk+DQogICAgPGxpPiAuLi4gPGEgaHJlZj0iIiBkYXRhLXVrLXN3aXRjaGVyLWl0ZW09IjEiPi4uLjwvYT48L2xpPg0KPC91bD4=', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(73, 'It is also possible to connect multiple content containers. Just extend the connect parameter with the ID of the additional container.', 4, 'Dynamically transition through different content panes.', 'Switcher multiple-items', 'PCEtLSBUaGlzIGlzIHRoZSBuYXYgY29udGFpbmluZyB0aGUgdG9nZ2xpbmcgZWxlbWVudHMgLS0+DQo8dWwgZGF0YS11ay1zd2l0Y2hlcj0ie2Nvbm5lY3Q6JyNteS1pZC1vbmUsICNteS1pZC10d28nfSI+DQogICAgPGxpPjxhIGhyZWY9IiI+Li4uPC9hPjwvbGk+DQo8L3VsPg0KDQo8IS0tIFRoZXNlIGFyZSB0aGUgY29udGFpbmVycyBvZiB0aGUgY29udGVudCBpdGVtcyAtLT4NCjx1bCBpZD0ibXktaWQtb25lIiBjbGFzcz0idWstc3dpdGNoZXIiPg0KICAgIDxsaT4uLi48L2xpPg0KPC91bD4NCg0KPHVsIGlkPSJteS1pZC10d28iIGNsYXNzPSJ1ay1zd2l0Y2hlciI+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(74, 'The Switcher component allows you to add different animations to items when toggling between them. All you need to do is add the animation parameter to the data-attribute and define the animation that you want to apply. Check the table below for an overview of the animations provided.\r\n\r\nYou can also apply multiple animations by using the uk-animation-* classes from the Animation component. That way you can even create your own custom class to apply a different transition to the switcher.', 4, 'Dynamically transition through different content panes.', 'Switcher animation', 'PCEtLSBUaGlzIGlzIHRoZSBjb250YWluZXIgb2YgdGhlIHRvZ2dsaW5nIGVsZW1lbnRzIC0tPg0KPHVsIGRhdGEtdWstc3dpdGNoZXI9Intjb25uZWN0OicjbXktaWQnLCBhbmltYXRpb246ICd1ay1hbmltYXRpb24tZmFkZSwgdWstYW5pbWF0aW9uLXNsaWRlLWxlZnQnfSI+DQogICAgPGxpPjxhIGhyZWY9IiI+Li4uPC9hPjwvbGk+DQo8L3VsPg0KDQo8IS0tIFRoaXMgaXMgdGhlIGNvbnRhaW5lciBvZiB0aGUgY29udGVudCBpdGVtcyAtLT4NCjx1bCBpZD0ibXktaWQiIGNsYXNzPSJ1ay1zd2l0Y2hlciI+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(75, 'As an exception to the rule, add the data-uk-tab=\"{connect:\'#ID\'}\" attribute, using the parameter \"tab\" instead of \"switcher\", to the tabbed navigation to combine the switcher with the Tab component.', 4, 'Dynamically transition through different content panes.', 'Switcher tabs-horizontal', 'PCEtLSBUaGlzIGlzIHRoZSB0YWJiZWQgbmF2aWdhdGlvbiBjb250YWluaW5nIHRoZSB0b2dnbGluZyBlbGVtZW50cyAtLT4NCjx1bCBjbGFzcz0idWstdGFiIiBkYXRhLXVrLXRhYj0ie2Nvbm5lY3Q6JyNteS1pZCd9Ij4NCiAgICA8bGk+PGEgaHJlZj0iIj4uLi48L2E+PC9saT4NCjwvdWw+DQoNCjwhLS0gVGhpcyBpcyB0aGUgY29udGFpbmVyIG9mIHRoZSBjb250ZW50IGl0ZW1zIC0tPg0KPHVsIGlkPSJteS1pZCIgY2xhc3M9InVrLXN3aXRjaGVyIHVrLW1hcmdpbiI+DQogICAgPGxpPi4uLjwvbGk+DQo8L3VsPg==', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(76, 'Use the Grid component to display content correctly with a vertical tabbed navigation.', 4, 'Dynamically transition through different content panes.', 'Switcher tabs-vertical', 'PCEtLSBUaGlzIGlzIHRoZSBsZWZ0IHZlcnRpY2FsIHRhYmJlZCBuYXZpZ2F0aW9uIC0tPg0KPGRpdiBjbGFzcz0idWstZ3JpZCI+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtbWVkaXVtLTEtMiI+DQogICAgICAgIDwhLS0gVGhpcyBpcyB0aGUgdmVydGljYWwgdGFiYmVkIG5hdmlnYXRpb24gY29udGFpbmluZyB0aGUgdG9nZ2xpbmcgZWxlbWVudHMgLS0+DQogICAgICAgIDx1bCBjbGFzcz0idWstdGFiIHVrLXRhYi1sZWZ0IiBkYXRhLXVrLXRhYj0ie2Nvbm5lY3Q6JyNteS1pZCd9Ij4uLi48L3VsPg0KICAgIDwvZGl2Pg0KICAgIDxkaXYgY2xhc3M9InVrLXdpZHRoLW1lZGl1bS0xLTIiPg0KICAgICAgICA8IS0tIFRoaXMgaXMgdGhlIGNvbnRhaW5lciBvZiB0aGUgY29udGVudCBpdGVtcyAtLT4NCiAgICAgICAgPHVsIGlkPSJteS1pZCIgY2xhc3M9InVrLXN3aXRjaGVyIj4uLi48L3VsPg0KICAgIDwvZGl2Pg0KPC9kaXY+DQoNCjwhLS0gVGhpcyBpcyB0aGUgcmlnaHQgdmVydGljYWwgdGFiYmVkIG5hdmlnYXRpb24gLS0+DQo8ZGl2IGNsYXNzPSJ1ay1ncmlkIj4NCiAgICA8ZGl2IGNsYXNzPSJ1ay13aWR0aC1tZWRpdW0tMS0yIHVrLXB1c2gtMS0yIj4NCiAgICAgICAgPCEtLSBUaGlzIGlzIHRoZSB2ZXJ0aWNhbCB0YWJiZWQgbmF2aWdhdGlvbiBjb250YWluaW5nIHRoZSB0b2dnbGluZyBlbGVtZW50cyAtLT4NCiAgICAgICAgPHVsIGNsYXNzPSJ1ay10YWIgdWstdGFiLXJpZ2h0IiBkYXRhLXVrLXRhYj0ie2Nvbm5lY3Q6JyNteS1pZCd9Ij4uLi48L3VsPg0KICAgIDwvZGl2Pg0KICAgIDxkaXYgY2xhc3M9InVrLXdpZHRoLW1lZGl1bS0xLTIgdWstcHVsbC0xLTIiPg0KICAgICAgICA8IS0tIFRoaXMgaXMgdGhlIGNvbnRhaW5lciBvZiB0aGUgY29udGVudCBpdGVtcyAtLT4NCiAgICAgICAgPHVsIGlkPSJteS1pZCIgY2xhc3M9InVrLXN3aXRjaGVyIj4uLi48L3VsPg0KICAgIDwvZGl2Pg0KPC9kaXY+', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(77, 'The switcher can also be applied to buttons or button groups from the Button component. Just add the switcher data attribute to a element around a group of buttons or to the element with the .button-group class.', 4, 'Dynamically transition through different content panes.', 'Switcher button-group', 'PCEtLSBUaGlzIGlzIHRoZSBidXR0b24gZ3JvdXAgY29udGFpbmluZyB0aGUgdG9nZ2xpbmcgYnV0dG9ucyAtLT4NCjxkaXYgY2xhc3M9InVrLWJ1dHRvbi1ncm91cCIgZGF0YS11ay1zd2l0Y2hlcj0ie2Nvbm5lY3Q6JyNteS1pZCd9Ij4NCiAgICA8YnV0dG9uIGNsYXNzPSJ1ay1idXR0b24iIHR5cGU9ImJ1dHRvbiI+Li4uPC9idXR0b24+DQo8L2Rpdj4NCg0KPCEtLSBUaGlzIGlzIHRoZSBjb250YWluZXIgb2YgdGhlIGNvbnRlbnQgaXRlbXMgLS0+DQo8dWwgaWQ9Im15LWlkIiBjbGFzcz0idWstc3dpdGNoZXIgdWstbWFyZ2luIj4uLi48L3VsPg==', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(78, 'To apply the switcher to the Nav component, add the data attribute to the nav . Use the Grid component to arrange nav and content in a grid layout.', 4, 'Dynamically transition through different content panes.', 'Switcher navs', 'PGRpdiBjbGFzcz0idWstZ3JpZCI+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtbWVkaXVtLTEtNCI+DQoNCiAgICAgICAgPCEtLSBUaGlzIGlzIHRoZSBuYXYgY29udGFpbmluZyB0aGUgdG9nZ2xpbmcgZWxlbWVudHMgLS0+DQogICAgICAgIDx1bCBjbGFzcz0idWstbmF2IHVrLW5hdi1zaWRlIiBkYXRhLXVrLXN3aXRjaGVyPSJ7Y29ubmVjdDonI215LWlkJ30iPg0KICAgICAgICAgICAgPGxpPjxhIGhyZWY9IiI+Li4uPC9hPjwvbGk+DQogICAgICAgIDwvdWw+DQogICAgPC9kaXY+DQogICAgPGRpdiBjbGFzcz0idWstd2lkdGgtbWVkaXVtLTMtNCI+DQoNCiAgICAgICAgPCEtLSBUaGlzIGlzIHRoZSBjb250YWluZXIgb2YgdGhlIGNvbnRlbnQgaXRlbXMgLS0+DQogICAgICAgIDx1bCBpZD0ibXktaWQiIGNsYXNzPSJ1ay1zd2l0Y2hlciI+DQogICAgICAgICAgICA8bGk+Li4uPC9saT4NCiAgICAgICAgPC91bD4NCiAgICA8L2Rpdj4NCjwvZGl2Pg==', 5, 'http://getuikit.com/docs/switcher.html', 'The switcher component consists of a number of toggles and their related content items. Add the data-uk-switcher=\"{connect:\'#ID\'}\" attribute to the element which contains the toggles, targetting the same id as is used on the element containing the content items. Add the .uk-switcher class to the same element. Typically the switcher is combined with other components, some of which will be shown here.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(79, '', 4, 'Hide, switch or change the appearence of different contents through a toggle.', 'Toggle default', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIiBkYXRhLXVrLXRvZ2dsZT0ie3RhcmdldDonI215LWlkJ30iPi4uLjwvYnV0dG9uPg0KDQo8ZGl2IGlkPSJteS1pZCI+Li4uPC9kaXY+', 5, 'http://getuikit.com/docs/toggle.html', 'To apply this component, just add the data-uk-toggle=\"{target: #ID}\" attribute to a or element. You can use any selector with the toggle attribute.\r\n\r\nThe toggle will add or remove a class from the item. By default, it adds the .uk-hidden class to hide the element.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(80, 'You can also toggle multiple items at the same time. Just use the appropriate selector.', 4, 'Hide, switch or change the appearence of different contents through a toggle.', 'Toggle multiple', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIiBkYXRhLXVrLXRvZ2dsZT0ie3RhcmdldDonLm15LWNsYXNzJ30iPi4uLjwvYnV0dG9uPg0KDQo8ZGl2IGNsYXNzPSJteS1jbGFzcyI+Li4uPC9kaXY+DQo8ZGl2IGNsYXNzPSJteS1jbGFzcyB1ay1oaWRkZW4iPi4uLjwvZGl2Pg==', 5, 'http://getuikit.com/docs/toggle.html', 'To apply this component, just add the data-uk-toggle=\"{target: #ID}\" attribute to a or element. You can use any selector with the toggle attribute.\r\n\r\nThe toggle will add or remove a class from the item. By default, it adds the .uk-hidden class to hide the element.', '', 1, 10, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(81, 'You can also toggle multiple items at the same time. Just use the appropriate selector.', 4, 'Hide, switch or change the appearence of different contents through a toggle.', 'Toggle class', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIiBkYXRhLXVrLXRvZ2dsZT0ie3RhcmdldDonI215LWlkJywgY2xzOid1ay1wYW5lbC1ib3gtcHJpbWFyeSd9Ij4uLi48L2J1dHRvbj4NCg0KPGRpdiBpZD0ibXktaWQiIGNsYXNzPSJ1ay1wYW5lbCB1ay1wYW5lbC1ib3giPi4uLjwvZGl2Pg==', 5, 'http://getuikit.com/docs/toggle.html', 'To apply this component, just add the data-uk-toggle=\"{target: #ID}\" attribute to a or element. You can use any selector with the toggle attribute.\r\n\r\nThe toggle will add or remove a class from the item. By default, it adds the .uk-hidden class to hide the element.', '', 1, 19, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(82, 'The Toggle component allows you to add animations to items when toggling between them. Just add one of the .uk-animation-* classes from the Animation component to the animation parameter. The class will be applied to the in as well as the out animation. If you prefer a different out animation, just add another class.', 4, 'Hide, switch or change the appearence of different contents through a toggle.', 'Toggle animations', 'PGJ1dHRvbiBjbGFzcz0idWstYnV0dG9uIiBkYXRhLXVrLXRvZ2dsZT0ie3RhcmdldDonI215LWlkJywgYW5pbWF0aW9uOid1ay1hbmltYXRpb24tc2xpZGUtbGVmdCwgdWstYW5pbWF0aW9uLXNsaWRlLWJvdHRvbSd9Ij4uLi48L2J1dHRvbj4NCg0KPGRpdiBpZD0ibXktaWQiPi4uLjwvZGl2Pg==', 5, 'http://getuikit.com/docs/toggle.html', 'To apply this component, just add the data-uk-toggle=\"{target: #ID}\" attribute to a or element. You can use any selector with the toggle attribute.\r\n\r\nThe toggle will add or remove a class from the item. By default, it adds the .uk-hidden class to hide the element.', '', 1, 19, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(83, '', 4, 'Trigger events and animations while scrolling your page.', 'Scrollspy default', 'PGRpdiBkYXRhLXVrLXNjcm9sbHNweT0ie2NsczondWstYW5pbWF0aW9uLWZhZGUnfSI+Li4uPC9kaXY+DQoNCjxkaXYgZGF0YS11ay1zY3JvbGxzcHk9IntjbHM6J3VrLWFuaW1hdGlvbi1mYWRlJywgcmVwZWF0OiB0cnVlfSI+Li4uPC9kaXY+DQoNCjxkaXYgZGF0YS11ay1zY3JvbGxzcHk9IntjbHM6J3VrLWFuaW1hdGlvbi1mYWRlJywgZGVsYXk6OTAwfSI+Li4uPC9kaXY+', 5, 'http://getuikit.com/docs/scrollspy.html', 'The scrollspy component listens to page scrolling and triggers events based on the scroll position. For example, if you scroll down a page and an element appears the first time in the viewport you can trigger a smooth animation to fade in the element. Just add the data-uk-scrollspy attribute and the following options.', '', 1, 19, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(84, 'You can also group scrollspy elements, so you won\'t have to apply the data attribute to each of them. Just add the data-uk-scollspy\"{target:\'MY-CLASS\'}\" attribute to a container element, targetting the selector the items you want to animate within the container. When using a delay it will be applied cumulatively to the items within the row that scrolls into view. The delay will be resetted for the next row within the group when it scrolls into view.', 4, 'Trigger events and animations while scrolling your page.', 'Scrollspy groups', 'PGRpdiBkYXRhLXVrLXNjcm9sbHNweT0ie2NsczondWstYW5pbWF0aW9uLWZhZGUnLCB0YXJnZXQ6Jy5teS1jbGFzcycsIGRlbGF5OjMwMH0iPg0KDQogICAgPCEtLSBUaGlzIGl0ZW0gaGFzIG5vIGRlbGF5IC0tPg0KICAgIDxkaXYgY2xhc3M9Im15LWNsYXNzIj4uLi48L2Rpdj4NCg0KICAgIDwhLS0gVGhpcyBpdGVtIGhhcyBhIGRlbGF5IG9mIDMwMG1zIC0tPg0KICAgIDxkaXYgY2xhc3M9Im15LWNsYXNzIj4uLi48L2Rpdj4NCg0KICAgIDwhLS0gVGhpcyBpdGVtIGhhcyBhIGRlbGF5IG9mIDYwMG1zIC0tPg0KICAgIDxkaXYgY2xhc3M9Im15LWNsYXNzIj4uLi48L2Rpdj4NCg0KPC9kaXY+', 5, 'http://getuikit.com/docs/scrollspy.html', 'The scrollspy component listens to page scrolling and triggers events based on the scroll position. For example, if you scroll down a page and an element appears the first time in the viewport you can trigger a smooth animation to fade in the element. Just add the data-uk-scrollspy attribute and the following options.', '', 1, 20, '', 8, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(85, '', 4, 'Create a fancy lightbox for images and videos utilizing the Modal component.', 'Lightbox single-image', 'PGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSIiIGhyZWY9IiIgY2xhc3M9InVrLWJ1dHRvbiI+T3BlbiBsaWdodGJveDwvYT4=', 5, 'http://getuikit.com/docs/lightbox.html', 'To apply this component, add the data-uk-lightbox attribute to an anchor linking to the image you wish to display. If a title attribute exists it will be displayed as a caption for the lightbox.', '', 1, 19, '', 9, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(86, 'You can link multiple images to the same lightbox and switch between them from within the lightbox, thus creating a gallery. Just add the {group:\'my-group\'} option to the data attribute of each item using the same name on all items that you want to group. Make sure to include the CSS from the Slidenav component, so you can navigate between the items.', 4, 'Create a fancy lightbox for images and videos utilizing the Modal component.', 'Lightbox groups-image', 'PGRpdiBkYXRhLXVrLWdyaWQtbWFyZ2luPSIiIGNsYXNzPSJ1ay1ncmlkIHVrLWdyaWQtd2lkdGgtbWVkaXVtLTEtNCI+DQogICAgPGRpdj4NCiAgICAgICAgPGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMSd9IiBocmVmPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF8xLmpwZyI+DQogICAgICAgICAgICA8aW1nIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBhbHQ9IiIgc3JjPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF8xLmpwZyI+DQogICAgICAgIDwvYT4NCiAgICA8L2Rpdj4NCiAgICA8ZGl2Pg0KICAgICAgICA8YSB0aXRsZT0iVGl0bGUiIGRhdGEtdWstbGlnaHRib3g9Intncm91cDonZ3JvdXAxJ30iIGRhdGEtbGlnaHRib3gtdHlwZT0iaW1hZ2UiIGhyZWY9ImltYWdlcy9wbGFjZWhvbGRlcl84MDB4NjAwXzIuanBnIj4NCiAgICAgICAgICAgIDxpbWcgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIGFsdD0iIiBzcmM9ImltYWdlcy9wbGFjZWhvbGRlcl84MDB4NjAwXzIuanBnIj4NCiAgICAgICAgPC9hPg0KICAgIDwvZGl2Pg0KICAgIDxkaXY+DQogICAgICAgIDxhIHRpdGxlPSJUaXRsZSIgZGF0YS11ay1saWdodGJveD0ie2dyb3VwOidncm91cDEnfSIgZGF0YS1saWdodGJveC10eXBlPSJpbWFnZSIgaHJlZj0iaW1hZ2VzL3BsYWNlaG9sZGVyXzgwMHg2MDBfMy5qcGciPg0KICAgICAgICAgICAgPGltZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgYWx0PSIiIHNyYz0iaW1hZ2VzL3BsYWNlaG9sZGVyXzgwMHg2MDBfMy5qcGciPg0KICAgICAgICA8L2E+DQogICAgPC9kaXY+DQogICAgPGRpdj4NCiAgICAgICAgPGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMSd9IiBkYXRhLWxpZ2h0Ym94LXR5cGU9ImltYWdlIiBocmVmPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF80LmpwZyI+DQogICAgICAgICAgICA8aW1nIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBhbHQ9IiIgc3JjPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF80LmpwZyI+DQogICAgICAgIDwvYT4NCiAgICA8L2Rpdj4NCjwvZGl2Pg==', 5, 'http://getuikit.com/docs/lightbox.html', 'To apply this component, add the data-uk-lightbox attribute to an anchor linking to the image you wish to display. If a title attribute exists it will be displayed as a caption for the lightbox.', '', 1, 20, '', 9, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(87, 'A lightbox is not restricted to images. Other media, like videos, can be displayed inside a lightbox and it will automatically generate the correct output by evaluating your path.', 4, 'Create a fancy lightbox for images and videos utilizing the Modal component.', 'Lightbox content-sources', 'PHA+DQogICAgPGEgdGl0bGU9IlRpdGxlIiBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMid9IiBocmVmPSJpbWFnZXMvcGxhY2Vob2xkZXJfODAweDYwMF8xLmpwZyIgY2xhc3M9InVrLWJ1dHRvbiI+SW1hZ2U8L2E+DQogICAgPGEgZGF0YS11ay1saWdodGJveD0ie2dyb3VwOidncm91cDInfSIgaHJlZj0iaHR0cDovL3d3dy5xdWlya3Ntb2RlLm9yZy9odG1sNS92aWRlb3MvYmlnX2J1Y2tfYnVubnkubXA0IiBjbGFzcz0idWstYnV0dG9uIj5NUDQ8L2E+DQogICAgPGEgZGF0YS11ay1saWdodGJveD0ie2dyb3VwOidncm91cDInfSIgaHJlZj0iaHR0cDovL3ZpbWVvLmNvbS8xMDg0NTM3IiBjbGFzcz0idWstYnV0dG9uIj5WaW1lbzwvYT4NCiAgICA8YSBkYXRhLXVrLWxpZ2h0Ym94PSJ7Z3JvdXA6J2dyb3VwMid9IiBocmVmPSJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PVlFN1Z6bEx0cC00IiBjbGFzcz0idWstYnV0dG9uIj5Zb3VUdWJlPC9hPg0KPC9wPg==', 5, 'http://getuikit.com/docs/lightbox.html', 'To apply this component, add the data-uk-lightbox attribute to an anchor linking to the image you wish to display. If a title attribute exists it will be displayed as a caption for the lightbox.', '', 1, 19, '', 9, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(88, 'To display multiple content sections at the same time without one collapsing when the other one is opened, add the {collapse: false} option to the date attribute.', 4, 'Create a list of items, allowing each item\'s content to be expanded and collapsed by clicking its header.', 'Accordion', 'PGRpdiBjbGFzcz0idWstYWNjb3JkaW9uIiBkYXRhLXVrLWFjY29yZGlvbj4NCg0KICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj4uLi48L2gzPg0KICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4uLi48L2Rpdj4NCg0KICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj4uLi48L2gzPg0KICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4uLi48L2Rpdj4NCg0KICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj4uLi48L2gzPg0KICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4uLi48L2Rpdj4NCg0KPC9kaXY+', 5, 'http://getuikit.com/docs/accordion.html', 'To apply the Accordion component, add the uk-accordion class and the data-uk-accordion attribute to a container element. Add the uk-accordion-content class to each of the content sections within the container. Finally, add the uk-accordion-title class to any element, like a heading, above the content section to create a toggle.', '', 1, 20, '', 10, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(90, 'This is a input field for uikit form', 4, 'Add Input field - row', 'Input field', 'ICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1mb3JtLXJvdyI+DQoJCTxsYWJlbCBjbGFzcz0idWstZm9ybS1sYWJlbCIgPg0KCQkJPD9waHAgZWNobyBKVGV4dDo6XygnTGFiZWwnKTsgPz4NCgkJPC9sYWJlbD4NCgkJPGlucHV0IHR5cGU9InRleHQiIG5hbWU9ImtleSIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2FkZCBzb21lIHRleHQgaGVyZSEnKTsgPz4iPiA8c3BhbiBjbGFzcz0idWstZm9ybS1oZWxwLWlubGluZSI+PD9waHAgZWNobyBKVGV4dDo6XygnaGVscCBuZWVkZWQnKTsgPz48L3NwYW4+DQoJPC9kaXY+', 3, 'http://getuikit.com/docs/form.html', '', '', 1, 20, '', 12, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(91, 'This is a textarea field for uikit form', 4, 'Add textarea - row', 'Textarea', 'CTxkaXYgY2xhc3M9InVrLWZvcm0tcm93Ij4NCgkJPGxhYmVsIGNsYXNzPSJ1ay1mb3JtLWxhYmVsIiA+DQoJCQk8P3BocCBlY2hvIEpUZXh0OjpfKCdMYWJlbCcpOyA/Pg0KCQk8L2xhYmVsPg0KCQk8dGV4dGFyZWEgY29scz0iIiByb3dzPSIiICBzdHlsZT0id2lkdGg6IDEwMCU7IGhlaWdodDogMjE2cHg7IiBwbGFjZWhvbGRlcj0iPD9waHAgZWNobyBKVGV4dDo6XygnYWRkIHNvbWUgdGV4dCBoZXJlIScpOyA/PiI+PHx8fHxGSVh8fHx8fHx0ZXh0YXJlYT4NCgkJPHAgY2xhc3M9InVrLWZvcm0taGVscC1ibG9jayI+PD9waHAgZWNobyBKVGV4dDo6XygnaGVscCBuZWVkZWQnKTsgPz48L3A+DQoJPC9kaXY+', 3, 'http://getuikit.com/docs/form.html', '', '', 1, 22, '', 12, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(92, 'This is a uikit form', 4, 'Add Form', 'Form', 'PGZvcm0gY2xhc3M9InVrLWZvcm0iPg0KICAgIDxmaWVsZHNldD4NCiAgICAgICAgPGxlZ2VuZD48P3BocCBlY2hvIEpUZXh0OjpfKCdMZWdlbmQnKTsgPz48L2xlZ2VuZD4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstZm9ybS1yb3ciPg0KCQk8bGFiZWwgY2xhc3M9InVrLWZvcm0tbGFiZWwiID4NCgkJCTw/cGhwIGVjaG8gSlRleHQ6Ol8oJ0xhYmVsJyk7ID8+DQoJCTwvbGFiZWw+DQoJCTxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJrZXkiIHBsYWNlaG9sZGVyPSI8P3BocCBlY2hvIEpUZXh0OjpfKCdhZGQgc29tZSB0ZXh0IGhlcmUhJyk7ID8+Ij4gPHNwYW4gY2xhc3M9InVrLWZvcm0taGVscC1pbmxpbmUiPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2hlbHAgbmVlZGVkJyk7ID8+PC9zcGFuPg0KCTwvZGl2Pg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1mb3JtLXJvdyI+DQoJCTxsYWJlbCBjbGFzcz0idWstZm9ybS1sYWJlbCIgPg0KCQkJPD9waHAgZWNobyBKVGV4dDo6XygnTGFiZWwnKTsgPz4NCgkJPC9sYWJlbD4NCgkJPHRleHRhcmVhIGNvbHM9IiIgcm93cz0iIiAgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDIxNnB4OyIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2FkZCBzb21lIHRleHQgaGVyZSEnKTsgPz4iPjx8fHx8fEZJWHx8fHx8dGV4dGFyZWE+DQoJCTxwIGNsYXNzPSJ1ay1mb3JtLWhlbHAtYmxvY2siPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2hlbHAgbmVlZGVkJyk7ID8+PC9wPg0KCTwvZGl2Pg0KICAgIDwvZmllbGRzZXQ+DQo8L2Zvcm0+', 1, 'http://getuikit.com/docs/form.html', 'To apply this component, add the .uk-form class to a form element. All form control elements are placed side by side within the next row.', '', 1, 21, '', 12, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(95, '', 3, 'Create a list of items that can be shown individually by clicking an item\'s header.', 'Accordion', 'PHVsIHVrLWFjY29yZGlvbj4NCiAgICA8bGkgY2xhc3M9InVrLW9wZW4iPg0KICAgICAgICA8aDMgY2xhc3M9InVrLWFjY29yZGlvbi10aXRsZSI+SXRlbSAxPC9oMz4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstYWNjb3JkaW9uLWNvbnRlbnQiPg0KICAgICAgICAgICAgPHA+TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdCwgc2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQgdXQgbGFib3JlIGV0IGRvbG9yZSBtYWduYSBhbGlxdWEuPC9wPg0KICAgICAgICA8L2Rpdj4NCiAgICA8L2xpPg0KICAgIDxsaT4NCiAgICAgICAgPGgzIGNsYXNzPSJ1ay1hY2NvcmRpb24tdGl0bGUiPkl0ZW0gMjwvaDM+DQogICAgICAgIDxkaXYgY2xhc3M9InVrLWFjY29yZGlvbi1jb250ZW50Ij4NCiAgICAgICAgICAgIDxwPlV0IGVuaW0gYWQgbWluaW0gdmVuaWFtLCBxdWlzIG5vc3RydWQgZXhlcmNpdGF0aW9uIHVsbGFtY28gbGFib3JpcyBuaXNpIHV0IGFsaXF1aXAgZXggZWEgY29tbW9kbyBjb25zZXF1YXQuIER1aXMgYXV0ZSBpcnVyZSBkb2xvciByZXByZWhlbmRlcml0LjwvcD4NCiAgICAgICAgPC9kaXY+DQogICAgPC9saT4NCiAgICA8bGk+DQogICAgICAgIDxoMyBjbGFzcz0idWstYWNjb3JkaW9uLXRpdGxlIj5JdGVtIDM8L2gzPg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1hY2NvcmRpb24tY29udGVudCI+DQogICAgICAgICAgICA8cD5EdWlzIGF1dGUgaXJ1cmUgZG9sb3IgaW4gcmVwcmVoZW5kZXJpdCBpbiB2b2x1cHRhdGUgdmVsaXQgZXNzZSBjaWxsdW0gZG9sb3JlIGV1IGZ1Z2lhdCBudWxsYSBwYXJpYXR1ci4gRXhjZXB0ZXVyIHNpbnQgb2NjYWVjYXQgY3VwaWRhdGF0IHByb2lkZW50LjwvcD4NCiAgICAgICAgPC9kaXY+DQogICAgPC9saT4NCjwvdWw+', 15, 'https://getuikit.com/docs/accordion', 'The Accordion component consists of a parent container with the uk-accordion attribute, and a title and content part for each accordion item.\r\n\r\n.uk-accordion-title - Defines and styles the toggle for each accordion item. Typically used on a heading.\r\n\r\n.uk-accordion-content - Defines the content part for each accordion item.\r\n\r\n', '', 1, 1, '', 14, 'Vast Development Method', 'joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'), -(96, 'FooTable is a jQuery plugin that aims to make HTML tables on smaller devices look awesome – No matter how many columns of data you may have in them.\r\n\r\nHave you ever wanted to show a lot of data in a table, but hate how badly it scales on smaller mobile devices? The FooTable jQuery plugin solves this problem by allowing you to hide certain columns on smaller devices, but still allowing the user to expand each row to see the columns that were hidden.', 5, 'FooTable', 'FooTable', 'PHRhYmxlIGNsYXNzPSJmb290YWJsZSBtZXRyby1ibHVlIiBkYXRhLWZpbHRlcj0iI2ZpbHRlciIgZGF0YS1wYWdlLXNpemU9IjUiPg0KICA8dGhlYWQ+DQogICAgPHRyPg0KICAgICAgPHRoIGRhdGEtdG9nZ2xlPSJ0cnVlIj5OYW1lPC90aD4NCiAgICAgIDx0aCBkYXRhLWhpZGU9InBob25lLHRhYmxldCI+UGhvbmU8L3RoPg0KICAgICAgPHRoIGRhdGEtaGlkZT0icGhvbmUsdGFibGV0Ij5FbWFpbDwvdGg+DQogICAgPC90cj4NCiAgPC90aGVhZD4NCiAgPHRib2R5Pg0KICAgIDx0cj4NCiAgICAgIDx0ZD5Cb2IgTWFuPC90ZD4NCiAgICAgIDx0ZD41NTUtMTIzNDU8L3RkPg0KICAgICAgPHRkPmJvYkBob21lLmNvbTwvdGQ+DQogICAgPC90cj4NCiAgICA8dHI+DQogICAgICA8dGQ+QnJpZGdldCBKb25lczwvdGQ+DQogICAgICA8dGQ+NTQ0LTc3NjY1NTwvdGQ+DQogICAgICA8dGQ+YmpvbmVzQG15c2l0ZS5jb208L3RkPg0KICAgIDwvdHI+DQogICAgPHRyPg0KICAgICAgPHRkPlRvbSBKb25lczwvdGQ+DQogICAgICA8dGQ+NTU1LTk5OTExPC90ZD4NCiAgICAgIDx0ZD5jcnVpc2UxQGNyYXp5LmNvbTwvdGQ+DQogICAgPC90cj4NCiAgPC90Ym9keT4NCjwvdGFibGU+', 32, 'http://fooplugins.com/footable-demos/', '', '', 1, 1, '', 15, 'Vast Development Method', 'Joomla@vdm.io', 'Llewellyn van der Merwe', 'https://www.vdm.io/'); +INSERT INTO `#__componentbuilder_library` (`id`, `addconditions`, `description`, `type`, `how`, `name`, `php_setdocument`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(1, '', '', 1, '', 'No Library', '', 1, '2017-11-11 22:08:33', '2017-12-08 15:51:34', 4, '', 1), +(2, '', '', 1, 1, 'Bootstrap v4', '', 1, '2017-11-12 02:08:39', '2017-12-10 15:09:48', 14, '', 2), +(3, '', '', 1, 1, 'Uikit v3', '', 1, '2017-11-11 22:08:45', '2017-12-10 15:55:35', 18, '', 3), +(4, '', '', 1, 4, 'Uikit v2', '', 1, '2017-11-11 22:08:51', '2017-12-10 15:53:17', 5, '', 4), +(5, '', '', 1, 4, 'FooTable v2', '', 1, '2017-11-11 22:08:57', '2017-12-11 20:07:32', 9, '', 5), +(6, '', '', 1, 4, 'FooTable v3', '', 1, '2017-11-25 22:11:03', '2017-12-10 15:54:45', 12, '', 6); -- -- Dumping data for table `#__componentbuilder_field` @@ -1337,7 +1315,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name (32, '', 'Note: When using the file input type you should always add the attribute enctype=\"multipart/form-data\" to your form tag. Otherwise, the uploaded files will not be attached correctly. Note 2: You can put a soft limit file size by adding a hidden field with name=\"MAX_FILE_SIZE\" and value the maximum allowed bytes which is handled by php, but you must also handle it in your code with or without it.', 'File', '{\"properties0\":{\"name\":\"type\",\"example\":\"file\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be file.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myfilevalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter some text\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Choose an image from your computer with maximum 100KB\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) (not translatable) is the default value, but doesn\'t mean much for a file.\"},\"properties5\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of the file box in characters.\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties7\":{\"name\":\"labelclass\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) adds a CSS class for form field\'s label; for Joomla 2.5.4+\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) HTML equivalent attribute\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties10\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) For Joomla form validating it to be filled in\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Whether to Joomla validate the field according to rules\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'Provides an input field for files', '', 1, 1, '', 3), (33, '', 'The menuitem form field type provides a drop down grouped list of the available menu items from your Joomla site.', 'menuitem', '{\"properties0\":{\"name\":\"type\",\"example\":\"menuitem\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be menuitem.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mymenuitem\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a menu item\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default menu item. Note that this is the ItemID number of the menu item.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"published\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) determines whether all menu items are listed or only published menu items. If state is \'0\' then all menu items will be listed. If state is \'1\' then only published menu items will be listed.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"int\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'provides a drop down list of the available menu items from your Joomla site.', '', 1, 2, '', 4), (34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select a access level to this concept.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 1, '', 5), -(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"adjustable\":\"1\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties5\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties7\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties8\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties9\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties10\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 6, '', 6); +(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties5\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties6\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties7\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties8\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties9\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties10\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 9, '', 6); -- -- Dumping data for table `#__componentbuilder_help_document` @@ -1483,15 +1461,23 @@ INSERT INTO `#__componentbuilder_snippet_type` (`id`, `name`, `description`, `pa (43, 'Utility: Text', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 43); -- --- Dumping data for table `#__componentbuilder_library` +-- Dumping data for table `#__componentbuilder_library_config` -- -INSERT INTO `#__componentbuilder_library` (`id`, `description`, `name`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES -(1, '', 'No Library', '', 1, '2017-11-11 22:08:33', '0000-00-00 00:00:00', 1, '', 1), -(2, '', 'Bootstrap v4', '', 1, '2017-11-11 22:08:39', '0000-00-00 00:00:00', 1, '', 2), -(3, '', 'Uikit v3', '', 1, '2017-11-11 22:08:45', '0000-00-00 00:00:00', 1, '', 3), -(4, '', 'Uikit v2', '', 1, '2017-11-11 22:08:51', '0000-00-00 00:00:00', 1, '', 4), -(5, '', 'FooTable', '', 1, '2017-11-11 22:08:57', '0000-00-00 00:00:00', 1, '', 5); +INSERT INTO `#__componentbuilder_library_config` (`id`, `addconfig`, `library`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(1, '', 2, '', 1, '2017-11-25 02:59:38', '2017-11-26 20:48:15', 10, '', 1), +(2, '', 3, '', 1, '2017-11-25 21:51:25', '2017-12-10 15:08:32', 6, '', 2); + +-- +-- Dumping data for table `#__componentbuilder_library_files_folders_urls` +-- + +INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, `addfolders`, `addurls`, `library`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(1, '', '{\"addfolders0\":{\"folder\":\"uikit-v2\",\"path\":\"\\/media\\/\"}}', '', 4, '', 1, '2017-11-25 00:09:15', '2017-12-10 15:10:31', 8, '', 1), +(2, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/js\\/bootstrap.min.js\",\"type\":\"1\"},\"addurls1\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/css\\/bootstrap.min.css\",\"type\":\"1\"}}', 2, '', 1, '2017-11-25 16:17:36', '2017-11-26 20:48:33', 6, '', 2), +(3, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/js\\/uikit.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/js\\/uikit-icons.min.js\",\"type\":\"2\"},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/css\\/uikit.min.css\",\"type\":\"2\"}}', 3, '', 1, '2017-11-25 21:47:40', '2017-12-10 15:09:17', 7, '', 3), +(4, '', '', '', 5, '', 1, '2017-11-25 22:00:43', '2017-12-10 15:53:54', 3, '', 4), +(5, '', '', '', 6, '', 1, '2017-11-25 22:12:42', '2017-12-10 15:54:36', 2, '', 5); diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index acee53b22..1b44b007d 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -6,6 +6,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_template`; DROP TABLE IF EXISTS `#__componentbuilder_layout`; DROP TABLE IF EXISTS `#__componentbuilder_dynamic_get`; DROP TABLE IF EXISTS `#__componentbuilder_custom_code`; +DROP TABLE IF EXISTS `#__componentbuilder_library`; DROP TABLE IF EXISTS `#__componentbuilder_snippet`; DROP TABLE IF EXISTS `#__componentbuilder_field`; DROP TABLE IF EXISTS `#__componentbuilder_fieldtype`; @@ -25,4 +26,5 @@ DROP TABLE IF EXISTS `#__componentbuilder_component_config`; DROP TABLE IF EXISTS `#__componentbuilder_component_dashboard`; DROP TABLE IF EXISTS `#__componentbuilder_component_files_folders`; DROP TABLE IF EXISTS `#__componentbuilder_snippet_type`; -DROP TABLE IF EXISTS `#__componentbuilder_library`; +DROP TABLE IF EXISTS `#__componentbuilder_library_config`; +DROP TABLE IF EXISTS `#__componentbuilder_library_files_folders_urls`; diff --git a/admin/sql/updates/mysql/2.6.5.sql b/admin/sql/updates/mysql/2.6.5.sql new file mode 100644 index 000000000..9d4c34469 --- /dev/null +++ b/admin/sql/updates/mysql/2.6.5.sql @@ -0,0 +1,113 @@ +ALTER TABLE `#__componentbuilder_site_view` ADD `libraries` TEXT NOT NULL AFTER `js_document`; + +ALTER TABLE `#__componentbuilder_template` ADD `libraries` TEXT NOT NULL AFTER `dynamic_get`; + +ALTER TABLE `#__componentbuilder_layout` ADD `libraries` TEXT NOT NULL AFTER `layout`; + +ALTER TABLE `#__componentbuilder_custom_admin_view` ADD `libraries` TEXT NOT NULL AFTER `js_document`; + +DROP TABLE IF EXISTS `#__componentbuilder_library`; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_config` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconfig` TEXT NOT NULL, + `library` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_library` (`library`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addfiles` TEXT NOT NULL, + `addfolders` TEXT NOT NULL, + `addurls` TEXT NOT NULL, + `library` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_library` (`library`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconditions` MEDIUMTEXT NOT NULL, + `description` VARCHAR(255) NOT NULL DEFAULT '', + `how` TINYINT(1) NOT NULL DEFAULT 1, + `libraries` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `not_required` INT(1) NOT NULL DEFAULT 0, + `php_setdocument` MEDIUMTEXT NOT NULL, + `type` TINYINT(1) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_name` (`name`), + KEY `idx_how` (`how`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +INSERT INTO `#__componentbuilder_library` (`id`, `addconditions`, `description`, `type`, `how`, `name`, `php_setdocument`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(1, '', '', 1, '', 'No Library', '', 1, '2017-11-11 22:08:33', '2017-12-08 15:51:34', 4, '', 1), +(2, '', '', 1, 1, 'Bootstrap v4', '', 1, '2017-11-12 02:08:39', '2017-12-10 15:09:48', 14, '', 2), +(3, '', '', 1, 1, 'Uikit v3', '', 1, '2017-11-11 22:08:45', '2017-12-10 15:55:35', 18, '', 3), +(4, '', '', 1, 4, 'Uikit v2', '', 1, '2017-11-11 22:08:51', '2017-12-10 15:53:17', 5, '', 4), +(5, '', '', 1, 4, 'FooTable v2', '', 1, '2017-11-11 22:08:57', '2017-12-11 20:07:32', 9, '', 5), +(6, '', '', 1, 4, 'FooTable v3', '', 1, '2017-11-25 22:11:03', '2017-12-10 15:54:45', 12, '', 6); + +INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, `addfolders`, `addurls`, `library`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(2, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/js\\/bootstrap.min.js\",\"type\":\"1\"},\"addurls1\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/css\\/bootstrap.min.css\",\"type\":\"1\"}}', 2, '', 1, '2017-11-25 16:17:36', '2017-11-26 20:48:33', 6, '', 2), +(3, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/js\\/uikit.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/js\\/uikit-icons.min.js\",\"type\":\"2\"},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/css\\/uikit.min.css\",\"type\":\"2\"}}', 3, '', 1, '2017-11-25 21:47:40', '2017-12-10 15:09:17', 7, '', 3); + +UPDATE `#__componentbuilder_site_view` SET `snippet` = 0; +UPDATE `#__componentbuilder_template` SET `snippet` = 0; +UPDATE `#__componentbuilder_layout` SET `snippet` = 0; +UPDATE `#__componentbuilder_custom_admin_view` SET `snippet` = 0; diff --git a/admin/tables/library_config.php b/admin/tables/library_config.php new file mode 100644 index 000000000..9d3941d9b --- /dev/null +++ b/admin/tables/library_config.php @@ -0,0 +1,351 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla table library +jimport('joomla.database.table'); + +/** + * Libraries_config Table class + */ +class ComponentbuilderTableLibrary_config extends JTable +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__componentbuilder_library_config', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.library_config')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the Library_config table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New library_config. A library_config created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('library_config', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('library_config', 'componentbuilderTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = JString::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_componentbuilder.library_config.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count($_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_componentbuilder.library_config.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_componentbuilder'); + + return $asset->id; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); + } + + return $this->alias; + } + +} diff --git a/admin/tables/library_files_folders_urls.php b/admin/tables/library_files_folders_urls.php new file mode 100644 index 000000000..284782cc9 --- /dev/null +++ b/admin/tables/library_files_folders_urls.php @@ -0,0 +1,351 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla table library +jimport('joomla.database.table'); + +/** + * Libraries_files_folders_urls Table class + */ +class ComponentbuilderTableLibrary_files_folders_urls extends JTable +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__componentbuilder_library_files_folders_urls', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.library_files_folders_urls')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the Library_files_folders_urls table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New library_files_folders_urls. A library_files_folders_urls created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('library_files_folders_urls', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('library_files_folders_urls', 'componentbuilderTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = JString::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_componentbuilder.library_files_folders_urls.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count($_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_componentbuilder.library_files_folders_urls.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_componentbuilder'); + + return $asset->id; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); + } + + return $this->alias; + } + +} diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index 0185f4688..ae727d1e8 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js"); + if (!isset($this->document)) + { + $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"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index f42934d75..f203354d3 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -126,7 +126,7 @@ jQuery(document).ready(function(){ jQuery('#adminForm').on('change', '#jform_addconditions__addconditions__match_field',function (e) { e.preventDefault(); - getFieldSelectOptions(, "_", "_"); + getFieldSelectOptions(); }); jQuery(document).on('subform-row-add', function(event, row){ @@ -134,9 +134,9 @@ jQuery(document).ready(function(){ var fieldName = groupName.replace(/([0-9])/g, ''); var fieldNr = groupName.replace(/([A-z_])/g, ''); if ('addconditions' === fieldName) { - jQuery('#adminForm').on('change', '#jform_addconditions_addconditions'+fieldNr+'_match_field',function (e) { + jQuery('#adminForm').on('change', '#jform_addconditions__addconditions'+fieldNr+'__match_field',function (e) { e.preventDefault(); - getFieldSelectOptions(fieldNr, "", ""); + getFieldSelectOptions(fieldNr); }); } }); diff --git a/admin/views/admin_fields_conditions/view.html.php b/admin/views/admin_fields_conditions/view.html.php index eaee3c985..258023cf4 100644 --- a/admin/views/admin_fields_conditions/view.html.php +++ b/admin/views/admin_fields_conditions/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields_conditions.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js"); + $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"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index e50b5e099..1f31e7434 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -725,7 +725,6 @@ jQuery(document).ready(function(){ jQuery('#jform_add_custom_import').on('change',function() { var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); getImportScripts(valueSwitch); - }); item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_view.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_view/submitbutton.js"); + $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 - $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/uikit.min.js' ); - $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/lightbox.min.js', 'text/javascript', true); - $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/notify.min.js', 'text/javascript', true); + $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 - $document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/uikit.gradient.min.css' ); - $document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/components/notify.gradient.min.css' ); + $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' ); // add var key - $document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); + $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 8bc3797a9..faa2387f4 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -209,9 +209,12 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMIN_VIEWS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_views.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index ef291f7f3..859c1b73f 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMINS_FIELDS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index 54002e5a3..3166300ec 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields_conditions.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index 10f6457ae..f16dd8152 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -150,7 +150,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy // Load the header checker class. require_once( JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' ); // Initialize the header checker. - $HeaderCheck = new componentbuilderHeaderCheck; + $HeaderCheck = new componentbuilderHeaderCheck; // Load uikit options. $uikit = $this->params->get('uikit_load'); @@ -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/css/uikit'.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css'); } // 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/js/uikit'.$size.'.js'); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js'); } // Load the needed uikit components in this view. @@ -182,16 +182,16 @@ class ComponentbuilderViewCompiler extends JViewLegacy foreach (ComponentbuilderHelper::$uk_components[$class] as $name) { // check if the CSS file exists. - if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit/css/components/'.$name.$style.$size.'.css')) + 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/css/components/'.$name.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'); } // check if the JavaScript file exists. - if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit/js/components/'.$name.$size.'.js')) + 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/js/components/'.$name.$size.'.js', 'text/javascript', true); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', 'text/javascript', true); } } } diff --git a/admin/views/component_admin_views/view.html.php b/admin/views/component_admin_views/view.html.php index 4bc5d441b..f45388ca2 100644 --- a/admin/views/component_admin_views/view.html.php +++ b/admin/views/component_admin_views/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_admin_views.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 23ec93697..cda3ec878 100644 --- a/admin/views/component_config/view.html.php +++ b/admin/views/component_config/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_config extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_config.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_config/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 d471a79b4..9e482d3f9 100644 --- a/admin/views/component_custom_admin_menus/view.html.php +++ b/admin/views/component_custom_admin_menus/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 b7a40099a..e711fc0c7 100644 --- a/admin/views/component_custom_admin_views/view.html.php +++ b/admin/views/component_custom_admin_views/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 84ebe747c..a5891d95d 100644 --- a/admin/views/component_dashboard/view.html.php +++ b/admin/views/component_dashboard/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_dashboard.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_dashboard/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 f9169ba2e..c9414e0ec 100644 --- a/admin/views/component_files_folders/view.html.php +++ b/admin/views/component_files_folders/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_files_folders.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_files_folders/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 c51dc3c07..62fb13e0b 100644 --- a/admin/views/component_mysql_tweaks/view.html.php +++ b/admin/views/component_mysql_tweaks/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_mysql_tweaks.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_mysql_tweaks/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 53e366920..375038297 100644 --- a/admin/views/component_site_views/view.html.php +++ b/admin/views/component_site_views/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_site_views.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 bbca8e53a..c5ac97f52 100644 --- a/admin/views/component_updates/view.html.php +++ b/admin/views/component_updates/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_updates.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_updates/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 58071c04d..51bb66131 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_admin_views.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php index 47e3f3b39..68e6423f2 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_config extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CONFIG')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_config.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php index 19a5aee42..aad36661f 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_menus.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php index 73c9f1e89..2e1e2f255 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_views.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php index bc3d99c8c..1037680be 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_dashboard.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php index 61e4e5017..eee0cb519 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_files_folders.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php index a96303ce5..2a8497c2d 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_mysql_tweaks.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php index 314695c04..6b3fc9ebf 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_site_views.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php index 12f3aa8ee..c7f4a335b 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_UPDATES')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_updates.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index 76613bf20..3a240c3f1 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -275,6 +275,12 @@ jQuery('#adminForm').on('change', '#jform_add_css',function (e) +jQuery(function() { + jQuery('#open-libraries').html(''); +}); +jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width'); +jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width'); +jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width'); jQuery('#jform_custom_button_modal').on('change', 'select[name="icomoon-"]',function (e) { // update the icon if changed @@ -304,6 +310,10 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) { jQuery(this).selText().addClass("selected"); }); }); +jQuery('#adminForm').on('change', '#jform_libraries',function (e) { + e.preventDefault(); + getSnippets(); +}); jQuery.fn.selText = function() { var obj = this[0]; @@ -354,5 +364,8 @@ jQuery(document).ready(function() { // get type value getLayoutDetails(9999); getTemplateDetails(9999); -}); +}); +// some lang strings +var select_a_snippet = ''; +var create_a_snippet = ''; diff --git a/admin/views/custom_admin_view/view.html.php b/admin/views/custom_admin_view/view.html.php index 5923c04ff..a15701e48 100644 --- a/admin/views/custom_admin_view/view.html.php +++ b/admin/views/custom_admin_view/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_view.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_admin_view/submitbutton.js"); + $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"); 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 597440e68..1ba34a80a 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -214,9 +214,12 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_views.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/custom_code/view.html.php b/admin/views/custom_code/view.html.php index 3864fadad..02aa89c25 100644 --- a/admin/views/custom_code/view.html.php +++ b/admin/views/custom_code/view.html.php @@ -189,19 +189,22 @@ class ComponentbuilderViewCustom_code extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_CODE_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_CODE_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_code.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_code/submitbutton.js"); + $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 - $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/uikit.min.js' ); - $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/notify.min.js', 'text/javascript', true); + $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 - $document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/uikit.gradient.min.css' ); - $document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/components/notify.gradient.min.css' ); + $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' ); 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 667a78256..c0132c7d5 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -297,9 +297,12 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_CUSTOM_CODES')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_codes.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/dynamic_get/view.html.php b/admin/views/dynamic_get/view.html.php index b49ad64e1..2a489f16b 100644 --- a/admin/views/dynamic_get/view.html.php +++ b/admin/views/dynamic_get/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_DYNAMIC_GET_NEW' : 'COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_get.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/dynamic_get/submitbutton.js"); + $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"); 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 6fb2fa17a..3d35741dd 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -253,9 +253,12 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_DYNAMIC_GETS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_gets.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 58b7b6d63..87402cc39 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -137,157 +137,157 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); diff --git a/admin/views/layout/view.html.php b/admin/views/layout/view.html.php index 96ca46a23..9b7213594 100644 --- a/admin/views/layout/view.html.php +++ b/admin/views/layout/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewLayout extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LAYOUT_NEW' : 'COM_COMPONENTBUILDER_LAYOUT_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layout.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js"); + $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"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 57a717e02..429731f21 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -236,9 +236,12 @@ class ComponentbuilderViewLayouts extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_LAYOUTS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layouts.css"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LAYOUTS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layouts.css"); } /** diff --git a/admin/views/libraries/tmpl/default_body.php b/admin/views/libraries/tmpl/default_body.php index b7cca0fb8..f9c8c3165 100644 --- a/admin/views/libraries/tmpl/default_body.php +++ b/admin/views/libraries/tmpl/default_body.php @@ -89,6 +89,12 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit" escape($item->description); ?> + + escape($item->how); ?> + + + type); ?> + get('library.edit.state')) : ?> checked_out) : ?> diff --git a/admin/views/libraries/tmpl/default_foot.php b/admin/views/libraries/tmpl/default_foot.php index 4cbb00713..8cb41138b 100644 --- a/admin/views/libraries/tmpl/default_foot.php +++ b/admin/views/libraries/tmpl/default_foot.php @@ -28,5 +28,5 @@ defined('_JEXEC') or die('Restricted access'); ?> - pagination->getListFooter(); ?> + pagination->getListFooter(); ?> \ No newline at end of file diff --git a/admin/views/libraries/tmpl/default_head.php b/admin/views/libraries/tmpl/default_head.php index 30e0da273..85a7ab6ee 100644 --- a/admin/views/libraries/tmpl/default_head.php +++ b/admin/views/libraries/tmpl/default_head.php @@ -49,6 +49,12 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> + + + + + listDirn, $this->listOrder); ?> + canState): ?> listDirn, $this->listOrder); ?> diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 2156d4700..133d46709 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -92,7 +92,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy */ protected function addToolBar() { - JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES'), 'joomla'); + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES'), 'puzzle'); JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries'); JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); @@ -143,7 +143,12 @@ class ComponentbuilderViewLibraries extends JViewLegacy { JToolbarHelper::trash('libraries.trash'); } - } + } + if ($this->user->authorise('library.get_snippets', 'com_componentbuilder')) + { + // add Get Snippets button. + JToolBarHelper::custom('libraries.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + } // set help url for this view if found $help_url = ComponentbuilderHelper::getHelpUrl('libraries'); @@ -189,7 +194,51 @@ class ComponentbuilderViewLibraries extends JViewLegacy 'batch[access]', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') ); - } + } + + // Set How Selection + $this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->getOptions(); + if ($this->howOptions) + { + // How Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL').' -', + 'filter_how', + JHtml::_('select.options', $this->howOptions, 'value', 'text', $this->state->get('filter.how')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // How Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL').' -', + 'batch[how]', + JHtml::_('select.options', $this->howOptions, 'value', 'text') + ); + } + } + + // Set Type Selection + $this->typeOptions = $this->getTheTypeSelections(); + if ($this->typeOptions) + { + // Type Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL').' -', + 'filter_type', + JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL').' -', + 'batch[type]', + JHtml::_('select.options', $this->typeOptions, 'value', 'text') + ); + } + } } /** @@ -199,9 +248,12 @@ class ComponentbuilderViewLibraries extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries.css"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries.css"); } /** @@ -234,7 +286,44 @@ class ComponentbuilderViewLibraries extends JViewLegacy 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL'), 'a.description' => JText::_('COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL'), + 'a.type' => JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } + } + + protected function getTheTypeSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_library')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } } diff --git a/media/footable/js/index.html b/admin/views/libraries_config/index.html similarity index 100% rename from media/footable/js/index.html rename to admin/views/libraries_config/index.html diff --git a/admin/views/libraries_config/tmpl/default.php b/admin/views/libraries_config/tmpl/default.php new file mode 100644 index 000000000..cd2dfa129 --- /dev/null +++ b/admin/views/libraries_config/tmpl/default.php @@ -0,0 +1,99 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// load tooltip behavior +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', 'select'); + +if ($this->saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=libraries_config.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'library_configList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_batch_body.php b/admin/views/libraries_config/tmpl/default_batch_body.php new file mode 100644 index 000000000..cfecf8b2b --- /dev/null +++ b/admin/views/libraries_config/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + +

+batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_batch_footer.php b/admin/views/libraries_config/tmpl/default_batch_footer.php new file mode 100644 index 000000000..bcb66a5cf --- /dev/null +++ b/admin/views/libraries_config/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + + + \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_body.php b/admin/views/libraries_config/tmpl/default_body.php new file mode 100644 index 000000000..aed3df06b --- /dev/null +++ b/admin/views/libraries_config/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$edit = "index.php?option=com_componentbuilder&view=libraries_config&task=library_config.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = ComponentbuilderHelper::getActions('library_config',$item,'libraries_config'); + ?> + + + get('library_config.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('library_config.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('library_config.edit')): ?> +
+ escape($item->library_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'libraries_config.', $canCheckin); ?> + +
+ +
escape($item->library_name); ?>
+ + + + get('library_config.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'libraries_config.', true, 'cb'); ?> + + published, $i, 'libraries_config.', false, 'cb'); ?> + + + published, $i, 'libraries_config.', true, 'cb'); ?> + + + published, $i, 'libraries_config.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_foot.php b/admin/views/libraries_config/tmpl/default_foot.php new file mode 100644 index 000000000..12718a553 --- /dev/null +++ b/admin/views/libraries_config/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + pagination->getListFooter(); ?> + \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_head.php b/admin/views/libraries_config/tmpl/default_head.php new file mode 100644 index 000000000..bbd584936 --- /dev/null +++ b/admin/views/libraries_config/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/libraries_config/tmpl/default_toolbar.php b/admin/views/libraries_config/tmpl/default_toolbar.php new file mode 100644 index 000000000..228db0fe7 --- /dev/null +++ b/admin/views/libraries_config/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +
+ +
+ + +
+
+ + pagination->getLimitBox(); ?> +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/media/uikit/css/components/index.html b/admin/views/libraries_config/tmpl/index.html similarity index 100% rename from media/uikit/css/components/index.html rename to admin/views/libraries_config/tmpl/index.html diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php new file mode 100644 index 000000000..164658476 --- /dev/null +++ b/admin/views/libraries_config/view.html.php @@ -0,0 +1,241 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Componentbuilder View class for the Libraries_config + */ +class ComponentbuilderViewLibraries_config extends JViewLegacy +{ + /** + * Libraries_config view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('libraries_config'); + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('library_config'); + $this->canEdit = $this->canDo->get('library_config.edit'); + $this->canState = $this->canDo->get('library_config.edit.state'); + $this->canCreate = $this->canDo->get('library_config.create'); + $this->canDelete = $this->canDo->get('library_config.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries_config'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('library_config.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('library_config.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('libraries_config.publish'); + JToolBarHelper::unpublishList('libraries_config.unpublish'); + JToolBarHelper::archiveList('libraries_config.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('libraries_config.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'libraries_config.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('libraries_config.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('libraries_config'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_config.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/media/uikit/css/index.html b/admin/views/libraries_files_folders_urls/index.html similarity index 100% rename from media/uikit/css/index.html rename to admin/views/libraries_files_folders_urls/index.html diff --git a/admin/views/libraries_files_folders_urls/tmpl/default.php b/admin/views/libraries_files_folders_urls/tmpl/default.php new file mode 100644 index 000000000..b68d97410 --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default.php @@ -0,0 +1,99 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// load tooltip behavior +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', 'select'); + +if ($this->saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=libraries_files_folders_urls.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'library_files_folders_urlsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_batch_body.php b/admin/views/libraries_files_folders_urls/tmpl/default_batch_body.php new file mode 100644 index 000000000..a25854574 --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + +

+batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_batch_footer.php b/admin/views/libraries_files_folders_urls/tmpl/default_batch_footer.php new file mode 100644 index 000000000..d9365289b --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + + + \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_body.php b/admin/views/libraries_files_folders_urls/tmpl/default_body.php new file mode 100644 index 000000000..5bda5eb55 --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$edit = "index.php?option=com_componentbuilder&view=libraries_files_folders_urls&task=library_files_folders_urls.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$item,'libraries_files_folders_urls'); + ?> + + + get('library_files_folders_urls.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('library_files_folders_urls.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('library_files_folders_urls.edit')): ?> +
+ escape($item->library_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'libraries_files_folders_urls.', $canCheckin); ?> + +
+ +
escape($item->library_name); ?>
+ + + + get('library_files_folders_urls.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'libraries_files_folders_urls.', true, 'cb'); ?> + + published, $i, 'libraries_files_folders_urls.', false, 'cb'); ?> + + + published, $i, 'libraries_files_folders_urls.', true, 'cb'); ?> + + + published, $i, 'libraries_files_folders_urls.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_foot.php b/admin/views/libraries_files_folders_urls/tmpl/default_foot.php new file mode 100644 index 000000000..12718a553 --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + pagination->getListFooter(); ?> + \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_head.php b/admin/views/libraries_files_folders_urls/tmpl/default_head.php new file mode 100644 index 000000000..a4d6fbc99 --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_toolbar.php b/admin/views/libraries_files_folders_urls/tmpl/default_toolbar.php new file mode 100644 index 000000000..578966eed --- /dev/null +++ b/admin/views/libraries_files_folders_urls/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +
+ +
+ + +
+
+ + pagination->getLimitBox(); ?> +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/media/uikit/fonts/index.html b/admin/views/libraries_files_folders_urls/tmpl/index.html similarity index 100% rename from media/uikit/fonts/index.html rename to admin/views/libraries_files_folders_urls/tmpl/index.html diff --git a/admin/views/libraries_files_folders_urls/view.html.php b/admin/views/libraries_files_folders_urls/view.html.php new file mode 100644 index 000000000..2e2cbbd30 --- /dev/null +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -0,0 +1,241 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Componentbuilder View class for the Libraries_files_folders_urls + */ +class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy +{ + /** + * Libraries_files_folders_urls view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('libraries_files_folders_urls'); + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls'); + $this->canEdit = $this->canDo->get('library_files_folders_urls.edit'); + $this->canState = $this->canDo->get('library_files_folders_urls.edit.state'); + $this->canCreate = $this->canDo->get('library_files_folders_urls.create'); + $this->canDelete = $this->canDo->get('library_files_folders_urls.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries_files_folders_urls'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('library_files_folders_urls.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('library_files_folders_urls.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('libraries_files_folders_urls.publish'); + JToolBarHelper::unpublishList('libraries_files_folders_urls.unpublish'); + JToolBarHelper::archiveList('libraries_files_folders_urls.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('libraries_files_folders_urls.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'libraries_files_folders_urls.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('libraries_files_folders_urls.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('libraries_files_folders_urls'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_files_folders_urls.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/library/tmpl/edit.php b/admin/views/library/tmpl/edit.php index 1f4defc66..58f4dcd76 100644 --- a/admin/views/library/tmpl/edit.php +++ b/admin/views/library/tmpl/edit.php @@ -58,17 +58,43 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); -
+
+ +
+ - + + + diff --git a/admin/views/library/view.html.php b/admin/views/library/view.html.php index 784d43dfb..d5817a343 100644 --- a/admin/views/library/view.html.php +++ b/admin/views/library/view.html.php @@ -189,11 +189,25 @@ class ComponentbuilderViewLibrary extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js"); + if (!isset($this->document)) + { + $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"); + // 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' ); + // add var key + $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/library_config/submitbutton.js b/admin/views/library_config/submitbutton.js new file mode 100644 index 000000000..edce73646 --- /dev/null +++ b/admin/views/library_config/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var isValid=true; + var action = task.split('.'); + if (action[1] != 'cancel' && action[1] != 'close'){ + var forms = $$('form.form-validate'); + for (var i=0;i + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = JComponentHelper::getParams('com_componentbuilder'); +?> + + + + diff --git a/media/uikit/index.html b/admin/views/library_config/tmpl/index.html similarity index 100% rename from media/uikit/index.html rename to admin/views/library_config/tmpl/index.html diff --git a/admin/views/library_config/view.html.php b/admin/views/library_config/view.html.php new file mode 100644 index 000000000..e18e2e2a5 --- /dev/null +++ b/admin/views/library_config/view.html.php @@ -0,0 +1,202 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Library_config View class + */ +class ComponentbuilderViewLibrary_config extends JViewLegacy +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = ComponentbuilderHelper::getActions('library_config',$this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; + if ($this->refid) + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } + + // Set the toolbar + $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('library_config.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('library_config.edit')) + { + // We can save the record. + JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('library_config.create')) + { + JToolBarHelper::apply('library_config.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('library_config.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('library_config.edit')) + { + // We can save the new record + JToolBarHelper::apply('library_config.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('library_config.create')) + { + JToolBarHelper::custom('library_config.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('library_config.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('library_config.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.library_config', $this->item->id); + } + if ($this->canDo->get('library_config.create')) + { + JToolBarHelper::custom('library_config.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('library_config'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_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"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/library_files_folders_urls/submitbutton.js b/admin/views/library_files_folders_urls/submitbutton.js new file mode 100644 index 000000000..47136efba --- /dev/null +++ b/admin/views/library_files_folders_urls/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var isValid=true; + var action = task.split('.'); + if (action[1] != 'cancel' && action[1] != 'close'){ + var forms = $$('form.form-validate'); + for (var i=0;i + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = JComponentHelper::getParams('com_componentbuilder'); +?> + + + + diff --git a/media/uikit/js/components/index.html b/admin/views/library_files_folders_urls/tmpl/index.html similarity index 100% rename from media/uikit/js/components/index.html rename to admin/views/library_files_folders_urls/tmpl/index.html diff --git a/admin/views/library_files_folders_urls/view.html.php b/admin/views/library_files_folders_urls/view.html.php new file mode 100644 index 000000000..b8326320b --- /dev/null +++ b/admin/views/library_files_folders_urls/view.html.php @@ -0,0 +1,202 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Library_files_folders_urls View class + */ +class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; + if ($this->refid) + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } + + // Set the toolbar + $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('library_files_folders_urls.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('library_files_folders_urls.edit')) + { + // We can save the record. + JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('library_files_folders_urls.create')) + { + JToolBarHelper::apply('library_files_folders_urls.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('library_files_folders_urls.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('library_files_folders_urls.edit')) + { + // We can save the new record + JToolBarHelper::apply('library_files_folders_urls.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('library_files_folders_urls.create')) + { + JToolBarHelper::custom('library_files_folders_urls.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('library_files_folders_urls.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('library_files_folders_urls.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.library_files_folders_urls', $this->item->id); + } + if ($this->canDo->get('library_files_folders_urls.create')) + { + JToolBarHelper::custom('library_files_folders_urls.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('library_files_folders_urls'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_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"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/site_view/tmpl/edit.php b/admin/views/site_view/tmpl/edit.php index fad5371aa..1e84caaaf 100644 --- a/admin/views/site_view/tmpl/edit.php +++ b/admin/views/site_view/tmpl/edit.php @@ -318,6 +318,12 @@ jQuery('#adminForm').on('change', '#jform_button_position',function (e) +jQuery(function() { + jQuery('#open-libraries').html(''); +}); +jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width'); +jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width'); +jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width'); jQuery('#jform_custom_button_modal').on('change', 'select[name="icomoon-"]',function (e) { // update the icon if changed @@ -347,6 +353,10 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) { jQuery(this).selText().addClass("selected"); }); }); +jQuery('#adminForm').on('change', '#jform_libraries',function (e) { + e.preventDefault(); + getSnippets(); +}); jQuery.fn.selText = function() { var obj = this[0]; @@ -397,5 +407,8 @@ jQuery(document).ready(function() { // get type value getLayoutDetails(9999); getTemplateDetails(9999); -}); +}); +// some lang strings +var select_a_snippet = ''; +var create_a_snippet = ''; diff --git a/admin/views/site_view/view.html.php b/admin/views/site_view/view.html.php index 8db44c357..3e1557fe0 100644 --- a/admin/views/site_view/view.html.php +++ b/admin/views/site_view/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewSite_view extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SITE_VIEW_NEW' : 'COM_COMPONENTBUILDER_SITE_VIEW_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_view.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/site_view/submitbutton.js"); + $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"); 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 2a825d70d..852db6dc7 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -214,9 +214,12 @@ class ComponentbuilderViewSite_views extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_SITE_VIEWS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_views.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/snippet/view.html.php b/admin/views/snippet/view.html.php index 7587ec970..3e8d42dda 100644 --- a/admin/views/snippet/view.html.php +++ b/admin/views/snippet/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewSnippet extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SNIPPET_NEW' : 'COM_COMPONENTBUILDER_SNIPPET_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/snippet/submitbutton.js"); + $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"); 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 7e1b843be..de0c7036f 100644 --- a/admin/views/snippet_type/view.html.php +++ b/admin/views/snippet_type/view.html.php @@ -189,11 +189,14 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SNIPPET_TYPE_NEW' : 'COM_COMPONENTBUILDER_SNIPPET_TYPE_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_type.css"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/snippet_type/submitbutton.js"); + if (!isset($this->document)) + { + $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"); 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 56aab1acc..abf2e4313 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -199,9 +199,12 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPES')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_types.css"); + if (!isset($this->document)) + { + $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"); } /** diff --git a/admin/views/snippets/tmpl/default_body.php b/admin/views/snippets/tmpl/default_body.php index 55d496a60..920b87815 100644 --- a/admin/views/snippets/tmpl/default_body.php +++ b/admin/views/snippets/tmpl/default_body.php @@ -95,8 +95,14 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit"; escape($item->heading); ?> - - escape($item->library_name); ?> + + user->authorise('library.edit', 'com_componentbuilder.library.' . (int)$item->library)): ?> + + +
escape($item->library_name); ?>
+ get('core.edit.state')) : ?> diff --git a/admin/views/snippets/tmpl/default_head.php b/admin/views/snippets/tmpl/default_head.php index d4151dcc8..fe4fce13b 100644 --- a/admin/views/snippets/tmpl/default_head.php +++ b/admin/views/snippets/tmpl/default_head.php @@ -55,7 +55,7 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - + listDirn, $this->listOrder); ?> canState): ?> diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index f1ac7ab98..14c5551eb 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -263,9 +263,12 @@ class ComponentbuilderViewSnippets extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_SNIPPETS')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippets.css"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_SNIPPETS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippets.css"); } /** diff --git a/admin/views/template/tmpl/edit.php b/admin/views/template/tmpl/edit.php index 980e88cbc..59cfeaf25 100644 --- a/admin/views/template/tmpl/edit.php +++ b/admin/views/template/tmpl/edit.php @@ -155,11 +155,20 @@ jQuery('#adminForm').on('change', '#jform_add_php_view',function (e) }); + jQuery(function() { + jQuery('#open-libraries').html(''); +}); +jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width'); +jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');jQuery(function() { jQuery("code").click(function() { jQuery(this).selText().addClass("selected"); }); }); +jQuery('#adminForm').on('change', '#jform_libraries',function (e) { + e.preventDefault(); + getSnippets(); +}); jQuery.fn.selText = function() { var obj = this[0]; @@ -210,5 +219,8 @@ jQuery(document).ready(function() { // get type value getLayoutDetails(9999); getTemplateDetails(item->id) ? $this->item->id:9999; ?>); -}); +}); +// some lang strings +var select_a_snippet = ''; +var create_a_snippet = ''; diff --git a/admin/views/template/view.html.php b/admin/views/template/view.html.php index 59fe933e6..e524c7402 100644 --- a/admin/views/template/view.html.php +++ b/admin/views/template/view.html.php @@ -189,13 +189,16 @@ class ComponentbuilderViewTemplate extends JViewLegacy protected function setDocument() { $isNew = ($this->item->id < 1); - $document = JFactory::getDocument(); - $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_TEMPLATE_NEW' : 'COM_COMPONENTBUILDER_TEMPLATE_EDIT')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/template.css"); + if (!isset($this->document)) + { + $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"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js"); + $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"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 3964ea727..9b92d05ab 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -214,9 +214,12 @@ class ComponentbuilderViewTemplates extends JViewLegacy */ protected function setDocument() { - $document = JFactory::getDocument(); - $document->setTitle(JText::_('COM_COMPONENTBUILDER_TEMPLATES')); - $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/templates.css"); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_TEMPLATES')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/templates.css"); } /** diff --git a/componentbuilder.xml b/componentbuilder.xml index bf756a778..224d7756f 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 21st November, 2017 + 12th December, 2017 Llewellyn van der Merwe joomla@vdm.io http://vdm.bz/component-builder Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.6.5 + 2.6.6 Component Builder (v.2.6.5) +

Component Builder (v.2.6.6)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. @@ -39,8 +39,8 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo js css images - uikit - footable + uikit-v2 + footable-v3 @@ -81,6 +81,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo

COM_COMPONENTBUILDER_MENU_LAYOUTS COM_COMPONENTBUILDER_MENU_DYNAMIC_GETS COM_COMPONENTBUILDER_MENU_CUSTOM_CODES + COM_COMPONENTBUILDER_MENU_LIBRARIES COM_COMPONENTBUILDER_MENU_SNIPPETS COM_COMPONENTBUILDER_MENU_FIELDS COM_COMPONENTBUILDER_MENU_FIELDTYPES diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index ab62f5746..9f0c7ba47 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -254,4 +254,21 @@ http://vdm.bz/component-builder + + Component Builder + Builds Complex Joomla Components + com_componentbuilder + component + 2.6.6 + http://vdm.bz/component-builder + + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.6/JCB_v2.6.6.zip + + + stable + + Llewellyn van der Merwe + http://vdm.bz/component-builder + + \ No newline at end of file diff --git a/media/footable/LICENSE-GPLv3 b/media/footable-v3/LICENSE-GPLv3 similarity index 100% rename from media/footable/LICENSE-GPLv3 rename to media/footable-v3/LICENSE-GPLv3 diff --git a/media/footable/css/footable.bootstrap.css b/media/footable-v3/css/footable.bootstrap.css similarity index 100% rename from media/footable/css/footable.bootstrap.css rename to media/footable-v3/css/footable.bootstrap.css diff --git a/media/footable/css/footable.bootstrap.min.css b/media/footable-v3/css/footable.bootstrap.min.css similarity index 100% rename from media/footable/css/footable.bootstrap.min.css rename to media/footable-v3/css/footable.bootstrap.min.css diff --git a/media/footable/css/footable.core.bootstrap.css b/media/footable-v3/css/footable.core.bootstrap.css similarity index 100% rename from media/footable/css/footable.core.bootstrap.css rename to media/footable-v3/css/footable.core.bootstrap.css diff --git a/media/footable/css/footable.core.bootstrap.min.css b/media/footable-v3/css/footable.core.bootstrap.min.css similarity index 100% rename from media/footable/css/footable.core.bootstrap.min.css rename to media/footable-v3/css/footable.core.bootstrap.min.css diff --git a/media/footable/css/footable.core.standalone.css b/media/footable-v3/css/footable.core.standalone.css similarity index 100% rename from media/footable/css/footable.core.standalone.css rename to media/footable-v3/css/footable.core.standalone.css diff --git a/media/footable/css/footable.core.standalone.min.css b/media/footable-v3/css/footable.core.standalone.min.css similarity index 100% rename from media/footable/css/footable.core.standalone.min.css rename to media/footable-v3/css/footable.core.standalone.min.css diff --git a/media/footable/css/footable.editing.css b/media/footable-v3/css/footable.editing.css similarity index 100% rename from media/footable/css/footable.editing.css rename to media/footable-v3/css/footable.editing.css diff --git a/media/footable/css/footable.editing.min.css b/media/footable-v3/css/footable.editing.min.css similarity index 100% rename from media/footable/css/footable.editing.min.css rename to media/footable-v3/css/footable.editing.min.css diff --git a/media/footable/css/footable.filtering.css b/media/footable-v3/css/footable.filtering.css similarity index 100% rename from media/footable/css/footable.filtering.css rename to media/footable-v3/css/footable.filtering.css diff --git a/media/footable/css/footable.filtering.min.css b/media/footable-v3/css/footable.filtering.min.css similarity index 100% rename from media/footable/css/footable.filtering.min.css rename to media/footable-v3/css/footable.filtering.min.css diff --git a/media/footable/css/footable.paging.css b/media/footable-v3/css/footable.paging.css similarity index 100% rename from media/footable/css/footable.paging.css rename to media/footable-v3/css/footable.paging.css diff --git a/media/footable/css/footable.paging.min.css b/media/footable-v3/css/footable.paging.min.css similarity index 100% rename from media/footable/css/footable.paging.min.css rename to media/footable-v3/css/footable.paging.min.css diff --git a/media/footable/css/footable.sorting.css b/media/footable-v3/css/footable.sorting.css similarity index 100% rename from media/footable/css/footable.sorting.css rename to media/footable-v3/css/footable.sorting.css diff --git a/media/footable/css/footable.sorting.min.css b/media/footable-v3/css/footable.sorting.min.css similarity index 100% rename from media/footable/css/footable.sorting.min.css rename to media/footable-v3/css/footable.sorting.min.css diff --git a/media/footable/css/footable.standalone.css b/media/footable-v3/css/footable.standalone.css similarity index 100% rename from media/footable/css/footable.standalone.css rename to media/footable-v3/css/footable.standalone.css diff --git a/media/footable/css/footable.standalone.min.css b/media/footable-v3/css/footable.standalone.min.css similarity index 100% rename from media/footable/css/footable.standalone.min.css rename to media/footable-v3/css/footable.standalone.min.css diff --git a/media/uikit/js/core/index.html b/media/footable-v3/css/index.html similarity index 100% rename from media/uikit/js/core/index.html rename to media/footable-v3/css/index.html diff --git a/media/uikit/js/index.html b/media/footable-v3/index.html similarity index 100% rename from media/uikit/js/index.html rename to media/footable-v3/index.html diff --git a/media/footable/js/footable.core.js b/media/footable-v3/js/footable.core.js similarity index 100% rename from media/footable/js/footable.core.js rename to media/footable-v3/js/footable.core.js diff --git a/media/footable/js/footable.core.min.js b/media/footable-v3/js/footable.core.min.js similarity index 100% rename from media/footable/js/footable.core.min.js rename to media/footable-v3/js/footable.core.min.js diff --git a/media/footable/js/footable.editing.js b/media/footable-v3/js/footable.editing.js similarity index 100% rename from media/footable/js/footable.editing.js rename to media/footable-v3/js/footable.editing.js diff --git a/media/footable/js/footable.editing.min.js b/media/footable-v3/js/footable.editing.min.js similarity index 100% rename from media/footable/js/footable.editing.min.js rename to media/footable-v3/js/footable.editing.min.js diff --git a/media/footable/js/footable.filtering.js b/media/footable-v3/js/footable.filtering.js similarity index 100% rename from media/footable/js/footable.filtering.js rename to media/footable-v3/js/footable.filtering.js diff --git a/media/footable/js/footable.filtering.min.js b/media/footable-v3/js/footable.filtering.min.js similarity index 100% rename from media/footable/js/footable.filtering.min.js rename to media/footable-v3/js/footable.filtering.min.js diff --git a/media/footable/js/footable.min.js b/media/footable-v3/js/footable.min.js similarity index 100% rename from media/footable/js/footable.min.js rename to media/footable-v3/js/footable.min.js diff --git a/media/footable/js/footable.paging.js b/media/footable-v3/js/footable.paging.js similarity index 100% rename from media/footable/js/footable.paging.js rename to media/footable-v3/js/footable.paging.js diff --git a/media/footable/js/footable.paging.min.js b/media/footable-v3/js/footable.paging.min.js similarity index 100% rename from media/footable/js/footable.paging.min.js rename to media/footable-v3/js/footable.paging.min.js diff --git a/media/footable/js/footable.sorting.js b/media/footable-v3/js/footable.sorting.js similarity index 100% rename from media/footable/js/footable.sorting.js rename to media/footable-v3/js/footable.sorting.js diff --git a/media/footable/js/footable.sorting.min.js b/media/footable-v3/js/footable.sorting.min.js similarity index 100% rename from media/footable/js/footable.sorting.min.js rename to media/footable-v3/js/footable.sorting.min.js diff --git a/media/footable/js/footable.state.js b/media/footable-v3/js/footable.state.js similarity index 100% rename from media/footable/js/footable.state.js rename to media/footable-v3/js/footable.state.js diff --git a/media/footable/js/footable.state.min.js b/media/footable-v3/js/footable.state.min.js similarity index 100% rename from media/footable/js/footable.state.min.js rename to media/footable-v3/js/footable.state.min.js diff --git a/media/footable-v3/js/index.html b/media/footable-v3/js/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/footable-v3/js/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/css/components/accordion.almost-flat.css b/media/uikit-v2/css/components/accordion.almost-flat.css similarity index 100% rename from media/uikit/css/components/accordion.almost-flat.css rename to media/uikit-v2/css/components/accordion.almost-flat.css diff --git a/media/uikit/css/components/accordion.almost-flat.min.css b/media/uikit-v2/css/components/accordion.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/accordion.almost-flat.min.css rename to media/uikit-v2/css/components/accordion.almost-flat.min.css diff --git a/media/uikit/css/components/accordion.css b/media/uikit-v2/css/components/accordion.css similarity index 100% rename from media/uikit/css/components/accordion.css rename to media/uikit-v2/css/components/accordion.css diff --git a/media/uikit/css/components/accordion.gradient.css b/media/uikit-v2/css/components/accordion.gradient.css similarity index 100% rename from media/uikit/css/components/accordion.gradient.css rename to media/uikit-v2/css/components/accordion.gradient.css diff --git a/media/uikit/css/components/accordion.gradient.min.css b/media/uikit-v2/css/components/accordion.gradient.min.css similarity index 100% rename from media/uikit/css/components/accordion.gradient.min.css rename to media/uikit-v2/css/components/accordion.gradient.min.css diff --git a/media/uikit/css/components/accordion.min.css b/media/uikit-v2/css/components/accordion.min.css similarity index 100% rename from media/uikit/css/components/accordion.min.css rename to media/uikit-v2/css/components/accordion.min.css diff --git a/media/uikit/css/components/autocomplete.almost-flat.css b/media/uikit-v2/css/components/autocomplete.almost-flat.css similarity index 100% rename from media/uikit/css/components/autocomplete.almost-flat.css rename to media/uikit-v2/css/components/autocomplete.almost-flat.css diff --git a/media/uikit/css/components/autocomplete.almost-flat.min.css b/media/uikit-v2/css/components/autocomplete.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/autocomplete.almost-flat.min.css rename to media/uikit-v2/css/components/autocomplete.almost-flat.min.css diff --git a/media/uikit/css/components/autocomplete.css b/media/uikit-v2/css/components/autocomplete.css similarity index 100% rename from media/uikit/css/components/autocomplete.css rename to media/uikit-v2/css/components/autocomplete.css diff --git a/media/uikit/css/components/autocomplete.gradient.css b/media/uikit-v2/css/components/autocomplete.gradient.css similarity index 100% rename from media/uikit/css/components/autocomplete.gradient.css rename to media/uikit-v2/css/components/autocomplete.gradient.css diff --git a/media/uikit/css/components/autocomplete.gradient.min.css b/media/uikit-v2/css/components/autocomplete.gradient.min.css similarity index 100% rename from media/uikit/css/components/autocomplete.gradient.min.css rename to media/uikit-v2/css/components/autocomplete.gradient.min.css diff --git a/media/uikit/css/components/autocomplete.min.css b/media/uikit-v2/css/components/autocomplete.min.css similarity index 100% rename from media/uikit/css/components/autocomplete.min.css rename to media/uikit-v2/css/components/autocomplete.min.css diff --git a/media/uikit/css/components/datepicker.almost-flat.css b/media/uikit-v2/css/components/datepicker.almost-flat.css similarity index 100% rename from media/uikit/css/components/datepicker.almost-flat.css rename to media/uikit-v2/css/components/datepicker.almost-flat.css diff --git a/media/uikit/css/components/datepicker.almost-flat.min.css b/media/uikit-v2/css/components/datepicker.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/datepicker.almost-flat.min.css rename to media/uikit-v2/css/components/datepicker.almost-flat.min.css diff --git a/media/uikit/css/components/datepicker.css b/media/uikit-v2/css/components/datepicker.css similarity index 100% rename from media/uikit/css/components/datepicker.css rename to media/uikit-v2/css/components/datepicker.css diff --git a/media/uikit/css/components/datepicker.gradient.css b/media/uikit-v2/css/components/datepicker.gradient.css similarity index 100% rename from media/uikit/css/components/datepicker.gradient.css rename to media/uikit-v2/css/components/datepicker.gradient.css diff --git a/media/uikit/css/components/datepicker.gradient.min.css b/media/uikit-v2/css/components/datepicker.gradient.min.css similarity index 100% rename from media/uikit/css/components/datepicker.gradient.min.css rename to media/uikit-v2/css/components/datepicker.gradient.min.css diff --git a/media/uikit/css/components/datepicker.min.css b/media/uikit-v2/css/components/datepicker.min.css similarity index 100% rename from media/uikit/css/components/datepicker.min.css rename to media/uikit-v2/css/components/datepicker.min.css diff --git a/media/uikit/css/components/dotnav.almost-flat.css b/media/uikit-v2/css/components/dotnav.almost-flat.css similarity index 100% rename from media/uikit/css/components/dotnav.almost-flat.css rename to media/uikit-v2/css/components/dotnav.almost-flat.css diff --git a/media/uikit/css/components/dotnav.almost-flat.min.css b/media/uikit-v2/css/components/dotnav.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/dotnav.almost-flat.min.css rename to media/uikit-v2/css/components/dotnav.almost-flat.min.css diff --git a/media/uikit/css/components/dotnav.css b/media/uikit-v2/css/components/dotnav.css similarity index 100% rename from media/uikit/css/components/dotnav.css rename to media/uikit-v2/css/components/dotnav.css diff --git a/media/uikit/css/components/dotnav.gradient.css b/media/uikit-v2/css/components/dotnav.gradient.css similarity index 100% rename from media/uikit/css/components/dotnav.gradient.css rename to media/uikit-v2/css/components/dotnav.gradient.css diff --git a/media/uikit/css/components/dotnav.gradient.min.css b/media/uikit-v2/css/components/dotnav.gradient.min.css similarity index 100% rename from media/uikit/css/components/dotnav.gradient.min.css rename to media/uikit-v2/css/components/dotnav.gradient.min.css diff --git a/media/uikit/css/components/dotnav.min.css b/media/uikit-v2/css/components/dotnav.min.css similarity index 100% rename from media/uikit/css/components/dotnav.min.css rename to media/uikit-v2/css/components/dotnav.min.css diff --git a/media/uikit/css/components/form-advanced.almost-flat.css b/media/uikit-v2/css/components/form-advanced.almost-flat.css similarity index 100% rename from media/uikit/css/components/form-advanced.almost-flat.css rename to media/uikit-v2/css/components/form-advanced.almost-flat.css diff --git a/media/uikit/css/components/form-advanced.almost-flat.min.css b/media/uikit-v2/css/components/form-advanced.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/form-advanced.almost-flat.min.css rename to media/uikit-v2/css/components/form-advanced.almost-flat.min.css diff --git a/media/uikit/css/components/form-advanced.css b/media/uikit-v2/css/components/form-advanced.css similarity index 100% rename from media/uikit/css/components/form-advanced.css rename to media/uikit-v2/css/components/form-advanced.css diff --git a/media/uikit/css/components/form-advanced.gradient.css b/media/uikit-v2/css/components/form-advanced.gradient.css similarity index 100% rename from media/uikit/css/components/form-advanced.gradient.css rename to media/uikit-v2/css/components/form-advanced.gradient.css diff --git a/media/uikit/css/components/form-advanced.gradient.min.css b/media/uikit-v2/css/components/form-advanced.gradient.min.css similarity index 100% rename from media/uikit/css/components/form-advanced.gradient.min.css rename to media/uikit-v2/css/components/form-advanced.gradient.min.css diff --git a/media/uikit/css/components/form-advanced.min.css b/media/uikit-v2/css/components/form-advanced.min.css similarity index 100% rename from media/uikit/css/components/form-advanced.min.css rename to media/uikit-v2/css/components/form-advanced.min.css diff --git a/media/uikit/css/components/form-file.almost-flat.css b/media/uikit-v2/css/components/form-file.almost-flat.css similarity index 100% rename from media/uikit/css/components/form-file.almost-flat.css rename to media/uikit-v2/css/components/form-file.almost-flat.css diff --git a/media/uikit/css/components/form-file.almost-flat.min.css b/media/uikit-v2/css/components/form-file.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/form-file.almost-flat.min.css rename to media/uikit-v2/css/components/form-file.almost-flat.min.css diff --git a/media/uikit/css/components/form-file.css b/media/uikit-v2/css/components/form-file.css similarity index 100% rename from media/uikit/css/components/form-file.css rename to media/uikit-v2/css/components/form-file.css diff --git a/media/uikit/css/components/form-file.gradient.css b/media/uikit-v2/css/components/form-file.gradient.css similarity index 100% rename from media/uikit/css/components/form-file.gradient.css rename to media/uikit-v2/css/components/form-file.gradient.css diff --git a/media/uikit/css/components/form-file.gradient.min.css b/media/uikit-v2/css/components/form-file.gradient.min.css similarity index 100% rename from media/uikit/css/components/form-file.gradient.min.css rename to media/uikit-v2/css/components/form-file.gradient.min.css diff --git a/media/uikit/css/components/form-file.min.css b/media/uikit-v2/css/components/form-file.min.css similarity index 100% rename from media/uikit/css/components/form-file.min.css rename to media/uikit-v2/css/components/form-file.min.css diff --git a/media/uikit/css/components/form-password.almost-flat.css b/media/uikit-v2/css/components/form-password.almost-flat.css similarity index 100% rename from media/uikit/css/components/form-password.almost-flat.css rename to media/uikit-v2/css/components/form-password.almost-flat.css diff --git a/media/uikit/css/components/form-password.almost-flat.min.css b/media/uikit-v2/css/components/form-password.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/form-password.almost-flat.min.css rename to media/uikit-v2/css/components/form-password.almost-flat.min.css diff --git a/media/uikit/css/components/form-password.css b/media/uikit-v2/css/components/form-password.css similarity index 100% rename from media/uikit/css/components/form-password.css rename to media/uikit-v2/css/components/form-password.css diff --git a/media/uikit/css/components/form-password.gradient.css b/media/uikit-v2/css/components/form-password.gradient.css similarity index 100% rename from media/uikit/css/components/form-password.gradient.css rename to media/uikit-v2/css/components/form-password.gradient.css diff --git a/media/uikit/css/components/form-password.gradient.min.css b/media/uikit-v2/css/components/form-password.gradient.min.css similarity index 100% rename from media/uikit/css/components/form-password.gradient.min.css rename to media/uikit-v2/css/components/form-password.gradient.min.css diff --git a/media/uikit/css/components/form-password.min.css b/media/uikit-v2/css/components/form-password.min.css similarity index 100% rename from media/uikit/css/components/form-password.min.css rename to media/uikit-v2/css/components/form-password.min.css diff --git a/media/uikit/css/components/form-select.almost-flat.css b/media/uikit-v2/css/components/form-select.almost-flat.css similarity index 100% rename from media/uikit/css/components/form-select.almost-flat.css rename to media/uikit-v2/css/components/form-select.almost-flat.css diff --git a/media/uikit/css/components/form-select.almost-flat.min.css b/media/uikit-v2/css/components/form-select.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/form-select.almost-flat.min.css rename to media/uikit-v2/css/components/form-select.almost-flat.min.css diff --git a/media/uikit/css/components/form-select.css b/media/uikit-v2/css/components/form-select.css similarity index 100% rename from media/uikit/css/components/form-select.css rename to media/uikit-v2/css/components/form-select.css diff --git a/media/uikit/css/components/form-select.gradient.css b/media/uikit-v2/css/components/form-select.gradient.css similarity index 100% rename from media/uikit/css/components/form-select.gradient.css rename to media/uikit-v2/css/components/form-select.gradient.css diff --git a/media/uikit/css/components/form-select.gradient.min.css b/media/uikit-v2/css/components/form-select.gradient.min.css similarity index 100% rename from media/uikit/css/components/form-select.gradient.min.css rename to media/uikit-v2/css/components/form-select.gradient.min.css diff --git a/media/uikit/css/components/form-select.min.css b/media/uikit-v2/css/components/form-select.min.css similarity index 100% rename from media/uikit/css/components/form-select.min.css rename to media/uikit-v2/css/components/form-select.min.css diff --git a/media/uikit/css/components/htmleditor.almost-flat.css b/media/uikit-v2/css/components/htmleditor.almost-flat.css similarity index 100% rename from media/uikit/css/components/htmleditor.almost-flat.css rename to media/uikit-v2/css/components/htmleditor.almost-flat.css diff --git a/media/uikit/css/components/htmleditor.almost-flat.min.css b/media/uikit-v2/css/components/htmleditor.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/htmleditor.almost-flat.min.css rename to media/uikit-v2/css/components/htmleditor.almost-flat.min.css diff --git a/media/uikit/css/components/htmleditor.css b/media/uikit-v2/css/components/htmleditor.css similarity index 100% rename from media/uikit/css/components/htmleditor.css rename to media/uikit-v2/css/components/htmleditor.css diff --git a/media/uikit/css/components/htmleditor.gradient.css b/media/uikit-v2/css/components/htmleditor.gradient.css similarity index 100% rename from media/uikit/css/components/htmleditor.gradient.css rename to media/uikit-v2/css/components/htmleditor.gradient.css diff --git a/media/uikit/css/components/htmleditor.gradient.min.css b/media/uikit-v2/css/components/htmleditor.gradient.min.css similarity index 100% rename from media/uikit/css/components/htmleditor.gradient.min.css rename to media/uikit-v2/css/components/htmleditor.gradient.min.css diff --git a/media/uikit/css/components/htmleditor.min.css b/media/uikit-v2/css/components/htmleditor.min.css similarity index 100% rename from media/uikit/css/components/htmleditor.min.css rename to media/uikit-v2/css/components/htmleditor.min.css diff --git a/media/uikit-v2/css/components/index.html b/media/uikit-v2/css/components/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/css/components/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/css/components/nestable.almost-flat.css b/media/uikit-v2/css/components/nestable.almost-flat.css similarity index 100% rename from media/uikit/css/components/nestable.almost-flat.css rename to media/uikit-v2/css/components/nestable.almost-flat.css diff --git a/media/uikit/css/components/nestable.almost-flat.min.css b/media/uikit-v2/css/components/nestable.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/nestable.almost-flat.min.css rename to media/uikit-v2/css/components/nestable.almost-flat.min.css diff --git a/media/uikit/css/components/nestable.css b/media/uikit-v2/css/components/nestable.css similarity index 100% rename from media/uikit/css/components/nestable.css rename to media/uikit-v2/css/components/nestable.css diff --git a/media/uikit/css/components/nestable.gradient.css b/media/uikit-v2/css/components/nestable.gradient.css similarity index 100% rename from media/uikit/css/components/nestable.gradient.css rename to media/uikit-v2/css/components/nestable.gradient.css diff --git a/media/uikit/css/components/nestable.gradient.min.css b/media/uikit-v2/css/components/nestable.gradient.min.css similarity index 100% rename from media/uikit/css/components/nestable.gradient.min.css rename to media/uikit-v2/css/components/nestable.gradient.min.css diff --git a/media/uikit/css/components/nestable.min.css b/media/uikit-v2/css/components/nestable.min.css similarity index 100% rename from media/uikit/css/components/nestable.min.css rename to media/uikit-v2/css/components/nestable.min.css diff --git a/media/uikit/css/components/notify.almost-flat.css b/media/uikit-v2/css/components/notify.almost-flat.css similarity index 100% rename from media/uikit/css/components/notify.almost-flat.css rename to media/uikit-v2/css/components/notify.almost-flat.css diff --git a/media/uikit/css/components/notify.almost-flat.min.css b/media/uikit-v2/css/components/notify.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/notify.almost-flat.min.css rename to media/uikit-v2/css/components/notify.almost-flat.min.css diff --git a/media/uikit/css/components/notify.css b/media/uikit-v2/css/components/notify.css similarity index 100% rename from media/uikit/css/components/notify.css rename to media/uikit-v2/css/components/notify.css diff --git a/media/uikit/css/components/notify.gradient.css b/media/uikit-v2/css/components/notify.gradient.css similarity index 100% rename from media/uikit/css/components/notify.gradient.css rename to media/uikit-v2/css/components/notify.gradient.css diff --git a/media/uikit/css/components/notify.gradient.min.css b/media/uikit-v2/css/components/notify.gradient.min.css similarity index 100% rename from media/uikit/css/components/notify.gradient.min.css rename to media/uikit-v2/css/components/notify.gradient.min.css diff --git a/media/uikit/css/components/notify.min.css b/media/uikit-v2/css/components/notify.min.css similarity index 100% rename from media/uikit/css/components/notify.min.css rename to media/uikit-v2/css/components/notify.min.css diff --git a/media/uikit/css/components/placeholder.almost-flat.css b/media/uikit-v2/css/components/placeholder.almost-flat.css similarity index 100% rename from media/uikit/css/components/placeholder.almost-flat.css rename to media/uikit-v2/css/components/placeholder.almost-flat.css diff --git a/media/uikit/css/components/placeholder.almost-flat.min.css b/media/uikit-v2/css/components/placeholder.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/placeholder.almost-flat.min.css rename to media/uikit-v2/css/components/placeholder.almost-flat.min.css diff --git a/media/uikit/css/components/placeholder.css b/media/uikit-v2/css/components/placeholder.css similarity index 100% rename from media/uikit/css/components/placeholder.css rename to media/uikit-v2/css/components/placeholder.css diff --git a/media/uikit/css/components/placeholder.gradient.css b/media/uikit-v2/css/components/placeholder.gradient.css similarity index 100% rename from media/uikit/css/components/placeholder.gradient.css rename to media/uikit-v2/css/components/placeholder.gradient.css diff --git a/media/uikit/css/components/placeholder.gradient.min.css b/media/uikit-v2/css/components/placeholder.gradient.min.css similarity index 100% rename from media/uikit/css/components/placeholder.gradient.min.css rename to media/uikit-v2/css/components/placeholder.gradient.min.css diff --git a/media/uikit/css/components/placeholder.min.css b/media/uikit-v2/css/components/placeholder.min.css similarity index 100% rename from media/uikit/css/components/placeholder.min.css rename to media/uikit-v2/css/components/placeholder.min.css diff --git a/media/uikit/css/components/progress.almost-flat.css b/media/uikit-v2/css/components/progress.almost-flat.css similarity index 100% rename from media/uikit/css/components/progress.almost-flat.css rename to media/uikit-v2/css/components/progress.almost-flat.css diff --git a/media/uikit/css/components/progress.almost-flat.min.css b/media/uikit-v2/css/components/progress.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/progress.almost-flat.min.css rename to media/uikit-v2/css/components/progress.almost-flat.min.css diff --git a/media/uikit/css/components/progress.css b/media/uikit-v2/css/components/progress.css similarity index 100% rename from media/uikit/css/components/progress.css rename to media/uikit-v2/css/components/progress.css diff --git a/media/uikit/css/components/progress.gradient.css b/media/uikit-v2/css/components/progress.gradient.css similarity index 100% rename from media/uikit/css/components/progress.gradient.css rename to media/uikit-v2/css/components/progress.gradient.css diff --git a/media/uikit/css/components/progress.gradient.min.css b/media/uikit-v2/css/components/progress.gradient.min.css similarity index 100% rename from media/uikit/css/components/progress.gradient.min.css rename to media/uikit-v2/css/components/progress.gradient.min.css diff --git a/media/uikit/css/components/progress.min.css b/media/uikit-v2/css/components/progress.min.css similarity index 100% rename from media/uikit/css/components/progress.min.css rename to media/uikit-v2/css/components/progress.min.css diff --git a/media/uikit/css/components/search.almost-flat.css b/media/uikit-v2/css/components/search.almost-flat.css similarity index 100% rename from media/uikit/css/components/search.almost-flat.css rename to media/uikit-v2/css/components/search.almost-flat.css diff --git a/media/uikit/css/components/search.almost-flat.min.css b/media/uikit-v2/css/components/search.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/search.almost-flat.min.css rename to media/uikit-v2/css/components/search.almost-flat.min.css diff --git a/media/uikit/css/components/search.css b/media/uikit-v2/css/components/search.css similarity index 100% rename from media/uikit/css/components/search.css rename to media/uikit-v2/css/components/search.css diff --git a/media/uikit/css/components/search.gradient.css b/media/uikit-v2/css/components/search.gradient.css similarity index 100% rename from media/uikit/css/components/search.gradient.css rename to media/uikit-v2/css/components/search.gradient.css diff --git a/media/uikit/css/components/search.gradient.min.css b/media/uikit-v2/css/components/search.gradient.min.css similarity index 100% rename from media/uikit/css/components/search.gradient.min.css rename to media/uikit-v2/css/components/search.gradient.min.css diff --git a/media/uikit/css/components/search.min.css b/media/uikit-v2/css/components/search.min.css similarity index 100% rename from media/uikit/css/components/search.min.css rename to media/uikit-v2/css/components/search.min.css diff --git a/media/uikit/css/components/slidenav.almost-flat.css b/media/uikit-v2/css/components/slidenav.almost-flat.css similarity index 100% rename from media/uikit/css/components/slidenav.almost-flat.css rename to media/uikit-v2/css/components/slidenav.almost-flat.css diff --git a/media/uikit/css/components/slidenav.almost-flat.min.css b/media/uikit-v2/css/components/slidenav.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/slidenav.almost-flat.min.css rename to media/uikit-v2/css/components/slidenav.almost-flat.min.css diff --git a/media/uikit/css/components/slidenav.css b/media/uikit-v2/css/components/slidenav.css similarity index 100% rename from media/uikit/css/components/slidenav.css rename to media/uikit-v2/css/components/slidenav.css diff --git a/media/uikit/css/components/slidenav.gradient.css b/media/uikit-v2/css/components/slidenav.gradient.css similarity index 100% rename from media/uikit/css/components/slidenav.gradient.css rename to media/uikit-v2/css/components/slidenav.gradient.css diff --git a/media/uikit/css/components/slidenav.gradient.min.css b/media/uikit-v2/css/components/slidenav.gradient.min.css similarity index 100% rename from media/uikit/css/components/slidenav.gradient.min.css rename to media/uikit-v2/css/components/slidenav.gradient.min.css diff --git a/media/uikit/css/components/slidenav.min.css b/media/uikit-v2/css/components/slidenav.min.css similarity index 100% rename from media/uikit/css/components/slidenav.min.css rename to media/uikit-v2/css/components/slidenav.min.css diff --git a/media/uikit/css/components/slider.almost-flat.css b/media/uikit-v2/css/components/slider.almost-flat.css similarity index 100% rename from media/uikit/css/components/slider.almost-flat.css rename to media/uikit-v2/css/components/slider.almost-flat.css diff --git a/media/uikit/css/components/slider.almost-flat.min.css b/media/uikit-v2/css/components/slider.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/slider.almost-flat.min.css rename to media/uikit-v2/css/components/slider.almost-flat.min.css diff --git a/media/uikit/css/components/slider.css b/media/uikit-v2/css/components/slider.css similarity index 100% rename from media/uikit/css/components/slider.css rename to media/uikit-v2/css/components/slider.css diff --git a/media/uikit/css/components/slider.gradient.css b/media/uikit-v2/css/components/slider.gradient.css similarity index 100% rename from media/uikit/css/components/slider.gradient.css rename to media/uikit-v2/css/components/slider.gradient.css diff --git a/media/uikit/css/components/slider.gradient.min.css b/media/uikit-v2/css/components/slider.gradient.min.css similarity index 100% rename from media/uikit/css/components/slider.gradient.min.css rename to media/uikit-v2/css/components/slider.gradient.min.css diff --git a/media/uikit/css/components/slider.min.css b/media/uikit-v2/css/components/slider.min.css similarity index 100% rename from media/uikit/css/components/slider.min.css rename to media/uikit-v2/css/components/slider.min.css diff --git a/media/uikit/css/components/slideshow.almost-flat.css b/media/uikit-v2/css/components/slideshow.almost-flat.css similarity index 100% rename from media/uikit/css/components/slideshow.almost-flat.css rename to media/uikit-v2/css/components/slideshow.almost-flat.css diff --git a/media/uikit/css/components/slideshow.almost-flat.min.css b/media/uikit-v2/css/components/slideshow.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/slideshow.almost-flat.min.css rename to media/uikit-v2/css/components/slideshow.almost-flat.min.css diff --git a/media/uikit/css/components/slideshow.css b/media/uikit-v2/css/components/slideshow.css similarity index 100% rename from media/uikit/css/components/slideshow.css rename to media/uikit-v2/css/components/slideshow.css diff --git a/media/uikit/css/components/slideshow.gradient.css b/media/uikit-v2/css/components/slideshow.gradient.css similarity index 100% rename from media/uikit/css/components/slideshow.gradient.css rename to media/uikit-v2/css/components/slideshow.gradient.css diff --git a/media/uikit/css/components/slideshow.gradient.min.css b/media/uikit-v2/css/components/slideshow.gradient.min.css similarity index 100% rename from media/uikit/css/components/slideshow.gradient.min.css rename to media/uikit-v2/css/components/slideshow.gradient.min.css diff --git a/media/uikit/css/components/slideshow.min.css b/media/uikit-v2/css/components/slideshow.min.css similarity index 100% rename from media/uikit/css/components/slideshow.min.css rename to media/uikit-v2/css/components/slideshow.min.css diff --git a/media/uikit/css/components/sortable.almost-flat.css b/media/uikit-v2/css/components/sortable.almost-flat.css similarity index 100% rename from media/uikit/css/components/sortable.almost-flat.css rename to media/uikit-v2/css/components/sortable.almost-flat.css diff --git a/media/uikit/css/components/sortable.almost-flat.min.css b/media/uikit-v2/css/components/sortable.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/sortable.almost-flat.min.css rename to media/uikit-v2/css/components/sortable.almost-flat.min.css diff --git a/media/uikit/css/components/sortable.css b/media/uikit-v2/css/components/sortable.css similarity index 100% rename from media/uikit/css/components/sortable.css rename to media/uikit-v2/css/components/sortable.css diff --git a/media/uikit/css/components/sortable.gradient.css b/media/uikit-v2/css/components/sortable.gradient.css similarity index 100% rename from media/uikit/css/components/sortable.gradient.css rename to media/uikit-v2/css/components/sortable.gradient.css diff --git a/media/uikit/css/components/sortable.gradient.min.css b/media/uikit-v2/css/components/sortable.gradient.min.css similarity index 100% rename from media/uikit/css/components/sortable.gradient.min.css rename to media/uikit-v2/css/components/sortable.gradient.min.css diff --git a/media/uikit/css/components/sortable.min.css b/media/uikit-v2/css/components/sortable.min.css similarity index 100% rename from media/uikit/css/components/sortable.min.css rename to media/uikit-v2/css/components/sortable.min.css diff --git a/media/uikit/css/components/sticky.almost-flat.css b/media/uikit-v2/css/components/sticky.almost-flat.css similarity index 100% rename from media/uikit/css/components/sticky.almost-flat.css rename to media/uikit-v2/css/components/sticky.almost-flat.css diff --git a/media/uikit/css/components/sticky.almost-flat.min.css b/media/uikit-v2/css/components/sticky.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/sticky.almost-flat.min.css rename to media/uikit-v2/css/components/sticky.almost-flat.min.css diff --git a/media/uikit/css/components/sticky.css b/media/uikit-v2/css/components/sticky.css similarity index 100% rename from media/uikit/css/components/sticky.css rename to media/uikit-v2/css/components/sticky.css diff --git a/media/uikit/css/components/sticky.gradient.css b/media/uikit-v2/css/components/sticky.gradient.css similarity index 100% rename from media/uikit/css/components/sticky.gradient.css rename to media/uikit-v2/css/components/sticky.gradient.css diff --git a/media/uikit/css/components/sticky.gradient.min.css b/media/uikit-v2/css/components/sticky.gradient.min.css similarity index 100% rename from media/uikit/css/components/sticky.gradient.min.css rename to media/uikit-v2/css/components/sticky.gradient.min.css diff --git a/media/uikit/css/components/sticky.min.css b/media/uikit-v2/css/components/sticky.min.css similarity index 100% rename from media/uikit/css/components/sticky.min.css rename to media/uikit-v2/css/components/sticky.min.css diff --git a/media/uikit/css/components/tooltip.almost-flat.css b/media/uikit-v2/css/components/tooltip.almost-flat.css similarity index 100% rename from media/uikit/css/components/tooltip.almost-flat.css rename to media/uikit-v2/css/components/tooltip.almost-flat.css diff --git a/media/uikit/css/components/tooltip.almost-flat.min.css b/media/uikit-v2/css/components/tooltip.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/tooltip.almost-flat.min.css rename to media/uikit-v2/css/components/tooltip.almost-flat.min.css diff --git a/media/uikit/css/components/tooltip.css b/media/uikit-v2/css/components/tooltip.css similarity index 100% rename from media/uikit/css/components/tooltip.css rename to media/uikit-v2/css/components/tooltip.css diff --git a/media/uikit/css/components/tooltip.gradient.css b/media/uikit-v2/css/components/tooltip.gradient.css similarity index 100% rename from media/uikit/css/components/tooltip.gradient.css rename to media/uikit-v2/css/components/tooltip.gradient.css diff --git a/media/uikit/css/components/tooltip.gradient.min.css b/media/uikit-v2/css/components/tooltip.gradient.min.css similarity index 100% rename from media/uikit/css/components/tooltip.gradient.min.css rename to media/uikit-v2/css/components/tooltip.gradient.min.css diff --git a/media/uikit/css/components/tooltip.min.css b/media/uikit-v2/css/components/tooltip.min.css similarity index 100% rename from media/uikit/css/components/tooltip.min.css rename to media/uikit-v2/css/components/tooltip.min.css diff --git a/media/uikit/css/components/upload.almost-flat.css b/media/uikit-v2/css/components/upload.almost-flat.css similarity index 100% rename from media/uikit/css/components/upload.almost-flat.css rename to media/uikit-v2/css/components/upload.almost-flat.css diff --git a/media/uikit/css/components/upload.almost-flat.min.css b/media/uikit-v2/css/components/upload.almost-flat.min.css similarity index 100% rename from media/uikit/css/components/upload.almost-flat.min.css rename to media/uikit-v2/css/components/upload.almost-flat.min.css diff --git a/media/uikit/css/components/upload.css b/media/uikit-v2/css/components/upload.css similarity index 100% rename from media/uikit/css/components/upload.css rename to media/uikit-v2/css/components/upload.css diff --git a/media/uikit/css/components/upload.gradient.css b/media/uikit-v2/css/components/upload.gradient.css similarity index 100% rename from media/uikit/css/components/upload.gradient.css rename to media/uikit-v2/css/components/upload.gradient.css diff --git a/media/uikit/css/components/upload.gradient.min.css b/media/uikit-v2/css/components/upload.gradient.min.css similarity index 100% rename from media/uikit/css/components/upload.gradient.min.css rename to media/uikit-v2/css/components/upload.gradient.min.css diff --git a/media/uikit/css/components/upload.min.css b/media/uikit-v2/css/components/upload.min.css similarity index 100% rename from media/uikit/css/components/upload.min.css rename to media/uikit-v2/css/components/upload.min.css diff --git a/media/uikit-v2/css/index.html b/media/uikit-v2/css/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/css/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/css/uikit.almost-flat.css b/media/uikit-v2/css/uikit.almost-flat.css similarity index 100% rename from media/uikit/css/uikit.almost-flat.css rename to media/uikit-v2/css/uikit.almost-flat.css diff --git a/media/uikit/css/uikit.almost-flat.min.css b/media/uikit-v2/css/uikit.almost-flat.min.css similarity index 100% rename from media/uikit/css/uikit.almost-flat.min.css rename to media/uikit-v2/css/uikit.almost-flat.min.css diff --git a/media/uikit/css/uikit.css b/media/uikit-v2/css/uikit.css similarity index 100% rename from media/uikit/css/uikit.css rename to media/uikit-v2/css/uikit.css diff --git a/media/uikit/css/uikit.gradient.css b/media/uikit-v2/css/uikit.gradient.css similarity index 100% rename from media/uikit/css/uikit.gradient.css rename to media/uikit-v2/css/uikit.gradient.css diff --git a/media/uikit/css/uikit.gradient.min.css b/media/uikit-v2/css/uikit.gradient.min.css similarity index 100% rename from media/uikit/css/uikit.gradient.min.css rename to media/uikit-v2/css/uikit.gradient.min.css diff --git a/media/uikit/css/uikit.min.css b/media/uikit-v2/css/uikit.min.css similarity index 100% rename from media/uikit/css/uikit.min.css rename to media/uikit-v2/css/uikit.min.css diff --git a/media/uikit/fonts/FontAwesome.otf b/media/uikit-v2/fonts/FontAwesome.otf similarity index 100% rename from media/uikit/fonts/FontAwesome.otf rename to media/uikit-v2/fonts/FontAwesome.otf diff --git a/media/uikit/fonts/fontawesome-webfont.ttf b/media/uikit-v2/fonts/fontawesome-webfont.ttf similarity index 100% rename from media/uikit/fonts/fontawesome-webfont.ttf rename to media/uikit-v2/fonts/fontawesome-webfont.ttf diff --git a/media/uikit/fonts/fontawesome-webfont.woff b/media/uikit-v2/fonts/fontawesome-webfont.woff similarity index 100% rename from media/uikit/fonts/fontawesome-webfont.woff rename to media/uikit-v2/fonts/fontawesome-webfont.woff diff --git a/media/uikit/fonts/fontawesome-webfont.woff2 b/media/uikit-v2/fonts/fontawesome-webfont.woff2 similarity index 100% rename from media/uikit/fonts/fontawesome-webfont.woff2 rename to media/uikit-v2/fonts/fontawesome-webfont.woff2 diff --git a/media/uikit-v2/fonts/index.html b/media/uikit-v2/fonts/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/fonts/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit-v2/index.html b/media/uikit-v2/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/js/components/accordion.js b/media/uikit-v2/js/components/accordion.js similarity index 100% rename from media/uikit/js/components/accordion.js rename to media/uikit-v2/js/components/accordion.js diff --git a/media/uikit/js/components/accordion.min.js b/media/uikit-v2/js/components/accordion.min.js similarity index 100% rename from media/uikit/js/components/accordion.min.js rename to media/uikit-v2/js/components/accordion.min.js diff --git a/media/uikit/js/components/autocomplete.js b/media/uikit-v2/js/components/autocomplete.js similarity index 100% rename from media/uikit/js/components/autocomplete.js rename to media/uikit-v2/js/components/autocomplete.js diff --git a/media/uikit/js/components/autocomplete.min.js b/media/uikit-v2/js/components/autocomplete.min.js similarity index 100% rename from media/uikit/js/components/autocomplete.min.js rename to media/uikit-v2/js/components/autocomplete.min.js diff --git a/media/uikit/js/components/datepicker.js b/media/uikit-v2/js/components/datepicker.js similarity index 100% rename from media/uikit/js/components/datepicker.js rename to media/uikit-v2/js/components/datepicker.js diff --git a/media/uikit/js/components/datepicker.min.js b/media/uikit-v2/js/components/datepicker.min.js similarity index 100% rename from media/uikit/js/components/datepicker.min.js rename to media/uikit-v2/js/components/datepicker.min.js diff --git a/media/uikit/js/components/form-password.js b/media/uikit-v2/js/components/form-password.js similarity index 100% rename from media/uikit/js/components/form-password.js rename to media/uikit-v2/js/components/form-password.js diff --git a/media/uikit/js/components/form-password.min.js b/media/uikit-v2/js/components/form-password.min.js similarity index 100% rename from media/uikit/js/components/form-password.min.js rename to media/uikit-v2/js/components/form-password.min.js diff --git a/media/uikit/js/components/form-select.js b/media/uikit-v2/js/components/form-select.js similarity index 100% rename from media/uikit/js/components/form-select.js rename to media/uikit-v2/js/components/form-select.js diff --git a/media/uikit/js/components/form-select.min.js b/media/uikit-v2/js/components/form-select.min.js similarity index 100% rename from media/uikit/js/components/form-select.min.js rename to media/uikit-v2/js/components/form-select.min.js diff --git a/media/uikit/js/components/grid-parallax.js b/media/uikit-v2/js/components/grid-parallax.js similarity index 100% rename from media/uikit/js/components/grid-parallax.js rename to media/uikit-v2/js/components/grid-parallax.js diff --git a/media/uikit/js/components/grid-parallax.min.js b/media/uikit-v2/js/components/grid-parallax.min.js similarity index 100% rename from media/uikit/js/components/grid-parallax.min.js rename to media/uikit-v2/js/components/grid-parallax.min.js diff --git a/media/uikit/js/components/grid.js b/media/uikit-v2/js/components/grid.js similarity index 100% rename from media/uikit/js/components/grid.js rename to media/uikit-v2/js/components/grid.js diff --git a/media/uikit/js/components/grid.min.js b/media/uikit-v2/js/components/grid.min.js similarity index 100% rename from media/uikit/js/components/grid.min.js rename to media/uikit-v2/js/components/grid.min.js diff --git a/media/uikit/js/components/htmleditor.js b/media/uikit-v2/js/components/htmleditor.js similarity index 100% rename from media/uikit/js/components/htmleditor.js rename to media/uikit-v2/js/components/htmleditor.js diff --git a/media/uikit/js/components/htmleditor.min.js b/media/uikit-v2/js/components/htmleditor.min.js similarity index 100% rename from media/uikit/js/components/htmleditor.min.js rename to media/uikit-v2/js/components/htmleditor.min.js diff --git a/media/uikit-v2/js/components/index.html b/media/uikit-v2/js/components/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/js/components/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/js/components/lightbox.js b/media/uikit-v2/js/components/lightbox.js similarity index 100% rename from media/uikit/js/components/lightbox.js rename to media/uikit-v2/js/components/lightbox.js diff --git a/media/uikit/js/components/lightbox.min.js b/media/uikit-v2/js/components/lightbox.min.js similarity index 100% rename from media/uikit/js/components/lightbox.min.js rename to media/uikit-v2/js/components/lightbox.min.js diff --git a/media/uikit/js/components/nestable.js b/media/uikit-v2/js/components/nestable.js similarity index 100% rename from media/uikit/js/components/nestable.js rename to media/uikit-v2/js/components/nestable.js diff --git a/media/uikit/js/components/nestable.min.js b/media/uikit-v2/js/components/nestable.min.js similarity index 100% rename from media/uikit/js/components/nestable.min.js rename to media/uikit-v2/js/components/nestable.min.js diff --git a/media/uikit/js/components/notify.js b/media/uikit-v2/js/components/notify.js similarity index 100% rename from media/uikit/js/components/notify.js rename to media/uikit-v2/js/components/notify.js diff --git a/media/uikit/js/components/notify.min.js b/media/uikit-v2/js/components/notify.min.js similarity index 100% rename from media/uikit/js/components/notify.min.js rename to media/uikit-v2/js/components/notify.min.js diff --git a/media/uikit/js/components/pagination.js b/media/uikit-v2/js/components/pagination.js similarity index 100% rename from media/uikit/js/components/pagination.js rename to media/uikit-v2/js/components/pagination.js diff --git a/media/uikit/js/components/pagination.min.js b/media/uikit-v2/js/components/pagination.min.js similarity index 100% rename from media/uikit/js/components/pagination.min.js rename to media/uikit-v2/js/components/pagination.min.js diff --git a/media/uikit/js/components/parallax.js b/media/uikit-v2/js/components/parallax.js similarity index 100% rename from media/uikit/js/components/parallax.js rename to media/uikit-v2/js/components/parallax.js diff --git a/media/uikit/js/components/parallax.min.js b/media/uikit-v2/js/components/parallax.min.js similarity index 100% rename from media/uikit/js/components/parallax.min.js rename to media/uikit-v2/js/components/parallax.min.js diff --git a/media/uikit/js/components/search.js b/media/uikit-v2/js/components/search.js similarity index 100% rename from media/uikit/js/components/search.js rename to media/uikit-v2/js/components/search.js diff --git a/media/uikit/js/components/search.min.js b/media/uikit-v2/js/components/search.min.js similarity index 100% rename from media/uikit/js/components/search.min.js rename to media/uikit-v2/js/components/search.min.js diff --git a/media/uikit/js/components/slider.js b/media/uikit-v2/js/components/slider.js similarity index 100% rename from media/uikit/js/components/slider.js rename to media/uikit-v2/js/components/slider.js diff --git a/media/uikit/js/components/slider.min.js b/media/uikit-v2/js/components/slider.min.js similarity index 100% rename from media/uikit/js/components/slider.min.js rename to media/uikit-v2/js/components/slider.min.js diff --git a/media/uikit/js/components/slideset.js b/media/uikit-v2/js/components/slideset.js similarity index 100% rename from media/uikit/js/components/slideset.js rename to media/uikit-v2/js/components/slideset.js diff --git a/media/uikit/js/components/slideset.min.js b/media/uikit-v2/js/components/slideset.min.js similarity index 100% rename from media/uikit/js/components/slideset.min.js rename to media/uikit-v2/js/components/slideset.min.js diff --git a/media/uikit/js/components/slideshow-fx.js b/media/uikit-v2/js/components/slideshow-fx.js similarity index 100% rename from media/uikit/js/components/slideshow-fx.js rename to media/uikit-v2/js/components/slideshow-fx.js diff --git a/media/uikit/js/components/slideshow-fx.min.js b/media/uikit-v2/js/components/slideshow-fx.min.js similarity index 100% rename from media/uikit/js/components/slideshow-fx.min.js rename to media/uikit-v2/js/components/slideshow-fx.min.js diff --git a/media/uikit/js/components/slideshow.js b/media/uikit-v2/js/components/slideshow.js similarity index 100% rename from media/uikit/js/components/slideshow.js rename to media/uikit-v2/js/components/slideshow.js diff --git a/media/uikit/js/components/slideshow.min.js b/media/uikit-v2/js/components/slideshow.min.js similarity index 100% rename from media/uikit/js/components/slideshow.min.js rename to media/uikit-v2/js/components/slideshow.min.js diff --git a/media/uikit/js/components/sortable.js b/media/uikit-v2/js/components/sortable.js similarity index 100% rename from media/uikit/js/components/sortable.js rename to media/uikit-v2/js/components/sortable.js diff --git a/media/uikit/js/components/sortable.min.js b/media/uikit-v2/js/components/sortable.min.js similarity index 100% rename from media/uikit/js/components/sortable.min.js rename to media/uikit-v2/js/components/sortable.min.js diff --git a/media/uikit/js/components/sticky.js b/media/uikit-v2/js/components/sticky.js similarity index 100% rename from media/uikit/js/components/sticky.js rename to media/uikit-v2/js/components/sticky.js diff --git a/media/uikit/js/components/sticky.min.js b/media/uikit-v2/js/components/sticky.min.js similarity index 100% rename from media/uikit/js/components/sticky.min.js rename to media/uikit-v2/js/components/sticky.min.js diff --git a/media/uikit/js/components/timepicker.js b/media/uikit-v2/js/components/timepicker.js similarity index 100% rename from media/uikit/js/components/timepicker.js rename to media/uikit-v2/js/components/timepicker.js diff --git a/media/uikit/js/components/timepicker.min.js b/media/uikit-v2/js/components/timepicker.min.js similarity index 100% rename from media/uikit/js/components/timepicker.min.js rename to media/uikit-v2/js/components/timepicker.min.js diff --git a/media/uikit/js/components/tooltip.js b/media/uikit-v2/js/components/tooltip.js similarity index 100% rename from media/uikit/js/components/tooltip.js rename to media/uikit-v2/js/components/tooltip.js diff --git a/media/uikit/js/components/tooltip.min.js b/media/uikit-v2/js/components/tooltip.min.js similarity index 100% rename from media/uikit/js/components/tooltip.min.js rename to media/uikit-v2/js/components/tooltip.min.js diff --git a/media/uikit/js/components/upload.js b/media/uikit-v2/js/components/upload.js similarity index 100% rename from media/uikit/js/components/upload.js rename to media/uikit-v2/js/components/upload.js diff --git a/media/uikit/js/components/upload.min.js b/media/uikit-v2/js/components/upload.min.js similarity index 100% rename from media/uikit/js/components/upload.min.js rename to media/uikit-v2/js/components/upload.min.js diff --git a/media/uikit/js/core/alert.js b/media/uikit-v2/js/core/alert.js similarity index 100% rename from media/uikit/js/core/alert.js rename to media/uikit-v2/js/core/alert.js diff --git a/media/uikit/js/core/alert.min.js b/media/uikit-v2/js/core/alert.min.js similarity index 100% rename from media/uikit/js/core/alert.min.js rename to media/uikit-v2/js/core/alert.min.js diff --git a/media/uikit/js/core/button.js b/media/uikit-v2/js/core/button.js similarity index 100% rename from media/uikit/js/core/button.js rename to media/uikit-v2/js/core/button.js diff --git a/media/uikit/js/core/button.min.js b/media/uikit-v2/js/core/button.min.js similarity index 100% rename from media/uikit/js/core/button.min.js rename to media/uikit-v2/js/core/button.min.js diff --git a/media/uikit/js/core/core.js b/media/uikit-v2/js/core/core.js similarity index 100% rename from media/uikit/js/core/core.js rename to media/uikit-v2/js/core/core.js diff --git a/media/uikit/js/core/core.min.js b/media/uikit-v2/js/core/core.min.js similarity index 100% rename from media/uikit/js/core/core.min.js rename to media/uikit-v2/js/core/core.min.js diff --git a/media/uikit/js/core/cover.js b/media/uikit-v2/js/core/cover.js similarity index 100% rename from media/uikit/js/core/cover.js rename to media/uikit-v2/js/core/cover.js diff --git a/media/uikit/js/core/cover.min.js b/media/uikit-v2/js/core/cover.min.js similarity index 100% rename from media/uikit/js/core/cover.min.js rename to media/uikit-v2/js/core/cover.min.js diff --git a/media/uikit/js/core/dropdown.js b/media/uikit-v2/js/core/dropdown.js similarity index 100% rename from media/uikit/js/core/dropdown.js rename to media/uikit-v2/js/core/dropdown.js diff --git a/media/uikit/js/core/dropdown.min.js b/media/uikit-v2/js/core/dropdown.min.js similarity index 100% rename from media/uikit/js/core/dropdown.min.js rename to media/uikit-v2/js/core/dropdown.min.js diff --git a/media/uikit/js/core/grid.js b/media/uikit-v2/js/core/grid.js similarity index 100% rename from media/uikit/js/core/grid.js rename to media/uikit-v2/js/core/grid.js diff --git a/media/uikit/js/core/grid.min.js b/media/uikit-v2/js/core/grid.min.js similarity index 100% rename from media/uikit/js/core/grid.min.js rename to media/uikit-v2/js/core/grid.min.js diff --git a/media/uikit-v2/js/core/index.html b/media/uikit-v2/js/core/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/js/core/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/js/core/modal.js b/media/uikit-v2/js/core/modal.js similarity index 100% rename from media/uikit/js/core/modal.js rename to media/uikit-v2/js/core/modal.js diff --git a/media/uikit/js/core/modal.min.js b/media/uikit-v2/js/core/modal.min.js similarity index 100% rename from media/uikit/js/core/modal.min.js rename to media/uikit-v2/js/core/modal.min.js diff --git a/media/uikit/js/core/nav.js b/media/uikit-v2/js/core/nav.js similarity index 100% rename from media/uikit/js/core/nav.js rename to media/uikit-v2/js/core/nav.js diff --git a/media/uikit/js/core/nav.min.js b/media/uikit-v2/js/core/nav.min.js similarity index 100% rename from media/uikit/js/core/nav.min.js rename to media/uikit-v2/js/core/nav.min.js diff --git a/media/uikit/js/core/offcanvas.js b/media/uikit-v2/js/core/offcanvas.js similarity index 100% rename from media/uikit/js/core/offcanvas.js rename to media/uikit-v2/js/core/offcanvas.js diff --git a/media/uikit/js/core/offcanvas.min.js b/media/uikit-v2/js/core/offcanvas.min.js similarity index 100% rename from media/uikit/js/core/offcanvas.min.js rename to media/uikit-v2/js/core/offcanvas.min.js diff --git a/media/uikit/js/core/scrollspy.js b/media/uikit-v2/js/core/scrollspy.js similarity index 100% rename from media/uikit/js/core/scrollspy.js rename to media/uikit-v2/js/core/scrollspy.js diff --git a/media/uikit/js/core/scrollspy.min.js b/media/uikit-v2/js/core/scrollspy.min.js similarity index 100% rename from media/uikit/js/core/scrollspy.min.js rename to media/uikit-v2/js/core/scrollspy.min.js diff --git a/media/uikit/js/core/smooth-scroll.js b/media/uikit-v2/js/core/smooth-scroll.js similarity index 100% rename from media/uikit/js/core/smooth-scroll.js rename to media/uikit-v2/js/core/smooth-scroll.js diff --git a/media/uikit/js/core/smooth-scroll.min.js b/media/uikit-v2/js/core/smooth-scroll.min.js similarity index 100% rename from media/uikit/js/core/smooth-scroll.min.js rename to media/uikit-v2/js/core/smooth-scroll.min.js diff --git a/media/uikit/js/core/switcher.js b/media/uikit-v2/js/core/switcher.js similarity index 100% rename from media/uikit/js/core/switcher.js rename to media/uikit-v2/js/core/switcher.js diff --git a/media/uikit/js/core/switcher.min.js b/media/uikit-v2/js/core/switcher.min.js similarity index 100% rename from media/uikit/js/core/switcher.min.js rename to media/uikit-v2/js/core/switcher.min.js diff --git a/media/uikit/js/core/tab.js b/media/uikit-v2/js/core/tab.js similarity index 100% rename from media/uikit/js/core/tab.js rename to media/uikit-v2/js/core/tab.js diff --git a/media/uikit/js/core/tab.min.js b/media/uikit-v2/js/core/tab.min.js similarity index 100% rename from media/uikit/js/core/tab.min.js rename to media/uikit-v2/js/core/tab.min.js diff --git a/media/uikit/js/core/toggle.js b/media/uikit-v2/js/core/toggle.js similarity index 100% rename from media/uikit/js/core/toggle.js rename to media/uikit-v2/js/core/toggle.js diff --git a/media/uikit/js/core/toggle.min.js b/media/uikit-v2/js/core/toggle.min.js similarity index 100% rename from media/uikit/js/core/toggle.min.js rename to media/uikit-v2/js/core/toggle.min.js diff --git a/media/uikit/js/core/touch.js b/media/uikit-v2/js/core/touch.js similarity index 100% rename from media/uikit/js/core/touch.js rename to media/uikit-v2/js/core/touch.js diff --git a/media/uikit/js/core/touch.min.js b/media/uikit-v2/js/core/touch.min.js similarity index 100% rename from media/uikit/js/core/touch.min.js rename to media/uikit-v2/js/core/touch.min.js diff --git a/media/uikit/js/core/utility.js b/media/uikit-v2/js/core/utility.js similarity index 100% rename from media/uikit/js/core/utility.js rename to media/uikit-v2/js/core/utility.js diff --git a/media/uikit/js/core/utility.min.js b/media/uikit-v2/js/core/utility.min.js similarity index 100% rename from media/uikit/js/core/utility.min.js rename to media/uikit-v2/js/core/utility.min.js diff --git a/media/uikit-v2/js/index.html b/media/uikit-v2/js/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/media/uikit-v2/js/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/uikit/js/uikit.js b/media/uikit-v2/js/uikit.js similarity index 100% rename from media/uikit/js/uikit.js rename to media/uikit-v2/js/uikit.js diff --git a/media/uikit/js/uikit.min.js b/media/uikit-v2/js/uikit.min.js similarity index 100% rename from media/uikit/js/uikit.min.js rename to media/uikit-v2/js/uikit.min.js diff --git a/script.php b/script.php index a3e08215b..978dd33f6 100644 --- a/script.php +++ b/script.php @@ -746,6 +746,92 @@ class com_componentbuilderInstallerScript } } + // Create a new query object. + $query = $db->getQuery(true); + // Select id from content type table + $query->select($db->quoteName('type_id')); + $query->from($db->quoteName('#__content_types')); + // Where Library alias is found + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library') ); + $db->setQuery($query); + // Execute query to see if alias is found + $db->execute(); + $library_found = $db->getNumRows(); + // Now check if there were any rows + if ($library_found) + { + // Since there are load the needed library type ids + $library_ids = $db->loadColumn(); + // Remove Library from the content type table + $library_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__content_types')); + $query->where($library_condition); + $db->setQuery($query); + // Execute the query to remove Library items + $library_done = $db->execute(); + if ($library_done); + { + // If succesfully remove Library add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library) type alias was removed from the #__content_type table')); + } + + // Remove Library items from the contentitem tag map table + $library_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__contentitem_tag_map')); + $query->where($library_condition); + $db->setQuery($query); + // Execute the query to remove Library items + $library_done = $db->execute(); + if ($library_done); + { + // If succesfully remove Library add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library) type alias was removed from the #__contentitem_tag_map table')); + } + + // Remove Library items from the ucm content table + $library_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.library') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_content')); + $query->where($library_condition); + $db->setQuery($query); + // Execute the query to remove Library items + $library_done = $db->execute(); + if ($library_done); + { + // If succesfully remove Library add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library) type alias was removed from the #__ucm_content table')); + } + + // Make sure that all the Library items are cleared from DB + foreach ($library_ids as $library_id) + { + // Remove Library items from the ucm base table + $library_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_base')); + $query->where($library_condition); + $db->setQuery($query); + // Execute the query to remove Library items + $db->execute(); + + // Remove Library items from the ucm history table + $library_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_history')); + $query->where($library_condition); + $db->setQuery($query); + // Execute the query to remove Library items + $db->execute(); + } + } + // Create a new query object. $query = $db->getQuery(true); // Select id from content type table @@ -2557,83 +2643,169 @@ class com_componentbuilderInstallerScript // Select id from content type table $query->select($db->quoteName('type_id')); $query->from($db->quoteName('#__content_types')); - // Where Library alias is found - $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library') ); + // Where Library_config alias is found + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library_config') ); $db->setQuery($query); // Execute query to see if alias is found $db->execute(); - $library_found = $db->getNumRows(); + $library_config_found = $db->getNumRows(); // Now check if there were any rows - if ($library_found) + if ($library_config_found) { - // Since there are load the needed library type ids - $library_ids = $db->loadColumn(); - // Remove Library from the content type table - $library_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library') ); + // Since there are load the needed library_config type ids + $library_config_ids = $db->loadColumn(); + // Remove Library_config from the content type table + $library_config_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library_config') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__content_types')); - $query->where($library_condition); + $query->where($library_config_condition); $db->setQuery($query); - // Execute the query to remove Library items - $library_done = $db->execute(); - if ($library_done); + // Execute the query to remove Library_config items + $library_config_done = $db->execute(); + if ($library_config_done); { - // If succesfully remove Library add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.library) type alias was removed from the #__content_type table')); + // If succesfully remove Library_config add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library_config) type alias was removed from the #__content_type table')); } - // Remove Library items from the contentitem tag map table - $library_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library') ); + // Remove Library_config items from the contentitem tag map table + $library_config_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library_config') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__contentitem_tag_map')); - $query->where($library_condition); + $query->where($library_config_condition); $db->setQuery($query); - // Execute the query to remove Library items - $library_done = $db->execute(); - if ($library_done); + // Execute the query to remove Library_config items + $library_config_done = $db->execute(); + if ($library_config_done); { - // If succesfully remove Library add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.library) type alias was removed from the #__contentitem_tag_map table')); + // If succesfully remove Library_config add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library_config) type alias was removed from the #__contentitem_tag_map table')); } - // Remove Library items from the ucm content table - $library_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.library') ); + // Remove Library_config items from the ucm content table + $library_config_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.library_config') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_content')); - $query->where($library_condition); + $query->where($library_config_condition); $db->setQuery($query); - // Execute the query to remove Library items - $library_done = $db->execute(); - if ($library_done); + // Execute the query to remove Library_config items + $library_config_done = $db->execute(); + if ($library_config_done); { - // If succesfully remove Library add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.library) type alias was removed from the #__ucm_content table')); + // If succesfully remove Library_config add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library_config) type alias was removed from the #__ucm_content table')); } - // Make sure that all the Library items are cleared from DB - foreach ($library_ids as $library_id) + // Make sure that all the Library_config items are cleared from DB + foreach ($library_config_ids as $library_config_id) { - // Remove Library items from the ucm base table - $library_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_id); + // Remove Library_config items from the ucm base table + $library_config_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_config_id); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_base')); - $query->where($library_condition); + $query->where($library_config_condition); $db->setQuery($query); - // Execute the query to remove Library items + // Execute the query to remove Library_config items $db->execute(); - // Remove Library items from the ucm history table - $library_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_id); + // Remove Library_config items from the ucm history table + $library_config_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_config_id); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_history')); - $query->where($library_condition); + $query->where($library_config_condition); $db->setQuery($query); - // Execute the query to remove Library items + // Execute the query to remove Library_config items + $db->execute(); + } + } + + // Create a new query object. + $query = $db->getQuery(true); + // Select id from content type table + $query->select($db->quoteName('type_id')); + $query->from($db->quoteName('#__content_types')); + // Where Library_files_folders_urls alias is found + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library_files_folders_urls') ); + $db->setQuery($query); + // Execute query to see if alias is found + $db->execute(); + $library_files_folders_urls_found = $db->getNumRows(); + // Now check if there were any rows + if ($library_files_folders_urls_found) + { + // Since there are load the needed library_files_folders_urls type ids + $library_files_folders_urls_ids = $db->loadColumn(); + // Remove Library_files_folders_urls from the content type table + $library_files_folders_urls_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library_files_folders_urls') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__content_types')); + $query->where($library_files_folders_urls_condition); + $db->setQuery($query); + // Execute the query to remove Library_files_folders_urls items + $library_files_folders_urls_done = $db->execute(); + if ($library_files_folders_urls_done); + { + // If succesfully remove Library_files_folders_urls add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library_files_folders_urls) type alias was removed from the #__content_type table')); + } + + // Remove Library_files_folders_urls items from the contentitem tag map table + $library_files_folders_urls_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.library_files_folders_urls') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__contentitem_tag_map')); + $query->where($library_files_folders_urls_condition); + $db->setQuery($query); + // Execute the query to remove Library_files_folders_urls items + $library_files_folders_urls_done = $db->execute(); + if ($library_files_folders_urls_done); + { + // If succesfully remove Library_files_folders_urls add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library_files_folders_urls) type alias was removed from the #__contentitem_tag_map table')); + } + + // Remove Library_files_folders_urls items from the ucm content table + $library_files_folders_urls_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.library_files_folders_urls') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_content')); + $query->where($library_files_folders_urls_condition); + $db->setQuery($query); + // Execute the query to remove Library_files_folders_urls items + $library_files_folders_urls_done = $db->execute(); + if ($library_files_folders_urls_done); + { + // If succesfully remove Library_files_folders_urls add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.library_files_folders_urls) type alias was removed from the #__ucm_content table')); + } + + // Make sure that all the Library_files_folders_urls items are cleared from DB + foreach ($library_files_folders_urls_ids as $library_files_folders_urls_id) + { + // Remove Library_files_folders_urls items from the ucm base table + $library_files_folders_urls_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_files_folders_urls_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_base')); + $query->where($library_files_folders_urls_condition); + $db->setQuery($query); + // Execute the query to remove Library_files_folders_urls items + $db->execute(); + + // Remove Library_files_folders_urls items from the ucm history table + $library_files_folders_urls_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $library_files_folders_urls_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_history')); + $query->where($library_files_folders_urls_condition); + $db->setQuery($query); + // Execute the query to remove Library_files_folders_urls items $db->execute(); } } @@ -2650,8 +2822,8 @@ class com_componentbuilderInstallerScript $query->delete($db->quoteName('#__assets')); $query->where($componentbuilder_condition); $db->setQuery($query); - $library_done = $db->execute(); - if ($library_done); + $library_files_folders_urls_done = $db->execute(); + if ($library_files_folders_urls_done); { // If succesfully remove componentbuilder add queued success message. $app->enqueueMessage(JText::_('All related items was removed from the #__assets table')); @@ -3058,9 +3230,9 @@ class com_componentbuilderInstallerScript $custom_admin_view->type_title = 'Componentbuilder Custom_admin_view'; $custom_admin_view->type_alias = 'com_componentbuilder.custom_admin_view'; $custom_admin_view->table = '{"special": {"dbtable": "#__componentbuilder_custom_admin_view","key": "id","type": "Custom_admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $custom_admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","add_php_jview":"add_php_jview","add_php_view":"add_php_view","add_css_document":"add_css_document","icon":"icon","add_php_jview_display":"add_php_jview_display","add_js_document":"add_js_document","php_controller":"php_controller","add_css":"add_css","default":"default","add_php_document":"add_php_document","php_model":"php_model","not_required":"not_required","php_document":"php_document","custom_get":"custom_get","php_view":"php_view","main_get":"main_get","php_jview_display":"php_jview_display","dynamic_get":"dynamic_get","php_jview":"php_jview","js_document":"js_document","add_custom_button":"add_custom_button","css_document":"css_document","css":"css"}}'; + $custom_admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","icon":"icon","add_php_jview":"add_php_jview","add_css_document":"add_css_document","add_php_document":"add_php_document","libraries":"libraries","add_php_jview_display":"add_php_jview_display","php_controller":"php_controller","add_js_document":"add_js_document","add_css":"add_css","default":"default","php_model":"php_model","add_php_view":"add_php_view","php_document":"php_document","not_required":"not_required","php_view":"php_view","custom_get":"custom_get","php_jview_display":"php_jview_display","main_get":"main_get","php_jview":"php_jview","dynamic_get":"dynamic_get","js_document":"js_document","css_document":"css_document","add_custom_button":"add_custom_button","css":"css"}}'; $custom_admin_view->router = 'ComponentbuilderHelperRoute::getCustom_admin_viewRoute'; - $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_jview","add_php_view","add_css_document","add_php_jview_display","add_js_document","add_css","add_php_document","not_required","main_get","dynamic_get","add_custom_button"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_jview","add_css_document","add_php_document","add_php_jview_display","add_js_document","add_css","add_php_view","not_required","main_get","dynamic_get","add_custom_button"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $custom_admin_view_Inserted = $db->insertObject('#__content_types', $custom_admin_view); @@ -3070,9 +3242,9 @@ class com_componentbuilderInstallerScript $site_view->type_title = 'Componentbuilder Site_view'; $site_view->type_alias = 'com_componentbuilder.site_view'; $site_view->table = '{"special": {"dbtable": "#__componentbuilder_site_view","key": "id","type": "Site_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $site_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","css":"css","add_php_document":"add_php_document","js_document":"js_document","css_document":"css_document","default":"default","php_ajaxmethod":"php_ajaxmethod","add_php_jview_display":"add_php_jview_display","add_php_view":"add_php_view","php_model":"php_model","add_php_jview":"add_php_jview","not_required":"not_required","custom_get":"custom_get","add_js_document":"add_js_document","main_get":"main_get","add_css_document":"add_css_document","dynamic_get":"dynamic_get","add_css":"add_css","add_php_ajax":"add_php_ajax","add_custom_button":"add_custom_button","button_position":"button_position","php_document":"php_document","php_view":"php_view","php_jview_display":"php_jview_display","php_controller":"php_controller","php_jview":"php_jview"}}'; + $site_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","js_document":"js_document","libraries":"libraries","css":"css","add_php_document":"add_php_document","add_php_jview_display":"add_php_jview_display","css_document":"css_document","php_ajaxmethod":"php_ajaxmethod","add_php_view":"add_php_view","default":"default","add_php_jview":"add_php_jview","php_model":"php_model","php_controller":"php_controller","not_required":"not_required","add_js_document":"add_js_document","custom_get":"custom_get","add_css_document":"add_css_document","main_get":"main_get","add_css":"add_css","dynamic_get":"dynamic_get","add_php_ajax":"add_php_ajax","add_custom_button":"add_custom_button","php_document":"php_document","button_position":"button_position","php_view":"php_view","php_jview_display":"php_jview_display","php_jview":"php_jview"}}'; $site_view->router = 'ComponentbuilderHelperRoute::getSite_viewRoute'; - $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_document","add_php_jview_display","add_php_view","add_php_jview","not_required","add_js_document","main_get","add_css_document","dynamic_get","add_css","add_php_ajax","add_custom_button","button_position"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_document","add_php_jview_display","add_php_view","add_php_jview","not_required","add_js_document","add_css_document","main_get","add_css","dynamic_get","add_php_ajax","add_custom_button","button_position"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $site_view_Inserted = $db->insertObject('#__content_types', $site_view); @@ -3082,9 +3254,9 @@ class com_componentbuilderInstallerScript $template->type_title = 'Componentbuilder Template'; $template->type_alias = 'com_componentbuilder.template'; $template->table = '{"special": {"dbtable": "#__componentbuilder_template","key": "id","type": "Template","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $template->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","snippet":"snippet","dynamic_get":"dynamic_get","add_php_view":"add_php_view","template":"template","not_required":"not_required","php_view":"php_view"}}'; + $template->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","snippet":"snippet","dynamic_get":"dynamic_get","libraries":"libraries","add_php_view":"add_php_view","not_required":"not_required","template":"template","php_view":"php_view"}}'; $template->router = 'ComponentbuilderHelperRoute::getTemplateRoute'; - $template->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/template.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","dynamic_get","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $template->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/template.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","dynamic_get","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $template_Inserted = $db->insertObject('#__content_types', $template); @@ -3094,9 +3266,9 @@ class com_componentbuilderInstallerScript $layout->type_title = 'Componentbuilder Layout'; $layout->type_alias = 'com_componentbuilder.layout'; $layout->table = '{"special": {"dbtable": "#__componentbuilder_layout","key": "id","type": "Layout","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $layout->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","add_php_view":"add_php_view","layout":"layout","not_required":"not_required","php_view":"php_view"}}'; + $layout->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","layout":"layout","add_php_view":"add_php_view","libraries":"libraries","not_required":"not_required","php_view":"php_view"}}'; $layout->router = 'ComponentbuilderHelperRoute::getLayoutRoute'; - $layout->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/layout.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","dynamic_get","snippet","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"}]}'; + $layout->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/layout.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","dynamic_get","snippet","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $layout_Inserted = $db->insertObject('#__content_types', $layout); @@ -3125,6 +3297,18 @@ class com_componentbuilderInstallerScript // Set the object into the content types table. $custom_code_Inserted = $db->insertObject('#__content_types', $custom_code); + // Create the library content type object. + $library = new stdClass(); + $library->type_title = 'Componentbuilder Library'; + $library->type_alias = 'com_componentbuilder.library'; + $library->table = '{"special": {"dbtable": "#__componentbuilder_library","key": "id","type": "Library","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $library->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","how":"how","type":"type","php_setdocument":"php_setdocument","libraries":"libraries","not_required":"not_required"}}'; + $library->router = 'ComponentbuilderHelperRoute::getLibraryRoute'; + $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","how","type","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; + + // Set the object into the content types table. + $library_Inserted = $db->insertObject('#__content_types', $library); + // Create the snippet content type object. $snippet = new stdClass(); $snippet->type_title = 'Componentbuilder Snippet'; @@ -3377,17 +3561,29 @@ class com_componentbuilderInstallerScript // Set the object into the content types table. $snippet_type_Inserted = $db->insertObject('#__content_types', $snippet_type); - // Create the library content type object. - $library = new stdClass(); - $library->type_title = 'Componentbuilder Library'; - $library->type_alias = 'com_componentbuilder.library'; - $library->table = '{"special": {"dbtable": "#__componentbuilder_library","key": "id","type": "Library","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $library->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description"}}'; - $library->router = 'ComponentbuilderHelperRoute::getLibraryRoute'; - $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + // Create the library_config content type object. + $library_config = new stdClass(); + $library_config->type_title = 'Componentbuilder Library_config'; + $library_config->type_alias = 'com_componentbuilder.library_config'; + $library_config->table = '{"special": {"dbtable": "#__componentbuilder_library_config","key": "id","type": "Library_config","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $library_config->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "library","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"library":"library"}}'; + $library_config->router = 'ComponentbuilderHelperRoute::getLibrary_configRoute'; + $library_config->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library_config.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","library"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. - $library_Inserted = $db->insertObject('#__content_types', $library); + $library_config_Inserted = $db->insertObject('#__content_types', $library_config); + + // Create the library_files_folders_urls content type object. + $library_files_folders_urls = new stdClass(); + $library_files_folders_urls->type_title = 'Componentbuilder Library_files_folders_urls'; + $library_files_folders_urls->type_alias = 'com_componentbuilder.library_files_folders_urls'; + $library_files_folders_urls->table = '{"special": {"dbtable": "#__componentbuilder_library_files_folders_urls","key": "id","type": "Library_files_folders_urls","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $library_files_folders_urls->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "library","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"library":"library"}}'; + $library_files_folders_urls->router = 'ComponentbuilderHelperRoute::getLibrary_files_folders_urlsRoute'; + $library_files_folders_urls->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library_files_folders_urls.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","library"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; + + // Set the object into the content types table. + $library_files_folders_urls_Inserted = $db->insertObject('#__content_types', $library_files_folders_urls); // Install the global extenstion params. @@ -3478,9 +3674,9 @@ class com_componentbuilderInstallerScript $custom_admin_view->type_title = 'Componentbuilder Custom_admin_view'; $custom_admin_view->type_alias = 'com_componentbuilder.custom_admin_view'; $custom_admin_view->table = '{"special": {"dbtable": "#__componentbuilder_custom_admin_view","key": "id","type": "Custom_admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $custom_admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","add_php_jview":"add_php_jview","add_php_view":"add_php_view","add_css_document":"add_css_document","icon":"icon","add_php_jview_display":"add_php_jview_display","add_js_document":"add_js_document","php_controller":"php_controller","add_css":"add_css","default":"default","add_php_document":"add_php_document","php_model":"php_model","not_required":"not_required","php_document":"php_document","custom_get":"custom_get","php_view":"php_view","main_get":"main_get","php_jview_display":"php_jview_display","dynamic_get":"dynamic_get","php_jview":"php_jview","js_document":"js_document","add_custom_button":"add_custom_button","css_document":"css_document","css":"css"}}'; + $custom_admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","icon":"icon","add_php_jview":"add_php_jview","add_css_document":"add_css_document","add_php_document":"add_php_document","libraries":"libraries","add_php_jview_display":"add_php_jview_display","php_controller":"php_controller","add_js_document":"add_js_document","add_css":"add_css","default":"default","php_model":"php_model","add_php_view":"add_php_view","php_document":"php_document","not_required":"not_required","php_view":"php_view","custom_get":"custom_get","php_jview_display":"php_jview_display","main_get":"main_get","php_jview":"php_jview","dynamic_get":"dynamic_get","js_document":"js_document","css_document":"css_document","add_custom_button":"add_custom_button","css":"css"}}'; $custom_admin_view->router = 'ComponentbuilderHelperRoute::getCustom_admin_viewRoute'; - $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_jview","add_php_view","add_css_document","add_php_jview_display","add_js_document","add_css","add_php_document","not_required","main_get","dynamic_get","add_custom_button"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_jview","add_css_document","add_php_document","add_php_jview_display","add_js_document","add_css","add_php_view","not_required","main_get","dynamic_get","add_custom_button"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Check if custom_admin_view type is already in content_type DB. $custom_admin_view_id = null; @@ -3507,9 +3703,9 @@ class com_componentbuilderInstallerScript $site_view->type_title = 'Componentbuilder Site_view'; $site_view->type_alias = 'com_componentbuilder.site_view'; $site_view->table = '{"special": {"dbtable": "#__componentbuilder_site_view","key": "id","type": "Site_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $site_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","css":"css","add_php_document":"add_php_document","js_document":"js_document","css_document":"css_document","default":"default","php_ajaxmethod":"php_ajaxmethod","add_php_jview_display":"add_php_jview_display","add_php_view":"add_php_view","php_model":"php_model","add_php_jview":"add_php_jview","not_required":"not_required","custom_get":"custom_get","add_js_document":"add_js_document","main_get":"main_get","add_css_document":"add_css_document","dynamic_get":"dynamic_get","add_css":"add_css","add_php_ajax":"add_php_ajax","add_custom_button":"add_custom_button","button_position":"button_position","php_document":"php_document","php_view":"php_view","php_jview_display":"php_jview_display","php_controller":"php_controller","php_jview":"php_jview"}}'; + $site_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name":"name","codename":"codename","description":"description","snippet":"snippet","js_document":"js_document","libraries":"libraries","css":"css","add_php_document":"add_php_document","add_php_jview_display":"add_php_jview_display","css_document":"css_document","php_ajaxmethod":"php_ajaxmethod","add_php_view":"add_php_view","default":"default","add_php_jview":"add_php_jview","php_model":"php_model","php_controller":"php_controller","not_required":"not_required","add_js_document":"add_js_document","custom_get":"custom_get","add_css_document":"add_css_document","main_get":"main_get","add_css":"add_css","dynamic_get":"dynamic_get","add_php_ajax":"add_php_ajax","add_custom_button":"add_custom_button","php_document":"php_document","button_position":"button_position","php_view":"php_view","php_jview_display":"php_jview_display","php_jview":"php_jview"}}'; $site_view->router = 'ComponentbuilderHelperRoute::getSite_viewRoute'; - $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_document","add_php_jview_display","add_php_view","add_php_jview","not_required","add_js_document","main_get","add_css_document","dynamic_get","add_css","add_php_ajax","add_custom_button","button_position"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","add_php_document","add_php_jview_display","add_php_view","add_php_jview","not_required","add_js_document","add_css_document","main_get","add_css","dynamic_get","add_php_ajax","add_custom_button","button_position"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Check if site_view type is already in content_type DB. $site_view_id = null; @@ -3536,9 +3732,9 @@ class com_componentbuilderInstallerScript $template->type_title = 'Componentbuilder Template'; $template->type_alias = 'com_componentbuilder.template'; $template->table = '{"special": {"dbtable": "#__componentbuilder_template","key": "id","type": "Template","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $template->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","snippet":"snippet","dynamic_get":"dynamic_get","add_php_view":"add_php_view","template":"template","not_required":"not_required","php_view":"php_view"}}'; + $template->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","snippet":"snippet","dynamic_get":"dynamic_get","libraries":"libraries","add_php_view":"add_php_view","not_required":"not_required","template":"template","php_view":"php_view"}}'; $template->router = 'ComponentbuilderHelperRoute::getTemplateRoute'; - $template->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/template.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","dynamic_get","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $template->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/template.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","snippet","dynamic_get","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Check if template type is already in content_type DB. $template_id = null; @@ -3565,9 +3761,9 @@ class com_componentbuilderInstallerScript $layout->type_title = 'Componentbuilder Layout'; $layout->type_alias = 'com_componentbuilder.layout'; $layout->table = '{"special": {"dbtable": "#__componentbuilder_layout","key": "id","type": "Layout","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $layout->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","add_php_view":"add_php_view","layout":"layout","not_required":"not_required","php_view":"php_view"}}'; + $layout->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","alias":"alias","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","layout":"layout","add_php_view":"add_php_view","libraries":"libraries","not_required":"not_required","php_view":"php_view"}}'; $layout->router = 'ComponentbuilderHelperRoute::getLayoutRoute'; - $layout->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/layout.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","dynamic_get","snippet","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"}]}'; + $layout->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/layout.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","dynamic_get","snippet","add_php_view","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Check if layout type is already in content_type DB. $layout_id = null; @@ -3647,6 +3843,35 @@ class com_componentbuilderInstallerScript $custom_code_Inserted = $db->insertObject('#__content_types', $custom_code); } + // Create the library content type object. + $library = new stdClass(); + $library->type_title = 'Componentbuilder Library'; + $library->type_alias = 'com_componentbuilder.library'; + $library->table = '{"special": {"dbtable": "#__componentbuilder_library","key": "id","type": "Library","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $library->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","how":"how","type":"type","php_setdocument":"php_setdocument","libraries":"libraries","not_required":"not_required"}}'; + $library->router = 'ComponentbuilderHelperRoute::getLibraryRoute'; + $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","how","type","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; + + // Check if library type is already in content_type DB. + $library_id = null; + $query = $db->getQuery(true); + $query->select($db->quoteName(array('type_id'))); + $query->from($db->quoteName('#__content_types')); + $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($library->type_alias)); + $db->setQuery($query); + $db->execute(); + + // Set the object into the content types table. + if ($db->getNumRows()) + { + $library->type_id = $db->loadResult(); + $library_Updated = $db->updateObject('#__content_types', $library, 'type_id'); + } + else + { + $library_Inserted = $db->insertObject('#__content_types', $library); + } + // Create the snippet content type object. $snippet = new stdClass(); $snippet->type_title = 'Componentbuilder Snippet'; @@ -4256,33 +4481,62 @@ class com_componentbuilderInstallerScript $snippet_type_Inserted = $db->insertObject('#__content_types', $snippet_type); } - // Create the library content type object. - $library = new stdClass(); - $library->type_title = 'Componentbuilder Library'; - $library->type_alias = 'com_componentbuilder.library'; - $library->table = '{"special": {"dbtable": "#__componentbuilder_library","key": "id","type": "Library","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $library->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description"}}'; - $library->router = 'ComponentbuilderHelperRoute::getLibraryRoute'; - $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + // Create the library_config content type object. + $library_config = new stdClass(); + $library_config->type_title = 'Componentbuilder Library_config'; + $library_config->type_alias = 'com_componentbuilder.library_config'; + $library_config->table = '{"special": {"dbtable": "#__componentbuilder_library_config","key": "id","type": "Library_config","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $library_config->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "library","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"library":"library"}}'; + $library_config->router = 'ComponentbuilderHelperRoute::getLibrary_configRoute'; + $library_config->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library_config.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","library"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; - // Check if library type is already in content_type DB. - $library_id = null; + // Check if library_config type is already in content_type DB. + $library_config_id = null; $query = $db->getQuery(true); $query->select($db->quoteName(array('type_id'))); $query->from($db->quoteName('#__content_types')); - $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($library->type_alias)); + $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($library_config->type_alias)); $db->setQuery($query); $db->execute(); // Set the object into the content types table. if ($db->getNumRows()) { - $library->type_id = $db->loadResult(); - $library_Updated = $db->updateObject('#__content_types', $library, 'type_id'); + $library_config->type_id = $db->loadResult(); + $library_config_Updated = $db->updateObject('#__content_types', $library_config, 'type_id'); } else { - $library_Inserted = $db->insertObject('#__content_types', $library); + $library_config_Inserted = $db->insertObject('#__content_types', $library_config); + } + + // Create the library_files_folders_urls content type object. + $library_files_folders_urls = new stdClass(); + $library_files_folders_urls->type_title = 'Componentbuilder Library_files_folders_urls'; + $library_files_folders_urls->type_alias = 'com_componentbuilder.library_files_folders_urls'; + $library_files_folders_urls->table = '{"special": {"dbtable": "#__componentbuilder_library_files_folders_urls","key": "id","type": "Library_files_folders_urls","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $library_files_folders_urls->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "library","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"library":"library"}}'; + $library_files_folders_urls->router = 'ComponentbuilderHelperRoute::getLibrary_files_folders_urlsRoute'; + $library_files_folders_urls->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library_files_folders_urls.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","library"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; + + // Check if library_files_folders_urls type is already in content_type DB. + $library_files_folders_urls_id = null; + $query = $db->getQuery(true); + $query->select($db->quoteName(array('type_id'))); + $query->from($db->quoteName('#__content_types')); + $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($library_files_folders_urls->type_alias)); + $db->setQuery($query); + $db->execute(); + + // Set the object into the content types table. + if ($db->getNumRows()) + { + $library_files_folders_urls->type_id = $db->loadResult(); + $library_files_folders_urls_Updated = $db->updateObject('#__content_types', $library_files_folders_urls, 'type_id'); + } + else + { + $library_files_folders_urls_Inserted = $db->insertObject('#__content_types', $library_files_folders_urls); } @@ -4485,7 +4739,7 @@ class com_componentbuilderInstallerScript echo ' -

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

'; +

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

'; } } } diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index efa51a2b4..e9a45f71c 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -32,6 +32,11 @@ defined('_JEXEC') or die('Restricted access'); abstract class ComponentbuilderHelper { + /** + * Locked Libraries (we can not have these change) + **/ + public static $libraryNames = array(1 => 'No Library', 2 => 'Bootstrap v4', 3 => 'Uikit v3', 4 => 'Uikit v2', 5 => 'FooTable v2', 6 => 'FooTable v3'); + /** * The global params **/ @@ -106,6 +111,203 @@ abstract class ComponentbuilderHelper return array('contributor_company' => self::$localCompany['company'] ,'contributor_name' => self::$localCompany['owner'], 'contributor_email' => self::$localCompany['email'], 'contributor_website' => self::$localCompany['website'], 'origin' => 'global'); } + /** + * Get the library files + * + * @param int $id The library id to target + * + * @return array On success the array of files that belong to this library + * + */ + public static function getLibraryFiles($id) + { + // get the library files, folders, and urls + $files = array(); + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('b.name','a.addurls','a.addfolders','a.addfiles'))); + $query->from($db->quoteName('#__componentbuilder_library_files_folders_urls','a')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'b') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('b.id') . ')'); + $query->where($db->quoteName('a.library') . ' = ' . (int) $id); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // prepare the files + $result = $db->loadObject(); + // first we load the URLs + if (self::checkJson($result->addurls)) + { + // convert to array + $result->addurls = json_decode($result->addurls, true); + // set urls + if (self::checkArray($result->addurls)) + { + // build media folder path + $mediaPath = '/media/' . strtolower( preg_replace('/\s+/', '-', self::safeString($result->name, 'filename', ' ', false))); + // load the urls + foreach($result->addurls as $url) + { + if (isset($url['url']) && self::checkString($url['url'])) + { + // set the path if needed + if (isset($url['type']) && $url['type'] > 1) + { + $fileName = basename($url['url']); + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + // set the path to library file + $url['path'] = $mediaPath . $path . '/' . $fileName; // we need this for later + } + // if local path is set, then use it first + if (isset($url['path'])) + { + // load document script + $files[md5($url['path'])] = '(' . JText::_('URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LOCAL'); + } + // load url also if not building document + $files[md5($url['url'])] = '(' . JText::_('URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LINK'); + } + } + } + } + // load the local files + if (self::checkJson($result->addfiles)) + { + // convert to array + $result->addfiles = json_decode($result->addfiles, true); + // set files + if (self::checkArray($result->addfiles)) + { + foreach($result->addfiles as $file) + { + if (isset($file['file']) && isset($file['path'])) + { + $path = '/'.trim($file['path'], '/'); + // check if path has new file name (has extetion) + $pathInfo = pathinfo($path); + if (isset($pathInfo['extension']) && $pathInfo['extension']) + { + // load document script + $files[md5($path)] = '(' . JText::_('COM_COMPONENTBUILDER_FILE') . ') ' . $file['file']; + } + else + { + // load document script + $files[md5($path.'/'.trim($file['file'],'/'))] = '(' . JText::_('COM_COMPONENTBUILDER_FILE') . ') ' . $file['file']; + } + } + } + } + } + // load the files in the folder + if (self::checkJson($result->addfolders)) + { + // convert to array + $result->addfolders = json_decode($result->addfolders, true); + // set folder + if (self::checkArray($result->addfolders)) + { + // get the global settings + if (!self::checkObject(self::$params)) + { + self::$params = JComponentHelper::getParams('com_componentbuilder'); + } + // reset bucket + $bucket = array(); + // get custom folder path + $customPath = '/'.trim(self::$params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'), '/'); + // get all the file paths + foreach ($result->addfolders as $folder) + { + if (isset($folder['path']) && isset($folder['folder'])) + { + $_path = '/'.trim($folder['path'], '/'); + $customFolder = '/'.trim($folder['folder'], '/'); + if (isset($folder['rename']) && 1 == $folder['rename']) + { + if ($_paths = self::getAllFilePaths($customPath.$customFolder)) + { + $bucket[$_path] = $_paths; + } + } + else + { + $path = $_path.$customFolder; + if ($_paths = self::getAllFilePaths($customPath.$customFolder)) + { + $bucket[$path] = $_paths; + } + } + } + } + // now load the script + if (self::checkArray($bucket)) + { + foreach ($bucket as $root => $paths) + { + // load per path + foreach($paths as $path) + { + $files[md5($root.'/'.trim($path, '/'))] = '(' . JText::_('COM_COMPONENTBUILDER_FOLDER') . ') ' . basename($path); + } + } + } + } + } + // return files if found + if (self::checkArray($files)) + { + return $files; + } + } + return false; + } + + /** + * get all the file paths in folder and sub folders + * + * @param string $folder The local path to parse + * @param array $fileTypes The type of files to get + * + * @return void + * + */ + public static function getAllFilePaths($folder, $fileTypes = array('\.php', '\.js', '\.css', '\.less')) + { + if (JFolder::exists($folder)) + { + // we must first store the current woking directory + $joomla = getcwd(); + // we are changing the working directory to the componet path + chdir($folder); + // get the files + foreach ($fileTypes as $type) + { + // get a list of files in the current directory tree + $files[] = JFolder::files('.', $type, true, true); + } + // change back to Joomla working directory + chdir($joomla); + // return array of files + return array_map( function($file) { return str_replace('./', '/', $file); }, (array) self::mergeArrays($files)); + } + return false; + } + /** * get all component IDs */ @@ -2208,6 +2410,31 @@ abstract class ComponentbuilderHelper } return false; } + + /** + * Check if we are connected + * Thanks https://stackoverflow.com/a/4860432/1429677 + * + * @returns bool true on success + **/ + public static function isConnected() + { + // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? + $connected = @fsockopen("www.example.com", 80); + // website, port (try 80 or 443) + if ($connected) + { + //action when connected + $is_conn = true; + fclose($connected); + } + else + { + //action in connection failure + $is_conn = false; + } + return $is_conn; + } public static function mergeArrays($arrays) { diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index 58156c1bf..b17095274 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -17,9 +17,13 @@ COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" COM_COMPONENTBUILDER_ERROR="Error!" +COM_COMPONENTBUILDER_FILE="File" +COM_COMPONENTBUILDER_FOLDER="Folder" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key" COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED="Key has not changed" COM_COMPONENTBUILDER_LICENSE_S="License: %s" +COM_COMPONENTBUILDER_LINK="Link" +COM_COMPONENTBUILDER_LOCAL="Local" COM_COMPONENTBUILDER_NEW="New" COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." diff --git a/site/models/api.php b/site/models/api.php index f29adbb0d..4576579b7 100644 --- a/site/models/api.php +++ b/site/models/api.php @@ -136,6 +136,9 @@ class ComponentbuilderModelApi extends JModelItem $app->redirect(JURI::root()); return false; } + // Load the JEvent Dispatcher + JPluginHelper::importPlugin('content'); + $this->_dispatcher = JEventDispatcher::getInstance(); // set data object to item. $this->_item[$pk] = $data; diff --git a/site/views/api/view.html.php b/site/views/api/view.html.php index be3d89eee..3e0a4f186 100644 --- a/site/views/api/view.html.php +++ b/site/views/api/view.html.php @@ -72,7 +72,7 @@ class ComponentbuilderViewApi extends JViewLegacy // Load the header checker class. require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' ); // Initialize the header checker. - $HeaderCheck = new componentbuilderHeaderCheck; + $HeaderCheck = new componentbuilderHeaderCheck; // Load uikit options. $uikit = $this->params->get('uikit_load'); @@ -84,12 +84,12 @@ 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/css/uikit'.$style.$size.'.css'); + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css'); } // 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/js/uikit'.$size.'.js'); + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js'); } // add the document default css file $this->document->addStyleSheet(JURI::root(true) .'/components/com_componentbuilder/assets/css/api.css');