From 7d27af5d59a809982bf0290f0ba6b36a136a13fa Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 12 Nov 2017 00:18:13 +0200 Subject: [PATCH] Added snippet types and libraries to snippets --- README.md | 10 +- admin/README.txt | 10 +- admin/access.xml | 34 + admin/assets/css/libraries.css | 27 + admin/assets/css/library.css | 27 + admin/assets/css/snippet_type.css | 27 + admin/assets/css/snippet_types.css | 27 + admin/controller.php | 4 +- admin/controllers/libraries.php | 48 + admin/controllers/library.php | 326 +++++++ admin/controllers/snippet_type.php | 326 +++++++ admin/controllers/snippet_types.php | 48 + .../en-GB/en-GB.com_componentbuilder.ini | 145 ++- .../en-GB/en-GB.com_componentbuilder.sys.ini | 32 + admin/layouts/library/details_left.php | 54 ++ admin/layouts/library/details_right.php | 54 ++ admin/layouts/library/index.html | 1 + admin/layouts/library/publishing.php | 58 ++ admin/layouts/library/publlshing.php | 60 ++ admin/layouts/snippet/details_above.php | 2 +- admin/layouts/snippet/details_left.php | 1 + admin/layouts/snippet_type/details_left.php | 54 ++ admin/layouts/snippet_type/details_right.php | 54 ++ admin/layouts/snippet_type/index.html | 1 + admin/layouts/snippet_type/publishing.php | 58 ++ admin/layouts/snippet_type/publlshing.php | 60 ++ admin/models/componentbuilder.php | 8 +- admin/models/fields/library.php | 171 ++++ admin/models/fields/snippettype.php | 171 ++++ admin/models/forms/library.js | 25 + admin/models/forms/library.xml | 148 +++ admin/models/forms/snippet.xml | 57 +- admin/models/forms/snippet_type.js | 25 + admin/models/forms/snippet_type.xml | 148 +++ admin/models/libraries.php | 275 ++++++ admin/models/library.php | 859 ++++++++++++++++++ admin/models/snippet_type.php | 859 ++++++++++++++++++ admin/models/snippet_types.php | 275 ++++++ admin/models/snippets.php | 68 +- admin/sql/install.mysql.utf8.sql | 302 ++++-- admin/sql/uninstall.mysql.utf8.sql | 2 + admin/sql/updates/mysql/2.6.3.sql | 106 +++ admin/tables/library.php | 351 +++++++ admin/tables/snippet_type.php | 351 +++++++ admin/views/libraries/index.html | 1 + admin/views/libraries/tmpl/default.php | 99 ++ .../libraries/tmpl/default_batch_body.php | 32 + .../libraries/tmpl/default_batch_footer.php | 37 + admin/views/libraries/tmpl/default_body.php | 111 +++ admin/views/libraries/tmpl/default_foot.php | 32 + admin/views/libraries/tmpl/default_head.php | 64 ++ .../views/libraries/tmpl/default_toolbar.php | 59 ++ admin/views/libraries/tmpl/index.html | 1 + admin/views/libraries/view.html.php | 240 +++++ admin/views/library/submitbutton.js | 49 + admin/views/library/tmpl/edit.php | 117 +++ admin/views/library/tmpl/index.html | 1 + admin/views/library/view.html.php | 199 ++++ admin/views/snippet_type/submitbutton.js | 49 + admin/views/snippet_type/tmpl/edit.php | 117 +++ admin/views/snippet_type/tmpl/index.html | 1 + admin/views/snippet_type/view.html.php | 199 ++++ admin/views/snippet_types/index.html | 1 + admin/views/snippet_types/tmpl/default.php | 99 ++ .../snippet_types/tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../views/snippet_types/tmpl/default_body.php | 111 +++ .../views/snippet_types/tmpl/default_foot.php | 32 + .../views/snippet_types/tmpl/default_head.php | 64 ++ .../snippet_types/tmpl/default_toolbar.php | 59 ++ admin/views/snippet_types/tmpl/index.html | 1 + admin/views/snippet_types/view.html.php | 240 +++++ admin/views/snippets/tmpl/default_body.php | 5 +- admin/views/snippets/tmpl/default_foot.php | 2 +- admin/views/snippets/tmpl/default_head.php | 5 +- admin/views/snippets/view.html.php | 77 +- componentbuilder.xml | 4 +- componentbuilder_update_server.xml | 17 + script.php | 268 +++++- 79 files changed, 7965 insertions(+), 246 deletions(-) create mode 100644 admin/assets/css/libraries.css create mode 100644 admin/assets/css/library.css create mode 100644 admin/assets/css/snippet_type.css create mode 100644 admin/assets/css/snippet_types.css create mode 100644 admin/controllers/libraries.php create mode 100644 admin/controllers/library.php create mode 100644 admin/controllers/snippet_type.php create mode 100644 admin/controllers/snippet_types.php create mode 100644 admin/layouts/library/details_left.php create mode 100644 admin/layouts/library/details_right.php create mode 100644 admin/layouts/library/index.html create mode 100644 admin/layouts/library/publishing.php create mode 100644 admin/layouts/library/publlshing.php create mode 100644 admin/layouts/snippet_type/details_left.php create mode 100644 admin/layouts/snippet_type/details_right.php create mode 100644 admin/layouts/snippet_type/index.html create mode 100644 admin/layouts/snippet_type/publishing.php create mode 100644 admin/layouts/snippet_type/publlshing.php create mode 100644 admin/models/fields/library.php create mode 100644 admin/models/fields/snippettype.php create mode 100644 admin/models/forms/library.js create mode 100644 admin/models/forms/library.xml create mode 100644 admin/models/forms/snippet_type.js create mode 100644 admin/models/forms/snippet_type.xml create mode 100644 admin/models/libraries.php create mode 100644 admin/models/library.php create mode 100644 admin/models/snippet_type.php create mode 100644 admin/models/snippet_types.php create mode 100644 admin/sql/updates/mysql/2.6.3.sql create mode 100644 admin/tables/library.php create mode 100644 admin/tables/snippet_type.php create mode 100644 admin/views/libraries/index.html create mode 100644 admin/views/libraries/tmpl/default.php create mode 100644 admin/views/libraries/tmpl/default_batch_body.php create mode 100644 admin/views/libraries/tmpl/default_batch_footer.php create mode 100644 admin/views/libraries/tmpl/default_body.php create mode 100644 admin/views/libraries/tmpl/default_foot.php create mode 100644 admin/views/libraries/tmpl/default_head.php create mode 100644 admin/views/libraries/tmpl/default_toolbar.php create mode 100644 admin/views/libraries/tmpl/index.html create mode 100644 admin/views/libraries/view.html.php create mode 100644 admin/views/library/submitbutton.js create mode 100644 admin/views/library/tmpl/edit.php create mode 100644 admin/views/library/tmpl/index.html create mode 100644 admin/views/library/view.html.php create mode 100644 admin/views/snippet_type/submitbutton.js create mode 100644 admin/views/snippet_type/tmpl/edit.php create mode 100644 admin/views/snippet_type/tmpl/index.html create mode 100644 admin/views/snippet_type/view.html.php create mode 100644 admin/views/snippet_types/index.html create mode 100644 admin/views/snippet_types/tmpl/default.php create mode 100644 admin/views/snippet_types/tmpl/default_batch_body.php create mode 100644 admin/views/snippet_types/tmpl/default_batch_footer.php create mode 100644 admin/views/snippet_types/tmpl/default_body.php create mode 100644 admin/views/snippet_types/tmpl/default_foot.php create mode 100644 admin/views/snippet_types/tmpl/default_head.php create mode 100644 admin/views/snippet_types/tmpl/default_toolbar.php create mode 100644 admin/views/snippet_types/tmpl/index.html create mode 100644 admin/views/snippet_types/view.html.php diff --git a/README.md b/README.md index e1f9bddba..5f8501718 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.3) 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.4) 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) @@ -112,12 +112,12 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 + *Last Build*: 11th November, 2017 -+ *Version*: 2.6.3 ++ *Version*: 2.6.4 + *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*: **158559** -+ *File count*: **1002** -+ *Folder count*: **166** ++ *Line count*: **166252** ++ *File count*: **1061** ++ *Folder count*: **174** > 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) diff --git a/admin/README.txt b/admin/README.txt index e1f9bddba..5f8501718 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.3) 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.4) 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) @@ -112,12 +112,12 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 + *Last Build*: 11th November, 2017 -+ *Version*: 2.6.3 ++ *Version*: 2.6.4 + *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*: **158559** -+ *File count*: **1002** -+ *Folder count*: **166** ++ *Line count*: **166252** ++ *File count*: **1061** ++ *Folder count*: **174** > 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) diff --git a/admin/access.xml b/admin/access.xml index f816a8d36..c859067df 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -287,6 +287,14 @@ + + + + + + + + @@ -295,6 +303,14 @@ + + + + + + + + @@ -582,6 +598,24 @@ +
+ + + + + + + +
+
+ + + + + + + +
diff --git a/admin/assets/css/libraries.css b/admin/assets/css/libraries.css new file mode 100644 index 000000000..493077b4c --- /dev/null +++ b/admin/assets/css/libraries.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage libraries.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.css b/admin/assets/css/library.css new file mode 100644 index 000000000..db90909b6 --- /dev/null +++ b/admin/assets/css/library.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library.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/snippet_type.css b/admin/assets/css/snippet_type.css new file mode 100644 index 000000000..e6c44d643 --- /dev/null +++ b/admin/assets/css/snippet_type.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage snippet_type.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/snippet_types.css b/admin/assets/css/snippet_types.css new file mode 100644 index 000000000..353dab6b4 --- /dev/null +++ b/admin/assets/css/snippet_types.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage snippet_types.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/controller.php b/admin/controller.php index d4363a590..869c27073 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -113,7 +113,9 @@ class ComponentbuilderController extends JControllerLegacy 'component_custom_admin_menus' => 'components_custom_admin_menus', 'component_config' => 'components_config', 'component_dashboard' => 'components_dashboard', - 'component_files_folders' => 'components_files_folders' + 'component_files_folders' => 'components_files_folders', + 'snippet_type' => 'snippet_types', + 'library' => 'libraries' ); // check if this is a list view if (in_array($view,$views)) diff --git a/admin/controllers/libraries.php b/admin/controllers/libraries.php new file mode 100644 index 000000000..0e89c427e --- /dev/null +++ b/admin/controllers/libraries.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 Controller + */ +class ComponentbuilderControllerLibraries extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Library', $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 new file mode 100644 index 000000000..025576ac8 --- /dev/null +++ b/admin/controllers/library.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 Controller + */ +class ComponentbuilderControllerLibrary 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'; // 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.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('library.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.access', 'com_componentbuilder.library.' . (int) $recordId) && $user->authorise('library.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library.edit', 'com_componentbuilder.library.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('library.edit.own', 'com_componentbuilder.library.' . $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.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('library.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', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries' . $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/snippet_type.php b/admin/controllers/snippet_type.php new file mode 100644 index 000000000..3d6613c96 --- /dev/null +++ b/admin/controllers/snippet_type.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'); + +/** + * Snippet_type Controller + */ +class ComponentbuilderControllerSnippet_type 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 = 'Snippet_types'; // 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('snippet_type.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('snippet_type.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('snippet_type.access', 'com_componentbuilder.snippet_type.' . (int) $recordId) && $user->authorise('snippet_type.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('snippet_type.edit', 'com_componentbuilder.snippet_type.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('snippet_type.edit.own', 'com_componentbuilder.snippet_type.' . $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('snippet_type.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('snippet_type.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('Snippet_type', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=snippet_types' . $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/snippet_types.php b/admin/controllers/snippet_types.php new file mode 100644 index 000000000..6f31a1629 --- /dev/null +++ b/admin/controllers/snippet_types.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'); + +/** + * Snippet_types Controller + */ +class ComponentbuilderControllerSnippet_types extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_SNIPPET_TYPES'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Snippet_type', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 42d12287f..aa2ba95ca 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4631,6 +4631,73 @@ COM_COMPONENTBUILDER_LAYOUT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LAYOUT_YES="Yes" COM_COMPONENTBUILDER_LEFT_IN_TAB="Left in Tab" COM_COMPONENTBUILDER_LEFT_OF_TABS="Left of Tabs" +COM_COMPONENTBUILDER_LIBRARIES="Libraries" +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_OPTIONS="Batch process the selected Libraries" +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_CREATE="Libraries Create" +COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC="Allows the users in this group to create create libraries" +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" +COM_COMPONENTBUILDER_LIBRARIES_EDIT_DESC="Allows the users in this group to edit the library" +COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN="Libraries Edit Own" +COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own libraries created by them" +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_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." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_CHECKED_IN_1="%d Library successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_CHECKED_IN_MORE="%d Libraries successfully checked in." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_DELETED="%s Libraries deleted." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_DELETED_1="%s Library deleted." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_FEATURED="%s Libraries featured." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_FEATURED_1="%s Library featured." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_PUBLISHED="%s Libraries published." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_PUBLISHED_1="%s Library published." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_TRASHED="%s Libraries trashed." +COM_COMPONENTBUILDER_LIBRARIES_N_ITEMS_TRASHED_1="%s Library trashed." +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_LIBRARY="Library" +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_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_ID="Id" +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." +COM_COMPONENTBUILDER_LIBRARY_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_LIBRARY_NAME="Name" +COM_COMPONENTBUILDER_LIBRARY_NAME_DESCRIPTION="Enter Name Here" +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_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_LIBRARY_PERMISSION="Permissions" +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_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" @@ -5189,8 +5256,6 @@ COM_COMPONENTBUILDER_SNIPPETS_N_ITEMS_UNPUBLISHED="%s Snippets unpublished." COM_COMPONENTBUILDER_SNIPPETS_N_ITEMS_UNPUBLISHED_1="%s Snippet unpublished." COM_COMPONENTBUILDER_SNIPPETS_SUBMENU="Snippets Submenu" COM_COMPONENTBUILDER_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the snippet" -COM_COMPONENTBUILDER_SNIPPET_CHARTS="Charts" -COM_COMPONENTBUILDER_SNIPPET_COMMON="Common" COM_COMPONENTBUILDER_SNIPPET_CREATED_BY_DESC="The user that created this Snippet." COM_COMPONENTBUILDER_SNIPPET_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_SNIPPET_CREATED_DATE_DESC="The date this Snippet was created." @@ -5201,7 +5266,6 @@ COM_COMPONENTBUILDER_SNIPPET_DESCRIPTION_HINT="Add Description Here" COM_COMPONENTBUILDER_SNIPPET_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_SNIPPET_DETAILS="Details" COM_COMPONENTBUILDER_SNIPPET_EDIT="Editing the Snippet" -COM_COMPONENTBUILDER_SNIPPET_ELEMENTS="Elements" COM_COMPONENTBUILDER_SNIPPET_ERROR_UNIQUE_ALIAS="Another Snippet has the same alias." COM_COMPONENTBUILDER_SNIPPET_HEADING="Heading" COM_COMPONENTBUILDER_SNIPPET_HEADING_DESCRIPTION="Enter short heading" @@ -5209,8 +5273,9 @@ COM_COMPONENTBUILDER_SNIPPET_HEADING_HINT="Your Heading Here" COM_COMPONENTBUILDER_SNIPPET_HEADING_LABEL="Heading" COM_COMPONENTBUILDER_SNIPPET_HEADING_MESSAGE="Error! Please add some short heading here." COM_COMPONENTBUILDER_SNIPPET_ID="Id" -COM_COMPONENTBUILDER_SNIPPET_JAVASCRIPT="JavaScript" -COM_COMPONENTBUILDER_SNIPPET_LAYOUT="Layout" +COM_COMPONENTBUILDER_SNIPPET_LIBRARY="Library" +COM_COMPONENTBUILDER_SNIPPET_LIBRARY_DESCRIPTION="Select a library." +COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL="Library" COM_COMPONENTBUILDER_SNIPPET_MODIFIED_BY_DESC="The last user that modified this Snippet." COM_COMPONENTBUILDER_SNIPPET_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_SNIPPET_MODIFIED_DATE_DESC="The date this Snippet was modified." @@ -5220,7 +5285,6 @@ COM_COMPONENTBUILDER_SNIPPET_NAME_DESCRIPTION="Enter Name Here" COM_COMPONENTBUILDER_SNIPPET_NAME_HINT="Name Here" COM_COMPONENTBUILDER_SNIPPET_NAME_LABEL="Name" COM_COMPONENTBUILDER_SNIPPET_NAME_MESSAGE="Error! Please add name here." -COM_COMPONENTBUILDER_SNIPPET_NAVIGATIONS="Navigations" COM_COMPONENTBUILDER_SNIPPET_NEW="A New Snippet" COM_COMPONENTBUILDER_SNIPPET_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_SNIPPET_PERMISSION="Permissions" @@ -5230,9 +5294,74 @@ COM_COMPONENTBUILDER_SNIPPET_SNIPPET="Snippet" COM_COMPONENTBUILDER_SNIPPET_SNIPPET_HINT="// Add the snippets code here" COM_COMPONENTBUILDER_SNIPPET_SNIPPET_LABEL="Snippet" COM_COMPONENTBUILDER_SNIPPET_STATUS="Status" -COM_COMPONENTBUILDER_SNIPPET_TYPE="Type" -COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Snippet Types" +COM_COMPONENTBUILDER_SNIPPET_TYPE="Snippet Type" +COM_COMPONENTBUILDER_SNIPPET_TYPES="Snippet Types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access" +COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_OPTIONS="Batch process the selected Snippet Types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_TIP="All changes will be applied to all selected Snippet Types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_USE="Snippet Types Batch Use" +COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_CREATE="Snippet Types Create" +COM_COMPONENTBUILDER_SNIPPET_TYPES_CREATE_DESC="Allows the users in this group to create create snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_DELETE="Snippet Types Delete" +COM_COMPONENTBUILDER_SNIPPET_TYPES_DELETE_DESC="Allows the users in this group to delete delete snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT="Snippet Types Edit" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_DESC="Allows the users in this group to edit the snippet type" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN="Snippet Types Edit Own" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN_DESC="Allows the users in this group to edit edit own snippet types created by them" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_STATE="Snippet Types Edit State" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_STATE_DESC="Allows the users in this group to update the state of the snippet type" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION="Snippet Types Edit Version" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_ARCHIVED="%s Snippet Types archived." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_ARCHIVED_1="%s Snippet Type archived." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_CHECKED_IN_0="No Snippet Type successfully checked in." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_CHECKED_IN_1="%d Snippet Type successfully checked in." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Snippet Types successfully checked in." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_DELETED="%s Snippet Types deleted." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_DELETED_1="%s Snippet Type deleted." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_FEATURED="%s Snippet Types featured." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_FEATURED_1="%s Snippet Type featured." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_PUBLISHED="%s Snippet Types published." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_PUBLISHED_1="%s Snippet Type published." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_TRASHED="%s Snippet Types trashed." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_TRASHED_1="%s Snippet Type trashed." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_UNFEATURED="%s Snippet Types unfeatured." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_UNFEATURED_1="%s Snippet Type unfeatured." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_UNPUBLISHED="%s Snippet Types unpublished." +COM_COMPONENTBUILDER_SNIPPET_TYPES_N_ITEMS_UNPUBLISHED_1="%s Snippet Type unpublished." +COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_DESC="The user that created this Snippet Type." +COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_DESC="The date this Snippet Type was created." +COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Description" +COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_DESCRIPTION="Enter some description" +COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_HINT="Description Here" +COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL="Description" +COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_MESSAGE="Error! Please add description here." +COM_COMPONENTBUILDER_SNIPPET_TYPE_DETAILS="Details" +COM_COMPONENTBUILDER_SNIPPET_TYPE_EDIT="Editing the Snippet Type" +COM_COMPONENTBUILDER_SNIPPET_TYPE_ERROR_UNIQUE_ALIAS="Another Snippet Type has the same alias." +COM_COMPONENTBUILDER_SNIPPET_TYPE_ID="Id" COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL="Type" +COM_COMPONENTBUILDER_SNIPPET_TYPE_MODIFIED_BY_DESC="The last user that modified this Snippet Type." +COM_COMPONENTBUILDER_SNIPPET_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_SNIPPET_TYPE_MODIFIED_DATE_DESC="The date this Snippet Type was modified." +COM_COMPONENTBUILDER_SNIPPET_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME="Name" +COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_LABEL="Name" +COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_SNIPPET_TYPE_NEW="A New Snippet Type" +COM_COMPONENTBUILDER_SNIPPET_TYPE_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_SNIPPET_TYPE_PERMISSION="Permissions" +COM_COMPONENTBUILDER_SNIPPET_TYPE_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_SNIPPET_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Snippet Type to customise the alias." +COM_COMPONENTBUILDER_SNIPPET_TYPE_STATUS="Status" +COM_COMPONENTBUILDER_SNIPPET_TYPE_VERSION_DESC="A count of the number of times this Snippet Type has been revised." +COM_COMPONENTBUILDER_SNIPPET_TYPE_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_SNIPPET_URL="Url" COM_COMPONENTBUILDER_SNIPPET_URL_DESCRIPTION="Enter url" COM_COMPONENTBUILDER_SNIPPET_URL_HINT="http://www.example.com" 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 f4fd7fd63..59db3c860 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -574,6 +574,22 @@ COM_COMPONENTBUILDER_LAYOUTS_IMPORT="Layouts Import" COM_COMPONENTBUILDER_LAYOUTS_IMPORT_DESC="Allows the users in this group to import import layouts" COM_COMPONENTBUILDER_LAYOUTS_SUBMENU="Layouts Submenu" COM_COMPONENTBUILDER_LAYOUTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the layout" +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_CREATE="Libraries Create" +COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC="Allows the users in this group to create create libraries" +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" +COM_COMPONENTBUILDER_LIBRARIES_EDIT_DESC="Allows the users in this group to edit the library" +COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN="Libraries Edit Own" +COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own libraries created by them" +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_MENU="» Component Builder" COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_MENU_COMPILER="Compiler" @@ -641,6 +657,22 @@ COM_COMPONENTBUILDER_SNIPPETS_IMPORT="Snippets Import" COM_COMPONENTBUILDER_SNIPPETS_IMPORT_DESC="Allows the users in this group to import import snippets" COM_COMPONENTBUILDER_SNIPPETS_SUBMENU="Snippets Submenu" COM_COMPONENTBUILDER_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the snippet" +COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access" +COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_USE="Snippet Types Batch Use" +COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_CREATE="Snippet Types Create" +COM_COMPONENTBUILDER_SNIPPET_TYPES_CREATE_DESC="Allows the users in this group to create create snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_DELETE="Snippet Types Delete" +COM_COMPONENTBUILDER_SNIPPET_TYPES_DELETE_DESC="Allows the users in this group to delete delete snippet types" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT="Snippet Types Edit" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_DESC="Allows the users in this group to edit the snippet type" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN="Snippet Types Edit Own" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN_DESC="Allows the users in this group to edit edit own snippet types created by them" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_STATE="Snippet Types Edit State" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_STATE_DESC="Allows the users in this group to update the state of the snippet type" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION="Snippet Types Edit Version" +COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version snippet types" COM_COMPONENTBUILDER_TEMPLATES_ACCESS="Templates Access" COM_COMPONENTBUILDER_TEMPLATES_ACCESS_DESC="Allows the users in this group to access access templates" COM_COMPONENTBUILDER_TEMPLATES_BATCH_USE="Templates Batch Use" diff --git a/admin/layouts/library/details_left.php b/admin/layouts/library/details_left.php new file mode 100644 index 000000000..892f7233e --- /dev/null +++ b/admin/layouts/library/details_left.php @@ -0,0 +1,54 @@ + + @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( + 'name' +); + +$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/details_right.php b/admin/layouts/library/details_right.php new file mode 100644 index 000000000..92112f79b --- /dev/null +++ b/admin/layouts/library/details_right.php @@ -0,0 +1,54 @@ + + @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( + 'description' +); + +$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/index.html b/admin/layouts/library/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/library/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/library/publishing.php b/admin/layouts/library/publishing.php new file mode 100644 index 000000000..13d13ed74 --- /dev/null +++ b/admin/layouts/library/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/publlshing.php b/admin/layouts/library/publlshing.php new file mode 100644 index 000000000..c982db556 --- /dev/null +++ b/admin/layouts/library/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/snippet/details_above.php b/admin/layouts/snippet/details_above.php index 92b0cc012..148964d7e 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -32,7 +32,7 @@ $form = $displayData->getForm(); $fields = array( 'name', 'url', - 'type' + 'library' ); ?> diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index bb3db8cec..38aa8192b 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -30,6 +30,7 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( + 'type', 'heading', 'description', 'usage' diff --git a/admin/layouts/snippet_type/details_left.php b/admin/layouts/snippet_type/details_left.php new file mode 100644 index 000000000..892f7233e --- /dev/null +++ b/admin/layouts/snippet_type/details_left.php @@ -0,0 +1,54 @@ + + @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( + 'name' +); + +$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/snippet_type/details_right.php b/admin/layouts/snippet_type/details_right.php new file mode 100644 index 000000000..92112f79b --- /dev/null +++ b/admin/layouts/snippet_type/details_right.php @@ -0,0 +1,54 @@ + + @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( + 'description' +); + +$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/snippet_type/index.html b/admin/layouts/snippet_type/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/snippet_type/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/snippet_type/publishing.php b/admin/layouts/snippet_type/publishing.php new file mode 100644 index 000000000..13d13ed74 --- /dev/null +++ b/admin/layouts/snippet_type/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/snippet_type/publlshing.php b/admin/layouts/snippet_type/publlshing.php new file mode 100644 index 000000000..c982db556 --- /dev/null +++ b/admin/layouts/snippet_type/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/models/componentbuilder.php b/admin/models/componentbuilder.php index 675379fa7..03f328d15 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -161,7 +161,13 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'component_dashboard.access' => 'component_dashboard.access', 'component_files_folders.create' => 'component_files_folders.create', 'components_files_folders.access' => 'component_files_folders.access', - 'component_files_folders.access' => 'component_files_folders.access'); + 'component_files_folders.access' => 'component_files_folders.access', + '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'); foreach($viewGroups as $group => $views) { $i = 0; diff --git a/admin/models/fields/library.php b/admin/models/fields/library.php new file mode 100644 index 000000000..2c2d744cf --- /dev/null +++ b/admin/models/fields/library.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'); + +/** + * Library Form Field class for the Componentbuilder component + */ +class JFormFieldLibrary extends JFormFieldList +{ + /** + * The library field type. + * + * @var string + */ + public $type = 'library'; + /** + * 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->where($db->quoteName('a.published') . ' >= 1'); + $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/snippettype.php b/admin/models/fields/snippettype.php new file mode 100644 index 000000000..6896acd6f --- /dev/null +++ b/admin/models/fields/snippettype.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'); + +/** + * Snippettype Form Field class for the Componentbuilder component + */ +class JFormFieldSnippettype extends JFormFieldList +{ + /** + * The snippettype field type. + * + * @var string + */ + public $type = 'snippettype'; + /** + * 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 snippet_type + if ($user->authorise('snippet_type.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 snippet_type + if (($buttonName === 'snippet_type' || $buttonName === 'snippet_types') && $user->authorise('snippet_type.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=snippet_types&task=snippet_type.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 snippet_type 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','type_name'))); + $query->from($db->quoteName('#__componentbuilder_snippet_type', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $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->type_name); + } + } + return $options; + } +} diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js new file mode 100644 index 000000000..7a1b7e267 --- /dev/null +++ b/admin/models/forms/library.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library.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.xml b/admin/models/forms/library.xml new file mode 100644 index 000000000..36633167e --- /dev/null +++ b/admin/models/forms/library.xml @@ -0,0 +1,148 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/snippet.xml b/admin/models/forms/snippet.xml index 4b956714e..5916457de 100644 --- a/admin/models/forms/snippet.xml +++ b/admin/models/forms/snippet.xml @@ -121,30 +121,16 @@ message="COM_COMPONENTBUILDER_SNIPPET_URL_MESSAGE" hint="COM_COMPONENTBUILDER_SNIPPET_URL_HINT" /> - + - - - - - - - - + default="0" + /> + + - - + + diff --git a/admin/models/forms/snippet_type.js b/admin/models/forms/snippet_type.js new file mode 100644 index 000000000..d4d567b72 --- /dev/null +++ b/admin/models/forms/snippet_type.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage snippet_type.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/snippet_type.xml b/admin/models/forms/snippet_type.xml new file mode 100644 index 000000000..b4e2b660d --- /dev/null +++ b/admin/models/forms/snippet_type.xml @@ -0,0 +1,148 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/libraries.php b/admin/models/libraries.php new file mode 100644 index 000000000..7184969fb --- /dev/null +++ b/admin/models/libraries.php @@ -0,0 +1,275 @@ + + @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 Model + */ +class ComponentbuilderModelLibraries extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by', + 'a.name','name', + 'a.description','description' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); + $this->setState('filter.description', $description); + + $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.access', 'com_componentbuilder.library.' . (int) $item->id) && $user->authorise('library.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', 'a')); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.description LIKE '.$search.')'); + } + } + + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.description'); + + 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')); + $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'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/library.php b/admin/models/library.php new file mode 100644 index 000000000..68fb7fc8d --- /dev/null +++ b/admin/models/library.php @@ -0,0 +1,859 @@ + + @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 Model + */ +class ComponentbuilderModelLibrary 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'; + + /** + * 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', $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)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.library'); + } + } + + 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', 'library', 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.edit.state', 'com_componentbuilder.library.' . (int) $id)) + || ($id == 0 && !$user->authorise('library.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if (!$user->authorise('core.edit.created_by', 'com_componentbuilder')) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if (!$user->authorise('core.edit.created', 'com_componentbuilder')) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected 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.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.delete', 'com_componentbuilder.library.' . (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.edit.state', 'com_componentbuilder.library.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('library.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.edit', 'com_componentbuilder.library.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('library.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')); + $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.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'); + $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'); + } + + if (!$this->canDo->get('library.create') && !$this->canDo->get('library.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.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.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->name = $this->generateUniqe('name',$this->table->name); + + // insert all set values + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('library'); + } + + if (!$this->canDo->get('library.edit') && !$this->canDo->get('library.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.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.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 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/snippet_type.php b/admin/models/snippet_type.php new file mode 100644 index 000000000..131a60d17 --- /dev/null +++ b/admin/models/snippet_type.php @@ -0,0 +1,859 @@ + + @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 Snippet_type Model + */ +class ComponentbuilderModelSnippet_type 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.snippet_type'; + + /** + * 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 = 'snippet_type', $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)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.snippet_type'); + } + } + + 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.snippet_type', 'snippet_type', 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('snippet_type.edit.state', 'com_componentbuilder.snippet_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('snippet_type.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if (!$user->authorise('core.edit.created_by', 'com_componentbuilder')) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if (!$user->authorise('core.edit.created', 'com_componentbuilder')) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected 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/snippet_type.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('snippet_type.delete', 'com_componentbuilder.snippet_type.' . (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('snippet_type.edit.state', 'com_componentbuilder.snippet_type.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('snippet_type.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('snippet_type.edit', 'com_componentbuilder.snippet_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('snippet_type.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_snippet_type')); + $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.snippet_type.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('snippet_type'); + $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('snippet_type'); + } + + if (!$this->canDo->get('snippet_type.create') && !$this->canDo->get('snippet_type.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('snippet_type.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('snippet_type.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->name = $this->generateUniqe('name',$this->table->name); + + // insert all set values + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('snippet_type'); + } + + if (!$this->canDo->get('snippet_type.edit') && !$this->canDo->get('snippet_type.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('snippet_type.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('snippet_type.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 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/snippet_types.php b/admin/models/snippet_types.php new file mode 100644 index 000000000..08c437ff6 --- /dev/null +++ b/admin/models/snippet_types.php @@ -0,0 +1,275 @@ + + @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'); + +/** + * Snippet_types Model + */ +class ComponentbuilderModelSnippet_types extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by', + 'a.name','name', + 'a.description','description' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); + $this->setState('filter.description', $description); + + $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('snippet_type.access', 'com_componentbuilder.snippet_type.' . (int) $item->id) && $user->authorise('snippet_type.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_snippet_type', 'a')); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.description LIKE '.$search.')'); + } + } + + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.description'); + + 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_snippet_type')); + $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_snippet_type'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/snippets.php b/admin/models/snippets.php index 6b60cfdb3..8c2b8ff11 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -47,7 +47,8 @@ class ComponentbuilderModelSnippets extends JModelList 'a.name','name', 'a.url','url', 'a.type','type', - 'a.heading','heading' + 'a.heading','heading', + 'a.library','library' ); } @@ -78,7 +79,10 @@ class ComponentbuilderModelSnippets extends JModelList $this->setState('filter.type', $type); $heading = $this->getUserStateFromRequest($this->context . '.filter.heading', 'filter_heading'); - $this->setState('filter.heading', $heading); + $this->setState('filter.heading', $heading); + + $library = $this->getUserStateFromRequest($this->context . '.filter.library', 'filter_library'); + $this->setState('filter.library', $library); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $this->setState('filter.sorting', $sorting); @@ -130,48 +134,10 @@ class ComponentbuilderModelSnippets 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'); - } - } - + } // 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_SNIPPET_LAYOUT', - 2 => 'COM_COMPONENTBUILDER_SNIPPET_NAVIGATIONS', - 3 => 'COM_COMPONENTBUILDER_SNIPPET_ELEMENTS', - 4 => 'COM_COMPONENTBUILDER_SNIPPET_COMMON', - 5 => 'COM_COMPONENTBUILDER_SNIPPET_JAVASCRIPT', - 6 => 'COM_COMPONENTBUILDER_SNIPPET_CHARTS' - ); - // Now check if value is found in this array - if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value])) - { - return $typeArray[$value]; - } - } - return $value; } /** @@ -193,6 +159,14 @@ class ComponentbuilderModelSnippets extends JModelList // From the componentbuilder_item table $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); + // From the componentbuilder_snippet_type table. + $query->select($db->quoteName('g.name','type_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_snippet_type', 'g') . ' ON (' . $db->quoteName('a.type') . ' = ' . $db->quoteName('g.id') . ')'); + + // From the componentbuilder_library table. + $query->select($db->quoteName('h.name','library_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'h') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('h.id') . ')'); + // Filter by published state $published = $this->getState('filter.published'); if (is_numeric($published)) @@ -229,15 +203,20 @@ 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.description LIKE '.$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.')'); } } - // Filter by Type. + // Filter by type. if ($type = $this->getState('filter.type')) { $query->where('a.type = ' . $db->quote($db->escape($type))); } + // Filter by library. + if ($library = $this->getState('filter.library')) + { + $query->where('a.library = ' . $db->quote($db->escape($library))); + } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); @@ -370,7 +349,8 @@ class ComponentbuilderModelSnippets extends JModelList $id .= ':' . $this->getState('filter.name'); $id .= ':' . $this->getState('filter.url'); $id .= ':' . $this->getState('filter.type'); - $id .= ':' . $this->getState('filter.heading'); + $id .= ':' . $this->getState('filter.heading'); + $id .= ':' . $this->getState('filter.library'); return parent::getStoreId($id); } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index b592d9ab7..31017c7e6 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -565,6 +565,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `description` TEXT NOT NULL, `heading` VARCHAR(255) NOT NULL DEFAULT '', + `library` INT(11) NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL DEFAULT '', `snippet` TEXT NOT NULL, `type` INT(11) NOT NULL DEFAULT 0, @@ -589,7 +590,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), KEY `idx_name` (`name`), - KEY `idx_type` (`type`) + KEY `idx_type` (`type`), + KEY `idx_library` (`library`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( @@ -1087,6 +1089,58 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_files_folders` ( KEY `idx_joomla_component` (`joomla_component`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `description` VARCHAR(255) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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`) +) 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.', + `description` VARCHAR(255) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + -- -- Dumping data for table `#__componentbuilder_joomla_component` -- @@ -1129,99 +1183,99 @@ INSERT INTO `#__componentbuilder_dynamic_get` (`id`, `add_php_after_getitem`, `a -- Dumping data for table `#__componentbuilder_snippet` -- -INSERT INTO `#__componentbuilder_snippet` (`id`, `description`, `heading`, `name`, `snippet`, `type`, `url`, `usage`, `params`, `published`, `version`, `hits`, `ordering`) 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.', '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, 4, '', 1), -(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.', '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, 3, '', 1), -(3, '', '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, 2, '', 2), -(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, 1, '', 3), -(5, '', '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, 1, '', 4), -(6, '', '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, 2, '', 5), -(7, '', '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, 2, '', 5), -(8, 'This component uses Flexbox, a concept that is still quite new but extremely powerful for creating layouts.', '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, 3, '', 5), -(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.', '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, 1, '', 5), -(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.', '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, 1, '', 5), -(11, '', '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, 1, '', 6), -(12, '', '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, 1, '', 6), -(13, '', '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, 1, '', 6), -(14, '', '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, 1, '', 6), -(15, '', '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, 1, '', 6), -(16, '', '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, 3, '', 6), -(17, '', '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, 2, '', 6), -(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.', '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, 2, '', 6), -(19, 'Add the .uk-description-list-horizontal class to display terms and descriptions side by side.', '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, 1, '', 6), -(20, '', '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, 1, '', 6), -(21, '', '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, 2, '', 7), -(22, '', '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, 1, '', 7), -(23, '', '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, 1, '', 7), -(24, '', '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, 1, '', 7), -(25, '', '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, 1, '', 7), -(26, '', '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, 1, '', 7), -(27, '', '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, 1, '', 7), -(28, '', '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, 1, '', 7), -(29, '', '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, 1, '', 7), -(30, '', '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, 1, '', 7), -(31, '', '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, 1, '', 7), -(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.', '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, 1, '', 8), -(33, '', '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, 1, '', 8), -(34, '', '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, 1, '', 8), -(35, '', '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, 1, '', 8), -(36, '', '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, 1, '', 8), -(37, '', '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, 1, '', 8), -(38, '', '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, 1, '', 8), -(39, '', '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, 1, '', 8), -(40, '', '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, 1, '', 8), -(41, '', '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, 1, '', 8), -(42, '', '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, 1, '', 8), -(43, '', '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, 1, '', 8), -(44, '', '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, 1, '', 8), -(45, '', '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, 1, '', 8), -(46, '', '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, 1, '', 8), -(47, '', '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, 1, '', 8), -(48, '', '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, 1, '', 8), -(49, '', '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, 1, '', 8), -(50, '', '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, 1, '', 8), -(51, '', '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, 1, '', 8), -(52, '', '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, 1, '', 8), -(53, '', '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, 1, '', 8), -(54, '', '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, 1, '', 8), -(55, '', '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, 1, '', 8), -(56, '', '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, 1, '', 8), -(57, '', '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, 1, '', 8), -(58, '', '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, 2, '', 8), -(59, '', '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, 1, '', 8), -(60, '', '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, 1, '', 8), -(61, '', '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, 1, '', 8), -(62, '', '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, 1, '', 8), -(63, '', '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, 1, '', 8), -(64, '', '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, 1, '', 8), -(65, '', '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, 1, '', 8), -(66, '', '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, 1, '', 8), -(67, '', '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, 1, '', 8), -(68, '', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(71, '', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(73, 'It is also possible to connect multiple content containers. Just extend the connect parameter with the ID of the additional container.', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(76, 'Use the Grid component to display content correctly with a vertical tabbed navigation.', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(79, '', '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, 1, '', 8), -(80, 'You can also toggle multiple items at the same time. Just use the appropriate selector.', '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, 1, '', 8), -(81, 'You can also toggle multiple items at the same time. Just use the appropriate selector.', '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, 1, '', 8), -(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.', '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, 1, '', 8), -(83, '', '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, 1, '', 8), -(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.', '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, 2, '', 8), -(85, '', '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, 1, '', 9), -(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.', '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, 2, '', 9), -(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.', '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, 1, '', 9), -(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.', '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, 3, '', 10), -(89, '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.', 'FooTable', 'FooTable', 'PHRhYmxlIGNsYXNzPSJmb290YWJsZSBtZXRyby1ibHVlIiBkYXRhLWZpbHRlcj0iI2ZpbHRlciIgZGF0YS1wYWdlLXNpemU9IjUiPg0KICA8dGhlYWQ+DQogICAgPHRyPg0KICAgICAgPHRoIGRhdGEtdG9nZ2xlPSJ0cnVlIj5OYW1lPC90aD4NCiAgICAgIDx0aCBkYXRhLWhpZGU9InBob25lLHRhYmxldCI+UGhvbmU8L3RoPg0KICAgICAgPHRoIGRhdGEtaGlkZT0icGhvbmUsdGFibGV0Ij5FbWFpbDwvdGg+DQogICAgPC90cj4NCiAgPC90aGVhZD4NCiAgPHRib2R5Pg0KICAgIDx0cj4NCiAgICAgIDx0ZD5Cb2IgTWFuPC90ZD4NCiAgICAgIDx0ZD41NTUtMTIzNDU8L3RkPg0KICAgICAgPHRkPmJvYkBob21lLmNvbTwvdGQ+DQogICAgPC90cj4NCiAgICA8dHI+DQogICAgICA8dGQ+QnJpZGdldCBKb25lczwvdGQ+DQogICAgICA8dGQ+NTQ0LTc3NjY1NTwvdGQ+DQogICAgICA8dGQ+YmpvbmVzQG15c2l0ZS5jb208L3RkPg0KICAgIDwvdHI+DQogICAgPHRyPg0KICAgICAgPHRkPlRvbSBKb25lczwvdGQ+DQogICAgICA8dGQ+NTU1LTk5OTExPC90ZD4NCiAgICAgIDx0ZD5jcnVpc2UxQGNyYXp5LmNvbTwvdGQ+DQogICAgPC90cj4NCiAgPC90Ym9keT4NCjwvdGFibGU+', 1, 'http://fooplugins.com/footable-demos/', '', '', 1, 1, '', 11), -(90, 'This is a input field for uikit form', 'Add Input field - row', 'Input field', 'ICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1mb3JtLXJvdyI+DQoJCTxsYWJlbCBjbGFzcz0idWstZm9ybS1sYWJlbCIgPg0KCQkJPD9waHAgZWNobyBKVGV4dDo6XygnTGFiZWwnKTsgPz4NCgkJPC9sYWJlbD4NCgkJPGlucHV0IHR5cGU9InRleHQiIG5hbWU9ImtleSIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2FkZCBzb21lIHRleHQgaGVyZSEnKTsgPz4iPiA8c3BhbiBjbGFzcz0idWstZm9ybS1oZWxwLWlubGluZSI+PD9waHAgZWNobyBKVGV4dDo6XygnaGVscCBuZWVkZWQnKTsgPz48L3NwYW4+DQoJPC9kaXY+', 3, 'http://getuikit.com/docs/form.html', '', '', 1, 2, '', 12), -(91, 'This is a textarea field for uikit form', 'Add textarea - row', 'Textarea', 'CTxkaXYgY2xhc3M9InVrLWZvcm0tcm93Ij4NCgkJPGxhYmVsIGNsYXNzPSJ1ay1mb3JtLWxhYmVsIiA+DQoJCQk8P3BocCBlY2hvIEpUZXh0OjpfKCdMYWJlbCcpOyA/Pg0KCQk8L2xhYmVsPg0KCQk8dGV4dGFyZWEgY29scz0iIiByb3dzPSIiICBzdHlsZT0id2lkdGg6IDEwMCU7IGhlaWdodDogMjE2cHg7IiBwbGFjZWhvbGRlcj0iPD9waHAgZWNobyBKVGV4dDo6XygnYWRkIHNvbWUgdGV4dCBoZXJlIScpOyA/PiI+PHx8fHxGSVh8fHx8fHx0ZXh0YXJlYT4NCgkJPHAgY2xhc3M9InVrLWZvcm0taGVscC1ibG9jayI+PD9waHAgZWNobyBKVGV4dDo6XygnaGVscCBuZWVkZWQnKTsgPz48L3A+DQoJPC9kaXY+', 3, 'http://getuikit.com/docs/form.html', '', '', 1, 4, '', 12), -(92, 'This is a uikit form', 'Add Form', 'Form', 'PGZvcm0gY2xhc3M9InVrLWZvcm0iPg0KICAgIDxmaWVsZHNldD4NCiAgICAgICAgPGxlZ2VuZD48P3BocCBlY2hvIEpUZXh0OjpfKCdMZWdlbmQnKTsgPz48L2xlZ2VuZD4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstZm9ybS1yb3ciPg0KCQk8bGFiZWwgY2xhc3M9InVrLWZvcm0tbGFiZWwiID4NCgkJCTw/cGhwIGVjaG8gSlRleHQ6Ol8oJ0xhYmVsJyk7ID8+DQoJCTwvbGFiZWw+DQoJCTxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJrZXkiIHBsYWNlaG9sZGVyPSI8P3BocCBlY2hvIEpUZXh0OjpfKCdhZGQgc29tZSB0ZXh0IGhlcmUhJyk7ID8+Ij4gPHNwYW4gY2xhc3M9InVrLWZvcm0taGVscC1pbmxpbmUiPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2hlbHAgbmVlZGVkJyk7ID8+PC9zcGFuPg0KCTwvZGl2Pg0KICAgICAgICA8ZGl2IGNsYXNzPSJ1ay1mb3JtLXJvdyI+DQoJCTxsYWJlbCBjbGFzcz0idWstZm9ybS1sYWJlbCIgPg0KCQkJPD9waHAgZWNobyBKVGV4dDo6XygnTGFiZWwnKTsgPz4NCgkJPC9sYWJlbD4NCgkJPHRleHRhcmVhIGNvbHM9IiIgcm93cz0iIiAgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDIxNnB4OyIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2FkZCBzb21lIHRleHQgaGVyZSEnKTsgPz4iPjx8fHx8fEZJWHx8fHx8dGV4dGFyZWE+DQoJCTxwIGNsYXNzPSJ1ay1mb3JtLWhlbHAtYmxvY2siPjw/cGhwIGVjaG8gSlRleHQ6Ol8oJ2hlbHAgbmVlZGVkJyk7ID8+PC9wPg0KCTwvZGl2Pg0KICAgIDwvZmllbGRzZXQ+DQo8L2Zvcm0+', 1, 'http://getuikit.com/docs/form.html', '', '', 1, 2, '', 12); +INSERT INTO `#__componentbuilder_snippet` (`id`, `description`, `library`, `heading`, `name`, `snippet`, `type`, `url`, `usage`, `params`, `published`, `version`, `hits`, `ordering`) 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, 4, '', 1), +(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, 3, '', 1), +(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, 2, '', 2), +(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, 1, '', 3), +(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, 1, '', 4), +(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, 2, '', 5), +(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, 2, '', 5), +(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, 3, '', 5), +(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, 1, '', 5), +(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, 1, '', 5), +(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, 1, '', 6), +(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, 1, '', 6), +(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, 1, '', 6), +(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, 1, '', 6), +(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, 1, '', 6), +(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, 3, '', 6), +(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, 2, '', 6), +(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, 2, '', 6), +(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, 1, '', 6), +(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, 1, '', 6), +(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, 2, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 7), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 2, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 1, '', 8), +(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, 2, '', 8), +(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, 1, '', 9), +(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, 2, '', 9), +(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, 1, '', 9), +(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, 3, '', 10), +(89, '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+', 1, 'http://fooplugins.com/footable-demos/', '', '', 1, 3, '', 11), +(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, 2, '', 12), +(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, 4, '', 12), +(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', '', '', 1, 2, '', 12); -- -- Dumping data for table `#__componentbuilder_field` @@ -1374,6 +1428,66 @@ INSERT INTO `#__componentbuilder_component_dashboard` (`id`, `dashboard_tab`, `j INSERT INTO `#__componentbuilder_component_files_folders` (`id`, `addfiles`, `addfolders`, `joomla_component`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES (27, '', '', 25, '', 1, '2017-10-28 03:56:26', '0000-00-00 00:00:00', 2, '', ''); +-- +-- Dumping data for table `#__componentbuilder_snippet_type` +-- + +INSERT INTO `#__componentbuilder_snippet_type` (`id`, `name`, `description`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(1, 'Layout', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 1), +(2, 'Navigations', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 2), +(3, 'Elements', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 3), +(4, 'Common', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 4), +(5, 'JavaScript', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 5), +(6, 'Charts', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 6), +(7, 'Alerts', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 7), +(8, 'Badges', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 8), +(9, 'Breadcrumbs', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 9), +(10, 'Buttons', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 10), +(11, 'Button Groups', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 11), +(12, 'Button Modifiers', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 12), +(13, 'Cards', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 13), +(14, 'Carousel', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 14), +(15, 'Collapse', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 15), +(16, 'Dropdowns', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 16), +(17, 'Forms', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 17), +(18, 'Form Input Groups', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 18), +(19, 'Custom Forms', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 19), +(20, 'Grid', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 20), +(21, 'Images', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 21), +(22, 'Jumbotron', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 22), +(23, 'List Group', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 23), +(24, 'Media Objects', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 24), +(25, 'Modal', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 25), +(26, 'Navs', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 26), +(27, 'Navbar', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 27), +(28, 'Pagination', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 28), +(29, 'Popover', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 29), +(30, 'Progress', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 30), +(31, 'Scrollspy', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 31), +(32, 'Tables', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 32), +(33, 'Tooltips', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 33), +(34, 'Typography', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 34), +(35, 'Utility: Borders', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 35), +(36, 'Utility: Colors', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 36), +(37, 'Utility: Display', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 37), +(38, 'Utility: Flexbox', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 38), +(39, 'Utility: Misc', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 39), +(40, 'Utility: Positioning', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 40), +(41, 'Utility: Sizing', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 41), +(42, 'Utility: Spacing', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 42), +(43, 'Utility: Text', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 43); + +-- +-- Dumping data for table `#__componentbuilder_library` +-- + +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); + -- diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index 9152d3267..acee53b22 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -24,3 +24,5 @@ DROP TABLE IF EXISTS `#__componentbuilder_component_custom_admin_menus`; 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`; diff --git a/admin/sql/updates/mysql/2.6.3.sql b/admin/sql/updates/mysql/2.6.3.sql new file mode 100644 index 000000000..9e5ab9592 --- /dev/null +++ b/admin/sql/updates/mysql/2.6.3.sql @@ -0,0 +1,106 @@ +ALTER TABLE `#__componentbuilder_snippet` ADD `library` INT(11) NOT NULL DEFAULT 0 AFTER `heading`; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `description` VARCHAR(255) NOT NULL DEFAULT '', + `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`) +) 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.', + `description` VARCHAR(255) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `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`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +INSERT INTO `#__componentbuilder_snippet_type` (`id`, `description`, `name`, `params`, `published`, `version`, `hits`, `access`, `ordering`) VALUES +(1, '', 'Layout', '', 1, 1, 0, 1, 1), +(2, '', 'Navigations', '', 1, 1, 0, 1, 2), +(3, '', 'Elements', '', 1, 1, 0, 1, 3), +(4, '', 'Common', '', 1, 1, 0, 1, 4), +(5, '', 'JavaScript', '', 1, 1, 0, 1, 5), +(6, '', 'Charts', '', 1, 1, 0, 1, 6), +(7, '', 'Alerts', '', 1, 1, 0, 1, 7), +(8, '', 'Badges', '', 1, 1, 0, 1, 8), +(9, '', 'Breadcrumbs', '', 1, 1, 0, 1, 9), +(10, '', 'Buttons', '', 1, 1, 0, 1, 10), +(11, '', 'Button Groups', '', 1, 1, 0, 1, 11), +(12, '', 'Button Modifiers', '', 1, 1, 0, 1, 12), +(13, '', 'Cards', '', 1, 1, 0, 1, 13), +(14, '', 'Carousel', '', 1, 1, 0, 1, 14), +(15, '', 'Collapse', '', 1, 1, 0, 1, 15), +(16, '', 'Dropdowns', '', 1, 1, 0, 1, 16), +(17, '', 'Forms', '', 1, 1, 0, 1, 17), +(18, '', 'Form Input Groups', '', 1, 1, 0, 1, 18), +(19, '', 'Custom Forms', '', 1, 1, 0, 1, 19), +(20, '', 'Grid', '', 1, 1, 0, 1, 20), +(21, '', 'Images', '', 1, 1, 0, 1, 21), +(22, '', 'Jumbotron', '', 1, 1, 0, 1, 22), +(23, '', 'List Group', '', 1, 1, 0, 1, 23), +(24, '', 'Media Objects', '', 1, 1, 0, 1, 24), +(25, '', 'Modal', '', 1, 1, 0, 1, 25), +(26, '', 'Navs', '', 1, 1, 0, 1, 26), +(27, '', 'Navbar', '', 1, 1, 0, 1, 27), +(28, '', 'Pagination', '', 1, 1, 0, 1, 28), +(29, '', 'Popover', '', 1, 1, 0, 1, 29), +(30, '', 'Progress', '', 1, 1, 0, 1, 30), +(31, '', 'Scrollspy', '', 1, 1, 0, 1, 31), +(32, '', 'Tables', '', 1, 1, 0, 1, 32), +(33, '', 'Tooltips', '', 1, 1, 0, 1, 33), +(34, '', 'Typography', '', 1, 1, 0, 1, 34), +(35, '', 'Utility: Borders', '', 1, 1, 0, 1, 35), +(36, '', 'Utility: Colors', '', 1, 1, 0, 1, 36), +(37, '', 'Utility: Display', '', 1, 1, 0, 1, 37), +(38, '', 'Utility: Flexbox', '', 1, 1, 0, 1, 38), +(39, '', 'Utility: Misc', '', 1, 1, 0, 1, 39), +(40, '', 'Utility: Positioning', '', 1, 1, 0, 1, 40), +(41, '', 'Utility: Sizing', '', 1, 1, 0, 1, 41), +(42, '', 'Utility: Spacing', '', 1, 1, 0, 1, 42), +(43, '', 'Utility: Text', '', 1, 1, 0, 1, 43); + +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); + diff --git a/admin/tables/library.php b/admin/tables/library.php new file mode 100644 index 000000000..467df2155 --- /dev/null +++ b/admin/tables/library.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 Table class + */ +class ComponentbuilderTableLibrary 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', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.library')); + } + + 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 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. A library 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', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_LIBRARY_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', '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.'.$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.'.(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/snippet_type.php b/admin/tables/snippet_type.php new file mode 100644 index 000000000..8c681f403 --- /dev/null +++ b/admin/tables/snippet_type.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'); + +/** + * Snippet_types Table class + */ +class ComponentbuilderTableSnippet_type 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_snippet_type', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.snippet_type')); + } + + 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 Snippet_type 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 snippet_type. A snippet_type 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('snippet_type', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_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('snippet_type', '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.snippet_type.'.$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.snippet_type.'.(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/libraries/index.html b/admin/views/libraries/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/libraries/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/libraries/tmpl/default.php b/admin/views/libraries/tmpl/default.php new file mode 100644 index 000000000..a027c6e39 --- /dev/null +++ b/admin/views/libraries/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.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'libraryList', '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_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/libraries/tmpl/default_batch_body.php b/admin/views/libraries/tmpl/default_batch_body.php new file mode 100644 index 000000000..496a3e475 --- /dev/null +++ b/admin/views/libraries/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/tmpl/default_batch_footer.php b/admin/views/libraries/tmpl/default_batch_footer.php new file mode 100644 index 000000000..5a46ddb51 --- /dev/null +++ b/admin/views/libraries/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/tmpl/default_body.php b/admin/views/libraries/tmpl/default_body.php new file mode 100644 index 000000000..b7cca0fb8 --- /dev/null +++ b/admin/views/libraries/tmpl/default_body.php @@ -0,0 +1,111 @@ + + @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&task=library.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',$item,'libraries'); + ?> + + + get('library.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('library.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('library.edit')): ?> +
+ escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'libraries.', $canCheckin); ?> + +
+ +
escape($item->name); ?>
+ + + + escape($item->description); ?> + + + get('library.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'libraries.', true, 'cb'); ?> + + published, $i, 'libraries.', false, 'cb'); ?> + + + published, $i, 'libraries.', true, 'cb'); ?> + + + published, $i, 'libraries.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/libraries/tmpl/default_foot.php b/admin/views/libraries/tmpl/default_foot.php new file mode 100644 index 000000000..4cbb00713 --- /dev/null +++ b/admin/views/libraries/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/tmpl/default_head.php b/admin/views/libraries/tmpl/default_head.php new file mode 100644 index 000000000..30e0da273 --- /dev/null +++ b/admin/views/libraries/tmpl/default_head.php @@ -0,0 +1,64 @@ + + @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/libraries/tmpl/default_toolbar.php b/admin/views/libraries/tmpl/default_toolbar.php new file mode 100644 index 000000000..1cb93e129 --- /dev/null +++ b/admin/views/libraries/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/admin/views/libraries/tmpl/index.html b/admin/views/libraries/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/libraries/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php new file mode 100644 index 000000000..2156d4700 --- /dev/null +++ b/admin/views/libraries/view.html.php @@ -0,0 +1,240 @@ + + @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 + */ +class ComponentbuilderViewLibraries extends JViewLegacy +{ + /** + * Libraries view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('libraries'); + } + + // 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'); + $this->canEdit = $this->canDo->get('library.edit'); + $this->canState = $this->canDo->get('library.edit.state'); + $this->canCreate = $this->canDo->get('library.create'); + $this->canDelete = $this->canDo->get('library.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'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('library.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('library.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('libraries.publish'); + JToolBarHelper::unpublishList('libraries.unpublish'); + JToolBarHelper::archiveList('libraries.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('libraries.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.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('libraries.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('libraries'); + 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() + { + $document = JFactory::getDocument(); + $document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.name' => JText::_('COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL'), + 'a.description' => JText::_('COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/library/submitbutton.js b/admin/views/library/submitbutton.js new file mode 100644 index 000000000..d0b0fcb2a --- /dev/null +++ b/admin/views/library/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/admin/views/library/tmpl/index.html b/admin/views/library/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/library/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/library/view.html.php b/admin/views/library/view.html.php new file mode 100644 index 000000000..784d43dfb --- /dev/null +++ b/admin/views/library/view.html.php @@ -0,0 +1,199 @@ + + @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 View class + */ +class ComponentbuilderViewLibrary 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',$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_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('library.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('library.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('library.edit')) + { + // We can save the record. + JToolBarHelper::save('library.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('library.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('library.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('library.create')) + { + JToolBarHelper::apply('library.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('library.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('library.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('library.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('library.edit')) + { + // We can save the new record + JToolBarHelper::apply('library.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('library.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.create')) + { + JToolBarHelper::custom('library.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('library.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('library.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.library', $this->item->id); + } + if ($this->canDo->get('library.create')) + { + JToolBarHelper::custom('library.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('library.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('library'); + 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); + $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"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/snippet_type/submitbutton.js b/admin/views/snippet_type/submitbutton.js new file mode 100644 index 000000000..0f9aae017 --- /dev/null +++ b/admin/views/snippet_type/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/admin/views/snippet_type/tmpl/index.html b/admin/views/snippet_type/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/snippet_type/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/snippet_type/view.html.php b/admin/views/snippet_type/view.html.php new file mode 100644 index 000000000..7e1b843be --- /dev/null +++ b/admin/views/snippet_type/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Snippet_type View class + */ +class ComponentbuilderViewSnippet_type 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('snippet_type',$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_SNIPPET_TYPE_NEW' : 'COM_COMPONENTBUILDER_SNIPPET_TYPE_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('snippet_type.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('snippet_type.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('snippet_type.edit')) + { + // We can save the record. + JToolBarHelper::save('snippet_type.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('snippet_type.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('snippet_type.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('snippet_type.create')) + { + JToolBarHelper::apply('snippet_type.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('snippet_type.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('snippet_type.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('snippet_type.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('snippet_type.edit')) + { + // We can save the new record + JToolBarHelper::apply('snippet_type.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('snippet_type.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('snippet_type.create')) + { + JToolBarHelper::custom('snippet_type.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('snippet_type.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('snippet_type.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.snippet_type', $this->item->id); + } + if ($this->canDo->get('snippet_type.create')) + { + JToolBarHelper::custom('snippet_type.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('snippet_type.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('snippet_type'); + 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); + $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"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/snippet_types/index.html b/admin/views/snippet_types/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/snippet_types/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/snippet_types/tmpl/default.php b/admin/views/snippet_types/tmpl/default.php new file mode 100644 index 000000000..b16593e4f --- /dev/null +++ b/admin/views/snippet_types/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=snippet_types.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'snippet_typeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/snippet_types/tmpl/default_batch_body.php b/admin/views/snippet_types/tmpl/default_batch_body.php new file mode 100644 index 000000000..b1b20ad9a --- /dev/null +++ b/admin/views/snippet_types/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/snippet_types/tmpl/default_batch_footer.php b/admin/views/snippet_types/tmpl/default_batch_footer.php new file mode 100644 index 000000000..8cc91b0e2 --- /dev/null +++ b/admin/views/snippet_types/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/snippet_types/tmpl/default_body.php b/admin/views/snippet_types/tmpl/default_body.php new file mode 100644 index 000000000..949275a96 --- /dev/null +++ b/admin/views/snippet_types/tmpl/default_body.php @@ -0,0 +1,111 @@ + + @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=snippet_types&task=snippet_type.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('snippet_type',$item,'snippet_types'); + ?> + + + get('snippet_type.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('snippet_type.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('snippet_type.edit')): ?> +
+ escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'snippet_types.', $canCheckin); ?> + +
+ +
escape($item->name); ?>
+ + + + escape($item->description); ?> + + + get('snippet_type.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'snippet_types.', true, 'cb'); ?> + + published, $i, 'snippet_types.', false, 'cb'); ?> + + + published, $i, 'snippet_types.', true, 'cb'); ?> + + + published, $i, 'snippet_types.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/snippet_types/tmpl/default_foot.php b/admin/views/snippet_types/tmpl/default_foot.php new file mode 100644 index 000000000..4cbb00713 --- /dev/null +++ b/admin/views/snippet_types/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/snippet_types/tmpl/default_head.php b/admin/views/snippet_types/tmpl/default_head.php new file mode 100644 index 000000000..5727b5512 --- /dev/null +++ b/admin/views/snippet_types/tmpl/default_head.php @@ -0,0 +1,64 @@ + + @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'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/snippet_types/tmpl/default_toolbar.php b/admin/views/snippet_types/tmpl/default_toolbar.php new file mode 100644 index 000000000..36549515e --- /dev/null +++ b/admin/views/snippet_types/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/admin/views/snippet_types/tmpl/index.html b/admin/views/snippet_types/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/snippet_types/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php new file mode 100644 index 000000000..56aab1acc --- /dev/null +++ b/admin/views/snippet_types/view.html.php @@ -0,0 +1,240 @@ + + @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 Snippet_types + */ +class ComponentbuilderViewSnippet_types extends JViewLegacy +{ + /** + * Snippet_types view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('snippet_types'); + } + + // 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('snippet_type'); + $this->canEdit = $this->canDo->get('snippet_type.edit'); + $this->canState = $this->canDo->get('snippet_type.edit.state'); + $this->canCreate = $this->canDo->get('snippet_type.create'); + $this->canDelete = $this->canDo->get('snippet_type.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_SNIPPET_TYPES'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=snippet_types'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('snippet_type.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('snippet_type.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('snippet_types.publish'); + JToolBarHelper::unpublishList('snippet_types.unpublish'); + JToolBarHelper::archiveList('snippet_types.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('snippet_types.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('', 'snippet_types.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('snippet_types.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('snippet_types'); + 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() + { + $document = JFactory::getDocument(); + $document->setTitle(JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPES')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_types.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_LABEL'), + 'a.description' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/snippets/tmpl/default_body.php b/admin/views/snippets/tmpl/default_body.php index 40d1a20bf..55d496a60 100644 --- a/admin/views/snippets/tmpl/default_body.php +++ b/admin/views/snippets/tmpl/default_body.php @@ -90,11 +90,14 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit"; escape($item->url); ?> - type); ?> + escape($item->type_name); ?> escape($item->heading); ?> + + escape($item->library_name); ?> + get('core.edit.state')) : ?> checked_out) : ?> diff --git a/admin/views/snippets/tmpl/default_foot.php b/admin/views/snippets/tmpl/default_foot.php index 8cb41138b..7b99a4813 100644 --- a/admin/views/snippets/tmpl/default_foot.php +++ b/admin/views/snippets/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/snippets/tmpl/default_head.php b/admin/views/snippets/tmpl/default_head.php index 7b51e1f75..d4151dcc8 100644 --- a/admin/views/snippets/tmpl/default_head.php +++ b/admin/views/snippets/tmpl/default_head.php @@ -50,11 +50,14 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> listDirn, $this->listOrder); ?> + + listDirn, $this->listOrder); ?> + canState): ?> listDirn, $this->listOrder); ?> diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index 14fe0c99f..ddab29ad0 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -201,24 +201,46 @@ class ComponentbuilderViewSnippets extends JViewLegacy ); } - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - if ($this->typeOptions) + // Set Type Name Selection + $this->typeNameOptions = JFormHelper::loadFieldType('Snippettype')->getOptions(); + if ($this->typeNameOptions) { - // Type Filter + // Type Name Filter JHtmlSidebar::addFilter( '- Select '.JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL').' -', 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) + JHtml::_('select.options', $this->typeNameOptions, 'value', 'text', $this->state->get('filter.type')) ); if ($this->canBatch && $this->canCreate && $this->canEdit) { - // Type Batch Selection + // Type Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL').' -', 'batch[type]', - JHtml::_('select.options', $this->typeOptions, 'value', 'text') + JHtml::_('select.options', $this->typeNameOptions, 'value', 'text') + ); + } + } + + // Set Library Name Selection + $this->libraryNameOptions = JFormHelper::loadFieldType('Library')->getOptions(); + if ($this->libraryNameOptions) + { + // Library Name Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL').' -', + 'filter_library', + JHtml::_('select.options', $this->libraryNameOptions, 'value', 'text', $this->state->get('filter.library')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Library Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL').' -', + 'batch[library]', + JHtml::_('select.options', $this->libraryNameOptions, 'value', 'text') ); } } @@ -266,45 +288,10 @@ class ComponentbuilderViewSnippets extends JViewLegacy 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_NAME_LABEL'), 'a.url' => JText::_('COM_COMPONENTBUILDER_SNIPPET_URL_LABEL'), - 'a.type' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL'), + 'g.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL'), 'a.heading' => JText::_('COM_COMPONENTBUILDER_SNIPPET_HEADING_LABEL'), + 'h.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_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_snippet')); - $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/componentbuilder.xml b/componentbuilder.xml index 4ca36ff1f..e82e1e74f 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -7,9 +7,9 @@ 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.3 + 2.6.4 Component Builder (v.2.6.3) +

Component Builder (v.2.6.4)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index c75957eaf..491bbd23c 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -220,4 +220,21 @@ http://vdm.bz/component-builder + + Component Builder + Builds Complex Joomla Components + com_componentbuilder + component + 2.6.4 + http://vdm.bz/component-builder + + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.4/JCB_v2.6.4.zip + + + stable + + Llewellyn van der Merwe + http://vdm.bz/component-builder + + \ No newline at end of file diff --git a/script.php b/script.php index aeb94d1ef..27c4de9c1 100644 --- a/script.php +++ b/script.php @@ -2466,6 +2466,178 @@ 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 Snippet_type alias is found + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.snippet_type') ); + $db->setQuery($query); + // Execute query to see if alias is found + $db->execute(); + $snippet_type_found = $db->getNumRows(); + // Now check if there were any rows + if ($snippet_type_found) + { + // Since there are load the needed snippet_type type ids + $snippet_type_ids = $db->loadColumn(); + // Remove Snippet_type from the content type table + $snippet_type_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.snippet_type') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__content_types')); + $query->where($snippet_type_condition); + $db->setQuery($query); + // Execute the query to remove Snippet_type items + $snippet_type_done = $db->execute(); + if ($snippet_type_done); + { + // If succesfully remove Snippet_type add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.snippet_type) type alias was removed from the #__content_type table')); + } + + // Remove Snippet_type items from the contentitem tag map table + $snippet_type_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.snippet_type') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__contentitem_tag_map')); + $query->where($snippet_type_condition); + $db->setQuery($query); + // Execute the query to remove Snippet_type items + $snippet_type_done = $db->execute(); + if ($snippet_type_done); + { + // If succesfully remove Snippet_type add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.snippet_type) type alias was removed from the #__contentitem_tag_map table')); + } + + // Remove Snippet_type items from the ucm content table + $snippet_type_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.snippet_type') ); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_content')); + $query->where($snippet_type_condition); + $db->setQuery($query); + // Execute the query to remove Snippet_type items + $snippet_type_done = $db->execute(); + if ($snippet_type_done); + { + // If succesfully remove Snippet_type add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.snippet_type) type alias was removed from the #__ucm_content table')); + } + + // Make sure that all the Snippet_type items are cleared from DB + foreach ($snippet_type_ids as $snippet_type_id) + { + // Remove Snippet_type items from the ucm base table + $snippet_type_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $snippet_type_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_base')); + $query->where($snippet_type_condition); + $db->setQuery($query); + // Execute the query to remove Snippet_type items + $db->execute(); + + // Remove Snippet_type items from the ucm history table + $snippet_type_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $snippet_type_id); + // Create a new query object. + $query = $db->getQuery(true); + $query->delete($db->quoteName('#__ucm_history')); + $query->where($snippet_type_condition); + $db->setQuery($query); + // Execute the query to remove Snippet_type 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 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(); + } + } + // If All related items was removed queued success message. $app->enqueueMessage(JText::_('All related items was removed from the #__ucm_base table')); $app->enqueueMessage(JText::_('All related items was removed from the #__ucm_history table')); @@ -2478,8 +2650,8 @@ class com_componentbuilderInstallerScript $query->delete($db->quoteName('#__assets')); $query->where($componentbuilder_condition); $db->setQuery($query); - $component_files_folders_done = $db->execute(); - if ($component_files_folders_done); + $library_done = $db->execute(); + if ($library_done); { // If succesfully remove componentbuilder add queued success message. $app->enqueueMessage(JText::_('All related items was removed from the #__assets table')); @@ -2958,9 +3130,9 @@ class com_componentbuilderInstallerScript $snippet->type_title = 'Componentbuilder Snippet'; $snippet->type_alias = 'com_componentbuilder.snippet'; $snippet->table = '{"special": {"dbtable": "#__componentbuilder_snippet","key": "id","type": "Snippet","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $snippet->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","url":"url","type":"type","heading":"heading","description":"description","usage":"usage","snippet":"snippet"}}'; + $snippet->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","url":"url","type":"type","heading":"heading","library":"library","description":"description","snippet":"snippet","usage":"usage"}}'; $snippet->router = 'ComponentbuilderHelperRoute::getSnippetRoute'; - $snippet->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/snippet.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type"],"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"}]}'; + $snippet->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/snippet.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","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": "type","targetTable": "#__componentbuilder_snippet_type","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $snippet_Inserted = $db->insertObject('#__content_types', $snippet); @@ -3193,6 +3365,30 @@ class com_componentbuilderInstallerScript // Set the object into the content types table. $component_files_folders_Inserted = $db->insertObject('#__content_types', $component_files_folders); + // Create the snippet_type content type object. + $snippet_type = new stdClass(); + $snippet_type->type_title = 'Componentbuilder Snippet_type'; + $snippet_type->type_alias = 'com_componentbuilder.snippet_type'; + $snippet_type->table = '{"special": {"dbtable": "#__componentbuilder_snippet_type","key": "id","type": "Snippet_type","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $snippet_type->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"}}'; + $snippet_type->router = 'ComponentbuilderHelperRoute::getSnippet_typeRoute'; + $snippet_type->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/snippet_type.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"}]}'; + + // 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"}]}'; + + // Set the object into the content types table. + $library_Inserted = $db->insertObject('#__content_types', $library); + // Install the global extenstion params. $query = $db->getQuery(true); @@ -3456,9 +3652,9 @@ class com_componentbuilderInstallerScript $snippet->type_title = 'Componentbuilder Snippet'; $snippet->type_alias = 'com_componentbuilder.snippet'; $snippet->table = '{"special": {"dbtable": "#__componentbuilder_snippet","key": "id","type": "Snippet","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $snippet->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","url":"url","type":"type","heading":"heading","description":"description","usage":"usage","snippet":"snippet"}}'; + $snippet->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","url":"url","type":"type","heading":"heading","library":"library","description":"description","snippet":"snippet","usage":"usage"}}'; $snippet->router = 'ComponentbuilderHelperRoute::getSnippetRoute'; - $snippet->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/snippet.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type"],"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"}]}'; + $snippet->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/snippet.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","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": "type","targetTable": "#__componentbuilder_snippet_type","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Check if snippet type is already in content_type DB. $snippet_id = null; @@ -4031,6 +4227,64 @@ class com_componentbuilderInstallerScript $component_files_folders_Inserted = $db->insertObject('#__content_types', $component_files_folders); } + // Create the snippet_type content type object. + $snippet_type = new stdClass(); + $snippet_type->type_title = 'Componentbuilder Snippet_type'; + $snippet_type->type_alias = 'com_componentbuilder.snippet_type'; + $snippet_type->table = '{"special": {"dbtable": "#__componentbuilder_snippet_type","key": "id","type": "Snippet_type","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $snippet_type->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"}}'; + $snippet_type->router = 'ComponentbuilderHelperRoute::getSnippet_typeRoute'; + $snippet_type->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/snippet_type.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"}]}'; + + // Check if snippet_type type is already in content_type DB. + $snippet_type_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($snippet_type->type_alias)); + $db->setQuery($query); + $db->execute(); + + // Set the object into the content types table. + if ($db->getNumRows()) + { + $snippet_type->type_id = $db->loadResult(); + $snippet_type_Updated = $db->updateObject('#__content_types', $snippet_type, 'type_id'); + } + else + { + $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"}]}'; + + // 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); + } + // set some defaults @@ -4139,7 +4393,7 @@ class com_componentbuilderInstallerScript echo ' -

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

'; +

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

'; } } }