diff --git a/README.md b/README.md index 4cce98539..d7c7299b8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Joomla Component Builder (JCB) [![GitHub release](https://img.shields.io/github/release/vdm-io/Joomla-Component-Builder.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases) [![Total Downloads](https://img.shields.io/github/downloads/vdm-io/Joomla-Component-Builder/total.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases) + This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://youtu.be/1KBBtQUxMTc) ![Component Builder image](https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder/master/admin/assets/images/vdm-component.jpg "The Component Builder") @@ -9,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.5.8) 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.0) 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://youtu.be/1KBBtQUxMTc) @@ -110,13 +111,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th October, 2017 -+ *Version*: 2.5.8 ++ *Last Build*: 30th October, 2017 ++ *Version*: 2.6.0 + *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*: **125744** -+ *File count*: **742** -+ *Folder count*: **129** ++ *Line count*: **159245** ++ *File count*: **998** ++ *Folder count*: **165** > 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 4cce98539..d7c7299b8 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,6 +1,7 @@ # Joomla Component Builder (JCB) [![GitHub release](https://img.shields.io/github/release/vdm-io/Joomla-Component-Builder.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases) [![Total Downloads](https://img.shields.io/github/downloads/vdm-io/Joomla-Component-Builder/total.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases) + This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://youtu.be/1KBBtQUxMTc) ![Component Builder image](https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder/master/admin/assets/images/vdm-component.jpg "The Component Builder") @@ -9,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.5.8) 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.0) 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://youtu.be/1KBBtQUxMTc) @@ -110,13 +111,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th October, 2017 -+ *Version*: 2.5.8 ++ *Last Build*: 30th October, 2017 ++ *Version*: 2.6.0 + *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*: **125744** -+ *File count*: **742** -+ *Folder count*: **129** ++ *Line count*: **159245** ++ *File count*: **998** ++ *Folder count*: **165** > 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 20bd779a2..f816a8d36 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -54,6 +54,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -393,6 +483,105 @@ +
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index bfd5d74e8..5feb9b8f4 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin.css diff --git a/admin/assets/css/admin_fields.css b/admin/assets/css/admin_fields.css index 6d27b7d74..a88cd9562 100644 --- a/admin/assets/css/admin_fields.css +++ b/admin/assets/css/admin_fields.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields.css diff --git a/admin/assets/css/admin_fields_conditions.css b/admin/assets/css/admin_fields_conditions.css index 480e4cd30..6bd419df5 100644 --- a/admin/assets/css/admin_fields_conditions.css +++ b/admin/assets/css/admin_fields_conditions.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields_conditions.css diff --git a/admin/assets/css/admin_view.css b/admin/assets/css/admin_view.css index 297130ece..bf2fcbd91 100644 --- a/admin/assets/css/admin_view.css +++ b/admin/assets/css/admin_view.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.css diff --git a/admin/assets/css/admin_views.css b/admin/assets/css/admin_views.css index 0d32c4016..f3d633ca3 100644 --- a/admin/assets/css/admin_views.css +++ b/admin/assets/css/admin_views.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.css diff --git a/admin/assets/css/admins_fields.css b/admin/assets/css/admins_fields.css index 6509e2410..c831d8060 100644 --- a/admin/assets/css/admins_fields.css +++ b/admin/assets/css/admins_fields.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admins_fields.css diff --git a/admin/assets/css/admins_fields_conditions.css b/admin/assets/css/admins_fields_conditions.css index 1c56a1ca3..266c6a14d 100644 --- a/admin/assets/css/admins_fields_conditions.css +++ b/admin/assets/css/admins_fields_conditions.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admins_fields_conditions.css diff --git a/admin/assets/css/component_admin_views.css b/admin/assets/css/component_admin_views.css new file mode 100644 index 000000000..d6cccbcaf --- /dev/null +++ b/admin/assets/css/component_admin_views.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_admin_views.css + @author Llewellyn van der Merwe + @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/component_config.css b/admin/assets/css/component_config.css new file mode 100644 index 000000000..5c9f2f955 --- /dev/null +++ b/admin/assets/css/component_config.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage component_config.css + @author Llewellyn van der Merwe + @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/component_custom_admin_menus.css b/admin/assets/css/component_custom_admin_menus.css new file mode 100644 index 000000000..0b74af8b8 --- /dev/null +++ b/admin/assets/css/component_custom_admin_menus.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage component_custom_admin_menus.css + @author Llewellyn van der Merwe + @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/component_custom_admin_views.css b/admin/assets/css/component_custom_admin_views.css new file mode 100644 index 000000000..0dbb5db7f --- /dev/null +++ b/admin/assets/css/component_custom_admin_views.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_custom_admin_views.css + @author Llewellyn van der Merwe + @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/component_dashboard.css b/admin/assets/css/component_dashboard.css new file mode 100644 index 000000000..56c8ee006 --- /dev/null +++ b/admin/assets/css/component_dashboard.css @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage component_dashboard.css + @author Llewellyn van der Merwe + @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 */ + + +.tab_html { width: 1027px; height: 338px; } diff --git a/admin/assets/css/component_files_folders.css b/admin/assets/css/component_files_folders.css new file mode 100644 index 000000000..87c218594 --- /dev/null +++ b/admin/assets/css/component_files_folders.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage component_files_folders.css + @author Llewellyn van der Merwe + @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/component_mysql_tweaks.css b/admin/assets/css/component_mysql_tweaks.css new file mode 100644 index 000000000..4479deeba --- /dev/null +++ b/admin/assets/css/component_mysql_tweaks.css @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_mysql_tweaks.css + @author Llewellyn van der Merwe + @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 */ + + +.ids_selection {min-width: 100%;} diff --git a/admin/assets/css/component_site_views.css b/admin/assets/css/component_site_views.css new file mode 100644 index 000000000..2d72b7d48 --- /dev/null +++ b/admin/assets/css/component_site_views.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 4 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_site_views.css + @author Llewellyn van der Merwe + @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/component_updates.css b/admin/assets/css/component_updates.css new file mode 100644 index 000000000..4a9d6a363 --- /dev/null +++ b/admin/assets/css/component_updates.css @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 8 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_updates.css + @author Llewellyn van der Merwe + @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 */ + + +.mysql_update { width: 100%; height: 392px; } +.version_url { min-width: 100%; } diff --git a/admin/assets/css/components_admin_views.css b/admin/assets/css/components_admin_views.css new file mode 100644 index 000000000..50f93481f --- /dev/null +++ b/admin/assets/css/components_admin_views.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage components_admin_views.css + @author Llewellyn van der Merwe + @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/components_config.css b/admin/assets/css/components_config.css new file mode 100644 index 000000000..c80728406 --- /dev/null +++ b/admin/assets/css/components_config.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage components_config.css + @author Llewellyn van der Merwe + @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/components_custom_admin_menus.css b/admin/assets/css/components_custom_admin_menus.css new file mode 100644 index 000000000..aaea7229e --- /dev/null +++ b/admin/assets/css/components_custom_admin_menus.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage components_custom_admin_menus.css + @author Llewellyn van der Merwe + @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/components_custom_admin_views.css b/admin/assets/css/components_custom_admin_views.css new file mode 100644 index 000000000..b0f2dacf4 --- /dev/null +++ b/admin/assets/css/components_custom_admin_views.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage components_custom_admin_views.css + @author Llewellyn van der Merwe + @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/components_dashboard.css b/admin/assets/css/components_dashboard.css new file mode 100644 index 000000000..6037c778e --- /dev/null +++ b/admin/assets/css/components_dashboard.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage components_dashboard.css + @author Llewellyn van der Merwe + @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/components_files_folders.css b/admin/assets/css/components_files_folders.css new file mode 100644 index 000000000..eae1d7051 --- /dev/null +++ b/admin/assets/css/components_files_folders.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage components_files_folders.css + @author Llewellyn van der Merwe + @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/components_mysql_tweaks.css b/admin/assets/css/components_mysql_tweaks.css new file mode 100644 index 000000000..549e58c93 --- /dev/null +++ b/admin/assets/css/components_mysql_tweaks.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage components_mysql_tweaks.css + @author Llewellyn van der Merwe + @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/components_site_views.css b/admin/assets/css/components_site_views.css new file mode 100644 index 000000000..36bf8a194 --- /dev/null +++ b/admin/assets/css/components_site_views.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 4 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage components_site_views.css + @author Llewellyn van der Merwe + @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/components_updates.css b/admin/assets/css/components_updates.css new file mode 100644 index 000000000..591489603 --- /dev/null +++ b/admin/assets/css/components_updates.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 8 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage components_updates.css + @author Llewellyn van der Merwe + @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/custom_admin_view.css b/admin/assets/css/custom_admin_view.css index 22ffc7e4d..8dbfe4280 100644 --- a/admin/assets/css/custom_admin_view.css +++ b/admin/assets/css/custom_admin_view.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_view.css diff --git a/admin/assets/css/custom_admin_views.css b/admin/assets/css/custom_admin_views.css index c82eee70b..91605c3a9 100644 --- a/admin/assets/css/custom_admin_views.css +++ b/admin/assets/css/custom_admin_views.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_views.css diff --git a/admin/assets/css/custom_code.css b/admin/assets/css/custom_code.css index ae473d1e1..eee8db8bc 100644 --- a/admin/assets/css/custom_code.css +++ b/admin/assets/css/custom_code.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_code.css diff --git a/admin/assets/css/custom_codes.css b/admin/assets/css/custom_codes.css index 4664ad2be..87cd05713 100644 --- a/admin/assets/css/custom_codes.css +++ b/admin/assets/css/custom_codes.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_codes.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 21790800d..fcf101e15 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage dashboard.css diff --git a/admin/assets/css/dynamic_get.css b/admin/assets/css/dynamic_get.css index 46879470f..db4a0fd5b 100644 --- a/admin/assets/css/dynamic_get.css +++ b/admin/assets/css/dynamic_get.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_get.css diff --git a/admin/assets/css/dynamic_gets.css b/admin/assets/css/dynamic_gets.css index aa575fae5..11e95538d 100644 --- a/admin/assets/css/dynamic_gets.css +++ b/admin/assets/css/dynamic_gets.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_gets.css diff --git a/admin/assets/css/field.css b/admin/assets/css/field.css index 475a1a58d..55f4790ad 100644 --- a/admin/assets/css/field.css +++ b/admin/assets/css/field.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.css diff --git a/admin/assets/css/fields.css b/admin/assets/css/fields.css index a4bd0d41b..9115af5f2 100644 --- a/admin/assets/css/fields.css +++ b/admin/assets/css/fields.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.css diff --git a/admin/assets/css/fieldtype.css b/admin/assets/css/fieldtype.css index 7d37a18ee..c96560eec 100644 --- a/admin/assets/css/fieldtype.css +++ b/admin/assets/css/fieldtype.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtype.css diff --git a/admin/assets/css/fieldtypes.css b/admin/assets/css/fieldtypes.css index 53685eb51..8a33b3750 100644 --- a/admin/assets/css/fieldtypes.css +++ b/admin/assets/css/fieldtypes.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtypes.css diff --git a/admin/assets/css/ftp.css b/admin/assets/css/ftp.css index 9584a45fd..cdcf8914a 100644 --- a/admin/assets/css/ftp.css +++ b/admin/assets/css/ftp.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftp.css diff --git a/admin/assets/css/ftps.css b/admin/assets/css/ftps.css index 0578cdc23..22b0b38f9 100644 --- a/admin/assets/css/ftps.css +++ b/admin/assets/css/ftps.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftps.css diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index 3ffeda6e0..361869c9f 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.css diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css index a2f003053..01708dac2 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.css diff --git a/admin/assets/css/language.css b/admin/assets/css/language.css index 95309ab6b..fe8d7f50c 100644 --- a/admin/assets/css/language.css +++ b/admin/assets/css/language.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language.css diff --git a/admin/assets/css/language_translation.css b/admin/assets/css/language_translation.css index 8e547802b..2983ad01d 100644 --- a/admin/assets/css/language_translation.css +++ b/admin/assets/css/language_translation.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translation.css diff --git a/admin/assets/css/language_translations.css b/admin/assets/css/language_translations.css index 51d06adfc..072dcb3b6 100644 --- a/admin/assets/css/language_translations.css +++ b/admin/assets/css/language_translations.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translations.css diff --git a/admin/assets/css/languages.css b/admin/assets/css/languages.css index 581d6aa11..51f1d9cbc 100644 --- a/admin/assets/css/languages.css +++ b/admin/assets/css/languages.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage languages.css diff --git a/admin/assets/css/layout.css b/admin/assets/css/layout.css index 832fc56af..868a35e07 100644 --- a/admin/assets/css/layout.css +++ b/admin/assets/css/layout.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layout.css diff --git a/admin/assets/css/layouts.css b/admin/assets/css/layouts.css index a9f11151f..487a3e75a 100644 --- a/admin/assets/css/layouts.css +++ b/admin/assets/css/layouts.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layouts.css diff --git a/admin/assets/css/site_view.css b/admin/assets/css/site_view.css index c4130729a..64aa3387e 100644 --- a/admin/assets/css/site_view.css +++ b/admin/assets/css/site_view.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_view.css diff --git a/admin/assets/css/site_views.css b/admin/assets/css/site_views.css index 8a73448ff..938d6830d 100644 --- a/admin/assets/css/site_views.css +++ b/admin/assets/css/site_views.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_views.css diff --git a/admin/assets/css/snippet.css b/admin/assets/css/snippet.css index 706486413..b1925f406 100644 --- a/admin/assets/css/snippet.css +++ b/admin/assets/css/snippet.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippet.css diff --git a/admin/assets/css/snippets.css b/admin/assets/css/snippets.css index 2b1011ccf..cf096cbc0 100644 --- a/admin/assets/css/snippets.css +++ b/admin/assets/css/snippets.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippets.css diff --git a/admin/assets/css/template.css b/admin/assets/css/template.css index 048377ab5..fd0452c9d 100644 --- a/admin/assets/css/template.css +++ b/admin/assets/css/template.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage template.css diff --git a/admin/assets/css/templates.css b/admin/assets/css/templates.css index d3425725b..146b2b373 100644 --- a/admin/assets/css/templates.css +++ b/admin/assets/css/templates.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage templates.css diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index e365d231c..39cebff7f 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin.js diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php index 6838233b8..53404b9a1 100644 --- a/admin/componentbuilder.php +++ b/admin/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/controller.php b/admin/controller.php index 1a6c50d24..2a0ab463d 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage controller.php @@ -104,7 +104,16 @@ class ComponentbuilderController extends JControllerLegacy 'ftp' => 'ftps', 'help_document' => 'help_documents', 'admin_fields' => 'admins_fields', - 'admin_fields_conditions' => 'admins_fields_conditions' + 'admin_fields_conditions' => 'admins_fields_conditions', + 'component_admin_views' => 'components_admin_views', + 'component_site_views' => 'components_site_views', + 'component_custom_admin_views' => 'components_custom_admin_views', + 'component_updates' => 'components_updates', + 'component_mysql_tweaks' => 'components_mysql_tweaks', + 'component_custom_admin_menus' => 'components_custom_admin_menus', + 'component_config' => 'components_config', + 'component_dashboard' => 'components_dashboard', + 'component_files_folders' => 'components_files_folders' ); // check if this is a list view if (in_array($view,$views)) diff --git a/admin/controllers/admin_fields.php b/admin/controllers/admin_fields.php index d5bc469b6..5f3aab018 100644 --- a/admin/controllers/admin_fields.php +++ b/admin/controllers/admin_fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields.php diff --git a/admin/controllers/admin_fields_conditions.php b/admin/controllers/admin_fields_conditions.php index 8d4156209..11b59bf81 100644 --- a/admin/controllers/admin_fields_conditions.php +++ b/admin/controllers/admin_fields_conditions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields_conditions.php diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php index cbd3e05ba..4d0917f2f 100644 --- a/admin/controllers/admin_view.php +++ b/admin/controllers/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php @@ -320,6 +320,31 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { + // get the state object (Joomla\CMS\Object\CMSObject) + $state = $model->get('state'); + // if we save2copy we need to also copy linked tables found! + if ($state->task === 'save2copy' && $state->{'admin_view.new'}) + { + // get new ID + $newID = $state->{'admin_view.id'}; + // get old ID + $oldID = $this->input->get('id', 0, 'INT'); + // linked tables to update + $_tablesArray = array( + 'admin_fields', + 'admin_fields_conditions' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked ID + if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, 'admin_view', 'id')) + { + // copy fields to new admin view + ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('admin_view' => $newID)); + } + } + } + return; } diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index 01b6a263c..336ca7f8a 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.php diff --git a/admin/controllers/admins_fields.php b/admin/controllers/admins_fields.php index d50e85990..270d4373a 100644 --- a/admin/controllers/admins_fields.php +++ b/admin/controllers/admins_fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admins_fields.php diff --git a/admin/controllers/admins_fields_conditions.php b/admin/controllers/admins_fields_conditions.php index eff76ef36..10a91a519 100644 --- a/admin/controllers/admins_fields_conditions.php +++ b/admin/controllers/admins_fields_conditions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admins_fields_conditions.php diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 349e822a2..a625e336f 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.json.php @@ -51,7 +51,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getImportScripts', 'ajax'); $this->registerTask('getButton', 'ajax'); $this->registerTask('getButtonID', 'ajax'); - $this->registerTask('getFieldsDisplay', 'ajax'); + $this->registerTask('getAjaxDisplay', 'ajax'); $this->registerTask('templateDetails', 'ajax'); $this->registerTask('getLayoutDetails', 'ajax'); $this->registerTask('dbTableColumns', 'ajax'); @@ -418,14 +418,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; - case 'getFieldsDisplay': + case 'getAjaxDisplay': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'WORD'); if($typeValue && $user->id != 0) { - $result = $this->getModel('ajax')->getFieldsDisplay($typeValue); + $result = $this->getModel('ajax')->getAjaxDisplay($typeValue); } else { diff --git a/admin/controllers/component_admin_views.php b/admin/controllers/component_admin_views.php new file mode 100644 index 000000000..321dc1bd3 --- /dev/null +++ b/admin/controllers/component_admin_views.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_admin_views Controller + */ +class ComponentbuilderControllerComponent_admin_views 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 = 'Components_admin_views'; // 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('component_admin_views.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_admin_views.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('component_admin_views.access', 'com_componentbuilder.component_admin_views.' . (int) $recordId) && $user->authorise('component_admin_views.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_admin_views.edit', 'com_componentbuilder.component_admin_views.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_admin_views.edit.own', 'com_componentbuilder.component_admin_views.' . $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('component_admin_views.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_admin_views.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('Component_admin_views', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_admin_views' . $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/component_config.php b/admin/controllers/component_config.php new file mode 100644 index 000000000..d22c61676 --- /dev/null +++ b/admin/controllers/component_config.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_config Controller + */ +class ComponentbuilderControllerComponent_config extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Components_config'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('component_config.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_config.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('component_config.access', 'com_componentbuilder.component_config.' . (int) $recordId) && $user->authorise('component_config.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_config.edit', 'com_componentbuilder.component_config.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_config.edit.own', 'com_componentbuilder.component_config.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('component_config.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_config.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Component_config', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_config' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/controllers/component_custom_admin_menus.php b/admin/controllers/component_custom_admin_menus.php new file mode 100644 index 000000000..962554828 --- /dev/null +++ b/admin/controllers/component_custom_admin_menus.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_custom_admin_menus Controller + */ +class ComponentbuilderControllerComponent_custom_admin_menus 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 = 'Components_custom_admin_menus'; // 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('component_custom_admin_menus.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_custom_admin_menus.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('component_custom_admin_menus.access', 'com_componentbuilder.component_custom_admin_menus.' . (int) $recordId) && $user->authorise('component_custom_admin_menus.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_custom_admin_menus.edit', 'com_componentbuilder.component_custom_admin_menus.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_custom_admin_menus.edit.own', 'com_componentbuilder.component_custom_admin_menus.' . $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('component_custom_admin_menus.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_custom_admin_menus.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('Component_custom_admin_menus', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_custom_admin_menus' . $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/component_custom_admin_views.php b/admin/controllers/component_custom_admin_views.php new file mode 100644 index 000000000..a994d25a1 --- /dev/null +++ b/admin/controllers/component_custom_admin_views.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_custom_admin_views Controller + */ +class ComponentbuilderControllerComponent_custom_admin_views 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 = 'Components_custom_admin_views'; // 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('component_custom_admin_views.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_custom_admin_views.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('component_custom_admin_views.access', 'com_componentbuilder.component_custom_admin_views.' . (int) $recordId) && $user->authorise('component_custom_admin_views.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_custom_admin_views.edit', 'com_componentbuilder.component_custom_admin_views.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_custom_admin_views.edit.own', 'com_componentbuilder.component_custom_admin_views.' . $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('component_custom_admin_views.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_custom_admin_views.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('Component_custom_admin_views', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_custom_admin_views' . $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/component_dashboard.php b/admin/controllers/component_dashboard.php new file mode 100644 index 000000000..689396c92 --- /dev/null +++ b/admin/controllers/component_dashboard.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_dashboard Controller + */ +class ComponentbuilderControllerComponent_dashboard 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 = 'Components_dashboard'; // 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('component_dashboard.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_dashboard.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('component_dashboard.access', 'com_componentbuilder.component_dashboard.' . (int) $recordId) && $user->authorise('component_dashboard.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_dashboard.edit', 'com_componentbuilder.component_dashboard.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_dashboard.edit.own', 'com_componentbuilder.component_dashboard.' . $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('component_dashboard.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_dashboard.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('Component_dashboard', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_dashboard' . $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/component_files_folders.php b/admin/controllers/component_files_folders.php new file mode 100644 index 000000000..401544429 --- /dev/null +++ b/admin/controllers/component_files_folders.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_files_folders Controller + */ +class ComponentbuilderControllerComponent_files_folders 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 = 'Components_files_folders'; // 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('component_files_folders.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_files_folders.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('component_files_folders.access', 'com_componentbuilder.component_files_folders.' . (int) $recordId) && $user->authorise('component_files_folders.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_files_folders.edit', 'com_componentbuilder.component_files_folders.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_files_folders.edit.own', 'com_componentbuilder.component_files_folders.' . $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('component_files_folders.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_files_folders.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('Component_files_folders', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_files_folders' . $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/component_mysql_tweaks.php b/admin/controllers/component_mysql_tweaks.php new file mode 100644 index 000000000..9f7d178cf --- /dev/null +++ b/admin/controllers/component_mysql_tweaks.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_mysql_tweaks Controller + */ +class ComponentbuilderControllerComponent_mysql_tweaks 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 = 'Components_mysql_tweaks'; // 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('component_mysql_tweaks.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_mysql_tweaks.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('component_mysql_tweaks.access', 'com_componentbuilder.component_mysql_tweaks.' . (int) $recordId) && $user->authorise('component_mysql_tweaks.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_mysql_tweaks.edit', 'com_componentbuilder.component_mysql_tweaks.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_mysql_tweaks.edit.own', 'com_componentbuilder.component_mysql_tweaks.' . $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('component_mysql_tweaks.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_mysql_tweaks.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('Component_mysql_tweaks', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_mysql_tweaks' . $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/component_site_views.php b/admin/controllers/component_site_views.php new file mode 100644 index 000000000..caba5ef4a --- /dev/null +++ b/admin/controllers/component_site_views.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_site_views Controller + */ +class ComponentbuilderControllerComponent_site_views 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 = 'Components_site_views'; // 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('component_site_views.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_site_views.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('component_site_views.access', 'com_componentbuilder.component_site_views.' . (int) $recordId) && $user->authorise('component_site_views.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_site_views.edit', 'com_componentbuilder.component_site_views.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_site_views.edit.own', 'com_componentbuilder.component_site_views.' . $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('component_site_views.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_site_views.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('Component_site_views', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_site_views' . $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/component_updates.php b/admin/controllers/component_updates.php new file mode 100644 index 000000000..0c49123c9 --- /dev/null +++ b/admin/controllers/component_updates.php @@ -0,0 +1,326 @@ + + @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'); + +/** + * Component_updates Controller + */ +class ComponentbuilderControllerComponent_updates 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 = 'Components_updates'; // 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('component_updates.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('component_updates.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('component_updates.access', 'com_componentbuilder.component_updates.' . (int) $recordId) && $user->authorise('component_updates.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_updates.edit', 'com_componentbuilder.component_updates.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('component_updates.edit.own', 'com_componentbuilder.component_updates.' . $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('component_updates.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('component_updates.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('Component_updates', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_updates' . $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/componentbuilder.php b/admin/controllers/componentbuilder.php index e8c6ffc16..9342071bd 100644 --- a/admin/controllers/componentbuilder.php +++ b/admin/controllers/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/controllers/components_admin_views.php b/admin/controllers/components_admin_views.php new file mode 100644 index 000000000..876c07805 --- /dev/null +++ b/admin/controllers/components_admin_views.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_admin_views Controller + */ +class ComponentbuilderControllerComponents_admin_views extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_admin_views', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_config.php b/admin/controllers/components_config.php new file mode 100644 index 000000000..5983f57b2 --- /dev/null +++ b/admin/controllers/components_config.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_config Controller + */ +class ComponentbuilderControllerComponents_config extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_CONFIG'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_config', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_custom_admin_menus.php b/admin/controllers/components_custom_admin_menus.php new file mode 100644 index 000000000..797a0196c --- /dev/null +++ b/admin/controllers/components_custom_admin_menus.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_custom_admin_menus Controller + */ +class ComponentbuilderControllerComponents_custom_admin_menus extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_custom_admin_menus', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_custom_admin_views.php b/admin/controllers/components_custom_admin_views.php new file mode 100644 index 000000000..92bb9bf2d --- /dev/null +++ b/admin/controllers/components_custom_admin_views.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_custom_admin_views Controller + */ +class ComponentbuilderControllerComponents_custom_admin_views extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_custom_admin_views', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_dashboard.php b/admin/controllers/components_dashboard.php new file mode 100644 index 000000000..5e04a52ef --- /dev/null +++ b/admin/controllers/components_dashboard.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_dashboard Controller + */ +class ComponentbuilderControllerComponents_dashboard extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_dashboard', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_files_folders.php b/admin/controllers/components_files_folders.php new file mode 100644 index 000000000..6500b3399 --- /dev/null +++ b/admin/controllers/components_files_folders.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_files_folders Controller + */ +class ComponentbuilderControllerComponents_files_folders extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_files_folders', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_mysql_tweaks.php b/admin/controllers/components_mysql_tweaks.php new file mode 100644 index 000000000..2db9cb173 --- /dev/null +++ b/admin/controllers/components_mysql_tweaks.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_mysql_tweaks Controller + */ +class ComponentbuilderControllerComponents_mysql_tweaks extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_mysql_tweaks', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_site_views.php b/admin/controllers/components_site_views.php new file mode 100644 index 000000000..20f1253d3 --- /dev/null +++ b/admin/controllers/components_site_views.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_site_views Controller + */ +class ComponentbuilderControllerComponents_site_views extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_site_views', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/components_updates.php b/admin/controllers/components_updates.php new file mode 100644 index 000000000..9aec2da9d --- /dev/null +++ b/admin/controllers/components_updates.php @@ -0,0 +1,48 @@ + + @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'); + +/** + * Components_updates Controller + */ +class ComponentbuilderControllerComponents_updates extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_UPDATES'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Component_updates', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/custom_admin_view.php b/admin/controllers/custom_admin_view.php index c7bd3893a..0a9be7035 100644 --- a/admin/controllers/custom_admin_view.php +++ b/admin/controllers/custom_admin_view.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_view.php diff --git a/admin/controllers/custom_admin_views.php b/admin/controllers/custom_admin_views.php index e164ff3bd..a3c9aebb3 100644 --- a/admin/controllers/custom_admin_views.php +++ b/admin/controllers/custom_admin_views.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_views.php diff --git a/admin/controllers/custom_code.php b/admin/controllers/custom_code.php index 698ebb87d..bc47566d4 100644 --- a/admin/controllers/custom_code.php +++ b/admin/controllers/custom_code.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_code.php diff --git a/admin/controllers/custom_codes.php b/admin/controllers/custom_codes.php index 794b7ea7c..aa26e50a8 100644 --- a/admin/controllers/custom_codes.php +++ b/admin/controllers/custom_codes.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_codes.php diff --git a/admin/controllers/dynamic_get.php b/admin/controllers/dynamic_get.php index 6d799bfbd..55a6bfe45 100644 --- a/admin/controllers/dynamic_get.php +++ b/admin/controllers/dynamic_get.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_get.php diff --git a/admin/controllers/dynamic_gets.php b/admin/controllers/dynamic_gets.php index 81c77b8e8..fb8cde3fe 100644 --- a/admin/controllers/dynamic_gets.php +++ b/admin/controllers/dynamic_gets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_gets.php diff --git a/admin/controllers/field.php b/admin/controllers/field.php index b3d4c57cd..2b37f2a89 100644 --- a/admin/controllers/field.php +++ b/admin/controllers/field.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.php diff --git a/admin/controllers/fields.php b/admin/controllers/fields.php index cf0526115..d1ac1aca3 100644 --- a/admin/controllers/fields.php +++ b/admin/controllers/fields.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php diff --git a/admin/controllers/fieldtype.php b/admin/controllers/fieldtype.php index 151ffbe0d..c284f516f 100644 --- a/admin/controllers/fieldtype.php +++ b/admin/controllers/fieldtype.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtype.php diff --git a/admin/controllers/fieldtypes.php b/admin/controllers/fieldtypes.php index 82b2b25f5..67541e111 100644 --- a/admin/controllers/fieldtypes.php +++ b/admin/controllers/fieldtypes.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtypes.php diff --git a/admin/controllers/ftp.php b/admin/controllers/ftp.php index eb1a1b4a0..036813fe4 100644 --- a/admin/controllers/ftp.php +++ b/admin/controllers/ftp.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftp.php diff --git a/admin/controllers/ftps.php b/admin/controllers/ftps.php index 398d1b67b..f1da29e43 100644 --- a/admin/controllers/ftps.php +++ b/admin/controllers/ftps.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftps.php diff --git a/admin/controllers/help.php b/admin/controllers/help.php index fc73a9b6f..778c5c9b7 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage help.php diff --git a/admin/controllers/import.php b/admin/controllers/import.php index e9735891e..0d38fc243 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/controllers/import_joomla_components.php b/admin/controllers/import_joomla_components.php index fbdc1be7f..2ae6ca841 100644 --- a/admin/controllers/import_joomla_components.php +++ b/admin/controllers/import_joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage import_joomla_components.php diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index e3fbb2369..c6f88ce7b 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php @@ -320,6 +320,38 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { + // get the state object (Joomla\CMS\Object\CMSObject) + $state = $model->get('state'); + // if we save2copy we need to also copy linked tables found! + if ($state->task === 'save2copy' && $state->{'joomla_component.new'}) + { + // get new ID + $newID = $state->{'joomla_component.id'}; + // get old ID + $oldID = $this->input->get('id', 0, 'INT'); + // linked tables to update + $_tablesArray = array( + 'component_admin_views', + 'component_site_views', + 'component_custom_admin_views', + 'component_updates', + 'component_mysql_tweaks', + 'component_custom_admin_menus', + 'component_config', + 'component_dashboard', + 'component_files_folders' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked ID + if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, 'joomla_component', 'id')) + { + // copy fields to new linked table + ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('joomla_component' => $newID)); + } + } + } + return; } diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index a379ac037..09bb9dfb2 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php diff --git a/admin/controllers/language.php b/admin/controllers/language.php index aef23b27d..9b81f5543 100644 --- a/admin/controllers/language.php +++ b/admin/controllers/language.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language.php diff --git a/admin/controllers/language_translation.php b/admin/controllers/language_translation.php index fa7d30e3a..6a9e2fe5a 100644 --- a/admin/controllers/language_translation.php +++ b/admin/controllers/language_translation.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translation.php diff --git a/admin/controllers/language_translations.php b/admin/controllers/language_translations.php index a2a011e17..934027940 100644 --- a/admin/controllers/language_translations.php +++ b/admin/controllers/language_translations.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translations.php diff --git a/admin/controllers/languages.php b/admin/controllers/languages.php index 62ec59cd5..5b5e818ce 100644 --- a/admin/controllers/languages.php +++ b/admin/controllers/languages.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage languages.php diff --git a/admin/controllers/layout.php b/admin/controllers/layout.php index f6f23da26..f962419dc 100644 --- a/admin/controllers/layout.php +++ b/admin/controllers/layout.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layout.php diff --git a/admin/controllers/layouts.php b/admin/controllers/layouts.php index 663c05330..fd96dff83 100644 --- a/admin/controllers/layouts.php +++ b/admin/controllers/layouts.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layouts.php diff --git a/admin/controllers/site_view.php b/admin/controllers/site_view.php index 28de35c78..384d4f3e8 100644 --- a/admin/controllers/site_view.php +++ b/admin/controllers/site_view.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_view.php diff --git a/admin/controllers/site_views.php b/admin/controllers/site_views.php index 4e7bee7b9..be84f947c 100644 --- a/admin/controllers/site_views.php +++ b/admin/controllers/site_views.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_views.php diff --git a/admin/controllers/snippet.php b/admin/controllers/snippet.php index 92e15f203..22f9ba504 100644 --- a/admin/controllers/snippet.php +++ b/admin/controllers/snippet.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippet.php diff --git a/admin/controllers/snippets.php b/admin/controllers/snippets.php index fdc3b30d1..cbae1ba3e 100644 --- a/admin/controllers/snippets.php +++ b/admin/controllers/snippets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippets.php diff --git a/admin/controllers/template.php b/admin/controllers/template.php index 9084095b1..ec4179b39 100644 --- a/admin/controllers/template.php +++ b/admin/controllers/template.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage template.php diff --git a/admin/controllers/templates.php b/admin/controllers/templates.php index 323f17a45..17796c5ac 100644 --- a/admin/controllers/templates.php +++ b/admin/controllers/templates.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage templates.php diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index e121ce617..c1a5cc9bf 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.0 + @version 2.6.0 @created 30th April, 2015 @package Component Builder @subpackage compiler.php @@ -105,6 +105,35 @@ class Compiler extends Infusion } // set the lang data now $this->setLangFileData(); + // set the language notice if it was set + if (ComponentbuilderHelper::checkArray($this->langNot) || ComponentbuilderHelper::checkArray($this->langSet)) + { + if (ComponentbuilderHelper::checkArray($this->langNot)) + { + foreach ($this->langNot as $tag => $percentage) + { + $this->app->enqueueMessage(JText::sprintf('The %s language has %s% translated, you will need to translate %s% of the language strings before it will be added.', + $tag, $percentage, $this->percentageLanguageAdd), 'Warning'); + } + $this->app->enqueueMessage(JText::sprintf('You can change this percentage of translated strings required in the global options of JCB.
Please watch this tutorial for more help surrounding the JCB translations manager.', + '"https://youtu.be/zzAcVkn_cWU?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE" target="_blank" title="JCB Tutorial surrounding Translation Manager"'), 'Notice'); + } + // set why the strings were added + $whyAddedLang = JText::sprintf('because more then %s% of the strings have been translated.', $this->percentageLanguageAdd); + if ($this->debugLinenr) + { + $whyAddedLang = JText::_('because the debugging mode is on. (debug line numbers)'); + } + // show languages that were added + if (ComponentbuilderHelper::checkArray($this->langSet)) + { + foreach ($this->langSet as $tag => $percentage) + { + $this->app->enqueueMessage(JText::sprintf('The %s language has %s% translated. Was addeded %s', + $tag, $percentage, $whyAddedLang), 'Notice'); + } + } + } // move the update server into place $this->setUpdateServer(); // set the global counters @@ -522,8 +551,6 @@ class Compiler extends Infusion protected function addCustomCode() { - // load error messages incase code can not be added - $app = JFactory::getApplication(); // reset all these $this->clearFromPlaceHolders('view'); $this->clearFromPlaceHolders('arg'); @@ -636,20 +663,20 @@ class Compiler extends Infusion { // Load escaped code since the target endhash has changed $this->loadEscapedCode($file, $target, $lineBites); - $app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines below the custom code.', $target['path'], $target['from_line']), 'warning'); + $this->app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines below the custom code.', $target['path'], $target['from_line']), 'warning'); } } else { // Load escaped code since the target hash has changed $this->loadEscapedCode($file, $target, $lineBites); - $app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines above the custom code.', $target['path'], $target['from_line']), 'warning'); + $this->app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines above the custom code.', $target['path'], $target['from_line']), 'warning'); } } else { // Give developer a notice that file is not found. - $app->enqueueMessage(JText::sprintf('File %s could not be found, so the custom code for this file could not be addded.', $target['path']), 'warning'); + $this->app->enqueueMessage(JText::sprintf('File %s could not be found, so the custom code for this file could not be addded.', $target['path']), 'warning'); } } } @@ -657,9 +684,20 @@ class Compiler extends Infusion protected function loadEscapedCode($file, $target, $lineBites) { + // get comment type + if ($target['comment_type'] == 1) + { + $commentType = "// "; + $_commentType = ""; + } + else + { + $commentType = ""; + } // escape the code $code = explode(PHP_EOL, $target['code']); - $code = PHP_EOL."// " .implode(PHP_EOL."// ",$code). PHP_EOL; + $code = PHP_EOL . $commentType . implode($_commentType . PHP_EOL . $commentType, $code) . $_commentType . PHP_EOL; // get place holders $placeholder = $this->getPlaceHolder((int) $target['comment_type'].$target['type'], $target['id']); // build the data diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 64e040c4f..2df139004 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.0 + @version 2.6.0 @created 30th April, 2015 @package Component Builder @subpackage compiler.php @@ -31,6 +31,13 @@ defined('_JEXEC') or die('Restricted access'); */ class Get { + /** + * The app + * + * @var object + */ + public $app; + /** * The Params * @@ -498,6 +505,8 @@ class Get { if (isset($config) && count($config)) { + // load application + $this->app = JFactory::getApplication(); // Set the params $this->params = JComponentHelper::getParams('com_componentbuilder'); // load the compiler path @@ -592,7 +601,51 @@ class Get $query = $this->db->getQuery(true); $query->select('a.*'); + $query->select( + $this->db->quoteName( + array( + 'b.addadmin_views', + 'b.id', + 'h.addconfig', + 'd.addcustom_admin_views', + 'g.addcustommenus', + 'j.addfiles', + 'j.addfolders', + 'c.addsite_views', + 'i.dashboard_tab', + 'i.php_dashboard_methods', + 'f.sql_tweak', + 'e.version_update', + 'e.id' + ), + array( + 'addadmin_views', + 'addadmin_views_id', + 'addconfig', + 'addcustom_admin_views', + 'addcustommenus', + 'addfiles', + 'addfolders', + 'addsite_views', + 'dashboard_tab', + 'php_dashboard_methods', + 'sql_tweak', + 'version_update', + 'version_update_id' + ) + ) + ); + // from these tables $query->from('#__componentbuilder_joomla_component AS a'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_admin_views', 'b') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('b.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_site_views', 'c') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('c.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_custom_admin_views', 'd') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('d.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_updates', 'e') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('e.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_mysql_tweaks', 'f') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('f.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_custom_admin_menus', 'g') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('g.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_config', 'h') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('h.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_dashboard', 'i') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('i.joomla_component') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_files_folders', 'j') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('j.joomla_component') . ')'); $query->where($this->db->quoteName('a.id') . ' = '. (int) $this->componentID); // Reset the query using our newly populated query object. @@ -601,6 +654,42 @@ class Get // Load the results as a list of stdClass objects $component = $this->db->loadObject(); + // set upater + $updater = array( + 'unique' => array( + 'addadmin_views' => array('table' => 'component_admin_views', 'val' => (int) $component->addadmin_views_id, 'key' => 'id'), + 'addconfig' => array('table' => 'component_config', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'addcustom_admin_views' => array('table' => 'component_custom_admin_views', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'addcustommenus' => array('table' => 'component_custom_admin_menus', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'addfiles' => array('table' => 'component_files_folders', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'addfolders' => array('table' => 'component_files_folders', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'addsite_views' => array('table' => 'component_site_views', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'dashboard_tab' => array('table' => 'component_dashboard', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'sql_tweak' => array('table' => 'component_mysql_tweaks', 'val' => (int) $this->componentID, 'key' => 'joomla_component'), + 'version_update' => array('table' => 'component_updates', 'val' => (int) $this->componentID, 'key' => 'joomla_component') + ), + 'table' => 'joomla_component', + 'key' => 'id', + 'val' => (int) $this->componentID + ); + // repeatable fields to update + $searchRepeatables = array( + // repeatablefield => checker + 'addadmin_views' => 'adminview', + 'addconfig' => 'field', + 'addcontributors' => 'name', + 'addcustom_admin_views' => 'customadminview', + 'addcustommenus' => 'name', + 'addfiles' => 'file', + 'addfolders' => 'folder', + 'addsite_views' => 'siteview', + 'dashboard_tab' => 'name', + 'sql_tweak' => 'adminview', + 'version_update' => 'version' + ); + // update the repeatable fields + $component = ComponentbuilderHelper::convertRepeatableFields($component, $searchRepeatables, $updater); + // set component place holders $this->placeholders['###component###'] = ComponentbuilderHelper::safeString($component->name_code); $this->placeholders['###Component###'] = ComponentbuilderHelper::safeString($component->name_code, 'F'); @@ -608,37 +697,29 @@ class Get $this->placeholders['[[[component]]]'] = $this->placeholders['###component###']; $this->placeholders['[[[Component]]]'] = $this->placeholders['###Component###']; $this->placeholders['[[[COMPONENT]]]'] = $this->placeholders['###COMPONENT###']; + // set component sales name $component->sales_name = ComponentbuilderHelper::safeString($component->system_name); + // ensure version naming is correct $this->component_version = preg_replace('/[^0-9.]+/', '', $component->component_version); - // ser the addfolders data - $addfolders = json_decode($component->addfolders,true); - if (ComponentbuilderHelper::checkArray($addfolders)) - { - foreach ($addfolders as $option => $values) - { - foreach ($values as $nr => $value) - { - $component->folders[$nr][$option] = $value; - } - } - unset($component->addfolders); - } - // ser the addfiles data - $addfiles = json_decode($component->addfiles,true); - if (ComponentbuilderHelper::checkArray($addfiles)) + // set the addfolders data + $component->addfolders = (isset($component->addfolders) && ComponentbuilderHelper::checkJson($component->addfolders)) ? json_decode($component->addfolders,true):null; + if (ComponentbuilderHelper::checkArray($component->addfolders)) { - foreach ($addfiles as $option => $values) - { - foreach ($values as $nr => $value) - { - $component->files[$nr][$option] = $value; - } - } - unset($component->addfiles); + $component->folders = array_values($component->addfolders); } + unset($component->addfolders); + + // set the addfiles data + $component->addfiles = (isset($component->addfiles) && ComponentbuilderHelper::checkJson($component->addfiles)) ? json_decode($component->addfiles,true):null; + if (ComponentbuilderHelper::checkArray($component->addfiles)) + { + $component->files = array_values($component->addfiles); + } + unset($component->addfiles); + // set the uikit switch if ($component->adduikit) { @@ -651,67 +732,39 @@ class Get // add the version $this->footableVersion = (1 == $component->addfootable || 2 == $component->addfootable) ? 2 : $component->addfootable; } - - // ser the addcustommenu data - $addcustommenus = json_decode($component->addcustommenus,true); - if (ComponentbuilderHelper::checkArray($addcustommenus)) - { - foreach ($addcustommenus as $option => $values) - { - foreach ($values as $nr => $value) - { - $component->custommenus[$nr][$option] = $value; - } - } - unset($component->addcustommenus); - } - // tweak the mysql dump settings if needed - $sql_tweak = json_decode($component->sql_tweak,true); - if (ComponentbuilderHelper::checkArray($sql_tweak)) + // set the addcustommenus data + $component->addcustommenus = (isset($component->addcustommenus) && ComponentbuilderHelper::checkJson($component->addcustommenus)) ? json_decode($component->addcustommenus,true):null; + if (ComponentbuilderHelper::checkArray($component->addcustommenus)) { - $component->sql_tweak = array(); - foreach ($sql_tweak as $option => $values) - { - foreach ($values as $nr => $value) - { - if ((string)(int)$value == $value) - { - $component->sql_tweak[$nr][$option] = (int) $value; - } - else - { - $component->sql_tweak[$nr][$option] = $value; - } - } - } - // build the tweak settings - $this->setSqlTweaking($component->sql_tweak); - unset($component->sql_tweak); + $component->custommenus = array_values($component->addcustommenus); } + unset($component->addcustommenus); + + // set the sql_tweak data + $component->sql_tweak = (isset($component->sql_tweak) && ComponentbuilderHelper::checkJson($component->sql_tweak)) ? json_decode($component->sql_tweak,true):null; + if (ComponentbuilderHelper::checkArray($component->sql_tweak)) + { + // build the tweak settings + $this->setSqlTweaking(array_map(function($array) { + return array_map(function($value) { + if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) + && strval($value) === strval(intval($value))) + { + return (int) $value; + } + return $value; + }, $array); + }, array_values($component->sql_tweak))); + } + unset($component->sql_tweak); // set the admin_view data - $admin_views = json_decode($component->addadmin_views,true); - - if (ComponentbuilderHelper::checkArray($admin_views)) + $component->addadmin_views = (isset($component->addadmin_views) && ComponentbuilderHelper::checkJson($component->addadmin_views)) ? json_decode($component->addadmin_views,true):null; + if (ComponentbuilderHelper::checkArray($component->addadmin_views)) { - foreach ($admin_views as $option => $values) - { - foreach ($values as $nr => $value) - { - if ((string)(int)$value == $value) - { - $component->admin_views[$nr][$option] = (int) $value; - } - else - { - $component->admin_views[$nr][$option] = $value; - } - } - } - unset($component->addadmin_views); // sort the views acording to order - usort($component->admin_views, function($a, $b) + usort($component->addadmin_views, function($a, $b) { if ($a['order'] != 0 && $b['order'] != 0) { @@ -727,165 +780,143 @@ class Get } return 1; }); - // load the view and field data - foreach ($component->admin_views as $key => &$view) - { - if ($view['port'] && !$this->addEximport) + // build the admin_views settings + $component->admin_views = array_map(function($array) { + $array = array_map(function($value) { + if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) + && strval($value) === strval(intval($value))) + { + return (int) $value; + } + return $value; + }, $array); + // has become a lacacy issue, can't remove this + $array['view'] = $array['adminview']; + $array['settings'] = $this->getAdminViewData($array['view']); + if (isset($array['port']) && $array['port'] && !$this->addEximport) { $this->addEximport = true; } - if ($view['history'] && !$this->setTagHistory) + if (isset($array['history']) && $array['history'] && !$this->setTagHistory) { $this->setTagHistory = true; } - if ($view['edit_create_site_view']) + if (isset($array['edit_create_site_view']) && $array['edit_create_site_view']) { - $this->siteEditView[$view['adminview']] = true; + $this->siteEditView[$array['adminview']] = true; } - // TODO this is a temp fix until front view is added - $view['view'] = $view['adminview']; - $view['settings'] = $this->getAdminViewData($view['view']); - } - unset($component->addadmin_view); + return $array; + }, array_values($component->addadmin_views)); } // set the site_view data - $site_views = json_decode($component->addsite_views,true); - if (ComponentbuilderHelper::checkArray($site_views)) + $component->addsite_views = (isset($component->addsite_views) && ComponentbuilderHelper::checkJson($component->addsite_views)) ? json_decode($component->addsite_views,true):null; + if (ComponentbuilderHelper::checkArray($component->addsite_views)) { - foreach ($site_views as $option => $values) - { - foreach ($values as $nr => $value) - { - if ((string)(int)$value == $value) - { - $component->site_views[$nr][$option] = (int) $value; - } - else - { - $component->site_views[$nr][$option] = $value; - } - } - } - unset($component->addsite_views); $this->lang = 'site'; $this->target = 'site'; - // load the view and field data - if (isset($component->site_views) && ComponentbuilderHelper::checkArray($component->site_views)) - { - foreach ($component->site_views as $key => &$view) - { - // has become a lacacy issue, can't remove this - $view['view'] = $view['siteview']; - $view['settings'] = $this->getCustomViewData($view['view']); - } - } + // build the site_views settings + $component->site_views = array_map(function($array) { + // has become a lacacy issue, can't remove this + $array['view'] = $array['siteview']; + $array['settings'] = $this->getCustomViewData($array['view']); + return array_map(function($value) { + if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) + && strval($value) === strval(intval($value))) + { + return (int) $value; + } + return $value; + }, $array); + }, array_values($component->addsite_views)); + // unset original value + unset($component->addsite_views); } // set the custom_admin_views data - $custom_admin_views = json_decode($component->addcustom_admin_views,true); - if (ComponentbuilderHelper::checkArray($custom_admin_views)) + $component->addcustom_admin_views = (isset($component->addcustom_admin_views) && ComponentbuilderHelper::checkJson($component->addcustom_admin_views)) ? json_decode($component->addcustom_admin_views,true):null; + if (ComponentbuilderHelper::checkArray($component->addcustom_admin_views)) { - foreach ($custom_admin_views as $option => $values) - { - foreach ($values as $nr => $value) - { - if ((string)(int)$value == $value) - { - $component->custom_admin_views[$nr][$option] = (int) $value; - } - else - { - $component->custom_admin_views[$nr][$option] = $value; - } - } - } - unset($component->addcustom_admin_views); $this->lang = 'admin'; $this->target = 'custom_admin'; - // load the view and field data - if (isset($component->custom_admin_views) && ComponentbuilderHelper::checkArray($component->custom_admin_views)) - { - foreach ($component->custom_admin_views as $key => &$view) - { - // has become a lacacy issue, can't remove this - $view['view'] = $view['customadminview']; - $view['settings'] = $this->getCustomViewData($view['view'], 'custom_admin_view'); - } - } + // build the custom_admin_views settings + $component->custom_admin_views = array_map(function($array) { + // has become a lacacy issue, can't remove this + $array['view'] = $array['customadminview']; + $array['settings'] = $this->getCustomViewData($array['view'], 'custom_admin_view'); + return array_map(function($value) { + if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) + && strval($value) === strval(intval($value))) + { + return (int) $value; + } + return $value; + }, $array); + }, array_values($component->addcustom_admin_views)); + // unset original value + unset($component->addcustom_admin_views); } // ser the config data - $addconfig = json_decode($component->addconfig,true); - if (ComponentbuilderHelper::checkArray($addconfig)) + $component->addconfig = (isset($component->addconfig) && ComponentbuilderHelper::checkJson($component->addconfig)) ? json_decode($component->addconfig,true):null; + if (ComponentbuilderHelper::checkArray($component->addconfig)) { - foreach ($addconfig as $option => $values) - { - foreach ($values as $nr => $value) - { - $component->config[$nr]['alias'] = 0; - $component->config[$nr]['title'] = 0; - if ($option === 'field') - { - // load the field data - $component->config[$nr]['settings'] = $this->getFieldData($value); - } - else - { - $component->config[$nr][$option] = $value; - } - } - } + $component->config = array_map(function($array) { + $array['alias'] = 0; + $array['title'] = 0; + $array['settings'] = $this->getFieldData($array['field']); + return $array; + }, array_values($component->addconfig)); + // unset original value unset($component->addconfig); } - - // check if any contributors is to be added - $contributors = json_decode($component->addcontributors,true); - if (ComponentbuilderHelper::checkArray($contributors)) + + // set the addcustommenus data + $component->addcontributors = (isset($component->addcontributors) && ComponentbuilderHelper::checkJson($component->addcontributors)) ? json_decode($component->addcontributors,true):null; + if (ComponentbuilderHelper::checkArray($component->addcontributors)) { $this->addContributors = true; - foreach ($contributors as $option => $values) - { - foreach ($values as $nr => $value) - { - $component->contributors[$nr][$option] = $value; - } - } - unset($component->addcontributors); + $component->contributors = array_values($component->addcontributors); } - - // check if version updating is set - $version_update = json_decode($component->version_update,true); - if (ComponentbuilderHelper::checkArray($version_update)) + unset($component->addcontributors); + + // set the addcustommenus data + $component->version_update = (isset($component->version_update) && ComponentbuilderHelper::checkJson($component->version_update)) ? json_decode($component->version_update,true):null; + if (ComponentbuilderHelper::checkArray($component->version_update)) { - $component->version_update = array(); - foreach ($version_update as $option => $values) - { - foreach ($values as $nr => $value) - { - $component->version_update[$nr][$option] = $value; - } - } - } + $component->version_update = array_values($component->version_update); + } // build update SQL - if ($old_component = $this->getHistoryWatch('joomla_component', $this->componentID)) + $old_admin_views = $this->getHistoryWatch('component_admin_views', $component->addadmin_views_id); + $old_component = $this->getHistoryWatch('joomla_component', $this->componentID); + if ($old_component || $old_admin_views) { - // add new views if found - if (isset($old_component->addadmin_views) && ComponentbuilderHelper::checkJson($old_component->addadmin_views)) + if (ComponentbuilderHelper::checkObject($old_admin_views)) { - $this->setUpdateSQL(json_decode($old_component->addadmin_views, true), $admin_views, 'adminview'); + // add new views if found + if (isset($old_admin_views->addadmin_views) && ComponentbuilderHelper::checkJson($old_admin_views->addadmin_views)) + { + $this->setUpdateSQL(json_decode($old_admin_views->addadmin_views, true), $component->addadmin_views, 'adminview'); + } + // check if a new version was manualy set + if (ComponentbuilderHelper::checkObject($old_component)) + { + $old_component_version = preg_replace('/[^0-9.]+/', '', $old_component->component_version); + if ($old_component_version != $this->component_version) + { + // yes, this is a new version, this mean there may be manual sql and must be checked and updated + $component->old_component_version = $old_component_version; + } + // clear this data + unset($old_component); + } + // clear this data + unset($old_admin_views); } - // check if a new version was manualy set - $old_component_version = preg_replace('/[^0-9.]+/', '', $old_component->component_version); - if ($old_component_version != $this->component_version) - { - // yes, this is a new version, this mean there may be manual sql and must be checked and updated - $component->old_component_version = $old_component_version; - } - // clear this data - unset($old_component); } + // unset original value + unset($component->addadmin_views); // add_javascript if ($component->add_javascript == 1) @@ -1010,40 +1041,33 @@ class Get } // dashboard methods - if ($component->add_php_dashboard_methods && ComponentbuilderHelper::checkString($component->php_dashboard_methods)) - { + $component->dashboard_tab = (isset($component->dashboard_tab) && ComponentbuilderHelper::checkJson($component->dashboard_tab)) ? json_decode($component->dashboard_tab,true):null; + if (ComponentbuilderHelper::checkArray($component->dashboard_tab)) + { $nowLang = $this->lang; $this->lang = 'admin'; + $component->dashboard_tab = array_map( function($array) { + $array['html'] = $this->setDynamicValues($array['html']); + return $array; + }, array_values($component->dashboard_tab)); + } + else + { + $component->dashboard_tab = ''; + } + // add the php of the dashboard if set + if (isset($component->php_dashboard_methods) && ComponentbuilderHelper::checkString($component->php_dashboard_methods)) + { // load the php for the dashboard model $component->php_dashboard_methods = $this->setDynamicValues(base64_decode($component->php_dashboard_methods)); - // check if dashboard_tab is set - $dashboard_tab = json_decode($component->dashboard_tab,true); - if (ComponentbuilderHelper::checkArray($dashboard_tab)) - { - $component->dashboard_tab = array(); - foreach ($dashboard_tab as $option => $values) - { - foreach ($values as $nr => $value) - { - if ('html' === $option) - { - $value = $this->setDynamicValues($value); - } - $component->dashboard_tab[$nr][$option] = $value; - } - } - } - else - { - $component->dashboard_tab = ''; - } + // reset back to nowlang $this->lang = $nowLang; } else { $component->php_dashboard_methods = ''; - $component->dashboard_tab = ''; } + // add the update FTP server sig if ($component->add_update_server == 1 && is_numeric($component->update_server_ftp) && $component->update_server_ftp > 0) { @@ -1085,81 +1109,6 @@ class Get return $component; } - /** - * To limit the SQL Demo date build in the views - * - * @param array $settings Tweaking array. - * - * @return void - * - */ - public function setSqlTweaking($settings) - { - if (ComponentbuilderHelper::checkArray($settings)) - { - foreach($settings as $setting) - { - // should sql dump be added - if (1 == $setting['add_sql']) - { - // add sql (by option) - if (2 == $setting['add_sql_options']) - { - // rest always - $id_array = array(); - // by id (first remove backups) - $ids = $setting['ids']; - // now get the ids - if (strpos($ids, ',') !== false) - { - $id_array = (array) array_map('trim',explode(',', $ids)); - } - else - { - $id_array[] = trim($ids); - } - $id_array_new = array(); - // check for ranges - foreach ($id_array as $key => $id) - { - if (strpos($id, '=>') !== false) - { - $id_range = (array) array_map('trim', explode('=>', $id)); - unset($id_array[$key]); - // build range - if (count($id_range) == 2) - { - $range = range($id_range[0],$id_range[1]); - $id_array_new = array_merge($id_array_new,$range); - } - } - } - if (ComponentbuilderHelper::checkArray($id_array_new)) - { - $id_array = array_merge($id_array_new, $id_array); - } - // final fixing to array - if (ComponentbuilderHelper::checkArray($id_array)) - { - // uniqe - $id_array = array_unique($id_array, SORT_NUMERIC); - // sort - sort($id_array, SORT_NUMERIC); - // now set it to global - $this->sqlTweak[ (int) $setting['adminview']]['where'] = implode(',', $id_array); - } - } - } - else - { - // remove all sql dump options - $this->sqlTweak[ (int) $setting['adminview']]['remove'] = true; - - } - } - } - } - /** * Get all Admin View Data * @@ -1176,7 +1125,25 @@ class Get $query = $this->db->getQuery(true); $query->select('a.*'); + $query->select( + $this->db->quoteName( + array( + 'b.addfields', + 'b.id', + 'c.addconditions', + 'c.id' + ), + array( + 'addfields', + 'addfields_id', + 'addconditions', + 'addconditions_id' + ) + ) + ); $query->from('#__componentbuilder_admin_view AS a'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('b.admin_view') . ')'); + $query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_fields_conditions', 'c') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('c.admin_view') . ')'); $query->where($this->db->quoteName('a.id') . ' = '. (int) $id); // Reset the query using our newly populated query object. @@ -1187,9 +1154,32 @@ class Get // setup view name to use in storing the data $name_single = ComponentbuilderHelper::safeString($view->name_single); $name_list = ComponentbuilderHelper::safeString($view->name_list); - // be sure to update the value in the db - $objectUpdate = new stdClass(); - $objectUpdate->id = (int) $id; + + // set upater + $updater = array( + 'unique' => array( + 'addfields' => array('table' => 'admin_fields', 'val' => (int) $view->addfields_id, 'key' => 'id'), + 'addconditions' => array('table' => 'admin_fields_conditions', 'val' => (int) $view->addconditions_id, 'key' => 'id') + ), + 'table' => 'admin_view', + 'key' => 'id', + 'val' => (int) $id + ); + // repeatable fields to update + $searchRepeatables = array( + // repeatablefield => checker + 'addfields' => 'field', + 'addconditions' => 'target_field', + 'ajax_input' => 'value_name', + 'custom_button' => 'name', + 'addlinked_views' => 'adminview', + 'addtables' => 'table', + 'addtabs' => 'name', + 'addpermissions' => 'action' + ); + // update the repeatable fields + $view = ComponentbuilderHelper::convertRepeatableFields($view, $searchRepeatables, $updater); + // setup token check if (!isset($this->customScriptBuilder['token'])) { @@ -1211,71 +1201,38 @@ class Get $this->placeholders['[[[VIEW]]]'] = $this->placeholders['###VIEW###']; $this->placeholders['[[[VIEWS]]]'] = $this->placeholders['###VIEWS###']; // add the tables - $view->addtables = json_decode($view->addtables,true); - // check what type of table array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addtables['table'])) - { - $bucket = array(); - foreach($view->addtables as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addtables'.$nr][$option] = $value; - } - } - $view->addtables = $bucket; - $objectUpdate->addtables = json_encode($bucket); - } + $view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables,true):null; if (ComponentbuilderHelper::checkArray($view->addtables)) { $view->tables = array_values($view->addtables); } unset($view->addtables); // add the tabs - $view->addtabs = json_decode($view->addtabs,true); - // check what type of tabs array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addtabs['name'])) - { - $bucket = array(); - foreach($view->addtabs as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addtabs'.$nr][$option] = $value; - } - } - $view->addtabs = $bucket; - $objectUpdate->addtabs = json_encode($bucket); - } + $view->addtabs = (isset($view->addtabs) && ComponentbuilderHelper::checkJson($view->addtabs)) ? json_decode($view->addtabs,true):null; if (ComponentbuilderHelper::checkArray($view->addtabs)) { $nr = 1; foreach ($view->addtabs as $tab) { - $view->tabs[$nr] = $tab['name']; + $view->tabs[$nr] = trim($tab['name']); $nr++; } } + // if Details tab is not set, then set it here + if (!isset($view->tabs[1])) + { + $view->tabs[1] = 'Details'; + } + // always make sure that publishing is lowercase + if (($removeKey = array_search('publishing', array_map('strtolower', $view->tabs))) !== false) + { + $view->tabs[$removeKey] = 'publishing'; + } + // make sure to set the publishing tab (just incase we need it) + $view->tabs[15] = 'publishing'; unset($view->addtabs); // add permissions - $view->addpermissions = json_decode($view->addpermissions,true); - // check what type of permissions array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addpermissions['action'])) - { - $bucket = array(); - foreach($view->addpermissions as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addpermissions'.$nr][$option] = $value; - } - } - $view->addpermissions = $bucket; - $objectUpdate->addpermissions = json_encode($bucket); - } + $view->addpermissions = (isset($view->addpermissions) && ComponentbuilderHelper::checkJson($view->addpermissions)) ? json_decode($view->addpermissions,true):null; if (ComponentbuilderHelper::checkArray($view->addpermissions)) { $view->permissions = array_values($view->addpermissions); @@ -1284,32 +1241,11 @@ class Get // reset fields $view->fields = array(); // set fields - if ($addfields = ComponentbuilderHelper::getVar('admin_fields', $id, 'admin_view', 'addfields')) + $view->addfields = (isset($view->addfields) && ComponentbuilderHelper::checkJson($view->addfields)) ? json_decode($view->addfields,true):null; + if (ComponentbuilderHelper::checkArray($view->addfields)) { - $view->addfields = json_decode($addfields,true); - // get the admin fields id - $fieldID = ComponentbuilderHelper::getVar('admin_fields', $id, 'admin_view', 'id'); - // check what type of field array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addfields['field'])) - { - $bucket = array(); - foreach($view->addfields as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addfields'.$nr][$option] = $value; - } - } - $view->addfields = $bucket; - // update the fields - $fieldsUpdate = new stdClass(); - $fieldsUpdate->id = (int) $fieldID; - $fieldsUpdate->addfields = json_encode($bucket); - $this->db->updateObject('#__componentbuilder_admin_fields', $fieldsUpdate, 'id'); - } // build update SQL - if ($old_view = $this->getHistoryWatch('admin_fields', $fieldID)) + if ($old_view = $this->getHistoryWatch('admin_fields', $view->addfields_id)) { // add new fields were added if (isset($old_view->addfields) && ComponentbuilderHelper::checkJson($old_view->addfields)) @@ -1321,7 +1257,11 @@ class Get } if (ComponentbuilderHelper::checkArray($view->addfields)) { - $view->fields = array_values($view->addfields); + // load the field data + $view->fields = array_map( function($array) use($name_single, $name_list){ + $array['settings'] = $this->getFieldData($array['field'], $name_single, $name_list); + return $array; + }, array_values($view->addfields)); // sort the fields acording to order usort($view->fields, function($a, $b) { @@ -1343,14 +1283,9 @@ class Get } return 0; }); - // load the field data - foreach ($view->fields as $key => &$field) - { - $field['settings'] = $this->getFieldData($field['field'], $name_single, $name_list); - } } - unset($view->addfields); - } + } + unset($view->addfields); // build update SQL if ($old_view = $this->getHistoryWatch('admin_view', $id)) { @@ -1363,123 +1298,84 @@ class Get unset($old_view); } // set the conditions - if ($addconditions = ComponentbuilderHelper::getVar('admin_fields_conditions', $id, 'admin_view', 'addconditions')) + $view->addconditions = (isset($view->addconditions) && ComponentbuilderHelper::checkJson($view->addconditions)) ? json_decode($view->addconditions,true):null; + if (ComponentbuilderHelper::checkArray($view->addconditions)) { - $view->addconditions = json_decode($addconditions,true); - // get the admin fields id - $conditionsID = ComponentbuilderHelper::getVar('admin_fields_conditions', $id, 'admin_view', 'id'); - // check what type of conditions array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addconditions['target_field'])) + $view->conditions = array(); + $ne = 0; + foreach ($view->addconditions as $nr => $conditionValue) { - $bucket = array(); - foreach($view->addconditions as $option => $values) + if (ComponentbuilderHelper::checkArray($conditionValue['target_field']) && ComponentbuilderHelper::checkArray($view->fields)) { - foreach($values as $nr => $value) + foreach ($conditionValue['target_field'] as $fieldKey => $fieldId) { - $bucket['addconditions'.$nr][$option] = $value; - } - } - $view->addconditions = $bucket; - // update the fields - $conditionsUpdate = new stdClass(); - $conditionsUpdate->id = (int) $conditionsID; - $conditionsUpdate->addconditions = json_encode($bucket); - $this->db->updateObject('#__componentbuilder_admin_fields_conditions', $conditionsUpdate, 'id'); - } - if (ComponentbuilderHelper::checkArray($view->addconditions)) - { - $view->conditions = array(); - $ne = 0; - foreach ($view->addconditions as $nr => $conditionValue) - { - if (ComponentbuilderHelper::checkArray($conditionValue['target_field']) && ComponentbuilderHelper::checkArray($view->fields)) - { - foreach ($conditionValue['target_field'] as $fieldKey => $fieldId) + foreach ($view->fields as $fieldValues) { - foreach ($view->fields as $fieldValues) - { - if ((int) $fieldValues['field'] == (int) $fieldId) - { - // load the field details - $required = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'required="','"'); - $required = ($required == true) ? 'yes' : 'no'; - $filter = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'filter="','"'); - $filter = ComponentbuilderHelper::checkString($filter) ? $filter : 'none'; - // get name - $name = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'name="','"'); - $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValues['settings']->name; - // get type - $type = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'type="','"'); - $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValues['settings']->type_name; - // set the field name - $conditionValue['target_field'][$fieldKey] = array( - 'name' => ComponentbuilderHelper::safeString($name), - 'type' => ComponentbuilderHelper::safeString($type), - 'required' => $required, - 'filter' => $filter - ); - break; - } - } - } - } - - // load match field - if (ComponentbuilderHelper::checkArray($view->fields) && isset($conditionValue['match_field'])) - { - foreach ($view->fields as $fieldValue) - { - if ((int) $fieldValue['field'] == (int) $conditionValue['match_field']) + if ((int) $fieldValues['field'] == (int) $fieldId) { + // load the field details + $required = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'required="','"'); + $required = ($required == true) ? 'yes' : 'no'; + $filter = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'filter="','"'); + $filter = ComponentbuilderHelper::checkString($filter) ? $filter : 'none'; // get name - $name = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'name="','"'); - $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValue['settings']->name; + $name = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'name="','"'); + $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValues['settings']->name; // get type - $type = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'type="','"'); - $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValue['settings']->type_name; - // set the field details - $conditionValue['match_name'] = ComponentbuilderHelper::safeString($name); - $conditionValue['match_type'] = ComponentbuilderHelper::safeString($type); - $conditionValue['match_xml'] = $fieldValue['settings']->xml; - // if custom field load field being extended - if (!ComponentbuilderHelper::typeField($type)) - { - $conditionValue['match_extends'] = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'extends="','"'); - } - else - { - $conditionValue['match_extends'] = ''; - } + $type = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'type="','"'); + $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValues['settings']->type_name; + // set the field name + $conditionValue['target_field'][$fieldKey] = array( + 'name' => ComponentbuilderHelper::safeString($name), + 'type' => ComponentbuilderHelper::safeString($type), + 'required' => $required, + 'filter' => $filter + ); break; } } } - // set condition values - $view->conditions[$ne] = $conditionValue; - $ne++; } + + // load match field + if (ComponentbuilderHelper::checkArray($view->fields) && isset($conditionValue['match_field'])) + { + foreach ($view->fields as $fieldValue) + { + if ((int) $fieldValue['field'] == (int) $conditionValue['match_field']) + { + // get name + $name = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'name="','"'); + $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValue['settings']->name; + // get type + $type = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'type="','"'); + $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValue['settings']->type_name; + // set the field details + $conditionValue['match_name'] = ComponentbuilderHelper::safeString($name); + $conditionValue['match_type'] = ComponentbuilderHelper::safeString($type); + $conditionValue['match_xml'] = $fieldValue['settings']->xml; + // if custom field load field being extended + if (!ComponentbuilderHelper::typeField($type)) + { + $conditionValue['match_extends'] = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'extends="','"'); + } + else + { + $conditionValue['match_extends'] = ''; + } + break; + } + } + } + // set condition values + $view->conditions[$ne] = $conditionValue; + $ne++; } - unset($view->addconditions); } + unset($view->addconditions); // set linked views $this->linkedAdminViews[$name_single] = null; - $view->addlinked_views = json_decode($view->addlinked_views,true); - // check what type of linked_views array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addlinked_views['adminview'])) - { - $bucket = array(); - foreach($view->addlinked_views as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addlinked_views'.$nr][$option] = $value; - } - } - $view->addlinked_views = $bucket; - $objectUpdate->addlinked_views = json_encode($bucket); - } + $view->addlinked_views = (isset($view->addlinked_views) && ComponentbuilderHelper::checkJson($view->addlinked_views)) ? json_decode($view->addlinked_views,true):null; if (ComponentbuilderHelper::checkArray($view->addlinked_views)) { // setup linked views to global data sets @@ -1561,24 +1457,8 @@ class Get $view->php_controller_list = $this->setDynamicValues(base64_decode($view->php_controller_list)); } // set the button array - $view->custom_button = json_decode($view->custom_button,true); - // check what type of custom_button array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->custom_button['name'])) - { - $bucket = array(); - foreach($view->custom_button as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['custom_button'.$nr][$option] = $value; - } - } - $view->custom_button = $bucket; - $objectUpdate->custom_button = json_encode($bucket); - } - // sort the values - if (ComponentbuilderHelper::checkArray($view->custom_button)) + $view->custom_button = (isset($view->custom_button) && ComponentbuilderHelper::checkJson($view->custom_button)) ? json_decode($view->custom_button,true):null; + if (ComponentbuilderHelper::checkArray($view->custom_button)) { $view->custom_buttons = array_values($view->custom_button); } @@ -1619,22 +1499,7 @@ class Get } } // check if controller input as been set - $view->ajax_input = json_decode($view->ajax_input,true); - // check what type of ajax_input array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->ajax_input['value_name'])) - { - $bucket = array(); - foreach($view->ajax_input as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['ajax_input'.$nr][$option] = $value; - } - } - $view->ajax_input = $bucket; - $objectUpdate->ajax_input = json_encode($bucket); - } + $view->ajax_input = (isset($view->ajax_input) && ComponentbuilderHelper::checkJson($view->ajax_input)) ? json_decode($view->ajax_input,true):null; if (ComponentbuilderHelper::checkArray($view->ajax_input)) { if ($addAjaxSite) @@ -1688,11 +1553,6 @@ class Get unset($this->placeholders['[[[VIEWS]]]']); // store this view to class object $this->_adminViewData[$id] = $view; - // be sure to update the table if we found repeatable fields that are still not converted - if (count((array) $objectUpdate) > 1) - { - $this->db->updateObject('#__componentbuilder_admin_view', $objectUpdate, 'id'); - } } // return the found view data return $this->_adminViewData[$id]; @@ -1724,14 +1584,31 @@ class Get if ($table === 'site_view') { $this->lang = 'site'; + // repeatable fields to update + $searchRepeatables = array( + // repeatablefield => checker + 'ajax_input' => 'value_name', + 'custom_button' => 'name' + ); } else { $this->lang = 'admin'; + // repeatable fields to update + $searchRepeatables = array( + // repeatablefield => checker + 'custom_button' => 'name' + ); } - // be sure to update the value in the db - $objectUpdate = new stdClass(); - $objectUpdate->id = (int) $id; + // set upater + $updater = array( + 'table' => $table, + 'key' => 'id', + 'val' => (int) $id + ); + // update the repeatable fields + $view = ComponentbuilderHelper::convertRepeatableFields($view, $searchRepeatables, $updater); + // set the default data $view->default = $this->setDynamicValues(base64_decode($view->default)); // fix alias to use in code @@ -1840,28 +1717,14 @@ class Get if (isset($view->add_php_ajax) && $view->add_php_ajax == 1) { // check if controller input as been set - $view->ajax_input = json_decode($view->ajax_input,true); - // check what type of ajax_input array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->ajax_input['value_name'])) - { - $bucket = array(); - foreach($view->ajax_input as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['ajax_input'.$nr][$option] = $value; - } - } - $view->ajax_input = $bucket; - $objectUpdate->ajax_input = json_encode($bucket); - } + $view->ajax_input = (isset($view->ajax_input) && ComponentbuilderHelper::checkJson($view->ajax_input)) ? json_decode($view->ajax_input,true):null; if (ComponentbuilderHelper::checkArray($view->ajax_input)) { $this->customScriptBuilder[$this->target]['ajax_controller'][$view->code] = array_values($view->ajax_input); $this->addSiteAjax = true; - unset($view->ajax_input); } + unset($view->ajax_input); + // load the ajax class mathods (if set) if (ComponentbuilderHelper::checkString($view->php_ajaxmethod)) { @@ -1882,34 +1745,13 @@ class Get $view->php_controller = base64_decode($view->php_controller); $view->php_controller = $this->setDynamicValues($view->php_controller); // set the button array - $view->custom_button = json_decode($view->custom_button,true); - // check what type of custom_button array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->custom_button['name'])) - { - $bucket = array(); - foreach($view->custom_button as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['custom_button'.$nr][$option] = $value; - } - } - $view->custom_button = array_values($bucket); - $objectUpdate->custom_button = json_encode($bucket); - } - // sort the values + $view->custom_button = (isset($view->custom_button) && ComponentbuilderHelper::checkJson($view->custom_button)) ? json_decode($view->custom_button,true):null; if (ComponentbuilderHelper::checkArray($view->custom_button)) { $view->custom_buttons = array_values($view->custom_button); } unset($view->custom_button); } - // be sure to update the table if we found repeatable fields that are still not converted - if (count((array) $objectUpdate) > 1) - { - $this->db->updateObject('#__componentbuilder_'.$table, $objectUpdate, 'id'); - } // return the found view data return $view; } @@ -1926,7 +1768,7 @@ class Get */ public function getFieldData($id, $name_single = null, $name_list = null) { - if (!isset($this->_fieldData[$id]) && $id > 0) + if ($id > 0 && !isset($this->_fieldData[$id])) { // Create a new query object. $query = $this->db->getQuery(true); @@ -1948,32 +1790,30 @@ class Get // adding a fix for the changed name of type to fieldtype $field->type = $field->fieldtype; + + // repeatable fields to update + $searchRepeatables = array( + // repeatablefield => checker + 'properties' => 'name' + ); + // set upater + $updater = array( + 'table' => 'fieldtype', + 'key' => 'id', + 'val' => (int) $id + ); + // update the repeatable fields + $field = ComponentbuilderHelper::convertRepeatableFields($field, $searchRepeatables, $updater); // load the values form params $field->xml = $this->setDynamicValues(json_decode($field->xml)); // load the type values form type params - $properties = json_decode($field->properties, true); - // check what type of field array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($properties['name'])) + $field->properties = (isset($field->properties) && ComponentbuilderHelper::checkJson($field->properties)) ? json_decode($field->properties, true):null; + if (ComponentbuilderHelper::checkArray($field->properties)) { - $bucket = array(); - foreach($properties as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addfields'.$nr][$option] = $value; - } - } - $properties = $bucket; - // be sure to update the value in the db - $objectUpdate = new stdClass(); - $objectUpdate->id = $field->fieldtype; - $objectUpdate->properties = json_encode($bucket); - $this->db->updateObject('#__componentbuilder_fieldtype', $objectUpdate, 'id'); + $field->properties = array_values($field->properties); } - $field->properties = array_values($properties); // check if we have advanced encryption if (4 == $field->store && (!isset($this->advancedEncryption) || !$this->advancedEncryption)) { @@ -1996,7 +1836,7 @@ class Get } } // check if the script should be added to the view each time this field is called - if (isset($this->_fieldData[$id]) && $id > 0) + if ($id > 0 && isset($this->_fieldData[$id])) { // check if we should load scripts for single view if (ComponentbuilderHelper::checkString($name_single) && !isset($this->customFieldScript[$name_single][$id])) @@ -2114,7 +1954,7 @@ class Get $this->customFieldScript[$name_list][$id] = true; } } - if (isset($this->_fieldData[$id]) && $id > 0) + if ($id > 0 && isset($this->_fieldData[$id])) { // return the found field data return $this->_fieldData[$id]; @@ -2150,7 +1990,7 @@ class Get $results = $this->db->loadObjectList(); $typeArray = array(1 => 'LEFT', 2 => 'LEFT OUTER', 3 => 'INNER', 4 => 'RIGHT', 5 => 'RIGHT OUTER'); $operatorArray = array(1 => '=', 2 => '!=', 3 => '<>', 4 => '>', 5 => '<', 6 => '>=', 7 => '<=', 8 => '!<', 9 => '!>', 10 => 'IN', 11 => 'NOT IN'); - foreach ($results as $nr => &$result) + foreach ($results as $_nr => &$result) { // add calculations if set if($result->addcalculation == 1 && ComponentbuilderHelper::checkString($result->php_calculation)) @@ -2307,7 +2147,7 @@ class Get $join_field = array(); // array(join_field_as, join_field) $join_field = array_map('trim', explode('.',$option1['join_field'])); $option1['selection'] = - $this->setDataSelection($result->key, $view_code, $value, $option1['db_table'], $option1['as'], $option1['row_type'], 'db'); + $this->setDataSelection($result->key, $view_code, $option1['selection'], $option1['db_table'], $option1['as'], $option1['row_type'], 'db'); $option1['key'] = $result->key; // load to the getters if ($option1['row_type'] == 1) @@ -2392,6 +2232,81 @@ class Get return false; } + /** + * To limit the SQL Demo date build in the views + * + * @param array $settings Tweaking array. + * + * @return void + * + */ + public function setSqlTweaking($settings) + { + if (ComponentbuilderHelper::checkArray($settings)) + { + foreach($settings as $setting) + { + // should sql dump be added + if (1 == $setting['add_sql']) + { + // add sql (by option) + if (2 == $setting['add_sql_options']) + { + // rest always + $id_array = array(); + // by id (first remove backups) + $ids = $setting['ids']; + // now get the ids + if (strpos($ids, ',') !== false) + { + $id_array = (array) array_map('trim',explode(',', $ids)); + } + else + { + $id_array[] = trim($ids); + } + $id_array_new = array(); + // check for ranges + foreach ($id_array as $key => $id) + { + if (strpos($id, '=>') !== false) + { + $id_range = (array) array_map('trim', explode('=>', $id)); + unset($id_array[$key]); + // build range + if (count($id_range) == 2) + { + $range = range($id_range[0],$id_range[1]); + $id_array_new = array_merge($id_array_new,$range); + } + } + } + if (ComponentbuilderHelper::checkArray($id_array_new)) + { + $id_array = array_merge($id_array_new, $id_array); + } + // final fixing to array + if (ComponentbuilderHelper::checkArray($id_array)) + { + // uniqe + $id_array = array_unique($id_array, SORT_NUMERIC); + // sort + sort($id_array, SORT_NUMERIC); + // now set it to global + $this->sqlTweak[ (int) $setting['adminview']]['where'] = implode(',', $id_array); + } + } + } + else + { + // remove all sql dump options + $this->sqlTweak[ (int) $setting['adminview']]['remove'] = true; + + } + } + } + } + /** * check if an update SQL is needed * @@ -4471,10 +4386,10 @@ class Get { switch($commentType) { - case 1: + case 1: // the PHP & JS type $startReplace .= '/*'.$id.'*/'; break; - case 2: + case 2: // the HTML type $startReplace .= ''; break; } diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index f217787fc..0d6ea90ed 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.0 + @version 2.6.0 @created 30th April, 2015 @package Component Builder @subpackage compiler.php @@ -312,6 +312,8 @@ class Structure extends Get // first we run the perent constructor if (parent::__construct($config)) { + // run global updater + ComponentbuilderHelper::runGlobalUpdater(); // set the Joomla version $this->joomlaVersion = $config['joomlaVersion']; // set the template path @@ -617,7 +619,7 @@ class Structure extends Get $config = array('###CREATIONDATE###' => $created, '###BUILDDATE###' => $modified,'###VERSION###' => $view['settings']->version); $this->buildDynamique($target,'single', false, $config); } - if($view['edit_create_site_view']) + if ( isset($view['edit_create_site_view']) && $view['edit_create_site_view']) { // setup the front site edit-view files $target = array('site' => $view['settings']->name_single); @@ -626,7 +628,7 @@ class Structure extends Get } } // quick set of checkin once - if ($view['checkin'] == 1 && !$this->addCheckin) + if (isset($view['checkin']) && $view['checkin'] == 1 && !$this->addCheckin) { // switch to add checking to config $this->addCheckin = true; diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index a1dee2332..33014b0bc 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -11,7 +11,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.0 + @version 2.6.0 @created 30th April, 2015 @package Component Builder @subpackage compiler.php @@ -403,12 +403,12 @@ class Fields extends Structure $this->placeholders['[[[VIEWS]]]'] = $this->placeholders['###VIEWS###']; $this->placeholders['[[[Views]]]'] = $this->placeholders['###Views###']; // add metadata to the view - if ($view['metadata']) + if (isset($view['metadata']) && $view['metadata']) { $this->metadataBuilder[$viewName] = $viewName; } // add access to the view - if ($view['access']) + if (isset($view['access']) && $view['access']) { $this->accessBuilder[$viewName] = $viewName; } @@ -1206,7 +1206,7 @@ class Fields extends Structure $this->movedPublishingFields[$viewName][$name] = $name; } } - elseif ($tabName === 'publishing') + elseif ($tabName === 'publishing' || $tabName === 'Publishing' ) { if (!in_array($name, $this->defaultFields)) { @@ -1805,24 +1805,24 @@ class Fields extends Structure // build unique keys of this view for db $this->dbUniqueKeys[$viewName][] = $name; } - elseif (($field['settings']->indexes == 2 || $field['alias'] || $field['title'] || $typeName === 'category') && !in_array($field['settings']->datatype, $textKeys)) + elseif (($field['settings']->indexes == 2 || (isset($field['alias']) && $field['alias']) || (isset($field['title']) && $field['title']) || $typeName === 'category') && !in_array($field['settings']->datatype, $textKeys)) { // build keys of this view for db $this->dbKeys[$viewName][] = $name; } } // add history to this view - if ($view['history']) + if (isset($view['history']) && $view['history']) { $this->historyBuilder[$viewName] = $viewName; } // set Alias (only one title per view) - if ($field['alias']) + if (isset($field['alias']) && $field['alias']) { $this->aliasBuilder[$viewName] = $name; } // set Titles (only one title per view) - if ($field['title']) + if (isset($field['title']) && $field['title']) { $this->titleBuilder[$viewName] = $name; } @@ -1855,17 +1855,17 @@ class Fields extends Structure } } // build the list values - if ($field['list'] == 1 && $typeName != 'repeatable' && $typeName != 'subform') + if ((isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform') { // load to list builder $this->listBuilder[$listViewName][] = array( 'type' => $typeName, 'code' => $name, 'lang' => $listLangName, - 'title' => ($field['title']) ? true : false, - 'alias' => ($field['alias']) ? true : false, - 'link' => ($field['link']) ? true : false, - 'sort' => ($field['sort']) ? true : false, + 'title' => (isset($field['title']) && $field['title']) ? true : false, + 'alias' => (isset($field['alias']) && $field['alias']) ? true : false, + 'link' => (isset($field['link']) && $field['link']) ? true : false, + 'sort' => (isset($field['sort']) && $field['sort']) ? true : false, 'custom' => $custom, 'multiple' => $multiple, 'options' => $options); @@ -2004,7 +2004,7 @@ class Fields extends Structure } // load the json list display fix - if ($field['list'] == 1 && $typeName != 'repeatable' && $typeName != 'subform') + if ((isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform') { if (ComponentbuilderHelper::checkArray($options)) { @@ -2031,22 +2031,23 @@ class Fields extends Structure // check if field should be added to uikit $this->buildSiteFieldData($viewName, $name, 'uikit', $typeName); // load the selection translation fix - if (ComponentbuilderHelper::checkArray($options) && $field['list'] == 1 && $typeName != 'repeatable' && $typeName != 'subform') + if (ComponentbuilderHelper::checkArray($options) && (isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform') { $this->selectionTranslationFixBuilder[$listViewName][$name] = $options; } // build the sort values - if ($field['sort'] == 1 && $field['list'] == 1 && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) + if ((isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) { $this->sortBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'options' => $options); } // build the search values - if ($field['search'] == 1) + if (isset($field['search']) && $field['search'] == 1) { - $this->searchBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $field['list']); + $_list = (!isset($field['list'])) ? $field['list'] : 0; + $this->searchBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list); } // build the filter values - if ($field['filter'] == 1 && $field['list'] == 1 && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) + if ((isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) { $this->filterBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'database' => $viewName, 'function' => ComponentbuilderHelper::safeString($name, 'F'), 'custom' => $custom, 'options' => $options); } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 4bed05d35..ebe79cc51 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.0 + @version 2.6.0 @created 30th April, 2015 @package Component Builder @subpackage compiler.php @@ -728,25 +728,30 @@ class Interpretation extends Fields if (ComponentbuilderHelper::checkArray($this->updateSQLBuilder)) { $buket = array(); - $buket['version'] = array(); - $buket['mysql'] = array(); - $buket['url'] = array(); + $nr = 0; foreach ($this->componentData->version_update as $values) { - foreach ($values as $key => $value) - { - $buket[$key][] = $value; - } - } - $new = array(); - $new['id'] = (int) $this->componentID; - $new['component_version'] = $this->componentData->component_version; - $new['version_update'] = json_encode($buket); + $buket['version_update'.$nr] = $values; + $nr++; + } + // update the joomla component table + $newJ = array(); + $newJ['id'] = (int) $this->componentID; + $newJ['component_version'] = $this->componentData->component_version; // update the component with the new dynamic SQL - $model = ComponentbuilderHelper::getModel('joomla_component'); - $model->save($new); // <-- to insure the history is also updated + $modelJ = ComponentbuilderHelper::getModel('joomla_component'); + $modelJ->save($newJ); // <-- to insure the history is also updated + // reset the watch here $this->getHistoryWatch('joomla_component', $this->componentID); + + // update the component update table + $newU = array(); + $newU['id'] = (int) $this->componentData->version_update_id; + $newU['version_update'] = json_encode($buket); + // update the component with the new dynamic SQL + $modelU = ComponentbuilderHelper::getModel('component_updates'); + $modelU->save($newU); // <-- to insure the history is also updated } } @@ -3253,11 +3258,11 @@ class Interpretation extends Fields public function setDocumentMetadata(&$view) { - if ($view['settings']->main_get->gettype == 1 && $view['metadata'] == 1) + if ($view['settings']->main_get->gettype == 1 && isset($view['metadata']) && $view['metadata'] == 1) { return $this->setMetadataItem(); } - elseif ($view['metadata'] == 1) + elseif (isset($view['metadata']) && $view['metadata'] == 1) { // lets check if we have a custom get method that has the same name as the view // if we do then it posibly can be that the metadata is loaded via that method @@ -5419,6 +5424,10 @@ class Interpretation extends Fields $this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_STATE'] = "- Keep Original State -"; $this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_ACCESS'] = "- Keep Original Access -"; $this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_CATEGORY'] = "- Keep Original Category -"; + $this->langContent['admin'][$this->langPrefix.'_PUBLISHED'] = 'Published'; + $this->langContent['admin'][$this->langPrefix.'_INACTIVE'] = 'Inactive'; + $this->langContent['admin'][$this->langPrefix.'_ARCHIVED'] = 'Archived'; + $this->langContent['admin'][$this->langPrefix.'_TRASHED'] = 'Trashed'; if ($this->componentData->add_license && $this->componentData->license_type == 3) { $this->langContent['admin']['NIE_REG_NIE'] = "

Lincense not set for ".$componentName.".

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

"; @@ -6119,8 +6128,8 @@ class Interpretation extends Fields } // start tab set $bucket = array(); - $leftside = ''; - $rightside = ''; + $leftside = ''; + $rightside = ''; $footer = ''; $header = ''; $mainwidth = 12; @@ -6398,21 +6407,52 @@ class Interpretation extends Fields { $this->langContent[$this->lang][$tabLangName] = 'Publishing'; } - // TODO add new publishing fields <-- nice to have, but no time now to do this - // $this->newPublishingFields[$viewName_single] // the default publishing items - $items = array(); - foreach ($this->defaultFields as $defaultField) + $items = array('left' => array(), 'right' => array()); + // Setup the default (custom) fields + // only load (1 => 'left', 2 => 'right') + $fieldsAddedRight = false; + if (isset($this->newPublishingFields[$viewName_single])) { - if (!isset($this->movedPublishingFields[$viewName_single][$defaultField])) + foreach($this->newPublishingFields[$viewName_single] as $df_alignment => $df_items) { - if ($defaultField != 'access') + foreach($df_items as $df_order => $df_name) { - $items[] = $defaultField; + if ($df_alignment == 2 || $df_alignment == 1) + { + $items[$alignmentNames[$df_alignment]][$df_order] = $df_name; + } + else + { + $this->app->enqueueMessage(JText::sprintf('Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $alignmentNames[$df_alignment], $viewName_single), 'warning'); + } } - elseif ($defaultField === 'access' && isset($this->accessBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName_single])) + } + // set switch to trigger notice if custom fields added to right + if (ComponentbuilderHelper::checkArray($items['right'])) + { + $fieldsAddedRight = true; + } + } + // load all defaults + $loadDefaultFields = array( + 'left' => array('created', 'created_by', 'modified', 'modified_by'), + 'right' => array('published', 'ordering', 'access', 'version', 'hits', 'id') + ); + foreach ($loadDefaultFields as $d_alignment => $defaultFields) + { + foreach($defaultFields as $defaultField) + { + if (!isset($this->movedPublishingFields[$viewName_single][$defaultField])) { - $items[] = $defaultField; + if ($defaultField != 'access') + { + $items[$d_alignment][] = $defaultField; + } + elseif ($defaultField === 'access' && isset($this->accessBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName_single])) + { + $items[$d_alignment][] = $defaultField; + } } } } @@ -6423,10 +6463,32 @@ class Interpretation extends Fields $tabCodeNameLeft = 'publishing'; $tabCodeNameRight = 'metadata'; // the default publishing tiems - if (ComponentbuilderHelper::checkArray($items)) + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) { - // load all items - $items_one = "'". implode("',".PHP_EOL."\t'", $items)."'"; + $items_one = ''; + // load the items into one side + if (ComponentbuilderHelper::checkArray($items['left'])) + { + $items_one .= "'". implode("',".PHP_EOL."\t'", $items['left'])."'"; + } + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // there is already fields just add these + if (strlen($items_one) > 3) + { + $items_one .= ",".PHP_EOL."\t'". implode("',".PHP_EOL."\t'", $items['right'])."'"; + } + // no fields has been added yet + else + { + $items_one .= "'". implode("',".PHP_EOL."\t'", $items['right'])."'"; + } + } + // only triger the info notice if there were custom fields targeted to the right alignment position. + if ($fieldsAddedRight) + { + $this->app->enqueueMessage(JText::sprintf('Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', $viewName_single), 'Notice'); + } // set the publishing layout $this->setLayout($viewName_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); $items_one = true; @@ -6445,40 +6507,22 @@ class Interpretation extends Fields $tabCodeNameLeft = 'publishing'; $tabCodeNameRight = 'publlshing'; // the default publishing tiems - if (ComponentbuilderHelper::checkArray($items)) + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) { - - $items_one = array('created', 'created_by', 'modified', 'modified_by'); - $items_two = array('published', 'ordering', 'access', 'version', 'hits', 'id'); - // check all items - foreach ($items_one as $key_one => $item_one) - { - if (!in_array($item_one, $items)) - { - unset($items_one[$key_one]); - } - } - foreach ($items_two as $key_two => $item_two) - { - if (!in_array($item_two, $items)) - { - unset($items_two[$key_two]); - } - } - // load all items that remain - if (ComponentbuilderHelper::checkArray($items_one)) + // load left items that remain + if (ComponentbuilderHelper::checkArray($items['left'])) { // load all items - $items_one = "'". implode("',".PHP_EOL."\t'", $items_one)."'"; + $items_one = "'". implode("',".PHP_EOL."\t'", $items['left'])."'"; // set the publishing layout $this->setLayout($viewName_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); $items_one = true; } - // load all items that remain - if (ComponentbuilderHelper::checkArray($items_two)) + // load right items that remain + if (ComponentbuilderHelper::checkArray($items['right'])) { // load all items - $items_two = "'". implode("',".PHP_EOL."\t'", $items_two)."'"; + $items_two = "'". implode("',".PHP_EOL."\t'", $items['right'])."'"; // set the publishing layout $this->setLayout($viewName_single, $tabCodeNameRight, $items_two, 'layoutpublished'); $items_two = true; @@ -7063,32 +7107,32 @@ class Interpretation extends Fields } $counter = $counter + 2; $data_value = (3 == $this->footableVersion) ? 'data-sort-value':'data-value'; - // add the defaults + // add the defaults $body .= PHP_EOL."\t\tpublished == 1):?>"; $body .= PHP_EOL."\t\t\t".''; - $body .= PHP_EOL."\t\t\t\t".'">'; - $body .= PHP_EOL."\t\t\t\t\t".''; + $body .= PHP_EOL."\t\t\t\t".'langPrefix."_PUBLISHED'".'); ?>">'; + $body .= PHP_EOL."\t\t\t\t\t".'langPrefix."_PUBLISHED'".'); ?>'; $body .= PHP_EOL."\t\t\t\t".''; $body .= PHP_EOL."\t\t\t".''; $body .= PHP_EOL."\t\tpublished == 0):?>"; $body .= PHP_EOL."\t\t\t".''; - $body .= PHP_EOL."\t\t\t\t".'">'; - $body .= PHP_EOL."\t\t\t\t\t".''; + $body .= PHP_EOL."\t\t\t\t".'langPrefix."_INACTIVE'".'); ?>">'; + $body .= PHP_EOL."\t\t\t\t\t".'langPrefix."_INACTIVE'".'); ?>'; $body .= PHP_EOL."\t\t\t\t".''; $body .= PHP_EOL."\t\t\t".''; $body .= PHP_EOL."\t\tpublished == 2):?>"; $body .= PHP_EOL."\t\t\t".''; - $body .= PHP_EOL."\t\t\t\t".'">'; - $body .= PHP_EOL."\t\t\t\t\t".''; + $body .= PHP_EOL."\t\t\t\t".'langPrefix."_ARCHIVED'".'); ?>">'; + $body .= PHP_EOL."\t\t\t\t\t".'langPrefix."_ARCHIVED'".'); ?>'; $body .= PHP_EOL."\t\t\t\t".''; $body .= PHP_EOL."\t\t\t".''; $body .= PHP_EOL."\t\tpublished == -2):?>"; $body .= PHP_EOL."\t\t\t".''; - $body .= PHP_EOL."\t\t\t\t".'">'; - $body .= PHP_EOL."\t\t\t\t\t".''; + $body .= PHP_EOL."\t\t\t\t".'langPrefix."_TRASHED'".'); ?>">'; + $body .= PHP_EOL."\t\t\t\t\t".'langPrefix."_TRASHED'".'); ?>'; $body .= PHP_EOL."\t\t\t\t".''; $body .= PHP_EOL."\t\t\t".''; $body .= PHP_EOL."\t\t".''; @@ -11535,7 +11579,7 @@ class Interpretation extends Fields $name_list = ComponentbuilderHelper::safeString($view['settings']->name_list); $icons .= $this->addCustomDashboardIcons($view,$counter); - if ($view['dashboard_add'] == 1) + if (isset($view['dashboard_add']) && $view['dashboard_add'] == 1) { $type = ComponentbuilderHelper::imageInfo($view['settings']->icon_add); if ($type) @@ -11563,7 +11607,7 @@ class Interpretation extends Fields $this->langContent[$this->lang][$langKey] = $langName; $counter++; } - if ($view['dashboard_list'] == 1) + if (isset($view['dashboard_list']) && $view['dashboard_list'] == 1) { $type = ComponentbuilderHelper::imageInfo($view['settings']->icon); if ($type) @@ -11964,7 +12008,7 @@ class Interpretation extends Fields { // set custom menu $menus .= $this->addCustomSubMenu($view,$codeName,$lang); - if ($view['submenu'] == 1) + if (isset($view['submenu']) && $view['submenu'] == 1) { // setup access defaults $tab = ""; @@ -12178,7 +12222,7 @@ class Interpretation extends Fields { // set custom menu $menus .= $this->addCustomMainMenu($view,$codeName,$lang); - if ($view['mainmenu'] == 1) + if (isset($view['mainmenu']) && $view['mainmenu'] == 1) { $nameList = ComponentbuilderHelper::safeString($view['settings']->name_list); $nameUpper = ComponentbuilderHelper::safeString($view['settings']->name_list, 'U'); @@ -13960,7 +14004,7 @@ function vdm_dkim() { foreach ($menuControllers as $menuController) { // add menu controll view that has menus options - if ($view[$menuController]) + if (isset($view[$menuController]) && $view[$menuController]) { $targetView_ = 'views.'; if ($menuController === 'dashboard_add') diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 4929fded8..f4ad7de3f 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.0 + @version 2.6.0 @created 30th April, 2015 @package Component Builder @subpackage compiler.php @@ -36,6 +36,8 @@ class Infusion extends Interpretation public $importCustomScripts = array(); public $langFiles = array(); public $removeSiteFolder = false; + public $langNot = array(); + public $langSet = array(); /** * Constructor @@ -225,7 +227,7 @@ class Infusion extends Interpretation $viewName_single = ComponentbuilderHelper::safeString($view['settings']->name_single); $viewName_list = ComponentbuilderHelper::safeString($view['settings']->name_list); // set site edit view array - if ($view['edit_create_site_view']) + if (isset($view['edit_create_site_view']) && $view['edit_create_site_view']) { $site_edit_view_array[] = "\t\t\t\t'".$viewName_single."'"; $this->lang = 'both'; @@ -377,7 +379,7 @@ class Infusion extends Interpretation $this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = ''; } // add css to front end - if ($view['edit_create_site_view']) + if (isset($view['edit_create_site_view']) && $view['edit_create_site_view']) { $this->fileContentDynamic[$viewName_single]['###SITE_VIEWCSS###'] = $this->fileContentDynamic[$viewName_single]['###VIEWCSS###']; @@ -412,7 +414,7 @@ class Infusion extends Interpretation $this->placeholders['[[[VIEWS]]]'] = $viewsName_u; // set the export/import option - if ($view['port']) + if (isset($view['port']) && $view['port']) { $this->eximportView[$viewName_list] = true; if (1 == $view['settings']->add_custom_import) @@ -428,7 +430,7 @@ class Infusion extends Interpretation } // set Autocheckin function - if ($view['checkin'] == 1) + if (isset($view['checkin']) && $view['checkin'] == 1) { // ###AUTOCHECKIN### <<>> $this->fileContentDynamic[$viewName_list]['###AUTOCHECKIN###'] @@ -601,7 +603,7 @@ class Infusion extends Interpretation } $this->fileContentStatic['###ROUTEHELPER###'] .= $this->setRouterHelp($viewName_single, $viewName_list); - if ($view['edit_create_site_view']) + if (isset($view['edit_create_site_view']) && $view['edit_create_site_view']) { // add needed router stuff for front edit views $this->fileContentStatic['###ROUTER_PARSE_SWITCH###'] .= $this->routerParseSwitch($viewName_single, null, false); @@ -931,12 +933,12 @@ class Infusion extends Interpretation $this->setLockLicensePer($view['settings']->code, $this->target); // set the site default view - if ($view['default_view'] == 1) + if (isset($view['default_view']) && $view['default_view'] == 1) { $this->fileContentStatic['###SITE_DEFAULT_VIEW###'] = $view['settings']->code; } // add site menu - if ($view['menu'] == 1) + if (isset($view['menu']) && $view['menu'] == 1) { // ###SITE_MENU_XML### <<>> $this->fileContentDynamic[$view['settings']->code]['###SITE_MENU_XML###'] = $this->setCustomViewMenu($view); @@ -1199,18 +1201,28 @@ class Infusion extends Interpretation { foreach ($areas as $area => $languageStrings) { - // force load if debug lines are added - if (!$this->debugLinenr) + // only log messages for none en-GB translations + if ('en-GB' !== $tag) { - // check if we sould install this translation - $dif = bcdiv(count($languageStrings), $mainLangLoader[$area]); - $percentage = bcmul($dif, 100); - if ($percentage < $this->percentageLanguageAdd) + $langStringNr = count($languageStrings); + $langStringSum = bcmul($langStringNr, 100); + $percentage = bcdiv($langStringSum, $mainLangLoader[$area]); + $stringNAme = ($langStringNr == 1) ? '(string ' . $tag . ' translated)' : '(strings ' . $tag . ' translated)'; + // force load if debug lines are added + if (!$this->debugLinenr) { - // dont add - continue; + // check if we sould install this translation + if ($percentage < $this->percentageLanguageAdd) + { + // dont add + $this->langNot[$area . ' ' . $tag] = '' . $mainLangLoader[$area] . '(total en-GB strings) only ' . $langStringNr . '' . $stringNAme . ' = ' . $percentage; + continue; + } } + // show if it was added as well + $this->langSet[$area . ' ' . $tag] = '' . $mainLangLoader[$area] . '(total en-GB strings) and ' . $langStringNr . '' . $stringNAme . ' = ' . $percentage; } + // set naming convention $p = 'admin'; $t = ''; if (strpos($area, 'site') !== false) diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 0f302b720..b5ea65f8c 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php @@ -39,7 +39,211 @@ abstract class ComponentbuilderHelper { // the Session keeps track of all data related to the current session of this user self::loadSession(); - } + } + + /* + * Convert repeatable field to subform + * + * @param array $item The array to convert + * @param string $name The main field name + * @param array $updater The updater (dynamic) option + * + * @return array + */ + public static function convertRepeatable($item, $name) + { + // continue only if we have an array + if (self::checkArray($item)) + { + $bucket = array(); + foreach ($item as $key => $values) + { + foreach ($values as $nr => $value) + { + if (!isset($bucket[$name . $nr]) || !self::checkArray($bucket[$name . $nr])) + { + $bucket[$name . $nr] = array(); + } + $bucket[$name . $nr][$key] = $value; + } + } + return $bucket; + } + return $item; + } + + /** + * The global updater + **/ + protected static $globalUpdater = array(); + + /* + * Convert repeatable field to subform + * + * @param object $item The item to update + * @param array $searcher The fields to check and update + * @param array $updater To update the local table + * + * @return void + */ + public static function convertRepeatableFields($object, $searcher, $updater = array()) + { + // update the repeatable fields + foreach ($searcher as $key => $sleutel) + { + $isJson = false; + if (isset($object->{$key}) && self::checkJson($object->{$key})) + { + $object->{$key} = json_decode($object->{$key}, true); + $isJson = true; + } + // check if this is old values for repeatable fields + if (self::checkArray($object->{$key}) && isset($object->{$key}[$sleutel])) + { + // load it back + $object->{$key} = self::convertRepeatable($object->{$key}, $key); + // add to global updater + if ( + self::checkArray($object->{$key}) && self::checkArray($updater) && + ( + ( isset($updater['table']) && isset($updater['val']) && isset($updater['key']) ) || + ( isset($updater['unique']) && isset($updater['unique'][$key]) && isset($updater['unique'][$key]['table']) && isset($updater['unique'][$key]['val']) && isset($updater['unique'][$key]['key']) ) + ) + ) + { + $_key = null; + $_value = null; + $_table = null; + // check if we have unique id table for this repeatable/subform field + if ( isset($updater['unique']) && isset($updater['unique'][$key]) && isset($updater['unique'][$key]['table']) && isset($updater['unique'][$key]['val']) && isset($updater['unique'][$key]['key']) ) + { + $_key = $updater['unique'][$key]['key']; + $_value = $updater['unique'][$key]['val']; + $_table = $updater['unique'][$key]['table']; + } + elseif ( isset($updater['table']) && isset($updater['val']) && isset($updater['key']) ) + { + $_key = $updater['key']; + $_value = $updater['val']; + $_table = $updater['table']; + } + // continue only if values are valid + if (self::checkString($_table) && self::checkString($_key) && $_value > 0) + { + // set target table & item + $target = trim($_table) . '.' . trim($_key) . '.' . trim($_value); + if (!isset(self::$globalUpdater[$target])) + { + self::$globalUpdater[$target] = new stdClass; + self::$globalUpdater[$target]->{$_key} = (int) $_value; + } + // load the new subform values to global updater + self::$globalUpdater[$target]->{$key} = json_encode($object->{$key}); + } + } + } + // no set back to json if came in as json + if (isset($object->{$key}) && $isJson && self::checkArray($object->{$key})) + { + $object->{$key} = json_encode($object->{$key}); + } + // remove if not json or array + elseif (isset($object->{$key}) && !self::checkArray($object->{$key}) && !self::checkJson($object->{$key})) + { + unset($object->{$key}); + } + } + return $object; + } + + /** + * Run Global Updater if any are set + * + * @return void + * + */ + public static function runGlobalUpdater() + { + // check if any updates are set to run + if (self::checkArray(self::$globalUpdater)) + { + // get the database object + $db = JFactory::getDbo(); + foreach (self::$globalUpdater as $tableKeyID => $object) + { + // get the table + $table = explode('.', $tableKeyID); + // update the item + $db->updateObject('#__componentbuilder_' . (string) $table[0] , $object, (string) $table[1]); + } + // rest updater + self::$globalUpdater = array(); + } + } + + /** + * Copy Any Item (only use for direct database copying) + * + * @param int $id The item to copy + * @param string $table The table and model to copy from and with + * @param array $config The values that should change + * + * @return boolean True if success + * + */ + public static function copyItem($id, $type, $config = array()) + { + // only continue if we have an id + if ((int) $id > 0) + { + // get the model + $model = self::getModel($type); + $app = \JFactory::getApplication(); + // get item + if ($item = $model->getItem($id)) + { + // update values that should change + if (self::checkArray($config)) + { + foreach($config as $key => $value) + { + if (isset($item->{$key})) + { + $item->{$key} = $value; + } + } + } + // clone the object + $data = array(); + foreach ($item as $key => $value) + { + $data[$key] = $value; + } + // reset some values + $data['id'] = 0; + $data['version'] = 1; + if (isset($data['tags'])) + { + $data['tags'] = null; + } + if (isset($data['associations'])) + { + $data['associations'] = array(); + } + // remove some unneeded values + unset($data['params']); + unset($data['asset_id']); + unset($data['checked_out']); + unset($data['checked_out_time']); + // Attempt to save the data. + if ($model->save($data)) + { + return true; + } + } + } + return false; + } /** * The global params @@ -314,7 +518,8 @@ abstract class ComponentbuilderHelper return $indenter->indent($html); } - public static function checkFileType($file, $sufix) { + public static function checkFileType($file, $sufix) + { // now check if the file ends with the sufix return $sufix === "" || ($sufix == substr(strrchr($file, "."), -strlen($sufix))); } @@ -416,7 +621,7 @@ abstract class ComponentbuilderHelper 'chromestyle','contenttype','databaseconnection','editors','email','file', 'filelist','folderlist','groupedlist','hidden','file','headertag','helpsite', 'imagelist','integer','language','list','media','menu','note','password', - 'plugins','range','radio','repeatable','rules','sessionhandler','spacer','sql','tag', + 'plugins','range','radio','repeatable','rules','subform','sessionhandler','spacer','sql','tag', 'tel','menuitem','modulelayout','meter','moduleorder','moduleposition','moduletag', 'templatestyle','text','textarea','timezone','url','user','usergroup' ), diff --git a/admin/helpers/componentbuilderemail.php b/admin/helpers/componentbuilderemail.php index 11220b47a..b9df6c2b2 100644 --- a/admin/helpers/componentbuilderemail.php +++ b/admin/helpers/componentbuilderemail.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilderemail.php diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index fb57b6bcf..6b7d433e6 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage headercheck.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index b3b44346e..bb5dc8f71 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage batch_.php diff --git a/admin/helpers/indenter.php b/admin/helpers/indenter.php index 2622fb522..0b936ed66 100644 --- a/admin/helpers/indenter.php +++ b/admin/helpers/indenter.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage indenter.php diff --git a/admin/helpers/js.php b/admin/helpers/js.php index a37ea87e9..4a0a8401b 100644 --- a/admin/helpers/js.php +++ b/admin/helpers/js.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage js.php diff --git a/admin/helpers/minify.php b/admin/helpers/minify.php index abe7b43ed..497dafbfc 100644 --- a/admin/helpers/minify.php +++ b/admin/helpers/minify.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage minify.php diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 504b6648a..45775e439 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1,8 +1,10 @@ COM_COMPONENTBUILDER="Component Builder" COM_COMPONENTBUILDER_ABOVE_TABS="Above Tabs" COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_ADD_ACCESS="Add Access" COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging." COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" +COM_COMPONENTBUILDER_ADD_MENU="Add Menu" COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_LTSMALLGTIF_SETLTSMALLGT="Add to Backup Folder & Sales Server <small>(if set)</small>" COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder" COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields" @@ -183,12 +185,12 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date" COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields" COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE="None" -COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, date_created, modified_by, date_modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)" -COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views" +COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, date_created, modified_by, date_modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)
For more help please watch this tutorial." +COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views." COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_DESCRIPTION="Order in relation to tab & alignment of admin and site." COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_LABEL="Order in Edit" -COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_LIST_DESCRIPTION="Ordering in relation to list view of admin and site" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_LIST_DESCRIPTION="Ordering in relation to list view of admin area" COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_LIST_LABEL="Order in list views" COM_COMPONENTBUILDER_ADMIN_FIELDS_PERMISSION="Permissions" COM_COMPONENTBUILDER_ADMIN_FIELDS_PERMISSION_DESCRIPTION="What permission to use." @@ -210,6 +212,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_LABEL="Title" COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_DESC="A count of the number of times this Admin Fields has been revised." COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_ADMIN_LIST="Admin List" COM_COMPONENTBUILDER_ADMIN_VIEW="Admin View" COM_COMPONENTBUILDER_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access" @@ -534,7 +537,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_LABEL="Child Key" COM_COMPONENTBUILDER_ADMIN_VIEW_LAMP="Lamp" COM_COMPONENTBUILDER_ADMIN_VIEW_LAST="Last" COM_COMPONENTBUILDER_ADMIN_VIEW_LINK="Link" -COM_COMPONENTBUILDER_ADMIN_VIEW_LINKED_COMPONENTS="Linked - Components" COM_COMPONENTBUILDER_ADMIN_VIEW_LIST="List" COM_COMPONENTBUILDER_ADMIN_VIEW_LIST_TWO="List 2" COM_COMPONENTBUILDER_ADMIN_VIEW_LOCATION="Location" @@ -841,12 +843,16 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_YES="Yes" COM_COMPONENTBUILDER_ADMIN_VIEW_YOUTUBE="Youtube" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_OUT="Zoom Out" +COM_COMPONENTBUILDER_ALIAS="Alias" +COM_COMPONENTBUILDER_ALIGNMENT="Alignment" COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME="All is good, there in no notice at this time." COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. (Make SURE to move this zipped backup package out of the tmp folder before doing an import)
If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers!" COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" +COM_COMPONENTBUILDER_ARCHIVED="Archived" COM_COMPONENTBUILDER_AUTHOR="Author" +COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" COM_COMPONENTBUILDER_BACK="Back" @@ -854,10 +860,7 @@ COM_COMPONENTBUILDER_BACKUP="Backup" COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First" COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" -COM_COMPONENTBUILDER_BADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED="Admin view in %s has id mismatch of selected admin view. So the id:%s was removed!" COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method" -COM_COMPONENTBUILDER_BCONFIG_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED="Config in %s has id mismatch of selected field. So the id:%s was removed!" -COM_COMPONENTBUILDER_BCUSTOM_ADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BCUSTOM_ADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED="Custom admin view in %s has id mismatch of selected custom admin view. So the id:%s was removed!" COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION="Custom files not move to correct location!" COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!" COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB="Field type id:%s mismatch in %s." @@ -870,7 +873,6 @@ COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="%s could not be imported COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="%s component details" COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="%s has been imported!" COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="%s has been updated!" -COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED="Site view in %s has id mismatch of selected site view. So the id:%s was removed!" COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time." COM_COMPONENTBUILDER_CHAIN="Chain" COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." @@ -889,7 +891,1177 @@ COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu" COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to update the submenu of the Compiler" COM_COMPONENTBUILDER_COMPILE_COMPONENT="Compile Component" COM_COMPONENTBUILDER_COMPONENTS="Components" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS="Components Admin Views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_OPTIONS="Batch process the selected Components Admin Views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_TIP="All changes will be applied to all selected Components Admin Views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE="Components Admin Views Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_CREATE="Components Admin Views Create" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_CREATE_DESC="Allows the users in this group to create create components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_DELETE="Components Admin Views Delete" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_DELETE_DESC="Allows the users in this group to delete delete components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT="Components Admin Views Edit" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_BY="Components Admin Views Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_DATE="Components Admin Views Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_DESC="Allows the users in this group to edit the component admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN="Components Admin Views Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components admin views created by them" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_STATE="Components Admin Views Edit State" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_VERSION="Components Admin Views Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_ARCHIVED="%s Components Admin Views archived." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_ARCHIVED_1="%s Component Admin Views archived." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_CHECKED_IN_0="No Component Admin Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_CHECKED_IN_1="%d Component Admin Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_CHECKED_IN_MORE="%d Components Admin Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_DELETED="%s Components Admin Views deleted." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_DELETED_1="%s Component Admin Views deleted." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_FEATURED="%s Components Admin Views featured." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_FEATURED_1="%s Component Admin Views featured." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_PUBLISHED="%s Components Admin Views published." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_PUBLISHED_1="%s Component Admin Views published." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_TRASHED="%s Components Admin Views trashed." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_TRASHED_1="%s Component Admin Views trashed." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_UNFEATURED="%s Components Admin Views unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_UNFEATURED_1="%s Component Admin Views unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_UNPUBLISHED="%s Components Admin Views unpublished." +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_N_ITEMS_UNPUBLISHED_1="%s Component Admin Views unpublished." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG="Components Config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_ACCESS="Components Config Access" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_ACCESS_DESC="Allows the users in this group to access access components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_OPTIONS="Batch process the selected Components Config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_TIP="All changes will be applied to all selected Components Config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_USE="Components Config Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_CREATE="Components Config Create" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_CREATE_DESC="Allows the users in this group to create create components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_DELETE="Components Config Delete" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_DELETE_DESC="Allows the users in this group to delete delete components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT="Components Config Edit" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_BY="Components Config Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_DATE="Components Config Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_DESC="Allows the users in this group to edit the component config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_OWN="Components Config Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_OWN_DESC="Allows the users in this group to edit edit own components config created by them" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_STATE="Components Config Edit State" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_STATE_DESC="Allows the users in this group to update the state of the component config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_VERSION="Components Config Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_ARCHIVED="%s Components Config archived." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_ARCHIVED_1="%s Component Config archived." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_CHECKED_IN_0="No Component Config successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_CHECKED_IN_1="%d Component Config successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_CHECKED_IN_MORE="%d Components Config successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_DELETED="%s Components Config deleted." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_DELETED_1="%s Component Config deleted." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_FEATURED="%s Components Config featured." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_FEATURED_1="%s Component Config featured." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_PUBLISHED="%s Components Config published." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_PUBLISHED_1="%s Component Config published." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_TRASHED="%s Components Config trashed." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_TRASHED_1="%s Component Config trashed." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_UNFEATURED="%s Components Config unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_UNFEATURED_1="%s Component Config unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_UNPUBLISHED="%s Components Config unpublished." +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_N_ITEMS_UNPUBLISHED_1="%s Component Config unpublished." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS="Components Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_ACCESS="Components Custom Admin Menus Access" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_ACCESS_DESC="Allows the users in this group to access access components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_OPTIONS="Batch process the selected Components Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_TIP="All changes will be applied to all selected Components Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_USE="Components Custom Admin Menus Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_CREATE="Components Custom Admin Menus Create" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_CREATE_DESC="Allows the users in this group to create create components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_DELETE="Components Custom Admin Menus Delete" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_DELETE_DESC="Allows the users in this group to delete delete components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT="Components Custom Admin Menus Edit" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_BY="Components Custom Admin Menus Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_DATE="Components Custom Admin Menus Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_DESC="Allows the users in this group to edit the component custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_OWN="Components Custom Admin Menus Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components custom admin menus created by them" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_STATE="Components Custom Admin Menus Edit State" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_VERSION="Components Custom Admin Menus Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_ARCHIVED="%s Components Custom Admin Menus archived." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_ARCHIVED_1="%s Component Custom Admin Menus archived." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_CHECKED_IN_0="No Component Custom Admin Menus successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_CHECKED_IN_1="%d Component Custom Admin Menus successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_CHECKED_IN_MORE="%d Components Custom Admin Menus successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_DELETED="%s Components Custom Admin Menus deleted." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_DELETED_1="%s Component Custom Admin Menus deleted." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_FEATURED="%s Components Custom Admin Menus featured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_FEATURED_1="%s Component Custom Admin Menus featured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_PUBLISHED="%s Components Custom Admin Menus published." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_PUBLISHED_1="%s Component Custom Admin Menus published." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_TRASHED="%s Components Custom Admin Menus trashed." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_TRASHED_1="%s Component Custom Admin Menus trashed." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_UNFEATURED="%s Components Custom Admin Menus unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_UNFEATURED_1="%s Component Custom Admin Menus unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_UNPUBLISHED="%s Components Custom Admin Menus unpublished." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_N_ITEMS_UNPUBLISHED_1="%s Component Custom Admin Menus unpublished." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS="Components Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_ACCESS="Components Custom Admin Views Access" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_OPTIONS="Batch process the selected Components Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_TIP="All changes will be applied to all selected Components Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_USE="Components Custom Admin Views Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_CREATE="Components Custom Admin Views Create" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_CREATE_DESC="Allows the users in this group to create create components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_DELETE="Components Custom Admin Views Delete" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_DELETE_DESC="Allows the users in this group to delete delete components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT="Components Custom Admin Views Edit" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_BY="Components Custom Admin Views Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_DATE="Components Custom Admin Views Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_DESC="Allows the users in this group to edit the component custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_OWN="Components Custom Admin Views Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components custom admin views created by them" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_STATE="Components Custom Admin Views Edit State" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_VERSION="Components Custom Admin Views Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_ARCHIVED="%s Components Custom Admin Views archived." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_ARCHIVED_1="%s Component Custom Admin Views archived." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_CHECKED_IN_0="No Component Custom Admin Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_CHECKED_IN_1="%d Component Custom Admin Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_CHECKED_IN_MORE="%d Components Custom Admin Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_DELETED="%s Components Custom Admin Views deleted." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_DELETED_1="%s Component Custom Admin Views deleted." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_FEATURED="%s Components Custom Admin Views featured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_FEATURED_1="%s Component Custom Admin Views featured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_PUBLISHED="%s Components Custom Admin Views published." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_PUBLISHED_1="%s Component Custom Admin Views published." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_TRASHED="%s Components Custom Admin Views trashed." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_TRASHED_1="%s Component Custom Admin Views trashed." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_UNFEATURED="%s Components Custom Admin Views unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_UNFEATURED_1="%s Component Custom Admin Views unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_UNPUBLISHED="%s Components Custom Admin Views unpublished." +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_N_ITEMS_UNPUBLISHED_1="%s Component Custom Admin Views unpublished." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD="Components Dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_ACCESS="Components Dashboard Access" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_ACCESS_DESC="Allows the users in this group to access access components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_OPTIONS="Batch process the selected Components Dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_TIP="All changes will be applied to all selected Components Dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_USE="Components Dashboard Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_CREATE="Components Dashboard Create" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_CREATE_DESC="Allows the users in this group to create create components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_DELETE="Components Dashboard Delete" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_DELETE_DESC="Allows the users in this group to delete delete components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT="Components Dashboard Edit" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_BY="Components Dashboard Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_DATE="Components Dashboard Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_DESC="Allows the users in this group to edit the component dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_OWN="Components Dashboard Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_OWN_DESC="Allows the users in this group to edit edit own components dashboard created by them" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_STATE="Components Dashboard Edit State" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_STATE_DESC="Allows the users in this group to update the state of the component dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_VERSION="Components Dashboard Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_ARCHIVED="%s Components Dashboard archived." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_ARCHIVED_1="%s Component Dashboard archived." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_CHECKED_IN_0="No Component Dashboard successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_CHECKED_IN_1="%d Component Dashboard successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_CHECKED_IN_MORE="%d Components Dashboard successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_DELETED="%s Components Dashboard deleted." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_DELETED_1="%s Component Dashboard deleted." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_FEATURED="%s Components Dashboard featured." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_FEATURED_1="%s Component Dashboard featured." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_PUBLISHED="%s Components Dashboard published." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_PUBLISHED_1="%s Component Dashboard published." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_TRASHED="%s Components Dashboard trashed." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_TRASHED_1="%s Component Dashboard trashed." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_UNFEATURED="%s Components Dashboard unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_UNFEATURED_1="%s Component Dashboard unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_UNPUBLISHED="%s Components Dashboard unpublished." +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_N_ITEMS_UNPUBLISHED_1="%s Component Dashboard unpublished." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS="Components Files & Folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_ACCESS="Components Files Folders Access" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_ACCESS_DESC="Allows the users in this group to access access components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_OPTIONS="Batch process the selected Components Files & Folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_TIP="All changes will be applied to all selected Components Files & Folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_USE="Components Files Folders Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_CREATE="Components Files Folders Create" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_CREATE_DESC="Allows the users in this group to create create components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_DELETE="Components Files Folders Delete" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_DELETE_DESC="Allows the users in this group to delete delete components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT="Components Files Folders Edit" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_BY="Components Files Folders Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_DATE="Components Files Folders Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_DESC="Allows the users in this group to edit the component files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_OWN="Components Files Folders Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components files folders created by them" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_STATE="Components Files Folders Edit State" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_VERSION="Components Files Folders Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_ARCHIVED="%s Components Files & Folders archived." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_ARCHIVED_1="%s Component Files & Folders archived." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_CHECKED_IN_0="No Component Files & Folders successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_CHECKED_IN_1="%d Component Files & Folders successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_CHECKED_IN_MORE="%d Components Files & Folders successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_DELETED="%s Components Files & Folders deleted." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_DELETED_1="%s Component Files & Folders deleted." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_FEATURED="%s Components Files & Folders featured." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_FEATURED_1="%s Component Files & Folders featured." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_PUBLISHED="%s Components Files & Folders published." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_PUBLISHED_1="%s Component Files & Folders published." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_TRASHED="%s Components Files & Folders trashed." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_TRASHED_1="%s Component Files & Folders trashed." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_UNFEATURED="%s Components Files & Folders unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_UNFEATURED_1="%s Component Files & Folders unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_UNPUBLISHED="%s Components Files & Folders unpublished." +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_N_ITEMS_UNPUBLISHED_1="%s Component Files & Folders unpublished." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS="Components mysql Tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_ACCESS="Components Mysql Tweaks Access" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_ACCESS_DESC="Allows the users in this group to access access components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_OPTIONS="Batch process the selected Components mysql Tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_TIP="All changes will be applied to all selected Components mysql Tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_USE="Components Mysql Tweaks Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_CREATE="Components Mysql Tweaks Create" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_CREATE_DESC="Allows the users in this group to create create components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_DELETE="Components Mysql Tweaks Delete" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_DELETE_DESC="Allows the users in this group to delete delete components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT="Components Mysql Tweaks Edit" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_BY="Components Mysql Tweaks Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_DATE="Components Mysql Tweaks Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_DESC="Allows the users in this group to edit the component mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_OWN="Components Mysql Tweaks Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components mysql tweaks created by them" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE="Components Mysql Tweaks Edit State" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION="Components Mysql Tweaks Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_ARCHIVED="%s Components mysql Tweaks archived." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_ARCHIVED_1="%s Component mysql Tweaks archived." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_CHECKED_IN_0="No Component mysql Tweaks successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_CHECKED_IN_1="%d Component mysql Tweaks successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_CHECKED_IN_MORE="%d Components mysql Tweaks successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_DELETED="%s Components mysql Tweaks deleted." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_DELETED_1="%s Component mysql Tweaks deleted." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_FEATURED="%s Components mysql Tweaks featured." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_FEATURED_1="%s Component mysql Tweaks featured." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_PUBLISHED="%s Components mysql Tweaks published." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_PUBLISHED_1="%s Component mysql Tweaks published." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_TRASHED="%s Components mysql Tweaks trashed." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_TRASHED_1="%s Component mysql Tweaks trashed." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNFEATURED="%s Components mysql Tweaks unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNFEATURED_1="%s Component mysql Tweaks unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNPUBLISHED="%s Components mysql Tweaks unpublished." +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNPUBLISHED_1="%s Component mysql Tweaks unpublished." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS="Components Site Views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS="Components Site Views Access" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_OPTIONS="Batch process the selected Components Site Views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_TIP="All changes will be applied to all selected Components Site Views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE="Components Site Views Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE="Components Site Views Create" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE_DESC="Allows the users in this group to create create components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_DELETE="Components Site Views Delete" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_DELETE_DESC="Allows the users in this group to delete delete components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT="Components Site Views Edit" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_BY="Components Site Views Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_DATE="Components Site Views Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_DESC="Allows the users in this group to edit the component site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_OWN="Components Site Views Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components site views created by them" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_STATE="Components Site Views Edit State" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_VERSION="Components Site Views Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_ARCHIVED="%s Components Site Views archived." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_ARCHIVED_1="%s Component Site Views archived." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_CHECKED_IN_0="No Component Site Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_CHECKED_IN_1="%d Component Site Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_CHECKED_IN_MORE="%d Components Site Views successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_DELETED="%s Components Site Views deleted." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_DELETED_1="%s Component Site Views deleted." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_FEATURED="%s Components Site Views featured." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_FEATURED_1="%s Component Site Views featured." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_PUBLISHED="%s Components Site Views published." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_PUBLISHED_1="%s Component Site Views published." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_TRASHED="%s Components Site Views trashed." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_TRASHED_1="%s Component Site Views trashed." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_UNFEATURED="%s Components Site Views unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_UNFEATURED_1="%s Component Site Views unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_UNPUBLISHED="%s Components Site Views unpublished." +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_N_ITEMS_UNPUBLISHED_1="%s Component Site Views unpublished." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES="Components Updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_ACCESS="Components Updates Access" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_ACCESS_DESC="Allows the users in this group to access access components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_OPTIONS="Batch process the selected Components Updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_TIP="All changes will be applied to all selected Components Updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_USE="Components Updates Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_CREATE="Components Updates Create" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_CREATE_DESC="Allows the users in this group to create create components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_DELETE="Components Updates Delete" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_DELETE_DESC="Allows the users in this group to delete delete components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT="Components Updates Edit" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_BY="Components Updates Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_DATE="Components Updates Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_DESC="Allows the users in this group to edit the component updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_OWN="Components Updates Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_OWN_DESC="Allows the users in this group to edit edit own components updates created by them" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_STATE="Components Updates Edit State" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the component updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_VERSION="Components Updates Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_ARCHIVED="%s Components Updates archived." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_ARCHIVED_1="%s Component Updates archived." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_CHECKED_IN_0="No Component Updates successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_CHECKED_IN_1="%d Component Updates successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_CHECKED_IN_MORE="%d Components Updates successfully checked in." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_DELETED="%s Components Updates deleted." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_DELETED_1="%s Component Updates deleted." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_FEATURED="%s Components Updates featured." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_FEATURED_1="%s Component Updates featured." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_PUBLISHED="%s Components Updates published." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_PUBLISHED_1="%s Component Updates published." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_TRASHED="%s Components Updates trashed." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_TRASHED_1="%s Component Updates trashed." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNFEATURED="%s Components Updates unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNFEATURED_1="%s Component Updates unfeatured." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNPUBLISHED="%s Components Updates unpublished." +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Component Updates unpublished." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS="Component Admin Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_DESCRIPTION="Select if this view
should use access." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_LABEL="Add Access" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS="Addadmin Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION="Setup the admin views for this component." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_LABEL="Admin Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDRESS="Address" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADMINVIEW="Adminview" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADMINVIEW_DESCRIPTION="Select an admin view" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADMINVIEW_LABEL="View" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARCHIVE="Archive" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_DOWN="Arrow Down" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_DOWN_FOUR="Arrow Down 4" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_DOWN_THREE="Arrow Down 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_DOWN_TWO="Arrow Down 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_FIRST="Arrow First" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_LAST="Arrow Last" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_LEFT="Arrow Left" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_LEFT_FOUR="Arrow Left 4" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_LEFT_THREE="Arrow Left 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_LEFT_TWO="Arrow Left 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_RIGHT="Arrow Right" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_RIGHT_FOUR="Arrow Right 4" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_RIGHT_THREE="Arrow Right 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_RIGHT_TWO="Arrow Right 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_UP="Arrow Up" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_UP_FOUR="Arrow Up 4" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_UP_THREE="Arrow Up 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ARROW_UP_TWO="Arrow Up 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ATTACHMENT="Attachment" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BACKWARD_CIRCLE="Backward Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BAN_CIRCLE="Ban Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BARS="Bars" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BASKET="Basket" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BOOK="Book" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BOOKMARK="Bookmark" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BOOKMARK_TWO="Bookmark 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BOX_ADD="Box Add" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BOX_REMOVE="Box Remove" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BRIEFCASE="Briefcase" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BRUSH="Brush" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_BUBBLE_QUOTE="Bubble Quote" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CALENDAR="Calendar" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CALENDAR_THREE="Calendar 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CALENDAR_TWO="Calendar 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CAMERA="Camera" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CAMERA_TWO_VIDEO="Camera 2 / Video" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CANCEL_CIRCLE="Cancel Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CART="Cart" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHART="Chart" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKBOX="Checkbox" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKBOX_PARTIAL="Checkbox Partial" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKBOX_UNCHECKED="Checkbox Unchecked" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKIN_DESCRIPTION="Select if the items of this view should automatically be checked in." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKIN_LABEL="Auto Check-in" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKMARK_CIRCLE="Checkmark Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CHECKMARK_TWO="Checkmark 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CIRCLE="Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CLOCK="Clock" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_COG="Cog" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_COGS="Cogs" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_COMMENT="Comment" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_COMMENTS_TWO="Comments 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_COMPASS="Compass" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CONTRACT="Contract" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CONTRACT_TWO="Contract 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CREATED_BY_DESC="The user that created this Component Admin Views." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CREATED_DATE_DESC="The date this Component Admin Views was created." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CREDIT="Credit" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CREDIT_TWO="Credit 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CUBE="Cube" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD="Dashboard" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_ADD_DESCRIPTION="Select if the view should show on the dashboard." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_ADD_LABEL="Dashboard (add record)" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_LIST_DESCRIPTION="Select if the view should show on the dashboard." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DASHBOARD_LIST_LABEL="Dashboard (list of records)" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DATABASE="Database" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DELETE="Delete" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_DOWNLOAD="Download" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT="Editing the Component Admin Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT_CREATE_SITE_VIEW_DESCRIPTION="add site edit & create view for this admin view" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT_CREATE_SITE_VIEW_LABEL="Edit/Create Site View" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ENTER="Enter" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ENVELOPE="Envelope" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ENVELOPE_OPENED="Envelope Opened" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EQUALIZER="Equalizer" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ERROR_UNIQUE_ALIAS="Another Component Admin Views has the same alias." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EXIT="Exit" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EXPAND="Expand" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EXPAND_TWO="Expand 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EXPIRED="Expired" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EYE_CLOSE="Eye Close" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EYE_OPEN="Eye Open" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FEATURED="Featured" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FEED="Feed" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE="File" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_ADD="File Add" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_CHECK="File Check" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_MINUS="File Minus" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_REMOVE="File Remove" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_TWO="File 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER="Filter" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FIRST="First" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLAG="Flag" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLAG_THREE="Flag 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLASH="Flash" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_CLOSE="Folder Close" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_MINUS="Folder Minus" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_OPEN="Folder Open" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_PLUS="Folder Plus" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_PLUS_TWO="Folder Plus 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_REMOVE="Folder Remove" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FOLDER_THREE="Folder 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FORWARD_CIRCLE="Forward Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FORWARD_TWO="Forward 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_GENERIC="Generic" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_GRID="Grid" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_GRID_TWO="Grid 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HEALTH="Health" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HEART="Heart" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HEART_TWO="Heart 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HISTORY_DESCRIPTION="Select if the items of this view should keep a history of item changes." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HISTORY_LABEL="Keep History" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HOME="Home" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_HOME_TWO="Home 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ICOMOON_DESCRIPTION="Joomla Standard Icomoon Fonts" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ICOMOON_LABEL="Icon" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_IMAGE="Image" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_IMAGES="Images" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_INFO="Info" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_INFO_CIRCLE="Info Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA="Joomla" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_KEY="Key" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LAMP="Lamp" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LAST="Last" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LINK="Link" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LIST="List" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LIST_TWO="List 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LOCATION="Location" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LOCK="Lock" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_LOOP="Loop" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MAINMENU_DESCRIPTION="Select if the view should show in the main menu." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MAINMENU_LABEL="Main Menu" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MENU="Menu" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MENU_THREE="Menu 3" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MENU_TWO="Menu 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_METADATA_DESCRIPTION="Select if this view should have metadata." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_METADATA_LABEL="Has Metadata" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MINUS="Minus" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MINUS_SIGN="Minus Sign" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MOBILE="Mobile" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MODIFIED_BY_DESC="The last user that modified this Component Admin Views." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MODIFIED_DATE_DESC="The date this Component Admin Views was modified." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MOVE="Move" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_MUSIC="Music" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW="A New Component Admin Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW_TAB="New Tab" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW_TAB_TWO="New Tab 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEXT="Next" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NOTE_ON_ADMIN_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NOTE_ON_ADMIN_VIEWS_LABEL="Setting Admin Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NOTIFICATION="Notification" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NOTIFICATION_CIRCLE="Notification Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ORDER_DESCRIPTION="Overide the default order" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ORDER_LABEL="Order" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PALETTE="Palette" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PARAGRAPH_CENTER="Paragraph Center" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PARAGRAPH_JUSTIFY="Paragraph Justify" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PARAGRAPH_LEFT="Paragraph Left" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PARAGRAPH_RIGHT="Paragraph Right" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PAUSE="Pause" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PAUSE_CIRCLE="Pause Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PENCIL="Pencil" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PENCIL_TWO="Pencil 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PHONE="Phone" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PHONE_TWO="Phone 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PIE="Pie" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PIN="Pin" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PLAY="Play" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PLAY_CIRCLE="Play Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PLUS="Plus" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PLUS_CIRCLE="Plus Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PORT_DESCRIPTION="add import/export option to this admin view." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PORT_LABEL="Export/Import Data" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_POWER_CORD="Power Cord" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PREVIOUS="Previous" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PRINT="Print" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PUBLISH="Publish" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PURGE="Purge" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PUZZLE="Puzzle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_QUESTION="Question" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_QUESTION_TWO="Question 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_QUOTES_LEFT="Quotes Left" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_QUOTES_RIGHT="Quotes Right" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_RADIO_UNCHECKED="Radio Unchecked" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_REPLY="Reply" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SAVE_COPY="Save Copy" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SAVE_NEW="Save New" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Admin Views to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SCISSORS="Scissors" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SCREEN="Screen" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SCREWDRIVER="Screwdriver" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SEARCH="Search" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHARE="Share" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHARE_ALT="Share Alt" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHIELD="Shield" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHUFFLE="Shuffle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SIGNUP="Signup" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY="Smiley" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_NEUTRAL="Smiley Neutral" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_NEUTRAL_TWO="Smiley Neutral 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_SAD="Smiley Sad" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_SAD_TWO="Smiley Sad 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_TWO="Smiley 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SQUARE="Square" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_STACK="Stack" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_STAR_TWO="Star 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_STOP="Stop" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_STOP_CIRCLE="Stop Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SUBMENU_DESCRIPTION="Select if the view should show in the submenu." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SUBMENU_LABEL="Submenu" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SUPPORT="Support" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SWITCH="Switch" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TABLET="Tablet" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TAG="Tag" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TAGS="Tags" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TAGS_TWO="Tags 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TAG_TWO="Tag 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_THUMBS_DOWN="Thumbs Down" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_THUMBS_UP="Thumbs Up" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TREE="Tree" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_TREE_TWO="Tree 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNARCHIVE="Unarchive" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNBLOCK="Unblock" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNDO="Undo" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNDO_TWO="Undo 2" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNFEATURED="Unfeatured" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNLOCK="Unlock" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UNPUBLISH="Unpublish" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_UPLOAD="Upload" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_USER="User" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_USERS="Users" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_VCARD="Vcard" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_VERSION_DESC="A count of the number of times this Component Admin Views has been revised." +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_VIEWS="Views" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_WAND="Wand" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_WARNING="Warning" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_WARNING_CIRCLE="Warning Circle" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_WIFI="Wifi" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_WRENCH="Wrench" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_YOUTUBE="Youtube" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ZOOM_IN="Zoom In" +COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ZOOM_OUT="Zoom Out" +COM_COMPONENTBUILDER_COMPONENT_CONFIG="Component Config" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_ADDCONFIG="Addconfig" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_ADDCONFIG_DESCRIPTION="Setup config fields." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_ADDCONFIG_LABEL="Config" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_BY_DESC="The user that created this Component Config." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_DATE_DESC="The date this Component Config was created." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_DESCRIPTION="Enter custom value in needed" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_HINT="Custom Value Here" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_LABEL="Custom Value" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT="Editing the Component Config" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_ERROR_UNIQUE_ALIAS="Another Component Config has the same alias." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_FIELD="Field" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_FIELD_DESCRIPTION="Select a field" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_FIELD_LABEL="Field" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_MODIFIED_BY_DESC="The last user that modified this Component Config." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_MODIFIED_DATE_DESC="The date this Component Config was modified." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW="A New Component Config" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Config to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_DESCRIPTION="The name of the tab this field belongs to." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_HINT="Global" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_LABEL="Tab Name" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_TWEAKS="Tweaks" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_VERSION_DESC="A count of the number of times this Component Config has been revised." +COM_COMPONENTBUILDER_COMPONENT_CONFIG_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS="Component Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS="Addcustommenus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS_LABEL="Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_BEFORE="Before" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_BEFORE_DESCRIPTION="Select before what admin view this one should be placed" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_BEFORE_LABEL="Order Before" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_CREATED_BY_DESC="The user that created this Component Custom Admin Menus." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_CREATED_DATE_DESC="The date this Component Custom Admin Menus was created." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_DASHBOARD_LIST_DESCRIPTION="Select if the view should show on the dashboard." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_DASHBOARD_LIST_LABEL="Dashboard (list of records)" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT="Editing the Component Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ERROR_UNIQUE_ALIAS="Another Component Custom Admin Menus has the same alias." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ICON_DESCRIPTION="Add the icon to the image folder and select it here (128 x 128px)" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ICON_LABEL="Icon" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_LINK_DESCRIPTION="Enter menu link" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_LINK_HINT="Menu Link Here" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_LINK_LABEL="Link" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MAINMENU_DESCRIPTION="Select if the view should show in the main menu." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MAINMENU_LABEL="Main Menu" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MODIFIED_BY_DESC="The last user that modified this Component Custom Admin Menus." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MODIFIED_DATE_DESC="The date this Component Custom Admin Menus was modified." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_CODE_DESCRIPTION="Add Name in Code Here" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_CODE_HINT="codename" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_CODE_LABEL="Name in Code" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_LABEL="Name" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NEW="A New Component Custom Admin Menus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Custom Admin Menus to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SUBMENU_DESCRIPTION="Select if the view should show in the submenu." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SUBMENU_LABEL="Submenu" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_TWEAKS="Tweaks" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_VERSION_DESC="A count of the number of times this Component Custom Admin Menus has been revised." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS="Component Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ACCESS_DESCRIPTION="Select if this view
should use access." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ACCESS_LABEL="Add Access" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS="Addcustom Admin Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS_LABEL="Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDRESS="Address" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADMINVIEWS="Adminviews" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADMINVIEWS_DESCRIPTION="Add a link to any list admin view" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADMINVIEWS_LABEL="Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARCHIVE="Archive" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_DOWN="Arrow Down" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_DOWN_FOUR="Arrow Down 4" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_DOWN_THREE="Arrow Down 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_DOWN_TWO="Arrow Down 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_FIRST="Arrow First" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_LAST="Arrow Last" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_LEFT="Arrow Left" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_LEFT_FOUR="Arrow Left 4" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_LEFT_THREE="Arrow Left 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_LEFT_TWO="Arrow Left 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_RIGHT="Arrow Right" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_RIGHT_FOUR="Arrow Right 4" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_RIGHT_THREE="Arrow Right 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_RIGHT_TWO="Arrow Right 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_UP="Arrow Up" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_UP_FOUR="Arrow Up 4" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_UP_THREE="Arrow Up 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ARROW_UP_TWO="Arrow Up 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ATTACHMENT="Attachment" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BACKWARD_CIRCLE="Backward Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BAN_CIRCLE="Ban Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BARS="Bars" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BASKET="Basket" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BEFORE="Before" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BEFORE_DESCRIPTION="Select before what admin view this one should be placed" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BEFORE_LABEL="Order Before" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BOOK="Book" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BOOKMARK="Bookmark" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BOOKMARK_TWO="Bookmark 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BOX_ADD="Box Add" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BOX_REMOVE="Box Remove" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BRIEFCASE="Briefcase" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BRUSH="Brush" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_BUBBLE_QUOTE="Bubble Quote" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CALENDAR="Calendar" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CALENDAR_THREE="Calendar 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CALENDAR_TWO="Calendar 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CAMERA="Camera" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CAMERA_TWO_VIDEO="Camera 2 / Video" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CANCEL_CIRCLE="Cancel Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CART="Cart" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CHART="Chart" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CHECKBOX="Checkbox" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CHECKBOX_PARTIAL="Checkbox Partial" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CHECKBOX_UNCHECKED="Checkbox Unchecked" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CHECKMARK_CIRCLE="Checkmark Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CHECKMARK_TWO="Checkmark 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CIRCLE="Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CLOCK="Clock" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_COG="Cog" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_COGS="Cogs" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_COMMENT="Comment" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_COMMENTS_TWO="Comments 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_COMPASS="Compass" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CONTRACT="Contract" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CONTRACT_TWO="Contract 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CREATED_BY_DESC="The user that created this Component Custom Admin Views." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CREATED_DATE_DESC="The date this Component Custom Admin Views was created." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CREDIT="Credit" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CREDIT_TWO="Credit 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CUBE="Cube" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CUSTOMADMINVIEW="Customadminview" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CUSTOMADMINVIEW_DESCRIPTION="Select a custom admin view" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CUSTOMADMINVIEW_LABEL="View" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DASHBOARD="Dashboard" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DASHBOARD_LIST_DESCRIPTION="Select if the view should show on the dashboard." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DASHBOARD_LIST_LABEL="Dashboard (list of records)" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DATABASE="Database" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DELETE="Delete" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_DOWNLOAD="Download" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT="Editing the Component Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ENTER="Enter" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ENVELOPE="Envelope" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ENVELOPE_OPENED="Envelope Opened" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EQUALIZER="Equalizer" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ERROR_UNIQUE_ALIAS="Another Component Custom Admin Views has the same alias." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EXIT="Exit" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EXPAND="Expand" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EXPAND_TWO="Expand 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EXPIRED="Expired" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EYE_CLOSE="Eye Close" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EYE_OPEN="Eye Open" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FEATURED="Featured" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FEED="Feed" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILE="File" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILE_ADD="File Add" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILE_CHECK="File Check" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILE_MINUS="File Minus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILE_REMOVE="File Remove" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILE_TWO="File 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FILTER="Filter" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FIRST="First" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FLAG="Flag" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FLAG_THREE="Flag 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FLASH="Flash" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_CLOSE="Folder Close" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_MINUS="Folder Minus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_OPEN="Folder Open" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_PLUS="Folder Plus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_PLUS_TWO="Folder Plus 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_REMOVE="Folder Remove" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FOLDER_THREE="Folder 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FORWARD_CIRCLE="Forward Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_FORWARD_TWO="Forward 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_GENERIC="Generic" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_GRID="Grid" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_GRID_TWO="Grid 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_HEALTH="Health" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_HEART="Heart" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_HEART_TWO="Heart 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_HOME="Home" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_HOME_TWO="Home 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ICOMOON_DESCRIPTION="Joomla Standard Icomoon Fonts" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ICOMOON_LABEL="Icon" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_IMAGE="Image" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_IMAGES="Images" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_INFO="Info" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_INFO_CIRCLE="Info Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA="Joomla" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_KEY="Key" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LAMP="Lamp" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LAST="Last" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LINK="Link" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LIST="List" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LIST_TWO="List 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LOCATION="Location" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LOCK="Lock" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_LOOP="Loop" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MAINMENU_DESCRIPTION="Select if the view should show in the main menu." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MAINMENU_LABEL="Main Menu" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MENU="Menu" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MENU_THREE="Menu 3" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MENU_TWO="Menu 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_METADATA_DESCRIPTION="Select if this view should have metadata." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_METADATA_LABEL="Has Metadata" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MINUS="Minus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MINUS_SIGN="Minus Sign" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MOBILE="Mobile" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MODIFIED_BY_DESC="The last user that modified this Component Custom Admin Views." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MODIFIED_DATE_DESC="The date this Component Custom Admin Views was modified." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MOVE="Move" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_MUSIC="Music" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW="A New Component Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW_TAB="New Tab" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW_TAB_TWO="New Tab 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEXT="Next" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NOTE_ON_CUSTOM_ADMIN_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NOTE_ON_CUSTOM_ADMIN_VIEWS_LABEL="Setting Custom Admin Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NOTIFICATION="Notification" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NOTIFICATION_CIRCLE="Notification Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PALETTE="Palette" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PARAGRAPH_CENTER="Paragraph Center" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PARAGRAPH_JUSTIFY="Paragraph Justify" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PARAGRAPH_LEFT="Paragraph Left" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PARAGRAPH_RIGHT="Paragraph Right" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PAUSE="Pause" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PAUSE_CIRCLE="Pause Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PENCIL="Pencil" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PENCIL_TWO="Pencil 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PHONE="Phone" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PHONE_TWO="Phone 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PIE="Pie" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PIN="Pin" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PLAY="Play" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PLAY_CIRCLE="Play Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PLUS="Plus" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PLUS_CIRCLE="Plus Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_POWER_CORD="Power Cord" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PREVIOUS="Previous" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PRINT="Print" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PUBLISH="Publish" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PURGE="Purge" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_PUZZLE="Puzzle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_QUESTION="Question" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_QUESTION_TWO="Question 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_QUOTES_LEFT="Quotes Left" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_QUOTES_RIGHT="Quotes Right" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_RADIO_UNCHECKED="Radio Unchecked" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_REPLY="Reply" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SAVE_COPY="Save Copy" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SAVE_NEW="Save New" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Custom Admin Views to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SCISSORS="Scissors" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SCREEN="Screen" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SCREWDRIVER="Screwdriver" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SEARCH="Search" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SHARE="Share" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SHARE_ALT="Share Alt" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SHIELD="Shield" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SHUFFLE="Shuffle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SIGNUP="Signup" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SMILEY="Smiley" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SMILEY_NEUTRAL="Smiley Neutral" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SMILEY_NEUTRAL_TWO="Smiley Neutral 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SMILEY_SAD="Smiley Sad" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SMILEY_SAD_TWO="Smiley Sad 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SMILEY_TWO="Smiley 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SQUARE="Square" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_STACK="Stack" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_STAR_TWO="Star 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_STOP="Stop" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_STOP_CIRCLE="Stop Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SUBMENU_DESCRIPTION="Select if the view should show in the submenu." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SUBMENU_LABEL="Submenu" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SUPPORT="Support" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_SWITCH="Switch" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TABLET="Tablet" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TAG="Tag" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TAGS="Tags" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TAGS_TWO="Tags 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TAG_TWO="Tag 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_THUMBS_DOWN="Thumbs Down" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_THUMBS_UP="Thumbs Up" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TREE="Tree" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_TREE_TWO="Tree 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNARCHIVE="Unarchive" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNBLOCK="Unblock" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNDO="Undo" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNDO_TWO="Undo 2" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNFEATURED="Unfeatured" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNLOCK="Unlock" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UNPUBLISH="Unpublish" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_UPLOAD="Upload" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_USER="User" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_USERS="Users" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_VCARD="Vcard" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_VERSION_DESC="A count of the number of times this Component Custom Admin Views has been revised." +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_VIEWS="Views" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_WAND="Wand" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_WARNING="Warning" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_WARNING_CIRCLE="Warning Circle" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_WIFI="Wifi" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_WRENCH="Wrench" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_YOUTUBE="Youtube" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ZOOM_IN="Zoom In" +COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ZOOM_OUT="Zoom Out" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD="Component Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_BY_DESC="The user that created this Component Dashboard." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_DATE_DESC="The date this Component Dashboard was created." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_DASHBOARD="Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_DASHBOARD_TAB="Dashboard Tab" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_DASHBOARD_TAB_LABEL="Dashboard Tabs" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT="Editing the Component Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ERROR_UNIQUE_ALIAS="Another Component Dashboard has the same alias." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_DESCRIPTION="Enter Header Here" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_HINT="Header Here" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_LABEL="Header" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT="// Add the tab HTML here. To access php values methodname->value; ?>" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL="HTML" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_MODIFIED_BY_DESC="The last user that modified this Component Dashboard." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_MODIFIED_DATE_DESC="The date this Component Dashboard was modified." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_LABEL="Name" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW="A New Component Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS="Php Dashboard Methods" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_DESCRIPTION="PHP methods to place in the dashboard model." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_HINT="// add custom PHP methods to dashboard model. Use the [public function getMethodname()] to insure the data is set to the view, note the convention [public function get...()] replace the .... with the unique method name." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_LABEL="PHP Dashboard Methods" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Dashboard to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_VERSION_DESC="A count of the number of times this Component Dashboard has been revised." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS="Component Files & Folders" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES="Addfiles" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES_DESCRIPTION="Add custom files to this component." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES_LABEL="Files" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS="Addfolders" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_DESCRIPTION="Add custom folder to this component." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_LABEL="Folder" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_BY_DESC="The user that created this Component Files & Folders." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_DATE_DESC="The date this Component Files & Folders was created." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT="Editing the Component Files & Folders" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ERROR_UNIQUE_ALIAS="Another Component Files & Folders has the same alias." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_FILE="File" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_FILE_DESCRIPTION="Add the files to custom folder" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_FILE_LABEL="File" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_FOLDER="Folder" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_FOLDER_DESCRIPTION="Add the folder to custom folder" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_FOLDER_LABEL="Folder" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_MODIFIED_BY_DESC="The last user that modified this Component Files & Folders." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_MODIFIED_DATE_DESC="The date this Component Files & Folders was modified." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NEW="A New Component Files & Folders" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FILES_DESCRIPTION="You can add custom files to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FILES_LABEL="Adding Custom Files" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_DESCRIPTION="You can add custom folders to the component, simply add the folders to the administrator/components/com_componentbuilder/custom folder and then select them here." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_LABEL="Adding Custom Folders" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION="Should file be updated." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL="Update" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled file to see the structure. " +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_HINT="Target Path Here" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_LABEL="Target Path" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_RENAME_LABEL="Rename" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Files & Folders to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_SETTINGS="Settings" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_VERSION_DESC="A count of the number of times this Component Files & Folders has been revised." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS="Component Global Settings" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS="Component mysql Tweaks" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADD_SQL_DESCRIPTION="if set in view" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADD_SQL_LABEL="Add MySQL" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADD_SQL_OPTIONS_DESCRIPTION="if being added" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADD_SQL_OPTIONS_LABEL="Options" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADMINVIEW="Adminview" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADMINVIEW_DESCRIPTION="Select an admin view" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ADMINVIEW_LABEL="View" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ALL="All" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_CREATED_BY_DESC="The user that created this Component mysql Tweaks." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_CREATED_DATE_DESC="The date this Component mysql Tweaks was created." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT="Editing the Component mysql Tweaks" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ERROR_UNIQUE_ALIAS="Another Component mysql Tweaks has the same alias." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_DESCRIPTION="if id option selected" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_HINT="// 1 => 500 or 1,2,3,4 or 1 => 4,20,40 => 90" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_LABEL="ID's" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ID_BASED="ID Based" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_MODIFIED_BY_DESC="The last user that modified this Component mysql Tweaks." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_MODIFIED_DATE_DESC="The date this Component mysql Tweaks was modified." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_NEW="A New Component mysql Tweaks" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_NO_DONT_ADD_ANY="No don't add any" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component mysql Tweaks to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SELECT_AN_OPTION="Select an option" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SQL_TWEAK="Sql Tweak" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SQL_TWEAK_DESCRIPTION="Tweak the view MySql dump settings." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_SQL_TWEAK_LABEL="MySql (tweak)" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_TWEAKS="Tweaks" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_VERSION_DESC="A count of the number of times this Component mysql Tweaks has been revised." +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_YES_INCLUDE_BASED_ON_OPTIONS="Yes include based on options" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS="Component Site Views" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION="Select if this view
should use access." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_LABEL="Add Access" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS="Addsite Views" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_DESCRIPTION="Setup the site views for this component." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_LABEL="Site Views" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_BY_DESC="The user that created this Component Site Views." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_DESC="The date this Component Site Views was created." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_DESCRIPTION="Select only one." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_LABEL="Default View" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT="Editing the Component Site Views" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ERROR_UNIQUE_ALIAS="Another Component Site Views has the same alias." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_DESCRIPTION="Select if the view should show have a menu link." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_LABEL="Add Menu" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_DESCRIPTION="Select if this view should have metadata." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_LABEL="Has Metadata" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MODIFIED_BY_DESC="The last user that modified this Component Site Views." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MODIFIED_DATE_DESC="The date this Component Site Views was modified." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NEW="A New Component Site Views" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_LABEL="Setting Site Views" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_DESCRIPTION="if view uses Access,
should default be public." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_LABEL="Public Access" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Site Views to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SITEVIEW="Siteview" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SITEVIEW_DESCRIPTION="Select a site view" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SITEVIEW_LABEL="View" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_VERSION_DESC="A count of the number of times this Component Site Views has been revised." +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_VIEWS="Views" +COM_COMPONENTBUILDER_COMPONENT_UPDATES="Component Updates" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_CREATED_BY_DESC="The user that created this Component Updates." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_CREATED_DATE_DESC="The date this Component Updates was created." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT="Editing the Component Updates" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_ERROR_UNIQUE_ALIAS="Another Component Updates has the same alias." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_ID="Id" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT="Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MODIFIED_BY_DESC="The last user that modified this Component Updates." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MODIFIED_DATE_DESC="The date this Component Updates was modified." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_DESCRIPTION="Update Dump" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_HINT="// MySQL for update or blank for none" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_LABEL="MySQL" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_NEW="A New Component Updates" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_PERMISSION="Permissions" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Updates to customise the alias." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_STATUS="Status" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATES="Updates" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_DESCRIPTION="Enter Download Link" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_HINT="http://www.example.com/file.zip" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_LABEL="Version URL" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESC="A count of the number of times this Component Updates has been revised." +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESCRIPTION="1.0.0" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_HINT="1.0.0" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="SQL Update Version" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE="Version Update" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_LABEL="Version Updates" COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call." COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User" @@ -977,25 +2149,6 @@ COM_COMPONENTBUILDER_CONFIG_COMPANY="Company" COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set the path to the compiler folder" COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler" COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_DESC="The email of this contributor." -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_LABEL="Contributor Email" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_DESC="The link to this contributor's website." -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_LABEL="Contributor Website" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_DESC="The name of this contributor." -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_LABEL="Contributor Name" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_ALL="Both Front & Back-end" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_BACK="Back-end" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_DESC="Select where you want this contributor's details to show in the component." -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_FRONT="Front-end" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_LABEL="Show" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_NONE="Hide" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_DESC="The job title that best describes the contributor's relationship to this component." -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_LABEL="Contributor Job Title" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_DESC="How should we link to this contributor." -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL="Email" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL="Use" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE="None" -COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW="Website" COM_COMPONENTBUILDER_CONFIG_CRONJOB="CronJob" COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to." COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_HINT="/home/user/fullbackup" @@ -1781,6 +2934,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_DESC="A count of the number of times th COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_DASH="Dashboard" COM_COMPONENTBUILDER_DASHBOARD="Component Builder Dashboard" +COM_COMPONENTBUILDER_DASHBOARD_ADD_RECORD="Dashboard (add record)" COM_COMPONENTBUILDER_DASHBOARD_ADMIN_VIEWS="Admin Views

" COM_COMPONENTBUILDER_DASHBOARD_ADMIN_VIEW_ADD="Add Admin View

" COM_COMPONENTBUILDER_DASHBOARD_COMPILER="Compiler

" @@ -1803,6 +2957,7 @@ COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENT_ADD="Add Joomla Component%s" COM_COMPONENTBUILDER_GLOBAL="Global" COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!" +COM_COMPONENTBUILDER_HAS_METADATA="Has Metadata" COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document" COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access" @@ -2634,6 +3795,7 @@ COM_COMPONENTBUILDER_HI="Hi" COM_COMPONENTBUILDER_HIDE="Hide" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="

Data is corrupt!

This could be due to broken package!" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE="

Data is corrupt!

This could be due to key error, or broken package!" +COM_COMPONENTBUILDER_ICON="Icon" COM_COMPONENTBUILDER_IMPORT_COMPONENTS="Import Components" COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue" COM_COMPONENTBUILDER_IMPORT_DATA="Import Data" @@ -2686,6 +3848,7 @@ COM_COMPONENTBUILDER_IMPORT_TITLE="Data Importer" COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found." COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA="Import Data" COM_COMPONENTBUILDER_IMPORT_UPLOAD_BOTTON="Upload File" +COM_COMPONENTBUILDER_INACTIVE="Inactive" COM_COMPONENTBUILDER_ISOLATE="Isolate" COM_COMPONENTBUILDER_ISSUE="issue" COM_COMPONENTBUILDER_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)" @@ -2741,43 +3904,13 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_N_ITEMS_UNPUBLISHED="%s Joomla Components COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_N_ITEMS_UNPUBLISHED_1="%s Joomla Component unpublished." COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU="Joomla Components Submenu" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the joomla component" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ACCESS_DESCRIPTION="Select if this view
should use access." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ACCESS_LABEL="Add Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDADMIN_VIEWS="Addadmin Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDADMIN_VIEWS_DESCRIPTION="Setup the admin views for this component." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDADMIN_VIEWS_LABEL="Admin Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDADMIN_VIEWS_SELECT="Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONFIG="Addconfig" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONFIG_DESCRIPTION="Setup config fields." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONFIG_LABEL="Config" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONFIG_SELECT="Add" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS="Addcontributors" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_DESCRIPTION="Setup contributors for the component." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_LABEL="Contributors" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_SELECT="Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCUSTOMMENUS="Addcustommenus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCUSTOMMENUS_LABEL="Custom Admin Menus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCUSTOMMENUS_SELECT="Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCUSTOM_ADMIN_VIEWS="Addcustom Admin Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCUSTOM_ADMIN_VIEWS_LABEL="Custom Admin Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCUSTOM_ADMIN_VIEWS_SELECT="Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFILES="Addfiles" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFILES_DESCRIPTION="Add custom files to this component." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFILES_LABEL="Files" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFILES_SELECT="Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOLDERS="Addfolders" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOLDERS_DESCRIPTION="Add custom folder to this component." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOLDERS_LABEL="Folder" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOLDERS_SELECT="Add" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE="Addfootable" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL="Add FooTable" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME="Addreadme" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL="Add README" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDRESS="Address" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDSITE_VIEWS="Addsite Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDSITE_VIEWS_DESCRIPTION="Setup the site views for this component." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDSITE_VIEWS_LABEL="Site Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDSITE_VIEWS_SELECT="Add" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT="Adduikit" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL="Add Uikit" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_ADMIN_EVENT="Add Admin Event" @@ -2792,8 +3925,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_JAVASCRIPT_LABEL="Add Javascript" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE="Add License" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE_DESCRIPTION="Add the option to use a license in the component." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE_LABEL="Add License (whmcs)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_DASHBOARD_METHODS="Add Php Dashboard Methods" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_DASHBOARD_METHODS_LABEL="Add PHP (dashboard Methods)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_ADMIN="Add Php Helper Admin" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_ADMIN_LABEL="Add PHP (helper_admin Class)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH="Add Php Helper Both" @@ -2818,41 +3949,11 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL="Add Sales Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SITE_EVENT="Add Site Event" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SITE_EVENT_LABEL="Add Global Site Event" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL="Add Sql" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_DESCRIPTION="if set in view" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL="Add MySQL (to view table)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_OPTIONS_DESCRIPTION="if being added" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_OPTIONS_LABEL="Options" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER="Add Update Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER_LABEL="Add Update Server" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMINVIEW="Adminview" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMINVIEWS="Adminviews" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMINVIEWS_DESCRIPTION="Add a link to any list admin view" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMINVIEWS_LABEL="Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMINVIEW_DESCRIPTION="Select an admin view" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMINVIEW_LABEL="View" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADVANCED_ENCRYPTION_ONLY_TO_LOCK_DATA="Advanced encryption (only to lock data)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ALL="All" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARCHIVE="Archive" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_DOWN="Arrow Down" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_DOWN_FOUR="Arrow Down 4" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_DOWN_THREE="Arrow Down 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_DOWN_TWO="Arrow Down 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_FIRST="Arrow First" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_LAST="Arrow Last" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_LEFT="Arrow Left" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_LEFT_FOUR="Arrow Left 4" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_LEFT_THREE="Arrow Left 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_LEFT_TWO="Arrow Left 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_RIGHT="Arrow Right" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_RIGHT_FOUR="Arrow Right 4" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_RIGHT_THREE="Arrow Right 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_RIGHT_TWO="Arrow Right 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_UP="Arrow Up" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_UP_FOUR="Arrow Up 4" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_UP_THREE="Arrow Up 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ARROW_UP_TWO="Arrow Up 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ATTACHMENT="Attachment" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR="Author" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_DESCRIPTION="The Author's Name & Surname." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT="Author Name & Surname Here" @@ -2860,25 +3961,10 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL="Author" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACK="Back" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKWARD_CIRCLE="Backward Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BAN_CIRCLE="Ban Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BARS="Bars" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BASKET="Basket" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BEFORE="Before" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BEFORE_DESCRIPTION="Select before what admin view this one should be placed" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BEFORE_LABEL="Order Before" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM="Bom" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_DESCRIPTION="Select the file that should be used for licensing all files (files found in: administrator/components/com_componentbuilder/compiler)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL="Licensing Template" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOOK="Book" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOOKMARK="Bookmark" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOOKMARK_TWO="Bookmark 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOTH="Both" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOX_ADD="Box Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOX_REMOVE="Box Remove" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BRIEFCASE="Briefcase" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BRUSH="Brush" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUBBLE_QUOTE="Bubble Quote" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP="Buildcomp" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL="Buildcompsql" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_DESCRIPTION="Add your MySQL here!" @@ -2887,38 +3973,14 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL="MySQL" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_DESCRIPTION="To build the component fields and back-end views dynamically using a mySQL table file." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_LABEL="Build Backend-views Dynamically" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CALENDAR="Calendar" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CALENDAR_THREE="Calendar 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CALENDAR_TWO="Calendar 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CAMERA="Camera" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CAMERA_TWO_VIDEO="Camera 2 / Video" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CANCEL_CIRCLE="Cancel Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CART="Cart" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHART="Chart" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKBOX="Checkbox" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKBOX_PARTIAL="Checkbox Partial" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKBOX_UNCHECKED="Checkbox Unchecked" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKIN_DESCRIPTION="Select if the items of this view should automatically be checked in." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKIN_LABEL="Auto Check-in" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKMARK_CIRCLE="Checkmark Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CHECKMARK_TWO="Checkmark 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CIRCLE="Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLOCK="Clock" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COG="Cog" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COGS="Cogs" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMMENT="Comment" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMMENTS_TWO="Comments 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME="Companyname" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_DESCRIPTION="Enter Company Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT="Company Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL="Company Name" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPASS="Compass" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION="Component Version" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_DESCRIPTION="Add Version Number Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_HINT="1.0.0" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL="Version" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CONTRACT="Contract" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CONTRACT_TWO="Contract 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT="Copyright" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_DESCRIPTION="Add Copyright Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_HINT="Add Copyright Here" @@ -2929,47 +3991,23 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DATE_DESC="The date this Joomla Co COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DATE_LABEL="Created Date" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER="Creatuserhelper" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL="Add Create User Helper Method" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREDIT="Credit" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREDIT_TWO="Credit 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS="Css" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_DESCRIPTION="Add your CSS here! [Do not add the style tags]" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_HINT="// CSS for the entire back-end" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_LABEL="CSS" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUBE="Cube" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOMADMINVIEW="Customadminview" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOMADMINVIEW_DESCRIPTION="Select a custom admin view" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOMADMINVIEW_LABEL="View" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_ADMIN_VIEWS="Custom Admin Views" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE="Custom (used in custom code)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_VALUE_DESCRIPTION="Enter custom value in needed" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_VALUE_HINT="Custom Value Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_VALUE_LABEL="Custom Value" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD="Dashboard" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_ADD_DESCRIPTION="Select if the view should show on the dashboard." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_ADD_LABEL="Dashboard (add record)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_LIST_DESCRIPTION="Select if the view should show on the dashboard." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_LIST_LABEL="Dashboard (list of records)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TAB="Dashboard Tab" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TAB_LABEL="Dashboard Tabs" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TAB_SELECT="Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DATABASE="Database" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR="Debug Linenr" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_DESCRIPTION="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL="Debug (line numbers)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT_VIEW_DESCRIPTION="Select only one." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT_VIEW_LABEL="Default View" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DELETE="Delete" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION="Description" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_DESCRIPTION="Add Description Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_HINT="Add Description Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DETAILS="Details" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DOWNLOAD="Download" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_BUILD_BETA="Dynamic Build (beta)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_INTEGRATION="Dynamic Integration" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT="Editing the Joomla Component" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT_CREATE_SITE_VIEW_DESCRIPTION="add site edit & create view for this admin view" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT_CREATE_SITE_VIEW_LABEL="Edit/Create Site View" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL="Email" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Email" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="demo@example.com" @@ -2977,15 +4015,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Email" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS="Emptycontributors" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION="Set if a list of empty contributor fields should be added." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL="Empty Contributor Fields" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ENTER="Enter" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ENVELOPE="Envelope" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ENVELOPE_OPENED="Envelope Opened" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EQUALIZER="Equalizer" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ERROR_UNIQUE_ALIAS="Another Joomla Component has the same alias." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXIT="Exit" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPAND="Expand" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPAND_TWO="Expand 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPIRED="Expired" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK="Export Buy Link" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_DESCRIPTION="Enter link where your JCB package key can be bought." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_HINT="http://www.example.com/buy-keys" @@ -3000,82 +4030,20 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK="Export Package Link" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK_DESCRIPTION="Enter link where you latest JCB package can be found" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK_HINT="http://www.example.com/buy-package" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK_LABEL="Package Link
(to get updated package)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EYE_CLOSE="Eye Close" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EYE_OPEN="Eye Open" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FEATURED="Featured" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FEED="Feed" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FIELD="Field" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FIELD_DESCRIPTION="Select a field" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FIELD_LABEL="Field" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE="File" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_ADD="File Add" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_CHECK="File Check" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_DESCRIPTION="Add the files to custom folder" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_LABEL="File" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_MINUS="File Minus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_REMOVE="File Remove" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILE_TWO="File 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FILTER="Filter" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FIRST="First" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FLAG="Flag" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FLAG_THREE="Flag 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FLASH="Flash" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER="Folder" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_CLOSE="Folder Close" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_DESCRIPTION="Add the folder to custom folder" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_LABEL="Folder" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_MINUS="Folder Minus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_OPEN="Folder Open" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_PLUS="Folder Plus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_PLUS_TWO="Folder Plus 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_REMOVE="Folder Remove" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FOLDER_THREE="Folder 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FORWARD_CIRCLE="Forward Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FORWARD_TWO="Forward 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FRONT="Front" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FTP="FTP" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GENERIC="Generic" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GRID="Grid" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GRID_TWO="Grid 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HEADER_DESCRIPTION="Enter Header Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HEADER_HINT="Header Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HEADER_LABEL="Header" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HEALTH="Health" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HEART="Heart" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HEART_TWO="Heart 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HISTORY_DESCRIPTION="Select if the items of this view should keep a history of item changes." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HISTORY_LABEL="Keep History" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HOME="Home" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HOME_TWO="Home 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HTML_HINT="// Add the tab HTML here. To access php values methodname->value; ?>" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_HTML_LABEL="HTML" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ICOMOON_DESCRIPTION="Joomla Standard Icomoon Fonts" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ICOMOON_LABEL="Icon" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ICON_DESCRIPTION="Add the icon to the image folder and select it here (128 x 128px)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ICON_LABEL="Icon" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID="Id" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IDS_DESCRIPTION="if id option selected" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IDS_HINT="// 1 => 500 or 1,2,3,4 or 1 => 4,20,40 => 90" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IDS_LABEL="ID's" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID_BASED="ID Based" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGES="Images" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import components button." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INFO="Info" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INFO_CIRCLE="Info Circle" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT="Javascript" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add your JavaScript here! [Do not add the script tags]" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_HINT="// JavaScript for the entire back-end" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL="Javascript" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_EXPORT_PACKAGE_NOTE_DESCRIPTION="The settings below are used when you export this component as a JCB Package, for more info on how this works please review the following tutorial (https://youtu.be/lkE0ZiSWufg)." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_EXPORT_PACKAGE_NOTE_LABEL="JCB Package Export Settings" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA="Joomla" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_KEY="Key" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LAMP="Lamp" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LAST="Last" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LIBS_HELPERS="Libs & Helpers" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE="License" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_DESCRIPTION="Add License Here" @@ -3084,41 +4052,15 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL="License" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE="License Type" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_DESCRIPTION="How should the license be implemented." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_LABEL="Implementation" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LINK="Link" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LINK_DESCRIPTION="Enter menu link" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LINK_HINT="Menu Link Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LINK_LABEL="Link" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LIST="List" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LIST_TWO="List 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCATION="Location" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCK="Lock" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCK_DOWN_USE_USED_TO_VERIFY_OWNERSHIP="Lock Down Use (used to verify ownership)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOOP="Loop" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MAINMENU_DESCRIPTION="Select if the view should show in the main menu." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MAINMENU_LABEL="Main Menu" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU="Menu" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_DESCRIPTION="Select if the view should show have a menu link." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_LABEL="Add Menu" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_THREE="Menu 3" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_TWO="Menu 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_METADATA_DESCRIPTION="Select if this view should have metadata." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_METADATA_LABEL="Has Metadata" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MINUS="Minus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MINUS_SIGN="Minus Sign" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MOBILE="Mobile" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_BY_DESC="The last user that modified this Joomla Component." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_DATE_DESC="The date this Joomla Component was modified." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_DATE_LABEL="Modified Date" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MOVE="Move" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MUSIC="Music" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE="Mvc Versiondate" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_DESCRIPTION="Use the modified date, and version number of the view/fields instead of the global version in related files." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL="Use View Version & Date" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MYSQL="MySQL" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MYSQL_DESCRIPTION="Update Dump" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MYSQL_HINT="// MySQL for update or blank for none" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MYSQL_LABEL="MySQL" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME="Name" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE="Name Code" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_DESCRIPTION="Add Name in Code Here" @@ -3128,27 +4070,33 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_DESCRIPTION="Enter Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_LABEL="Name" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW="A New Joomla Component" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW_TAB="New Tab" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW_TAB_TWO="New Tab 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEXT="Next" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO="No" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NONE="None" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_CONFIG_DESCRIPTION="You can add custom config fields to the component here. The normal Global config is already being added so only add custom fields that you would like to use in custom scripts." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_CONFIG_DESCRIPTION="You can add custom config fields to the component here. The normal Global config is already being added so only add custom fields that you would like to use in custom scripts." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_CONFIG_LABEL="Adding Custom Config Fields" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_CUSTOM_MENUS_DESCRIPTION="You can add custom menus to the component here. The normal Menus are already being added so only add custom Menus that you would like to use for custom scripts." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_CUSTOM_MENUS_DESCRIPTION="You can add custom menus to the component here. The normal Menus are already being added so only add custom Menus that you would like to use for custom scripts." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_CUSTOM_MENUS_LABEL="Adding Custom Menus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_FILES_DESCRIPTION="You can add custom files to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_FILES_LABEL="Adding Custom Files" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_FOLDERS_DESCRIPTION="You can add custom folders to the component, simply add the folders to the administrator/components/com_componentbuilder/custom folder and then select them here." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ADD_FOLDERS_LABEL="Adding Custom Folders" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_DESCRIPTION="

You can add more tabs to the component dashboard.

" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_LABEL="Customize the Component Dashboard" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION="You can dynamically build the components back-end views and fields by adding a mySql table dump, that has all the tables, or some more tables with its columns and data types. A very basic and generic set of fields and tables will be created, and added to the existing fields and tables of this component." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL="Dynamic Builder (mySql) Option" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_DESCRIPTION="In each admin view you can add data from a MySQL Table (this is done in the admin view MySQL tab). Here you can limit that data in relation to this component. This feature is useful when an admin view with demo data is used in more then one component, and you would like to exclude some demo data without creating a new admin view." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_DESCRIPTION="You can add custom files and folders to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_LABEL="Adding Custom Files & Folder" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DISPLAY_COMPONENT_ADMIN_VIEWS_DESCRIPTION="

Linked Admin Views

Display of the admin views will load here!
" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DISPLAY_COMPONENT_CUSTOM_ADMIN_VIEWS_DESCRIPTION="

Linked Custom Admin Views

Display of the custom admin views will load here!
" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DISPLAY_COMPONENT_SITE_VIEWS_DESCRIPTION="

Linked Site Views

Display of the site views will load here!
" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_DESCRIPTION="We have moved the views in to their own tabs for your convenience." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_LABEL="To add views, please open the corresponding tab." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_DESCRIPTION="In each admin view you can add data from a MySQL Table (this is done in the admin view MySQL tab). Here you can limit that data in relation to this component. This feature is useful when an admin view with demo data is used in more then one component, and you would like to exclude some demo data without creating a new admin view." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_LABEL=" MySql Tweak Options" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_ADMIN_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_ADMIN_VIEWS_LABEL="Setting Admin Views" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_CONTRIBUTORS_DESCRIPTION="Only add contributors if you would like them listed on the component dashboard." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_CONTRIBUTORS_LABEL="Setting Contributors" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_VIEWS_DESCRIPTION="Do not add the same view twice it will not work." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_VIEWS_LABEL="Setting Views" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_CUSTOM_ADMIN_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_CUSTOM_ADMIN_VIEWS_LABEL="Setting Custom Admin Views" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_SITE_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_SITE_VIEWS_LABEL="Setting Site Views" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_DESCRIPTION="

Need help, visit Markdown-Cheatsheet

# ###Component_name### (###VERSION###)
@@ -3213,41 +4161,17 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_ZIP_DESCRIPTION="T COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL="The ZIP Option" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_DESCRIPTION="You can use WHMCS licensing addon in your component
Helpful Links
https://www.whmcs.com/addons/licensing-addon/
http://docs.whmcs.com/Licensing_Addon" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_LABEL="Licensing addon module for WHMCS" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTIFICATION="Notification" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTIFICATION_CIRCLE="Notification Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTNEW_DESCRIPTION="Should file be updated." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTNEW_LABEL="Update" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOT_REQUIRED="Not Required" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NUMBER="Number" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NUMBER_LABEL="Number" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ORDER_DESCRIPTION="Overide the default order" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ORDER_LABEL="Order" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OTHER="Other" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PALETTE="Palette" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PARAGRAPH_CENTER="Paragraph Center" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PARAGRAPH_JUSTIFY="Paragraph Justify" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PARAGRAPH_LEFT="Paragraph Left" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PARAGRAPH_RIGHT="Paragraph Right" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled file to see the structure. " -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PATH_HINT="Target Path Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PATH_LABEL="Target Path" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PAUSE="Pause" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PAUSE_CIRCLE="Pause Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PENCIL="Pencil" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PENCIL_TWO="Pencil 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PERMISSION="Permissions" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHONE="Phone" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHONE_TWO="Phone 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP="PHP" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT="Php Admin Event" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_DESCRIPTION="PHP script for the global helper admin event method." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_HINT="// add custom PHP script to the global helper admin event method." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL="Global Helper Admin Event" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_DASHBOARD_METHODS="Php Dashboard Methods" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_DASHBOARD_METHODS_DESCRIPTION="PHP methods to place in the dashboard model." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_DASHBOARD_METHODS_HINT="// add custom PHP methods to dashboard model. Use the [public function getMethodname()] to insure the data is set to the view, note the convention [public function get...()] replace the .... with the unique method name." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_DASHBOARD_METHODS_LABEL="PHP Dashboard Methods" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN="Php Helper Admin" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_DESCRIPTION="Add your PHP here! [Do not add the php tags]" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_HINT="// The PHP abstract Methods to add to the component helper class. Only Methods! as it will directly be add as methods to the helper class!" @@ -3284,97 +4208,30 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT="Php Site Event" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_DESCRIPTION="PHP script for the global helper site event method." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_HINT="// add custom PHP script to the global helper site event method." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL="Global Helper Site Event" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PIE="Pie" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PIN="Pin" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PLAY="Play" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PLAY_CIRCLE="Play Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PLUS="Plus" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PLUS_CIRCLE="Plus Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PORT_DESCRIPTION="add import/export option to this admin view." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PORT_LABEL="Export/Import Data" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_POWER_CORD="Power Cord" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREVIOUS="Previous" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PRINT="Print" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLIC_DESCRIPTION="if view uses Access,
should default be public." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLIC_LABEL="Public Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISH="Publish" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING="Publishing" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PURGE="Purge" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUZZLE="Puzzle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_QUESTION="Question" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_QUESTION_TWO="Question 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_QUOTES_LEFT="Quotes Left" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_QUOTES_RIGHT="Quotes Right" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RADIO_UNCHECKED="Radio Unchecked" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README="Readme" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL="README.md" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RENAME_LABEL="Rename" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REPLY="Reply" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP="Sales Server Ftp" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_DESCRIPTION="Select your sales server (FTP) for this component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_LABEL="Sales Server (FTP)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SAVE_COPY="Save Copy" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SAVE_NEW="Save New" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Component to customise the alias." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SCISSORS="Scissors" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SCREEN="Screen" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SCREWDRIVER="Screwdriver" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SEARCH="Search" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SELECT_AN_OPTION="Select an option" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SETTINGS="Settings" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHARE="Share" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHARE_ALT="Share Alt" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHIELD="Shield" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION="Short Description" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_DESCRIPTION="Enter short description" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_HINT="Your Short Description Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_LABEL="Short Description" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHOW_DESCRIPTION="Select where you want this contributor to show in the component." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHOW_LABEL="Show" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHUFFLE="Shuffle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SIGNUP="Signup" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SITEVIEW="Siteview" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SITEVIEW_DESCRIPTION="Select a site view" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SITEVIEW_LABEL="View" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SITE_VIEWS="Site Views" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SMILEY="Smiley" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SMILEY_NEUTRAL="Smiley Neutral" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SMILEY_NEUTRAL_TWO="Smiley Neutral 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SMILEY_SAD="Smiley Sad" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SMILEY_SAD_TWO="Smiley Sad 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SMILEY_TWO="Smiley 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL="Sql" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_DESCRIPTION="Add your MySQL here!" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_HINT="// Add MySQL Table Dump Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL="MySQL" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_TWEAK="Sql Tweak" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_TWEAK_DESCRIPTION="Tweak the view MySql dump settings." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_TWEAK_LABEL="MySql (tweak)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_TWEAK_SELECT="Open" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQUARE="Square" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STACK="Stack" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STAR_TWO="Star 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STATUS="Status" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STOP="Stop" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STOP_CIRCLE="Stop Circle" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SUBMENU_DESCRIPTION="Select if the view should show in the submenu." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SUBMENU_LABEL="Submenu" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SUPPORT="Support" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SWITCH="Switch" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME="System Name" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_DESCRIPTION="Used only in the system." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_HINT="The System Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_LABEL="System Name" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TABLET="Tablet" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TABNAME_DESCRIPTION="The name of the tab this field belongs to." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TABNAME_HINT="Global" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TABNAME_LABEL="Tab Name" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TAG="Tag" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TAGS="Tags" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TAGS_TWO="Tags 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TAG_TWO="Tag 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_THUMBS_DOWN="Thumbs Down" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_THUMBS_UP="Thumbs Up" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_DESCRIPTION="Enter contributor's title in relation to this component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_HINT="Contributor's Role" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_LABEL="Job Title" @@ -3385,15 +4242,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TOIGNORE_LABEL="Repository Folders or File COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TO_IGNORE_NOTE_DESCRIPTION="During compilation JCB deletes all files and folders from the repository folder, and then adds the newly created files and folders back into the repository folder. Yet there may be files or folders you may not want deleted, like the .git folder, since JCB does not dynamically create that folder and so it will not be placed back, but simply delete it, unless you add it in this text field below, so that it will be ignored, and therefore not deleted in the first place. You can add multiple folders and files, separated by commas. Like: .git, .hg" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TO_IGNORE_NOTE_LABEL="Repository Folders or Files to Ignore" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION="Translation" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TREE="Tree" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TREE_TWO="Tree 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNARCHIVE="Unarchive" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNBLOCK="Unblock" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNDO="Undo" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNDO_TWO="Undo 2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNFEATURED="Unfeatured" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNLOCK="Unlock" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UNPUBLISH="Unpublish" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATES_USED_IN_JOOMLA_UPDATER="Updates (used in Joomla updater)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER="Update Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_DESCRIPTION="Enter Update Server URL" @@ -3405,28 +4253,12 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_LABEL="Update Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET="Update Server Target" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_DESCRIPTION="Select the type of way you would like the update server to be set." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL="Update Server Target" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPLOAD="Upload" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_URL_DESCRIPTION="Enter Download Link" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_URL_HINT="http://www.example.com/file.zip" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_URL_LABEL="Version URL" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USER="User" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USERS="Users" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_DESCRIPTION="How should we link to this contributor." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_LABEL="Use" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VCARD="Vcard" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_DESC="A count of the number of times this Joomla Component has been revised." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_DESCRIPTION="1.0.0" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_HINT="1.0.0" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_LABEL="SQL Update Version" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_UPDATE="Version Update" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_UPDATE_LABEL="Version Updates" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_UPDATE_SELECT="Add Update SQL" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VTHREE="V3" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VTWO="V2" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WAND="Wand" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WARNING="Warning" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WARNING_CIRCLE="Warning Circle" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE="Website" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com" @@ -3439,13 +4271,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL="Whmcs Url" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_DESCRIPTION="Enter whmcs address" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_HINT="http://www.yoursite.com/whmcs" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_LABEL="URL to your WHMCS install" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WIFI="Wifi" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WRENCH="Wrench" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES="Yes" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YOUTUBE="Youtube" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP="ZIP" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZOOM_IN="Zoom In" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZOOM_OUT="Zoom Out" +COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History" COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" COM_COMPONENTBUILDER_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -" COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE="- Keep Original State -" @@ -3711,6 +4539,11 @@ COM_COMPONENTBUILDER_LEFT_IN_TAB="Left in Tab" COM_COMPONENTBUILDER_LEFT_OF_TABS="Left of Tabs" COM_COMPONENTBUILDER_LICENSE="License" COM_COMPONENTBUILDER_LICENSE_S="License: %s" +COM_COMPONENTBUILDER_LINK="Link" +COM_COMPONENTBUILDER_MAIN_MENU="Main Menu" +COM_COMPONENTBUILDER_MATCH_BEHAVIOR="Match Behavior" +COM_COMPONENTBUILDER_MATCH_FIELD="Match Field" +COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options" COM_COMPONENTBUILDER_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)" COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)" COM_COMPONENTBUILDER_NEW="New" @@ -3724,14 +4557,18 @@ COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested." -COM_COMPONENTBUILDER_NO_FIELD_FOUND="No Field Found" +COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found" COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found" COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here." COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPENED="opened" COM_COMPONENTBUILDER_OPENED_THIS="opened this" COM_COMPONENTBUILDER_OPEN_ON_GITHUB="Open on Github" +COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before" +COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit" +COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views" COM_COMPONENTBUILDER_OUT_OF_DATE="Out of date" COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set" COM_COMPONENTBUILDER_OWNER_S="Owner: %s" @@ -3739,11 +4576,15 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details" COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!" COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set" COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: %s
%s %s" +COM_COMPONENTBUILDER_PERMISSIONS="Permissions" COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)" COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)" COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile." COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder" +COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access" +COM_COMPONENTBUILDER_PUBLISHED="Published" +COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_RELEASED_THIS="released this" COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github" @@ -3752,6 +4593,7 @@ COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab" COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs" COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved." COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another." +COM_COMPONENTBUILDER_SEARCHABLE="Searchable" COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile" COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code." COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?" @@ -4297,6 +5139,8 @@ COM_COMPONENTBUILDER_SNIPPET_USAGE_LABEL="Usage" COM_COMPONENTBUILDER_SNIPPET_VERSION_DESC="A count of the number of times this Snippet has been revised." COM_COMPONENTBUILDER_SNIPPET_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_SORRY_THIS_FUNCTION_NAME_IS_ALREADY_IN_USE="Sorry this function name is already in use!" +COM_COMPONENTBUILDER_SORTABLE="Sortable" +COM_COMPONENTBUILDER_SUBMENU="Submenu" COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_SUBMENU_COMPILER="Compiler" COM_COMPONENTBUILDER_SUBMENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views" @@ -4316,6 +5160,10 @@ COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates" COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported" COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED="%s, please wait! The component is being compiled" +COM_COMPONENTBUILDER_TAB="Tab" +COM_COMPONENTBUILDER_TARGET_BEHAVIOR="Target Behavior" +COM_COMPONENTBUILDER_TARGET_FIELDS="Target Field/s" +COM_COMPONENTBUILDER_TARGET_RELATION="Target Relation" COM_COMPONENTBUILDER_TEMPLATE="Template" COM_COMPONENTBUILDER_TEMPLATES="Templates" COM_COMPONENTBUILDER_TEMPLATES_ACCESS="Templates Access" @@ -4422,6 +5270,15 @@ COM_COMPONENTBUILDER_TEMPLATE_YES="Yes" COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!" +COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views" +COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config" +COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus" +COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_VIEWS="The component custom admin views" +COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD="The component dashboard" +COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS="The component files & folders" +COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks" +COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views" +COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates" COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package." COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: %s" @@ -4429,9 +5286,11 @@ COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s" COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading" COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading" COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." +COM_COMPONENTBUILDER_TITLE="Title" COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_TRASHED="Trashed" COM_COMPONENTBUILDER_TYPE_ERROR="Type Error" COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs" @@ -4442,6 +5301,8 @@ COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch co COM_COMPONENTBUILDER_USE_KEY="Use Key" COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board" COM_COMPONENTBUILDER_VERSION="Version" +COM_COMPONENTBUILDER_VIEW="View" +COM_COMPONENTBUILDER_VIEWS="Views" COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github" COM_COMPONENTBUILDER_WEBSITE="Website" 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 2a16ad8a9..f4fd7fd63 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -77,6 +77,186 @@ COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List" COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Compiler" COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu" COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to update the submenu of the Compiler" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE="Components Admin Views Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_CREATE="Components Admin Views Create" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_CREATE_DESC="Allows the users in this group to create create components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_DELETE="Components Admin Views Delete" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_DELETE_DESC="Allows the users in this group to delete delete components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT="Components Admin Views Edit" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_BY="Components Admin Views Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_DATE="Components Admin Views Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_DESC="Allows the users in this group to edit the component admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN="Components Admin Views Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components admin views created by them" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_STATE="Components Admin Views Edit State" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component admin views" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_VERSION="Components Admin Views Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components admin views" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_ACCESS="Components Config Access" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_ACCESS_DESC="Allows the users in this group to access access components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_USE="Components Config Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_CREATE="Components Config Create" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_CREATE_DESC="Allows the users in this group to create create components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_DELETE="Components Config Delete" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_DELETE_DESC="Allows the users in this group to delete delete components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT="Components Config Edit" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_BY="Components Config Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_DATE="Components Config Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_DESC="Allows the users in this group to edit the component config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_OWN="Components Config Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_OWN_DESC="Allows the users in this group to edit edit own components config created by them" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_STATE="Components Config Edit State" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_STATE_DESC="Allows the users in this group to update the state of the component config" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_VERSION="Components Config Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components config" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_ACCESS="Components Custom Admin Menus Access" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_ACCESS_DESC="Allows the users in this group to access access components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_USE="Components Custom Admin Menus Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_CREATE="Components Custom Admin Menus Create" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_CREATE_DESC="Allows the users in this group to create create components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_DELETE="Components Custom Admin Menus Delete" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_DELETE_DESC="Allows the users in this group to delete delete components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT="Components Custom Admin Menus Edit" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_BY="Components Custom Admin Menus Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_DATE="Components Custom Admin Menus Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_DESC="Allows the users in this group to edit the component custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_OWN="Components Custom Admin Menus Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components custom admin menus created by them" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_STATE="Components Custom Admin Menus Edit State" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_VERSION="Components Custom Admin Menus Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components custom admin menus" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_ACCESS="Components Custom Admin Views Access" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_USE="Components Custom Admin Views Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_CREATE="Components Custom Admin Views Create" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_CREATE_DESC="Allows the users in this group to create create components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_DELETE="Components Custom Admin Views Delete" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_DELETE_DESC="Allows the users in this group to delete delete components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT="Components Custom Admin Views Edit" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_BY="Components Custom Admin Views Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_DATE="Components Custom Admin Views Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_DESC="Allows the users in this group to edit the component custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_OWN="Components Custom Admin Views Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components custom admin views created by them" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_STATE="Components Custom Admin Views Edit State" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_VERSION="Components Custom Admin Views Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components custom admin views" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_ACCESS="Components Dashboard Access" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_ACCESS_DESC="Allows the users in this group to access access components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_USE="Components Dashboard Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_CREATE="Components Dashboard Create" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_CREATE_DESC="Allows the users in this group to create create components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_DELETE="Components Dashboard Delete" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_DELETE_DESC="Allows the users in this group to delete delete components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT="Components Dashboard Edit" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_BY="Components Dashboard Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_DATE="Components Dashboard Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_DESC="Allows the users in this group to edit the component dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_OWN="Components Dashboard Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_OWN_DESC="Allows the users in this group to edit edit own components dashboard created by them" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_STATE="Components Dashboard Edit State" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_STATE_DESC="Allows the users in this group to update the state of the component dashboard" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_VERSION="Components Dashboard Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components dashboard" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_ACCESS="Components Files Folders Access" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_ACCESS_DESC="Allows the users in this group to access access components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_USE="Components Files Folders Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_CREATE="Components Files Folders Create" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_CREATE_DESC="Allows the users in this group to create create components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_DELETE="Components Files Folders Delete" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_DELETE_DESC="Allows the users in this group to delete delete components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT="Components Files Folders Edit" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_BY="Components Files Folders Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_DATE="Components Files Folders Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_DESC="Allows the users in this group to edit the component files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_OWN="Components Files Folders Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components files folders created by them" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_STATE="Components Files Folders Edit State" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component files folders" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_VERSION="Components Files Folders Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components files folders" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_ACCESS="Components Mysql Tweaks Access" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_ACCESS_DESC="Allows the users in this group to access access components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_USE="Components Mysql Tweaks Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_CREATE="Components Mysql Tweaks Create" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_CREATE_DESC="Allows the users in this group to create create components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_DELETE="Components Mysql Tweaks Delete" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_DELETE_DESC="Allows the users in this group to delete delete components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT="Components Mysql Tweaks Edit" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_BY="Components Mysql Tweaks Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_DATE="Components Mysql Tweaks Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_DESC="Allows the users in this group to edit the component mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_OWN="Components Mysql Tweaks Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components mysql tweaks created by them" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE="Components Mysql Tweaks Edit State" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION="Components Mysql Tweaks Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components mysql tweaks" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS="Components Site Views Access" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE="Components Site Views Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE="Components Site Views Create" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE_DESC="Allows the users in this group to create create components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_DELETE="Components Site Views Delete" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_DELETE_DESC="Allows the users in this group to delete delete components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT="Components Site Views Edit" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_BY="Components Site Views Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_DATE="Components Site Views Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_DESC="Allows the users in this group to edit the component site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_OWN="Components Site Views Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components site views created by them" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_STATE="Components Site Views Edit State" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component site views" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_VERSION="Components Site Views Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components site views" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_ACCESS="Components Updates Access" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_ACCESS_DESC="Allows the users in this group to access access components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_USE="Components Updates Batch Use" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_CREATE="Components Updates Create" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_CREATE_DESC="Allows the users in this group to create create components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_DELETE="Components Updates Delete" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_DELETE_DESC="Allows the users in this group to delete delete components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT="Components Updates Edit" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_BY="Components Updates Edit Created By" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_DATE="Components Updates Edit Created Date" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_DESC="Allows the users in this group to edit the component updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_OWN="Components Updates Edit Own" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_OWN_DESC="Allows the users in this group to edit edit own components updates created by them" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_STATE="Components Updates Edit State" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the component updates" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_VERSION="Components Updates Edit Version" +COM_COMPONENTBUILDER_COMPONENTS_UPDATES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components updates" COM_COMPONENTBUILDER_CONFIGURATION="Component Builder Configuration" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_ACCESS="Custom Admin Views Access" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access custom admin views" diff --git a/admin/layouts/admin_fields/fields_above.php b/admin/layouts/admin_fields/fields_above.php index 9e61e72a7..84cf93e9b 100644 --- a/admin/layouts/admin_fields/fields_above.php +++ b/admin/layouts/admin_fields/fields_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_above.php diff --git a/admin/layouts/admin_fields/fields_fullwidth.php b/admin/layouts/admin_fields/fields_fullwidth.php index c70763c94..f78cda3bc 100644 --- a/admin/layouts/admin_fields/fields_fullwidth.php +++ b/admin/layouts/admin_fields/fields_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php diff --git a/admin/layouts/admin_fields/publishing.php b/admin/layouts/admin_fields/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/admin_fields/publishing.php +++ b/admin/layouts/admin_fields/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/admin_fields/publlshing.php b/admin/layouts/admin_fields/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/admin_fields/publlshing.php +++ b/admin/layouts/admin_fields/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/admin_fields_conditions/conditions_above.php b/admin/layouts/admin_fields_conditions/conditions_above.php index 1c8421ef8..0ade4b2f8 100644 --- a/admin/layouts/admin_fields_conditions/conditions_above.php +++ b/admin/layouts/admin_fields_conditions/conditions_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage conditions_above.php diff --git a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php index 68e5f629c..7031b5a00 100644 --- a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php +++ b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage conditions_fullwidth.php diff --git a/admin/layouts/admin_fields_conditions/publishing.php b/admin/layouts/admin_fields_conditions/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/admin_fields_conditions/publishing.php +++ b/admin/layouts/admin_fields_conditions/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/admin_fields_conditions/publlshing.php b/admin/layouts/admin_fields_conditions/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/admin_fields_conditions/publlshing.php +++ b/admin/layouts/admin_fields_conditions/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index 98c56d307..f4278dd76 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage css_fullwidth.php diff --git a/admin/layouts/admin_view/custom_buttons_fullwidth.php b/admin/layouts/admin_view/custom_buttons_fullwidth.php index 524507c63..c1f1fad70 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/admin_view/custom_buttons_left.php b/admin/layouts/admin_view/custom_buttons_left.php index 1943b6a00..b4f873c84 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/admin_view/custom_import_fullwidth.php b/admin/layouts/admin_view/custom_import_fullwidth.php index 5c54400db..f535db2f6 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_import_fullwidth.php diff --git a/admin/layouts/admin_view/details_above.php b/admin/layouts/admin_view/details_above.php index c3abf1866..759c1e10c 100644 --- a/admin/layouts/admin_view/details_above.php +++ b/admin/layouts/admin_view/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/admin_view/details_left.php b/admin/layouts/admin_view/details_left.php index beeeb1249..9a873c882 100644 --- a/admin/layouts/admin_view/details_left.php +++ b/admin/layouts/admin_view/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/admin_view/details_right.php b/admin/layouts/admin_view/details_right.php index c9eb90ea3..74d44185c 100644 --- a/admin/layouts/admin_view/details_right.php +++ b/admin/layouts/admin_view/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/admin_view/details_under.php b/admin/layouts/admin_view/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/admin_view/details_under.php +++ b/admin/layouts/admin_view/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/admin_view/fields_conditions_fullwidth.php b/admin/layouts/admin_view/fields_conditions_fullwidth.php index 4746a0da3..013c4d01b 100644 --- a/admin/layouts/admin_view/fields_conditions_fullwidth.php +++ b/admin/layouts/admin_view/fields_conditions_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_conditions_fullwidth.php diff --git a/admin/layouts/admin_view/fields_conditions_left.php b/admin/layouts/admin_view/fields_conditions_left.php index 45454fb0c..fc367e9da 100644 --- a/admin/layouts/admin_view/fields_conditions_left.php +++ b/admin/layouts/admin_view/fields_conditions_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_conditions_left.php diff --git a/admin/layouts/admin_view/fields_conditions_right.php b/admin/layouts/admin_view/fields_conditions_right.php index ffcc671de..8713fb471 100644 --- a/admin/layouts/admin_view/fields_conditions_right.php +++ b/admin/layouts/admin_view/fields_conditions_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_conditions_right.php diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index d0c7bab24..13b6d36fd 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage javascript_fullwidth.php diff --git a/admin/layouts/admin_view/linked_components_fullwidth.php b/admin/layouts/admin_view/linked_components_fullwidth.php deleted file mode 100644 index 4745da795..000000000 --- a/admin/layouts/admin_view/linked_components_fullwidth.php +++ /dev/null @@ -1,138 +0,0 @@ - - @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'); - -// set the defaults -$items = $displayData->vxzlinked_components; -$user = JFactory::getUser(); -$id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; - -?> -
- - - - - - - - - - - - - - - - $item): ?> - authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = JFactory::getUser($item->checked_out); - $canDo = ComponentbuilderHelper::getActions('joomla_component',$item,'joomla_components'); - ?> - - - - - - - - published == 1):?> - - published == 0):?> - - published == 2):?> - - published == -2):?> - - - - - - -
- - - - - - - - - - - - - - - -
- get('joomla_component.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?> - - -
escape($item->system_name); ?>
- -
- escape($item->name_code); ?> - - escape($item->component_version); ?> - - escape($item->short_description); ?> - - escape($item->companyname); ?> - - escape($item->author); ?> - - - - - - - - - - - - - - - - - - id; ?> -
- -
- -
- -
diff --git a/admin/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index 861df5159..f0602b0bc 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_fullwidth.php diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index f857eb5bd..d7ff8d593 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_left.php diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index b2ec70ebc..48d1a10ad 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/admin_view/publishing.php b/admin/layouts/admin_view/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/admin_view/publlshing.php b/admin/layouts/admin_view/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/admin_view/settings_fullwidth.php b/admin/layouts/admin_view/settings_fullwidth.php index 449100827..7d59f72d4 100644 --- a/admin/layouts/admin_view/settings_fullwidth.php +++ b/admin/layouts/admin_view/settings_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_fullwidth.php diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index e5f637e40..09ed8f8fc 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage batchselection.php diff --git a/admin/layouts/component_admin_views/index.html b/admin/layouts/component_admin_views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_admin_views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_admin_views/publishing.php b/admin/layouts/component_admin_views/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_admin_views/publishing.php @@ -0,0 +1,58 @@ + + @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/component_admin_views/publlshing.php b/admin/layouts/component_admin_views/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_admin_views/publlshing.php @@ -0,0 +1,60 @@ + + @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/language_translation/details_above.php b/admin/layouts/component_admin_views/views_above.php similarity index 93% rename from admin/layouts/language_translation/details_above.php rename to admin/layouts/component_admin_views/views_above.php index 1af7819cb..4fcb6e5c1 100644 --- a/admin/layouts/language_translation/details_above.php +++ b/admin/layouts/component_admin_views/views_above.php @@ -10,11 +10,11 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder - @subpackage details_above.php + @subpackage views_above.php @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = array( - 'components' + 'joomla_component' ); ?> diff --git a/admin/layouts/component_admin_views/views_fullwidth.php b/admin/layouts/component_admin_views/views_fullwidth.php new file mode 100644 index 000000000..b83507eda --- /dev/null +++ b/admin/layouts/component_admin_views/views_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_admin_views', + 'addadmin_views' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_config/index.html b/admin/layouts/component_config/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_config/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_config/publishing.php b/admin/layouts/component_config/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_config/publishing.php @@ -0,0 +1,58 @@ + + @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/component_config/publlshing.php b/admin/layouts/component_config/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_config/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_config/tweaks_above.php b/admin/layouts/component_config/tweaks_above.php new file mode 100644 index 000000000..1cf1fb850 --- /dev/null +++ b/admin/layouts/component_config/tweaks_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_config/tweaks_fullwidth.php b/admin/layouts/component_config/tweaks_fullwidth.php new file mode 100644 index 000000000..f69325b7d --- /dev/null +++ b/admin/layouts/component_config/tweaks_fullwidth.php @@ -0,0 +1,48 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'addconfig' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_custom_admin_menus/index.html b/admin/layouts/component_custom_admin_menus/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_custom_admin_menus/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_custom_admin_menus/publishing.php b/admin/layouts/component_custom_admin_menus/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_custom_admin_menus/publishing.php @@ -0,0 +1,58 @@ + + @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/component_custom_admin_menus/publlshing.php b/admin/layouts/component_custom_admin_menus/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_custom_admin_menus/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_custom_admin_menus/tweaks_above.php b/admin/layouts/component_custom_admin_menus/tweaks_above.php new file mode 100644 index 000000000..1cf1fb850 --- /dev/null +++ b/admin/layouts/component_custom_admin_menus/tweaks_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php b/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php new file mode 100644 index 000000000..5a9713b5b --- /dev/null +++ b/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php @@ -0,0 +1,48 @@ + + @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( + 'addcustommenus' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_custom_admin_views/index.html b/admin/layouts/component_custom_admin_views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_custom_admin_views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_custom_admin_views/publishing.php b/admin/layouts/component_custom_admin_views/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_custom_admin_views/publishing.php @@ -0,0 +1,58 @@ + + @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/component_custom_admin_views/publlshing.php b/admin/layouts/component_custom_admin_views/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_custom_admin_views/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_custom_admin_views/views_above.php b/admin/layouts/component_custom_admin_views/views_above.php new file mode 100644 index 000000000..4fcb6e5c1 --- /dev/null +++ b/admin/layouts/component_custom_admin_views/views_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_custom_admin_views/views_fullwidth.php b/admin/layouts/component_custom_admin_views/views_fullwidth.php new file mode 100644 index 000000000..5651212b6 --- /dev/null +++ b/admin/layouts/component_custom_admin_views/views_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_custom_admin_views', + 'addcustom_admin_views' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_dashboard/dashboard_above.php b/admin/layouts/component_dashboard/dashboard_above.php new file mode 100644 index 000000000..7761a3ad2 --- /dev/null +++ b/admin/layouts/component_dashboard/dashboard_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_dashboard/dashboard_fullwidth.php b/admin/layouts/component_dashboard/dashboard_fullwidth.php new file mode 100644 index 000000000..7bce81e6f --- /dev/null +++ b/admin/layouts/component_dashboard/dashboard_fullwidth.php @@ -0,0 +1,49 @@ + + @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( + 'php_dashboard_methods', + 'dashboard_tab' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_dashboard/index.html b/admin/layouts/component_dashboard/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_dashboard/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_dashboard/publishing.php b/admin/layouts/component_dashboard/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_dashboard/publishing.php @@ -0,0 +1,58 @@ + + @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/component_dashboard/publlshing.php b/admin/layouts/component_dashboard/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_dashboard/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_files_folders/index.html b/admin/layouts/component_files_folders/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_files_folders/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_files_folders/publishing.php b/admin/layouts/component_files_folders/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_files_folders/publishing.php @@ -0,0 +1,58 @@ + + @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/component_files_folders/publlshing.php b/admin/layouts/component_files_folders/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_files_folders/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_files_folders/settings_above.php b/admin/layouts/component_files_folders/settings_above.php new file mode 100644 index 000000000..a429f2f6d --- /dev/null +++ b/admin/layouts/component_files_folders/settings_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_files_folders/settings_fullwidth.php b/admin/layouts/component_files_folders/settings_fullwidth.php new file mode 100644 index 000000000..dc5894ccf --- /dev/null +++ b/admin/layouts/component_files_folders/settings_fullwidth.php @@ -0,0 +1,51 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_add_files', + 'addfiles', + 'note_add_folders', + 'addfolders' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_mysql_tweaks/index.html b/admin/layouts/component_mysql_tweaks/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_mysql_tweaks/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_mysql_tweaks/publishing.php b/admin/layouts/component_mysql_tweaks/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_mysql_tweaks/publishing.php @@ -0,0 +1,58 @@ + + @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/component_mysql_tweaks/publlshing.php b/admin/layouts/component_mysql_tweaks/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_mysql_tweaks/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_mysql_tweaks/tweaks_above.php b/admin/layouts/component_mysql_tweaks/tweaks_above.php new file mode 100644 index 000000000..1cf1fb850 --- /dev/null +++ b/admin/layouts/component_mysql_tweaks/tweaks_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php b/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php new file mode 100644 index 000000000..2ae0bda5b --- /dev/null +++ b/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php @@ -0,0 +1,48 @@ + + @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( + 'sql_tweak' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_site_views/index.html b/admin/layouts/component_site_views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_site_views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_site_views/publishing.php b/admin/layouts/component_site_views/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_site_views/publishing.php @@ -0,0 +1,58 @@ + + @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/component_site_views/publlshing.php b/admin/layouts/component_site_views/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_site_views/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_site_views/views_above.php b/admin/layouts/component_site_views/views_above.php new file mode 100644 index 000000000..4fcb6e5c1 --- /dev/null +++ b/admin/layouts/component_site_views/views_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_site_views/views_fullwidth.php b/admin/layouts/component_site_views/views_fullwidth.php new file mode 100644 index 000000000..50fe4c8e5 --- /dev/null +++ b/admin/layouts/component_site_views/views_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_site_views', + 'addsite_views' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/component_updates/index.html b/admin/layouts/component_updates/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/component_updates/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/component_updates/publishing.php b/admin/layouts/component_updates/publishing.php new file mode 100644 index 000000000..fc48afcf3 --- /dev/null +++ b/admin/layouts/component_updates/publishing.php @@ -0,0 +1,58 @@ + + @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/component_updates/publlshing.php b/admin/layouts/component_updates/publlshing.php new file mode 100644 index 000000000..8bc963975 --- /dev/null +++ b/admin/layouts/component_updates/publlshing.php @@ -0,0 +1,60 @@ + + @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/component_updates/updates_above.php b/admin/layouts/component_updates/updates_above.php new file mode 100644 index 000000000..d5bd4bdce --- /dev/null +++ b/admin/layouts/component_updates/updates_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'joomla_component' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/component_updates/updates_fullwidth.php b/admin/layouts/component_updates/updates_fullwidth.php new file mode 100644 index 000000000..6312b7a7a --- /dev/null +++ b/admin/layouts/component_updates/updates_fullwidth.php @@ -0,0 +1,48 @@ + + @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( + 'version_update' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php index 31bc44240..8a129fe2e 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/custom_admin_view/custom_buttons_left.php b/admin/layouts/custom_admin_view/custom_buttons_left.php index 1943b6a00..b4f873c84 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/custom_admin_view/custom_script_fullwidth.php b/admin/layouts/custom_admin_view/custom_script_fullwidth.php index 025b27fd0..00dc0557f 100644 --- a/admin/layouts/custom_admin_view/custom_script_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/custom_admin_view/details_above.php b/admin/layouts/custom_admin_view/details_above.php index c3abf1866..759c1e10c 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index 21b529eed..e36e76c00 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index 356259a6e..681d2f1ac 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index cea59422e..8443b113b 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/custom_admin_view/details_rightside.php b/admin/layouts/custom_admin_view/details_rightside.php index 2feb0423b..25581f16c 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/custom_admin_view/details_under.php b/admin/layouts/custom_admin_view/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php index eddee645d..86bafd684 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyjlinked_components; +$items = $displayData->vyelinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; @@ -100,26 +100,26 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/custom_admin_view/publlshing.php b/admin/layouts/custom_admin_view/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/custom_code/details_above.php b/admin/layouts/custom_code/details_above.php index 185c82ce8..b24ebca7b 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/custom_code/details_fullwidth.php b/admin/layouts/custom_code/details_fullwidth.php index a9f1bcabc..c2542935a 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/custom_code/details_left.php b/admin/layouts/custom_code/details_left.php index 4593d0445..e73cb141b 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/custom_code/details_right.php b/admin/layouts/custom_code/details_right.php index 4c691af70..2e88ca35e 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/custom_code/details_under.php b/admin/layouts/custom_code/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/custom_code/publishing.php b/admin/layouts/custom_code/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/custom_code/publlshing.php b/admin/layouts/custom_code/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/dynamic_get/abacus_fullwidth.php b/admin/layouts/dynamic_get/abacus_fullwidth.php index bc2352829..1f7e5f99d 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage abacus_fullwidth.php diff --git a/admin/layouts/dynamic_get/abacus_left.php b/admin/layouts/dynamic_get/abacus_left.php index 30be370b9..f2c271025 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage abacus_left.php diff --git a/admin/layouts/dynamic_get/custom_script_fullwidth.php b/admin/layouts/dynamic_get/custom_script_fullwidth.php index 8805741e7..e02480e1d 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/dynamic_get/joint_fullwidth.php b/admin/layouts/dynamic_get/joint_fullwidth.php index e48658bf3..9c930a2b9 100644 --- a/admin/layouts/dynamic_get/joint_fullwidth.php +++ b/admin/layouts/dynamic_get/joint_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage joint_fullwidth.php diff --git a/admin/layouts/dynamic_get/main_above.php b/admin/layouts/dynamic_get/main_above.php index 883efc488..70eada551 100644 --- a/admin/layouts/dynamic_get/main_above.php +++ b/admin/layouts/dynamic_get/main_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage main_above.php diff --git a/admin/layouts/dynamic_get/main_fullwidth.php b/admin/layouts/dynamic_get/main_fullwidth.php index 2c4e298db..3d800b7a2 100644 --- a/admin/layouts/dynamic_get/main_fullwidth.php +++ b/admin/layouts/dynamic_get/main_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage main_fullwidth.php diff --git a/admin/layouts/dynamic_get/main_left.php b/admin/layouts/dynamic_get/main_left.php index b2e0c254e..5667ea8d2 100644 --- a/admin/layouts/dynamic_get/main_left.php +++ b/admin/layouts/dynamic_get/main_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage main_left.php diff --git a/admin/layouts/dynamic_get/main_under.php b/admin/layouts/dynamic_get/main_under.php index 7963b0e95..3e1dedd1c 100644 --- a/admin/layouts/dynamic_get/main_under.php +++ b/admin/layouts/dynamic_get/main_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage main_under.php diff --git a/admin/layouts/dynamic_get/publishing.php b/admin/layouts/dynamic_get/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/dynamic_get/publlshing.php b/admin/layouts/dynamic_get/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/dynamic_get/tweak_fullwidth.php b/admin/layouts/dynamic_get/tweak_fullwidth.php new file mode 100644 index 000000000..98633b3b3 --- /dev/null +++ b/admin/layouts/dynamic_get/tweak_fullwidth.php @@ -0,0 +1,51 @@ + + @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( + 'filter', + 'where', + 'order', + 'global' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/field/details_fullwidth.php b/admin/layouts/field/details_fullwidth.php index a1ebb183b..e1127edbd 100644 --- a/admin/layouts/field/details_fullwidth.php +++ b/admin/layouts/field/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/field/details_left.php b/admin/layouts/field/details_left.php index 559c834e0..226325cae 100644 --- a/admin/layouts/field/details_left.php +++ b/admin/layouts/field/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/field/details_right.php b/admin/layouts/field/details_right.php index 20d2a7278..cdda55c57 100644 --- a/admin/layouts/field/details_right.php +++ b/admin/layouts/field/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/field/details_under.php b/admin/layouts/field/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/field/details_under.php +++ b/admin/layouts/field/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/field/publlshing.php b/admin/layouts/field/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/field/scripts_left.php b/admin/layouts/field/scripts_left.php index 260d306f6..8b1fe3722 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage scripts_left.php diff --git a/admin/layouts/field/scripts_right.php b/admin/layouts/field/scripts_right.php index d910ef3f8..09e0bbc13 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage scripts_right.php diff --git a/admin/layouts/fieldtype/details_fullwidth.php b/admin/layouts/fieldtype/details_fullwidth.php index dc37cfa90..2fbe36bd6 100644 --- a/admin/layouts/fieldtype/details_fullwidth.php +++ b/admin/layouts/fieldtype/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/fieldtype/details_left.php b/admin/layouts/fieldtype/details_left.php index 7edd5c76b..cad20310a 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/fieldtype/details_right.php b/admin/layouts/fieldtype/details_right.php index d485a61cc..486b38628 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index e648ba43e..d247159e5 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wabfields; +$items = $displayData->vzwfields; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; @@ -116,26 +116,26 @@ $can = ComponentbuilderHelper::getActions('field'); published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/fieldtype/publlshing.php b/admin/layouts/fieldtype/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/ftp/details_above.php b/admin/layouts/ftp/details_above.php index 63a78bd5a..b5b343521 100644 --- a/admin/layouts/ftp/details_above.php +++ b/admin/layouts/ftp/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/ftp/details_fullwidth.php b/admin/layouts/ftp/details_fullwidth.php index 4efc112fd..f069476ce 100644 --- a/admin/layouts/ftp/details_fullwidth.php +++ b/admin/layouts/ftp/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/ftp/linked_components_fullwidth.php index 8fbecd518..d2cc2e319 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/ftp/linked_components_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->waclinked_components; +$items = $displayData->vzxlinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; @@ -100,26 +100,26 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/ftp/publishing.php b/admin/layouts/ftp/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/ftp/publishing.php +++ b/admin/layouts/ftp/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/ftp/publlshing.php b/admin/layouts/ftp/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/ftp/publlshing.php +++ b/admin/layouts/ftp/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index 2f4a2fe4f..0e14bbd43 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index c21aa69f1..866af2b99 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index a36ceed8d..86dd65b8e 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 6e6d6c87b..b660b68ae 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/joomla_component/admin_views_fullwidth.php b/admin/layouts/joomla_component/admin_views_fullwidth.php index affd61f9e..55de303fb 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views_fullwidth.php @@ -27,106 +27,23 @@ defined('_JEXEC') or die('Restricted access'); -// set the defaults -$items = $displayData->vwnadmin_views; -$user = JFactory::getUser(); -$id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit"; -$ref = ($id) ? "&ref=joomla_component&refid=".$id : ""; -$new = "index.php?option=com_componentbuilder&view=admin_view&layout=edit".$ref; -$can = ComponentbuilderHelper::getActions('admin_view'); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_admin_views', + 'note_display_component_admin_views' +); ?>
-get('admin_view.create')): ?> -

- - - - - - - - - - - - - - - $item): ?> - authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = JFactory::getUser($item->checked_out); - $canDo = ComponentbuilderHelper::getActions('admin_view',$item,'admin_views'); - ?> - - - - - - published == 1):?> - - published == 0):?> - - published == 2):?> - - published == -2):?> - - - - - - -
- - - - - - - - - - - -
- get('admin_view.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'admin_views.', $canCheckin); ?> - - -
escape($item->system_name); ?>
- -
- escape($item->name_single); ?> - - escape($item->name_list); ?> - - escape($item->short_description); ?> - - - - - - - - - - - - - - - - - - id; ?> -
- -
- -
- + +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+
diff --git a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php index c8ef5d768..332c58cca 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_admin_views_fullwidth.php @@ -27,112 +27,23 @@ defined('_JEXEC') or die('Restricted access'); -// set the defaults -$items = $displayData->vwocustom_admin_views; -$user = JFactory::getUser(); -$id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=custom_admin_view.edit"; -$ref = ($id) ? "&ref=joomla_component&refid=".$id : ""; -$new = "index.php?option=com_componentbuilder&view=custom_admin_view&layout=edit".$ref; -$can = ComponentbuilderHelper::getActions('custom_admin_view'); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_custom_admin_views', + 'note_display_component_custom_admin_views' +); ?>
-get('core.create')): ?> -

- - - - - - - - - - - - - - - - $item): ?> - authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = JFactory::getUser($item->checked_out); - $canDo = ComponentbuilderHelper::getActions('custom_admin_view',$item,'custom_admin_views'); - ?> - - - - - - - published == 1):?> - - published == 0):?> - - published == 2):?> - - published == -2):?> - - - - - - -
- - - - - - - - - - - - - -
- get('core.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'custom_admin_views.', $canCheckin); ?> - - -
escape($item->system_name); ?>
- -
- escape($item->name); ?> - - escape($item->codename); ?> - - escape($item->description); ?> - - escape($item->snippet_name); ?> - - - - - - - - - - - - - - - - - - id; ?> -
- -
- -
- + +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+
diff --git a/admin/layouts/joomla_component/details_above.php b/admin/layouts/joomla_component/details_above.php index c3abf1866..759c1e10c 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/joomla_component/details_left.php b/admin/layouts/joomla_component/details_left.php index 6de7dd96a..79c667065 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php @@ -33,7 +33,6 @@ $fields = $displayData->get('fields') ?: array( 'name', 'name_code', 'component_version', - 'version_update', 'debug_linenr', 'add_placeholders', 'mvc_versiondate', diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php index 39721c8f3..3e6612956 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/joomla_component/details_under.php b/admin/layouts/joomla_component/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php index 61c9b35ab..8a4b9cd38 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamic_build_beta_fullwidth.php diff --git a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php index 33e0137a1..7b783d167 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamic_integration_fullwidth.php diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index c4914ff90..200351bf8 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage libs_helpers_fullwidth.php diff --git a/admin/layouts/joomla_component/metadata.php b/admin/layouts/joomla_component/metadata.php index 174f1a19b..354812f5a 100644 --- a/admin/layouts/joomla_component/metadata.php +++ b/admin/layouts/joomla_component/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage metadata.php diff --git a/admin/layouts/joomla_component/mysql_fullwidth.php b/admin/layouts/joomla_component/mysql_fullwidth.php index f9c2695f6..26adc0e40 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_fullwidth.php diff --git a/admin/layouts/joomla_component/php_fullwidth.php b/admin/layouts/joomla_component/php_fullwidth.php index b64ec0ccd..c31cee3cc 100644 --- a/admin/layouts/joomla_component/php_fullwidth.php +++ b/admin/layouts/joomla_component/php_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php @@ -30,9 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'add_php_dashboard_methods', - 'php_dashboard_methods', - 'dashboard_tab', 'add_php_preflight_install', 'php_preflight_install', 'add_php_preflight_update', diff --git a/admin/layouts/dynamic_get/main_right.php b/admin/layouts/joomla_component/php_left.php similarity index 92% rename from admin/layouts/dynamic_get/main_right.php rename to admin/layouts/joomla_component/php_left.php index 073d79db6..5eb10394a 100644 --- a/admin/layouts/dynamic_get/main_right.php +++ b/admin/layouts/joomla_component/php_left.php @@ -10,11 +10,11 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder - @subpackage main_right.php + @subpackage php_left.php @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -30,10 +30,7 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'filter', - 'where', - 'order', - 'global' + 'note_botton_component_dashboard' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/joomla_component/publishing.php b/admin/layouts/joomla_component/publishing.php index 90be72273..b0e961c2c 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/joomla_component/readme_left.php b/admin/layouts/joomla_component/readme_left.php index 3e2221aff..73f91748f 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage readme_left.php diff --git a/admin/layouts/joomla_component/readme_right.php b/admin/layouts/joomla_component/readme_right.php index 3fa3b302b..b71dd4e8f 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage readme_right.php diff --git a/admin/layouts/joomla_component/settings_fullwidth.php b/admin/layouts/joomla_component/settings_fullwidth.php new file mode 100644 index 000000000..5eef11dee --- /dev/null +++ b/admin/layouts/joomla_component/settings_fullwidth.php @@ -0,0 +1,52 @@ + + @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( + 'spacer_hr_f', + 'note_on_contributors', + 'addcontributors', + 'emptycontributors', + 'number' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index 0bdc0287a..c4f12df87 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_left.php @@ -30,19 +30,13 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_on_views', - 'addadmin_views', - 'addcustom_admin_views', - 'addsite_views', + 'note_moved_views', 'spacer_hr_a', 'note_mysql_tweak_options', - 'sql_tweak', 'spacer_hr_b', 'note_add_custom_menus', - 'addcustommenus', 'spacer_hr_c', - 'note_add_config', - 'addconfig' + 'note_add_config' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index a27ecca0e..567ff02b1 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_right.php @@ -30,20 +30,11 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_on_contributors', - 'addcontributors', - 'emptycontributors', - 'number', + 'note_component_files_folders', 'spacer_hr_d', - 'note_add_files', - 'addfiles', - 'spacer_hr_e', - 'note_add_folders', - 'addfolders', - 'spacer_hr_f', 'to_ignore_note', 'toignore', - 'spacer_hr_g', + 'spacer_hr_e', 'jcb_export_package_note', 'export_key', 'export_package_link', diff --git a/admin/layouts/joomla_component/site_views_fullwidth.php b/admin/layouts/joomla_component/site_views_fullwidth.php index d27b37289..43e818a5f 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage site_views_fullwidth.php @@ -27,112 +27,23 @@ defined('_JEXEC') or die('Restricted access'); -// set the defaults -$items = $displayData->vwpsite_views; -$user = JFactory::getUser(); -$id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.edit"; -$ref = ($id) ? "&ref=joomla_component&refid=".$id : ""; -$new = "index.php?option=com_componentbuilder&view=site_view&layout=edit".$ref; -$can = ComponentbuilderHelper::getActions('site_view'); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_site_views', + 'note_display_component_site_views' +); ?>
-get('core.create')): ?> -

- - - - - - - - - - - - - - - - $item): ?> - authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = JFactory::getUser($item->checked_out); - $canDo = ComponentbuilderHelper::getActions('site_view',$item,'site_views'); - ?> - - - - - - - published == 1):?> - - published == 0):?> - - published == 2):?> - - published == -2):?> - - - - - - -
- - - - - - - - - - - - - -
- get('core.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'site_views.', $canCheckin); ?> - - -
escape($item->system_name); ?>
- -
- escape($item->name); ?> - - escape($item->codename); ?> - - escape($item->description); ?> - - escape($item->snippet_name); ?> - - - - - - - - - - - - - - - - - - id; ?> -
- -
- -
- + +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+
diff --git a/admin/layouts/joomla_component/translation_fullwidth.php b/admin/layouts/joomla_component/translation_fullwidth.php index 8ee24c7da..d2625f2eb 100644 --- a/admin/layouts/joomla_component/translation_fullwidth.php +++ b/admin/layouts/joomla_component/translation_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage translation_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vwqtranslation; +$items = $displayData->vwmtranslation; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=language_translations&task=language_translation.edit"; @@ -70,26 +70,26 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/language/details_left.php b/admin/layouts/language/details_left.php index 259fa1157..87ab2fb3e 100644 --- a/admin/layouts/language/details_left.php +++ b/admin/layouts/language/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/language/details_right.php b/admin/layouts/language/details_right.php index 386c4044f..4634c1262 100644 --- a/admin/layouts/language/details_right.php +++ b/admin/layouts/language/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/language/publishing.php b/admin/layouts/language/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/language/publishing.php +++ b/admin/layouts/language/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/language/publlshing.php b/admin/layouts/language/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/language/publlshing.php +++ b/admin/layouts/language/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/language_translation/details_fullwidth.php b/admin/layouts/language_translation/details_fullwidth.php index 3c68a0536..7438aabde 100644 --- a/admin/layouts/language_translation/details_fullwidth.php +++ b/admin/layouts/language_translation/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php @@ -31,7 +31,8 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'entranslation', - 'translation' + 'translation', + 'components' ); ?> diff --git a/admin/layouts/language_translation/publishing.php b/admin/layouts/language_translation/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/language_translation/publishing.php +++ b/admin/layouts/language_translation/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/language_translation/publlshing.php b/admin/layouts/language_translation/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/language_translation/publlshing.php +++ b/admin/layouts/language_translation/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/layout/custom_script_fullwidth.php b/admin/layouts/layout/custom_script_fullwidth.php index 6b68deade..977017064 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index 27249e024..acc4db039 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index 1c99798ab..eefffe7aa 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index fae90925f..edac82528 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/layout/details_rightside.php b/admin/layouts/layout/details_rightside.php index 0110e2439..85f7360eb 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/layout/details_under.php b/admin/layouts/layout/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/layout/publishing.php b/admin/layouts/layout/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/layout/publlshing.php b/admin/layouts/layout/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/site_view/custom_buttons_fullwidth.php b/admin/layouts/site_view/custom_buttons_fullwidth.php index 4bbfa9ec5..ab1f0b025 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/site_view/custom_buttons_left.php b/admin/layouts/site_view/custom_buttons_left.php index 093c249f0..a3e846f6a 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/site_view/custom_buttons_right.php b/admin/layouts/site_view/custom_buttons_right.php index 7e7b82d32..64efb78d8 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_right.php diff --git a/admin/layouts/site_view/details_above.php b/admin/layouts/site_view/details_above.php index c3abf1866..759c1e10c 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 21b529eed..e36e76c00 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index 356259a6e..681d2f1ac 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index fae90925f..edac82528 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/site_view/details_rightside.php b/admin/layouts/site_view/details_rightside.php index 2feb0423b..25581f16c 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/site_view/details_under.php b/admin/layouts/site_view/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/site_view/javascript_css_fullwidth.php b/admin/layouts/site_view/javascript_css_fullwidth.php index 7b897e9f3..866d91dd5 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage javascript_css_fullwidth.php diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php index 4c33f5016..204a262bd 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyulinked_components; +$items = $displayData->vyplinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; @@ -100,26 +100,26 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml published == 1):?> - - + + published == 0):?> - - + + published == 2):?> - - + + published == -2):?> - - + + diff --git a/admin/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index 9bef8eede..01eb7664f 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/site_view/publishing.php b/admin/layouts/site_view/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/site_view/publlshing.php b/admin/layouts/site_view/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/snippet/details_above.php b/admin/layouts/snippet/details_above.php index d1c38ca9d..96eaf7a69 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index 0eefb5500..1951f1cdf 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/snippet/details_right.php b/admin/layouts/snippet/details_right.php index e47dc84a8..bede6719b 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/snippet/publishing.php b/admin/layouts/snippet/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/snippet/publlshing.php b/admin/layouts/snippet/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/template/custom_script_fullwidth.php b/admin/layouts/template/custom_script_fullwidth.php index 6b68deade..977017064 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 83df7489e..8370b69df 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index 1c99798ab..eefffe7aa 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index fae90925f..edac82528 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/template/details_rightside.php b/admin/layouts/template/details_rightside.php index 0110e2439..85f7360eb 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/template/details_under.php b/admin/layouts/template/details_under.php index 5b2b24f66..b5ba7bc61 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/template/publishing.php b/admin/layouts/template/publishing.php index b6c0d3f1f..fc48afcf3 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/template/publlshing.php b/admin/layouts/template/publlshing.php index 979e11f42..8bc963975 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index 6578a1abb..67e5ff043 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields.php @@ -812,6 +812,16 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin $data['metadata'] = (string) $metadata; } + if (isset($data['addfields']) && ComponentbuilderHelper::checkArray($data['addfields'])) + { + // Sort fields by 'Tab' ASC, 'Alignment' ASC, 'Order in Edit' ASC + usort($data['addfields'], function ($a, $b) { + $val_a = sprintf('%02u', $a['tab']) . sprintf('%02u', $a['alignment']) . sprintf('%03u', $a['order_edit']); + $val_b = sprintf('%02u', $b['tab']) . sprintf('%02u', $b['alignment']) . sprintf('%03u', $b['order_edit']); + return strcmp($val_a, $val_b); + }); + } + // Set the addfields items to data. if (isset($data['addfields']) && is_array($data['addfields'])) { diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index 5cad61656..f90445b97 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields_conditions.php diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 5878e6f11..75f0a4990 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php @@ -148,16 +148,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->ajax_input = $ajax_input->toArray(); } - if (!empty($item->php_getitems)) + if (!empty($item->php_after_delete)) { - // base64 Decode php_getitems. - $item->php_getitems = base64_decode($item->php_getitems); - } - - if (!empty($item->php_batchmove)) - { - // base64 Decode php_batchmove. - $item->php_batchmove = base64_decode($item->php_batchmove); + // base64 Decode php_after_delete. + $item->php_after_delete = base64_decode($item->php_after_delete); } if (!empty($item->php_save)) @@ -166,10 +160,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_save = base64_decode($item->php_save); } - if (!empty($item->php_after_delete)) + if (!empty($item->php_batchmove)) { - // base64 Decode php_after_delete. - $item->php_after_delete = base64_decode($item->php_after_delete); + // base64 Decode php_batchmove. + $item->php_batchmove = base64_decode($item->php_batchmove); } if (!empty($item->php_getlistquery)) @@ -190,6 +184,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_after_publish = base64_decode($item->php_after_publish); } + if (!empty($item->php_getitems)) + { + // base64 Decode php_getitems. + $item->php_getitems = base64_decode($item->php_getitems); + } + if (!empty($item->php_import)) { // base64 Decode php_import. @@ -370,95 +370,32 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin // update the fields $objectUpdate = new stdClass(); $objectUpdate->id = (int) $item->id; - // check what type of linked_views array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($item->addlinked_views) && isset($item->addlinked_views['adminview'])) + // repeatable values to check + $arrayChecker = array( + 'addlinked_views' => 'adminview', + 'ajax_input' => 'value_name', + 'custom_button' => 'name', + 'addpermissions' => 'action', + 'addtables' => 'table', + 'addtabs' => 'name' + ); + foreach ($arrayChecker as $_value => $checker) { - $bucket = array(); - foreach($item->addlinked_views as $option => $values) + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) { - foreach($values as $nr => $value) + $bucket = array(); + foreach($item->{$_value} as $option => $values) { - $bucket['addlinked_views'.$nr][$option] = $value; + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); } - $item->addlinked_views = $bucket; - $objectUpdate->addconditions = json_encode($bucket); - } - // check what type of ajax_input array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($item->ajax_input) && isset($item->ajax_input['value_name'])) - { - $bucket = array(); - foreach($item->ajax_input as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['ajax_input'.$nr][$option] = $value; - } - } - $item->ajax_input = $bucket; - $objectUpdate->ajax_input = json_encode($bucket); - } - // check what type of custom_button array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($item->custom_button) && isset($item->custom_button['name'])) - { - $bucket = array(); - foreach($item->custom_button as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['custom_button'.$nr][$option] = $value; - } - } - $item->custom_button = $bucket; - $objectUpdate->custom_button = json_encode($bucket); - } - // check what type of permissions array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($item->addpermissions) && isset($item->addpermissions['action'])) - { - $bucket = array(); - foreach($item->addpermissions as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addpermissions'.$nr][$option] = $value; - } - } - $item->addpermissions = $bucket; - $objectUpdate->addpermissions = json_encode($bucket); - } - // check what type of table array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($item->addtables) && isset($item->addtables['table'])) - { - $bucket = array(); - foreach($item->addtables as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addtables'.$nr][$option] = $value; - } - } - $item->addtables = $bucket; - $objectUpdate->addtables = json_encode($bucket); - } - // check what type of tabs array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($item->addtabs) && isset($item->addtabs['name'])) - { - $bucket = array(); - foreach($item->addtabs as $option => $values) - { - foreach($values as $nr => $value) - { - $bucket['addtabs'.$nr][$option] = $value; - } - } - $item->addtabs = $bucket; - $objectUpdate->addtabs = json_encode($bucket); } // be sure to update the table if we found repeatable fields that are still not converted if (count((array) $objectUpdate) > 1) @@ -471,102 +408,9 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->tags = new JHelperTags; $item->tags->getTagIds($item->id, 'com_componentbuilder.admin_view'); } - } - $this->addadmin_viewsvvvz = $item->id; + } return $item; - } - - /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getVxzlinked_components() - { - // 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_joomla_component table - $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - - // 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 . ')'); - } - - // Order the results by ordering - $query->order('a.published ASC'); - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // set values to display correctly. - if (ComponentbuilderHelper::checkArray($items)) - { - // get user object. - $user = JFactory::getUser(); - foreach ($items as $nr => &$item) - { - $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - } - } - - // Filter by addadmin_viewsvvvz in this Repetable Field - if (ComponentbuilderHelper::checkArray($items) && isset($this->addadmin_viewsvvvz)) - { - foreach ($items as $nr => &$item) - { - if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views)) - { - $tmpArray = json_decode($item->addadmin_views,true); - if (!isset($tmpArray['adminview']) || !ComponentbuilderHelper::checkArray($tmpArray['adminview']) || !in_array($this->addadmin_viewsvvvz, $tmpArray['adminview'])) - { - unset($items[$nr]); - continue; - } - } - else - { - unset($items[$nr]); - continue; - } - } - } - else - { - return false; - } - return $items; - } - return false; } /** @@ -878,6 +722,26 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin if (!parent::delete($pks)) { return false; + } + + // we must also delete the linked tables found + if (ComponentbuilderHelper::checkArray($pks)) + { + $_tablesArray = array( + 'admin_fields', + 'admin_fields_conditions' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'admin_view', 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->delete($_pks); + } + } } return true; @@ -898,6 +762,26 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin if (!parent::publish($pks, $value)) { return false; + } + + // we must also update all linked tables + if (ComponentbuilderHelper::checkArray($pks)) + { + $_tablesArray = array( + 'admin_fields', + 'admin_fields_conditions' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'admin_view', 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->publish($_pks, $value); + } + } } return true; @@ -1139,6 +1023,26 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin // Add the new ID to the array $newIds[$pk] = $newId; } + + if (ComponentbuilderHelper::checkArray($newIds)) + { + foreach($newIds as $oldID => $newID) + { + // get the linked ID + if ($field = ComponentbuilderHelper::getVar('admin_fields', $oldID, 'admin_view', 'id')) + { + // copy fields to new admin view + ComponentbuilderHelper::copyItem(/*id->*/ $field, /*table->*/ 'admin_fields', /*change->*/ array('admin_view' => $newID)); + } + // get the linked ID + if ($condition = ComponentbuilderHelper::getVar('admin_fields_conditions', $oldID, 'admin_view', 'id')) + { + // copy conditions to new admin view + ComponentbuilderHelper::copyItem(/*id->*/ $condition, /*table->*/ 'admin_fields_conditions', /*change->*/ array('admin_view' => $newID)); + } + } + } + // Clean the cache $this->cleanCache(); @@ -1360,16 +1264,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['ajax_input'] = ''; } - // Set the php_getitems string to base64 string. - if (isset($data['php_getitems'])) + // Set the php_after_delete string to base64 string. + if (isset($data['php_after_delete'])) { - $data['php_getitems'] = base64_encode($data['php_getitems']); - } - - // Set the php_batchmove string to base64 string. - if (isset($data['php_batchmove'])) - { - $data['php_batchmove'] = base64_encode($data['php_batchmove']); + $data['php_after_delete'] = base64_encode($data['php_after_delete']); } // Set the php_save string to base64 string. @@ -1378,10 +1276,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_save'] = base64_encode($data['php_save']); } - // Set the php_after_delete string to base64 string. - if (isset($data['php_after_delete'])) + // Set the php_batchmove string to base64 string. + if (isset($data['php_batchmove'])) { - $data['php_after_delete'] = base64_encode($data['php_after_delete']); + $data['php_batchmove'] = base64_encode($data['php_batchmove']); } // Set the php_getlistquery string to base64 string. @@ -1402,6 +1300,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_after_publish'] = base64_encode($data['php_after_publish']); } + // Set the php_getitems string to base64 string. + if (isset($data['php_getitems'])) + { + $data['php_getitems'] = base64_encode($data['php_getitems']); + } + // Set the php_import string to base64 string. if (isset($data['php_import'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index e97139cac..3831b8119 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.php @@ -262,20 +262,20 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); - // decode php_batchmove - $item->php_batchmove = base64_decode($item->php_batchmove); - // decode php_save - $item->php_save = base64_decode($item->php_save); // decode php_after_delete $item->php_after_delete = base64_decode($item->php_after_delete); + // decode php_save + $item->php_save = base64_decode($item->php_save); + // decode php_batchmove + $item->php_batchmove = base64_decode($item->php_batchmove); // decode php_getlistquery $item->php_getlistquery = base64_decode($item->php_getlistquery); // decode php_allowedit $item->php_allowedit = base64_decode($item->php_allowedit); // decode php_after_publish $item->php_after_publish = base64_decode($item->php_after_publish); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); // decode php_import $item->php_import = base64_decode($item->php_import); // decode php_getitems_after_all diff --git a/admin/models/admins_fields.php b/admin/models/admins_fields.php index c87b2bfa0..5801d2ed1 100644 --- a/admin/models/admins_fields.php +++ b/admin/models/admins_fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admins_fields.php diff --git a/admin/models/admins_fields_conditions.php b/admin/models/admins_fields_conditions.php index 72ea7266c..9e0d74f41 100644 --- a/admin/models/admins_fields_conditions.php +++ b/admin/models/admins_fields_conditions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admins_fields_conditions.php diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 3075281bc..adcd59c67 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.php @@ -214,6 +214,15 @@ class ComponentbuilderModelAjax extends JModelList 'admin_fields' => 'admins_fields', 'admin_fields_conditions' => 'admins_fields_conditions', 'field' => 'fields', + 'component_admin_views' => 'components_admin_views' , + 'component_site_views' => 'components_site_views', + 'component_custom_admin_views' => 'components_custom_views', + 'component_updates' => 'components_updates', + 'component_mysql_tweaks' => 'components_mysql_tweaks', + 'component_custom_admin_menus' => 'components_custom_admin_menus', + 'component_config' => 'components_config', + 'component_dashboard' => 'components_dashboard', + 'component_files_folders' => 'components_files_folders', 'language' => true); public function getButton($type) @@ -329,7 +338,8 @@ class ComponentbuilderModelAjax extends JModelList } protected $functionArray = array( - 'field' => 'setFieldsNames', + // Admin View + 'field' => 'setItemNames', 'list' => 'setYesNo', 'title' => 'setYesNo', 'alias' => 'setYesNo', @@ -340,12 +350,91 @@ class ComponentbuilderModelAjax extends JModelList 'permission' => 'setYesNo', 'tab' => 'setTabName', 'alignment' => 'setAlignmentName', - 'target_field' => 'setFieldsNames', + 'target_field' => 'setItemNames', 'target_behavior' => 'setTargetBehavior', 'target_relation' => 'setTargetRelation', - 'match_field' => 'setFieldsNames', + 'match_field' => 'setItemNames', 'match_behavior' => 'setMatchBehavior', - 'match_options' => 'setMatchOptions'); + 'match_options' => 'setMatchOptions', + // Joomla Component + 'menu' => 'setYesNo', + 'metadata' => 'setYesNo', + 'default_view' => 'setYesNo', + 'access' => 'setYesNo', + 'mainmenu' => 'setYesNo', + 'dashboard_list' => 'setYesNo', + 'submenu' => 'setYesNo', + 'dashboard_add' => 'setYesNo', + 'checkin' => 'setYesNo', + 'history' => 'setYesNo', + 'port' => 'setYesNo', + 'edit_create_site_view' => 'setYesNo', + 'icomoon' => 'setIcoMoon', + 'customadminview' => 'setItemNames', + 'adminviews' => 'setItemNames', + 'adminview' => 'setItemNames', + 'siteview' => 'setItemNames', + 'before' => 'setItemNames'); + + protected function getLanguage($key) + { + $language = array( + // Admin View (fields) + 'field' => JText::_('COM_COMPONENTBUILDER_FIELD'), + 'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_LIST'), + 'order_list' => JText::_('COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS'), + 'title' => JText::_('COM_COMPONENTBUILDER_TITLE'), + 'alias' => JText::_('COM_COMPONENTBUILDER_ALIAS'), + 'sort' => JText::_('COM_COMPONENTBUILDER_SORTABLE'), + 'search' => JText::_('COM_COMPONENTBUILDER_SEARCHABLE'), + 'filter' => JText::_('COM_COMPONENTBUILDER_FILTER'), + 'link' => JText::_('COM_COMPONENTBUILDER_LINK'), + 'permission' => JText::_('COM_COMPONENTBUILDER_PERMISSIONS'), + 'tab' => JText::_('COM_COMPONENTBUILDER_TAB'), + 'alignment' => JText::_('COM_COMPONENTBUILDER_ALIGNMENT'), + 'order_edit' => JText::_('COM_COMPONENTBUILDER_ORDER_IN_EDIT'), + // Admin View (conditions) + 'target_field' => JText::_('COM_COMPONENTBUILDER_TARGET_FIELDS'), + 'target_behavior' => JText::_('COM_COMPONENTBUILDER_TARGET_BEHAVIOR'), + 'target_relation' => JText::_('COM_COMPONENTBUILDER_TARGET_RELATION'), + 'match_field' => JText::_('COM_COMPONENTBUILDER_MATCH_FIELD'), + 'match_behavior' => JText::_('COM_COMPONENTBUILDER_MATCH_BEHAVIOR'), + 'match_options' => JText::_('COM_COMPONENTBUILDER_MATCH_OPTIONS'), + // Joomla Component + 'menu' => JText::_('COM_COMPONENTBUILDER_ADD_MENU'), + 'metadata' => JText::_('COM_COMPONENTBUILDER_HAS_METADATA'), + 'default_view' => JText::_('COM_COMPONENTBUILDER_DEFAULT_VIEW'), + 'access' => JText::_('COM_COMPONENTBUILDER_ADD_ACCESS'), + 'component_site_views|=VDM=|access' => JText::_('COM_COMPONENTBUILDER_PUBLIC_ACCESS'), + 'mainmenu' => JText::_('COM_COMPONENTBUILDER_MAIN_MENU'), + 'dashboard_list' => JText::_('COM_COMPONENTBUILDER_DASHBOARD_LIST_OF_RECORDS'), + 'dashboard_add' => JText::_('COM_COMPONENTBUILDER_DASHBOARD_ADD_RECORD'), + 'submenu' => JText::_('COM_COMPONENTBUILDER_SUBMENU'), + 'checkin' => JText::_('COM_COMPONENTBUILDER_AUTO_CHECKIN'), + 'history' => JText::_('COM_COMPONENTBUILDER_KEEP_HISTORY'), + 'port' => JText::_('COM_COMPONENTBUILDER_EXPORTIMPORT_DATA'), + 'edit_create_site_view' => JText::_('COM_COMPONENTBUILDER_EDITCREATE_SITE_VIEW'), + 'icomoon' => JText::_('COM_COMPONENTBUILDER_ICON'), + 'customadminview' => JText::_('COM_COMPONENTBUILDER_VIEW'), + 'adminviews' => JText::_('COM_COMPONENTBUILDER_VIEWS'), + 'adminview' => JText::_('COM_COMPONENTBUILDER_VIEW'), + 'siteview' => JText::_('COM_COMPONENTBUILDER_VIEW'), + 'before' => JText::_('COM_COMPONENTBUILDER_ORDER_BEFORE') + ); + // check if a unique value is available + if (isset($language[$key])) + { + return $language[$key]; + } + // check a shared value is available + $keys = explode('|=VDM=|', $key); + if (isset($language[$keys[1]])) + { + return $language[$keys[1]]; + } + return ComponentbuilderHelper::safeString($keys[1], 'Ww'); + } + protected function getSubformTable($idName, $data) { @@ -363,7 +452,10 @@ class ComponentbuilderModelAjax extends JModelList { foreach ($headers as $header => $value) { - $head[$header] = '' . ComponentbuilderHelper::safeString($header, 'Ww'); + if (!isset($head[$header])) + { + $head[$header] = $this->getLanguage($idName . '|=VDM=|' . $header); + } } } // build the rows @@ -372,16 +464,16 @@ class ComponentbuilderModelAjax extends JModelList { foreach ($data as $nr => $values) { - foreach ($head as $key => $t) + foreach ($head as $key => $_header) { // set the value for the row if (isset($values[$key])) { - $this->setSubformRows($nr, $this->setSubformValue($key, $values[$key]), $rows); + $this->setSubformRows($nr, $this->setSubformValue($key, $values[$key]), $rows, $_header); } else { - $this->setSubformRows($nr, $this->setSubformValue($key, ''), $rows); + $this->setSubformRows($nr, $this->setSubformValue($key, ''), $rows, $_header); } } } @@ -406,7 +498,7 @@ class ComponentbuilderModelAjax extends JModelList $table[] = "\t\t\t"; $table[] = "\t\t\t\t"; $table[] = "\t\t\t\t\t"; - $table[] = "\t\t\t\t\t\t". implode("", $head); + $table[] = "\t\t\t\t\t\t"; $table[] = "\t\t\t\t\t"; $table[] = "\t\t\t\t"; $table[] = "\t\t\t\t"; @@ -439,25 +531,28 @@ class ComponentbuilderModelAjax extends JModelList return $value; } - protected function setSubformRows($nr, $value, &$rows) + protected function setSubformRows($nr, $value, &$rows, $_header) { // build rows if (!isset($rows[$nr])) { - $rows[$nr] = ''; + $rows[$nr] = ''; } else { - $rows[$nr] .= ''; + $rows[$nr] .= ''; } } protected $ref; protected $fieldsArray = array( 'admin_fields' => 'addfields', - 'admin_fields_conditions' => 'addconditions'); + 'admin_fields_conditions' => 'addconditions', + 'component_admin_views' => 'addadmin_views', + 'component_site_views' => 'addsite_views', + 'component_custom_admin_views' => 'addcustom_admin_views'); - public function getFieldsDisplay($type) + public function getAjaxDisplay($type) { if (isset($this->fieldsArray[$type])) { @@ -466,23 +561,23 @@ class ComponentbuilderModelAjax extends JModelList // get the view name & id $values = $this->getViewID(); // check if we are in the correct view. - if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && $values['a_view'] === 'admin_view') + if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && ($values['a_view'] === 'admin_view' || $values['a_view'] === 'joomla_component')) { - $this->ref = '&ref=admin_view&refid=' . $values['a_id']; + $this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; // get the field data - if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $values['a_id'], 'admin_view', $this->fieldsArray[$type])) + if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $values['a_id'], $values['a_view'], $this->fieldsArray[$type])) { // check repeatable conversion - $this->checkRepeatableConversion($fieldsData, $type, $values['a_id']); + $this->checkRepeatableConversion($fieldsData, $type, $values['a_id'], $values['a_view']); // get the table $table = $this->getSubformTable($type, $fieldsData); // set notice of bad practice $notice = ''; - if (isset($this->rowNumber) && $this->rowNumber > 50) + if ($values['a_view'] === 'admin_view' && isset($this->rowNumber) && $this->rowNumber > 50) { $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '
'; } - elseif (isset($this->rowNumber)) + elseif ($values['a_view'] === 'admin_view' && isset($this->rowNumber)) { $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '
'; } @@ -497,9 +592,16 @@ class ComponentbuilderModelAjax extends JModelList protected $conversionCheck = array( 'addfields' => 'field', - 'addconditions' => 'target_field'); + 'addconditions' => 'target_field', + 'addadmin_views' => 'adminview', + 'addconfig' => 'field', + 'addcustom_admin_views' => 'customadminview', + 'addcustommenus' => 'name', + 'addsite_views' => 'siteview', + 'sql_tweak' => 'adminview', + 'version_update' => 'version'); - protected function checkRepeatableConversion(&$fieldsData, $type, $id) + protected function checkRepeatableConversion(&$fieldsData, $type, $id, $linked_id_name) { if (ComponentbuilderHelper::checkJson($fieldsData)) { @@ -517,13 +619,93 @@ class ComponentbuilderModelAjax extends JModelList $fieldsData = json_encode($bucket); // update the fields $objectUpdate = new stdClass(); - $objectUpdate->admin_view = (int) $id; + $objectUpdate->{$linked_id_name} = (int) $id; $objectUpdate->{$this->fieldsArray[$type]} = $fieldsData; JFactory::getDbo()->updateObject('#__componentbuilder_'.$type, $objectUpdate, 'admin_view'); } } } + protected $itemNames = array( + 'field' => array(), + 'admin_view' => array(), + 'site_view' => array(), + 'custom_admin_view' => array() + ); + + protected $itemKeys = array( + // admin view + 'field' => array('table' => 'field', 'tables' => 'fields', 'id' => 'id', 'name' => 'name', 'text' => 'Field'), + 'target_field' => array('table' => 'field', 'tables' => 'fields', 'id' => 'id', 'name' => 'name', 'text' => 'Field'), + 'match_field' => array('table' => 'field', 'tables' => 'fields', 'id' => 'id', 'name' => 'name', 'text' => 'Field'), + // joomla component view + 'siteview' => array('table' => 'site_view', 'tables' => 'site_views', 'id' => 'id', 'name' => 'name', 'text' => 'Site View'), + 'customadminview' => array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'id' => 'id', 'name' => 'system_name', 'text' => 'Custom Admin View'), + 'adminviews' => array('table' => 'admin_view', 'tables' => 'admin_views', 'id' => 'id', 'name' => 'system_name', 'text' => 'Admin View'), + 'adminview' => array('table' => 'admin_view', 'tables' => 'admin_views', 'id' => 'id', 'name' => 'system_name', 'text' => 'Admin View'), + 'before' => array('table' => 'admin_view', 'tables' => 'admin_views', 'id' => 'id', 'name' => 'system_name', 'text' => 'Admin View') + ); + + protected function setItemNames($header, $value) + { + if (isset($this->itemKeys[$header]) && isset($this->itemKeys[$header]['table']) && isset($this->itemNames[$this->itemKeys[$header]['table']])) + { + // reset bucket + $bucket = array(); + if (ComponentbuilderHelper::checkArray($value)) + { + foreach ($value as $item) + { + $edit = true; + if (!isset($this->itemNames[$this->itemKeys[$header]['table']][$item])) + { + if (!$this->itemNames[$this->itemKeys[$header]['table']][$item] = ComponentbuilderHelper::getVar($this->itemKeys[$header]['table'], (int) $item, $this->itemKeys[$header]['id'], $this->itemKeys[$header]['name'])) + { + $this->itemNames[$this->itemKeys[$header]['table']][$item] = JText::sprintf('COM_COMPONENTBUILDER_NO_S_FOUND', $this->itemKeys[$header]['text']); + $edit = false; + } + } + // set edit link + $link = ($edit) ? $this->addEditLink($item, $this->itemKeys[$header]['table'], $this->itemKeys[$header]['tables']) : ''; + // load item + $bucket[] = $this->itemNames[$this->itemKeys[$header]['table']][$item] . $link; + } + } + elseif (is_numeric($value)) + { + $edit = true; + if (!isset($this->itemNames[$this->itemKeys[$header]['table']][$value])) + { + if (!$this->itemNames[$this->itemKeys[$header]['table']][$value] = ComponentbuilderHelper::getVar($this->itemKeys[$header]['table'], (int) $value, $this->itemKeys[$header]['id'], $this->itemKeys[$header]['name'])) + { + $this->itemNames[$this->itemKeys[$header]['table']][$value] = JText::sprintf('COM_COMPONENTBUILDER_NO_S_FOUND', $this->itemKeys[$header]['text']); + $edit = false; + } + } + // set edit link + $link = ($edit) ? $this->addEditLink($value, $this->itemKeys[$header]['table'], $this->itemKeys[$header]['tables']) : ''; + // load item + $bucket[] = $this->itemNames[$this->itemKeys[$header]['table']][$value] . $link; + } + // return found items + if (ComponentbuilderHelper::checkArray($bucket)) + { + return implode('
', $bucket); + } + return JText::sprintf('COM_COMPONENTBUILDER_NO_S_FOUND', $this->itemKeys[$header]['text']); + } + return JText::_('COM_COMPONENTBUILDER_NO_ITEM_FOUND'); + } + + protected function setIcoMoon($header, $value) + { + if (ComponentbuilderHelper::checkString($value)) + { + return ''; + } + return '-'; + } + protected function setAlignmentName($header, $value) { switch ($value) @@ -553,44 +735,6 @@ class ComponentbuilderModelAjax extends JModelList return JText::_('COM_COMPONENTBUILDER_NOT_SET'); } - protected $fieldNames = array(); - - protected function setFieldsNames($header, $value) - { - $bucket = array(); - if (ComponentbuilderHelper::checkArray($value)) - { - foreach ($value as $field) - { - if (!isset($this->fieldNames[$field])) - { - if (!$this->fieldNames[$field] = ComponentbuilderHelper::getVar('field', (int) $field, 'id', 'name')) - { - $this->fieldNames[$field] = JText::_('COM_COMPONENTBUILDER_NO_FIELD_FOUND'); - } - } - $bucket[] = $this->fieldNames[$field] . $this->addEditLink($field, 'field', 'fields'); - } - } - elseif (is_numeric($value)) - { - if (!isset($this->fieldNames[$value])) - { - if (!$this->fieldNames[$value] = ComponentbuilderHelper::getVar('field', (int) $value, 'id', 'name')) - { - $this->fieldNames[$value] = JText::_('COM_COMPONENTBUILDER_NO_FIELD_FOUND'); - } - } - $bucket[] = $this->fieldNames[$value] . $this->addEditLink($value, 'field', 'fields'); - } - // return found fields - if (ComponentbuilderHelper::checkArray($bucket)) - { - return implode('
', $bucket); - } - return JText::_('COM_COMPONENTBUILDER_NO_FIELD_FOUND'); - } - protected function addEditLink($id, $view, $views) { // can edit @@ -619,6 +763,11 @@ class ComponentbuilderModelAjax extends JModelList protected function setTabName($header, $value) { + // return published if set to 15 (since this is the default number for it) + if (15 == $value) + { + return JText::_('COM_COMPONENTBUILDER_PUBLISHING'); + } if (!ComponentbuilderHelper::checkArray($this->tabNames)) { // get the view name & id @@ -655,9 +804,9 @@ class ComponentbuilderModelAjax extends JModelList { if (1 == $value) { - return JText::_('COM_COMPONENTBUILDER_YES'); + return ''; } - return JText::_('COM_COMPONENTBUILDER_NO'); + return ''; } protected function setTargetBehavior($header, $value) @@ -1434,8 +1583,8 @@ class ComponentbuilderModelAjax extends JModelList $query['a']['select'] = array('id', 'system_name', 'php_preflight_install','php_postflight_install', 'php_preflight_update','php_postflight_update','php_method_uninstall', 'php_helper_admin','php_admin_event','php_helper_both','php_helper_site', - 'php_site_event','php_dashboard_methods','dashboard_tab','javascript'); - $query['a']['not_base64'] = array('dashboard_tab' => 'json'); + 'php_site_event','javascript'); + $query['a']['not_base64'] = array(); $query['a']['name'] = 'system_name'; // #__componentbuilder_admin_view as b @@ -1502,6 +1651,15 @@ class ComponentbuilderModelAjax extends JModelList $query['h']['not_base64'] = array(); $query['h']['name'] = 'name'; + $query = array(); + // #__componentbuilder_component_dashboard as i + $query['i'] = array(); + $query['i']['table'] = 'component_dashboard'; + $query['i']['view'] = 'components_dashboard'; + $query['i']['select'] = array('id', 'joomla_component', 'php_dashboard_methods','dashboard_tab'); + $query['i']['not_base64'] = array('dashboard_tab' => 'json'); + $query['i']['name'] = 'joomla_component'; + // return the query string to search if (isset($query[$target])) { diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php new file mode 100644 index 000000000..1cb10cdac --- /dev/null +++ b/admin/models/component_admin_views.php @@ -0,0 +1,913 @@ + + @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 Component_admin_views Model + */ +class ComponentbuilderModelComponent_admin_views 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.component_admin_views'; + + /** + * 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 = 'component_admin_views', $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->addadmin_views)) + { + // Convert the addadmin_views field to an array. + $addadmin_views = new Registry; + $addadmin_views->loadString($item->addadmin_views); + $item->addadmin_views = $addadmin_views->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addadmin_views' => 'adminview' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_admin_views', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_admin_views'); + } + } + + 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.component_admin_views', 'component_admin_views', 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('component_admin_views.edit.state', 'com_componentbuilder.component_admin_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_admin_views.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_admin_views.edit.created_by', 'com_componentbuilder.component_admin_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_admin_views.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_admin_views.edit.created', 'com_componentbuilder.component_admin_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_admin_views.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/component_admin_views.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('component_admin_views.delete', 'com_componentbuilder.component_admin_views.' . (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('component_admin_views.edit.state', 'com_componentbuilder.component_admin_views.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_admin_views.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('component_admin_views.edit', 'com_componentbuilder.component_admin_views.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_admin_views.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_component_admin_views')); + $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.component_admin_views.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('component_admin_views'); + $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('component_admin_views'); + } + + if (!$this->canDo->get('component_admin_views.create') && !$this->canDo->get('component_admin_views.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('component_admin_views.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('component_admin_views.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_admin_views'); + } + + if (!$this->canDo->get('component_admin_views.edit') && !$this->canDo->get('component_admin_views.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('component_admin_views.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('component_admin_views.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 addadmin_views items to data. + if (isset($data['addadmin_views']) && is_array($data['addadmin_views'])) + { + $addadmin_views = new JRegistry; + $addadmin_views->loadArray($data['addadmin_views']); + $data['addadmin_views'] = (string) $addadmin_views; + } + elseif (!isset($data['addadmin_views'])) + { + // Set the empty addadmin_views to data + $data['addadmin_views'] = ''; + } + + // 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/component_config.php b/admin/models/component_config.php new file mode 100644 index 000000000..b7ef6d054 --- /dev/null +++ b/admin/models/component_config.php @@ -0,0 +1,913 @@ + + @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 Component_config Model + */ +class ComponentbuilderModelComponent_config extends JModelAdmin +{ + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_componentbuilder.component_config'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'component_config', $prefix = 'ComponentbuilderTable', $config = array()) + { + return JTable::getInstance($type, $prefix, $config); + } + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->addconfig)) + { + // Convert the addconfig field to an array. + $addconfig = new Registry; + $addconfig->loadString($item->addconfig); + $item->addconfig = $addconfig->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addconfig' => 'field' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_config', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_config'); + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_componentbuilder.component_config', 'component_config', array('control' => 'jform', 'load_data' => $loadData)); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('component_config.edit.state', 'com_componentbuilder.component_config.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_config.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_config.edit.created_by', 'com_componentbuilder.component_config.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_config.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_config.edit.created', 'com_componentbuilder.component_config.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_config.edit.created', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'administrator/components/com_componentbuilder/models/forms/component_config.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('component_config.delete', 'com_componentbuilder.component_config.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('component_config.edit.state', 'com_componentbuilder.component_config.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_config.edit.state', 'com_componentbuilder'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('component_config.edit', 'com_componentbuilder.component_config.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_config.edit', 'com_componentbuilder'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__componentbuilder_component_config')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.component_config.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqeFields() + { + return false; + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + return true; + } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } + + /** + * Method to perform batch operations on an item or a set of items. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + JArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('component_config'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('component_config'); + } + + if (!$this->canDo->get('component_config.create') && !$this->canDo->get('component_config.batch')) + { + return false; + } + + // get list of uniqe fields + $uniqeFields = $this->getUniqeFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('component_config.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + + if (!$this->user->authorise('component_config.edit', $contexts[$pk])) + + { + + // Not fatal error + + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + + continue; + + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + $this->table->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_config'); + } + + if (!$this->canDo->get('component_config.edit') && !$this->canDo->get('component_config.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('component_config.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('component_config.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' === $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // Set the addconfig items to data. + if (isset($data['addconfig']) && is_array($data['addconfig'])) + { + $addconfig = new JRegistry; + $addconfig->loadArray($data['addconfig']); + $data['addconfig'] = (string) $addconfig; + } + elseif (!isset($data['addconfig'])) + { + // Set the empty addconfig to data + $data['addconfig'] = ''; + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the uniqe field for save as copy + if ($input->get('task') === 'save2copy') + { + // Automatic handling of other uniqe fields + $uniqeFields = $this->getUniqeFields(); + if (ComponentbuilderHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUniqe($field,$value) + { + + // set field value uniqe + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = JString::increment($value); + } + + return $value; + } + + /** + * Method to change the title & alias. + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = JString::increment($title); + } + + return $title; + } +} diff --git a/admin/models/component_custom_admin_menus.php b/admin/models/component_custom_admin_menus.php new file mode 100644 index 000000000..a092ac249 --- /dev/null +++ b/admin/models/component_custom_admin_menus.php @@ -0,0 +1,913 @@ + + @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 Component_custom_admin_menus Model + */ +class ComponentbuilderModelComponent_custom_admin_menus 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.component_custom_admin_menus'; + + /** + * 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 = 'component_custom_admin_menus', $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->addcustommenus)) + { + // Convert the addcustommenus field to an array. + $addcustommenus = new Registry; + $addcustommenus->loadString($item->addcustommenus); + $item->addcustommenus = $addcustommenus->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addcustommenus' => 'name' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_custom_admin_menus', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_custom_admin_menus'); + } + } + + 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.component_custom_admin_menus', 'component_custom_admin_menus', 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('component_custom_admin_menus.edit.state', 'com_componentbuilder.component_custom_admin_menus.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_custom_admin_menus.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_custom_admin_menus.edit.created_by', 'com_componentbuilder.component_custom_admin_menus.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_custom_admin_menus.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_custom_admin_menus.edit.created', 'com_componentbuilder.component_custom_admin_menus.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_custom_admin_menus.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/component_custom_admin_menus.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('component_custom_admin_menus.delete', 'com_componentbuilder.component_custom_admin_menus.' . (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('component_custom_admin_menus.edit.state', 'com_componentbuilder.component_custom_admin_menus.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_custom_admin_menus.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('component_custom_admin_menus.edit', 'com_componentbuilder.component_custom_admin_menus.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_custom_admin_menus.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_component_custom_admin_menus')); + $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.component_custom_admin_menus.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('component_custom_admin_menus'); + $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('component_custom_admin_menus'); + } + + if (!$this->canDo->get('component_custom_admin_menus.create') && !$this->canDo->get('component_custom_admin_menus.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('component_custom_admin_menus.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('component_custom_admin_menus.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_custom_admin_menus'); + } + + if (!$this->canDo->get('component_custom_admin_menus.edit') && !$this->canDo->get('component_custom_admin_menus.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('component_custom_admin_menus.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('component_custom_admin_menus.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 addcustommenus items to data. + if (isset($data['addcustommenus']) && is_array($data['addcustommenus'])) + { + $addcustommenus = new JRegistry; + $addcustommenus->loadArray($data['addcustommenus']); + $data['addcustommenus'] = (string) $addcustommenus; + } + elseif (!isset($data['addcustommenus'])) + { + // Set the empty addcustommenus to data + $data['addcustommenus'] = ''; + } + + // 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/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php new file mode 100644 index 000000000..e066f6090 --- /dev/null +++ b/admin/models/component_custom_admin_views.php @@ -0,0 +1,913 @@ + + @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 Component_custom_admin_views Model + */ +class ComponentbuilderModelComponent_custom_admin_views 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.component_custom_admin_views'; + + /** + * 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 = 'component_custom_admin_views', $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->addcustom_admin_views)) + { + // Convert the addcustom_admin_views field to an array. + $addcustom_admin_views = new Registry; + $addcustom_admin_views->loadString($item->addcustom_admin_views); + $item->addcustom_admin_views = $addcustom_admin_views->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addcustom_admin_views' => 'customadminview' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_custom_admin_views', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_custom_admin_views'); + } + } + + 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.component_custom_admin_views', 'component_custom_admin_views', 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('component_custom_admin_views.edit.state', 'com_componentbuilder.component_custom_admin_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_custom_admin_views.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_custom_admin_views.edit.created_by', 'com_componentbuilder.component_custom_admin_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_custom_admin_views.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_custom_admin_views.edit.created', 'com_componentbuilder.component_custom_admin_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_custom_admin_views.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/component_custom_admin_views.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('component_custom_admin_views.delete', 'com_componentbuilder.component_custom_admin_views.' . (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('component_custom_admin_views.edit.state', 'com_componentbuilder.component_custom_admin_views.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_custom_admin_views.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('component_custom_admin_views.edit', 'com_componentbuilder.component_custom_admin_views.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_custom_admin_views.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_component_custom_admin_views')); + $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.component_custom_admin_views.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('component_custom_admin_views'); + $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('component_custom_admin_views'); + } + + if (!$this->canDo->get('component_custom_admin_views.create') && !$this->canDo->get('component_custom_admin_views.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('component_custom_admin_views.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('component_custom_admin_views.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_custom_admin_views'); + } + + if (!$this->canDo->get('component_custom_admin_views.edit') && !$this->canDo->get('component_custom_admin_views.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('component_custom_admin_views.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('component_custom_admin_views.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 addcustom_admin_views items to data. + if (isset($data['addcustom_admin_views']) && is_array($data['addcustom_admin_views'])) + { + $addcustom_admin_views = new JRegistry; + $addcustom_admin_views->loadArray($data['addcustom_admin_views']); + $data['addcustom_admin_views'] = (string) $addcustom_admin_views; + } + elseif (!isset($data['addcustom_admin_views'])) + { + // Set the empty addcustom_admin_views to data + $data['addcustom_admin_views'] = ''; + } + + // 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/component_dashboard.php b/admin/models/component_dashboard.php new file mode 100644 index 000000000..50f5a2080 --- /dev/null +++ b/admin/models/component_dashboard.php @@ -0,0 +1,925 @@ + + @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 Component_dashboard Model + */ +class ComponentbuilderModelComponent_dashboard 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.component_dashboard'; + + /** + * 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 = 'component_dashboard', $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->dashboard_tab)) + { + // Convert the dashboard_tab field to an array. + $dashboard_tab = new Registry; + $dashboard_tab->loadString($item->dashboard_tab); + $item->dashboard_tab = $dashboard_tab->toArray(); + } + + if (!empty($item->php_dashboard_methods)) + { + // base64 Decode php_dashboard_methods. + $item->php_dashboard_methods = base64_decode($item->php_dashboard_methods); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'dashboard_tab' => 'name' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_dashboard', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_dashboard'); + } + } + + 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.component_dashboard', 'component_dashboard', 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('component_dashboard.edit.state', 'com_componentbuilder.component_dashboard.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_dashboard.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_dashboard.edit.created_by', 'com_componentbuilder.component_dashboard.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_dashboard.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_dashboard.edit.created', 'com_componentbuilder.component_dashboard.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_dashboard.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/component_dashboard.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('component_dashboard.delete', 'com_componentbuilder.component_dashboard.' . (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('component_dashboard.edit.state', 'com_componentbuilder.component_dashboard.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_dashboard.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('component_dashboard.edit', 'com_componentbuilder.component_dashboard.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_dashboard.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_component_dashboard')); + $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.component_dashboard.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('component_dashboard'); + $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('component_dashboard'); + } + + if (!$this->canDo->get('component_dashboard.create') && !$this->canDo->get('component_dashboard.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('component_dashboard.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('component_dashboard.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_dashboard'); + } + + if (!$this->canDo->get('component_dashboard.edit') && !$this->canDo->get('component_dashboard.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('component_dashboard.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('component_dashboard.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 dashboard_tab items to data. + if (isset($data['dashboard_tab']) && is_array($data['dashboard_tab'])) + { + $dashboard_tab = new JRegistry; + $dashboard_tab->loadArray($data['dashboard_tab']); + $data['dashboard_tab'] = (string) $dashboard_tab; + } + elseif (!isset($data['dashboard_tab'])) + { + // Set the empty dashboard_tab to data + $data['dashboard_tab'] = ''; + } + + // Set the php_dashboard_methods string to base64 string. + if (isset($data['php_dashboard_methods'])) + { + $data['php_dashboard_methods'] = base64_encode($data['php_dashboard_methods']); + } + + // 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/component_files_folders.php b/admin/models/component_files_folders.php new file mode 100644 index 000000000..4229dacb0 --- /dev/null +++ b/admin/models/component_files_folders.php @@ -0,0 +1,935 @@ + + @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 Component_files_folders Model + */ +class ComponentbuilderModelComponent_files_folders 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.component_files_folders'; + + /** + * 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 = 'component_files_folders', $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->addfiles)) + { + // Convert the addfiles field to an array. + $addfiles = new Registry; + $addfiles->loadString($item->addfiles); + $item->addfiles = $addfiles->toArray(); + } + + if (!empty($item->addfolders)) + { + // Convert the addfolders field to an array. + $addfolders = new Registry; + $addfolders->loadString($item->addfolders); + $item->addfolders = $addfolders->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addfiles' => 'file', + 'addfolders' => 'folder' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_files_folders', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_files_folders'); + } + } + + 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.component_files_folders', 'component_files_folders', 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('component_files_folders.edit.state', 'com_componentbuilder.component_files_folders.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_files_folders.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_files_folders.edit.created_by', 'com_componentbuilder.component_files_folders.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_files_folders.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_files_folders.edit.created', 'com_componentbuilder.component_files_folders.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_files_folders.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/component_files_folders.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('component_files_folders.delete', 'com_componentbuilder.component_files_folders.' . (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('component_files_folders.edit.state', 'com_componentbuilder.component_files_folders.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_files_folders.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('component_files_folders.edit', 'com_componentbuilder.component_files_folders.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_files_folders.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_component_files_folders')); + $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.component_files_folders.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('component_files_folders'); + $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('component_files_folders'); + } + + if (!$this->canDo->get('component_files_folders.create') && !$this->canDo->get('component_files_folders.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('component_files_folders.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('component_files_folders.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_files_folders'); + } + + if (!$this->canDo->get('component_files_folders.edit') && !$this->canDo->get('component_files_folders.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('component_files_folders.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('component_files_folders.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 addfiles items to data. + if (isset($data['addfiles']) && is_array($data['addfiles'])) + { + $addfiles = new JRegistry; + $addfiles->loadArray($data['addfiles']); + $data['addfiles'] = (string) $addfiles; + } + elseif (!isset($data['addfiles'])) + { + // Set the empty addfiles to data + $data['addfiles'] = ''; + } + + // Set the addfolders items to data. + if (isset($data['addfolders']) && is_array($data['addfolders'])) + { + $addfolders = new JRegistry; + $addfolders->loadArray($data['addfolders']); + $data['addfolders'] = (string) $addfolders; + } + elseif (!isset($data['addfolders'])) + { + // Set the empty addfolders to data + $data['addfolders'] = ''; + } + + // Set the 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/component_mysql_tweaks.php b/admin/models/component_mysql_tweaks.php new file mode 100644 index 000000000..0dd8d7e1c --- /dev/null +++ b/admin/models/component_mysql_tweaks.php @@ -0,0 +1,913 @@ + + @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 Component_mysql_tweaks Model + */ +class ComponentbuilderModelComponent_mysql_tweaks 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.component_mysql_tweaks'; + + /** + * 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 = 'component_mysql_tweaks', $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->sql_tweak)) + { + // Convert the sql_tweak field to an array. + $sql_tweak = new Registry; + $sql_tweak->loadString($item->sql_tweak); + $item->sql_tweak = $sql_tweak->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'sql_tweak' => 'adminview' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_mysql_tweaks', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_mysql_tweaks'); + } + } + + 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.component_mysql_tweaks', 'component_mysql_tweaks', 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('component_mysql_tweaks.edit.state', 'com_componentbuilder.component_mysql_tweaks.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_mysql_tweaks.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_mysql_tweaks.edit.created_by', 'com_componentbuilder.component_mysql_tweaks.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_mysql_tweaks.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_mysql_tweaks.edit.created', 'com_componentbuilder.component_mysql_tweaks.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_mysql_tweaks.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/component_mysql_tweaks.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('component_mysql_tweaks.delete', 'com_componentbuilder.component_mysql_tweaks.' . (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('component_mysql_tweaks.edit.state', 'com_componentbuilder.component_mysql_tweaks.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_mysql_tweaks.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('component_mysql_tweaks.edit', 'com_componentbuilder.component_mysql_tweaks.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_mysql_tweaks.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_component_mysql_tweaks')); + $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.component_mysql_tweaks.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('component_mysql_tweaks'); + $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('component_mysql_tweaks'); + } + + if (!$this->canDo->get('component_mysql_tweaks.create') && !$this->canDo->get('component_mysql_tweaks.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('component_mysql_tweaks.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('component_mysql_tweaks.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_mysql_tweaks'); + } + + if (!$this->canDo->get('component_mysql_tweaks.edit') && !$this->canDo->get('component_mysql_tweaks.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('component_mysql_tweaks.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('component_mysql_tweaks.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 sql_tweak items to data. + if (isset($data['sql_tweak']) && is_array($data['sql_tweak'])) + { + $sql_tweak = new JRegistry; + $sql_tweak->loadArray($data['sql_tweak']); + $data['sql_tweak'] = (string) $sql_tweak; + } + elseif (!isset($data['sql_tweak'])) + { + // Set the empty sql_tweak to data + $data['sql_tweak'] = ''; + } + + // 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/component_site_views.php b/admin/models/component_site_views.php new file mode 100644 index 000000000..f3c533d12 --- /dev/null +++ b/admin/models/component_site_views.php @@ -0,0 +1,913 @@ + + @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 Component_site_views Model + */ +class ComponentbuilderModelComponent_site_views 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.component_site_views'; + + /** + * 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 = 'component_site_views', $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->addsite_views)) + { + // Convert the addsite_views field to an array. + $addsite_views = new Registry; + $addsite_views->loadString($item->addsite_views); + $item->addsite_views = $addsite_views->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addsite_views' => 'siteview' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_site_views', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_site_views'); + } + } + + 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.component_site_views', 'component_site_views', 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('component_site_views.edit.state', 'com_componentbuilder.component_site_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_site_views.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_site_views.edit.created_by', 'com_componentbuilder.component_site_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_site_views.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_site_views.edit.created', 'com_componentbuilder.component_site_views.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_site_views.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/component_site_views.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('component_site_views.delete', 'com_componentbuilder.component_site_views.' . (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('component_site_views.edit.state', 'com_componentbuilder.component_site_views.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_site_views.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('component_site_views.edit', 'com_componentbuilder.component_site_views.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_site_views.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_component_site_views')); + $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.component_site_views.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('component_site_views'); + $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('component_site_views'); + } + + if (!$this->canDo->get('component_site_views.create') && !$this->canDo->get('component_site_views.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('component_site_views.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('component_site_views.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_site_views'); + } + + if (!$this->canDo->get('component_site_views.edit') && !$this->canDo->get('component_site_views.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('component_site_views.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('component_site_views.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 addsite_views items to data. + if (isset($data['addsite_views']) && is_array($data['addsite_views'])) + { + $addsite_views = new JRegistry; + $addsite_views->loadArray($data['addsite_views']); + $data['addsite_views'] = (string) $addsite_views; + } + elseif (!isset($data['addsite_views'])) + { + // Set the empty addsite_views to data + $data['addsite_views'] = ''; + } + + // 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/component_updates.php b/admin/models/component_updates.php new file mode 100644 index 000000000..ce3a5edda --- /dev/null +++ b/admin/models/component_updates.php @@ -0,0 +1,913 @@ + + @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 Component_updates Model + */ +class ComponentbuilderModelComponent_updates 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.component_updates'; + + /** + * 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 = 'component_updates', $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->version_update)) + { + // Convert the version_update field to an array. + $version_update = new Registry; + $version_update->loadString($item->version_update); + $item->version_update = $version_update->toArray(); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'version_update' => 'version' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_component_updates', $objectUpdate, 'id'); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.component_updates'); + } + } + + 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.component_updates', 'component_updates', 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('component_updates.edit.state', 'com_componentbuilder.component_updates.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_updates.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('component_updates.edit.created_by', 'com_componentbuilder.component_updates.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_updates.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('component_updates.edit.created', 'com_componentbuilder.component_updates.' . (int) $id)) + || ($id == 0 && !$user->authorise('component_updates.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/component_updates.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('component_updates.delete', 'com_componentbuilder.component_updates.' . (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('component_updates.edit.state', 'com_componentbuilder.component_updates.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('component_updates.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('component_updates.edit', 'com_componentbuilder.component_updates.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('component_updates.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_component_updates')); + $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.component_updates.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('component_updates'); + $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('component_updates'); + } + + if (!$this->canDo->get('component_updates.create') && !$this->canDo->get('component_updates.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('component_updates.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('component_updates.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->joomla_component = $this->generateUniqe('joomla_component',$this->table->joomla_component); + + // 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('component_updates'); + } + + if (!$this->canDo->get('component_updates.edit') && !$this->canDo->get('component_updates.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('component_updates.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('component_updates.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 version_update items to data. + if (isset($data['version_update']) && is_array($data['version_update'])) + { + $version_update = new JRegistry; + $version_update->loadArray($data['version_update']); + $data['version_update'] = (string) $version_update; + } + elseif (!isset($data['version_update'])) + { + // Set the empty version_update to data + $data['version_update'] = ''; + } + + // 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/componentbuilder.php b/admin/models/componentbuilder.php index d815ef3e4..0f70a8e71 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php @@ -134,7 +134,34 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'admin_fields.access' => 'admin_fields.access', 'admin_fields_conditions.create' => 'admin_fields_conditions.create', 'admins_fields_conditions.access' => 'admin_fields_conditions.access', - 'admin_fields_conditions.access' => 'admin_fields_conditions.access'); + 'admin_fields_conditions.access' => 'admin_fields_conditions.access', + 'component_admin_views.create' => 'component_admin_views.create', + 'components_admin_views.access' => 'component_admin_views.access', + 'component_admin_views.access' => 'component_admin_views.access', + 'component_site_views.create' => 'component_site_views.create', + 'components_site_views.access' => 'component_site_views.access', + 'component_site_views.access' => 'component_site_views.access', + 'component_custom_admin_views.create' => 'component_custom_admin_views.create', + 'components_custom_admin_views.access' => 'component_custom_admin_views.access', + 'component_custom_admin_views.access' => 'component_custom_admin_views.access', + 'component_updates.create' => 'component_updates.create', + 'components_updates.access' => 'component_updates.access', + 'component_updates.access' => 'component_updates.access', + 'component_mysql_tweaks.create' => 'component_mysql_tweaks.create', + 'components_mysql_tweaks.access' => 'component_mysql_tweaks.access', + 'component_mysql_tweaks.access' => 'component_mysql_tweaks.access', + 'component_custom_admin_menus.create' => 'component_custom_admin_menus.create', + 'components_custom_admin_menus.access' => 'component_custom_admin_menus.access', + 'component_custom_admin_menus.access' => 'component_custom_admin_menus.access', + 'component_config.create' => 'component_config.create', + 'components_config.access' => 'component_config.access', + 'component_config.access' => 'component_config.access', + 'component_dashboard.create' => 'component_dashboard.create', + 'components_dashboard.access' => 'component_dashboard.access', + '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'); foreach($viewGroups as $group => $views) { $i = 0; diff --git a/admin/models/components_admin_views.php b/admin/models/components_admin_views.php new file mode 100644 index 000000000..9460e82a8 --- /dev/null +++ b/admin/models/components_admin_views.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_admin_views Model + */ +class ComponentbuilderModelComponents_admin_views extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_admin_views.access', 'com_componentbuilder.component_admin_views.' . (int) $item->id) && $user->authorise('component_admin_views.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_component_admin_views', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_admin_views')); + $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_component_admin_views'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_config.php b/admin/models/components_config.php new file mode 100644 index 000000000..7f7b2d385 --- /dev/null +++ b/admin/models/components_config.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_config Model + */ +class ComponentbuilderModelComponents_config extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_config.access', 'com_componentbuilder.component_config.' . (int) $item->id) && $user->authorise('component_config.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // return items + return $items; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the componentbuilder_item table + $query->from($db->quoteName('#__componentbuilder_component_config', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_config')); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Get Yesterdays date + $date = JFactory::getDate()->modify($time)->toSql(); + // reset query + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table + $query->update($db->quoteName('#__componentbuilder_component_config'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_custom_admin_menus.php b/admin/models/components_custom_admin_menus.php new file mode 100644 index 000000000..f7e824e47 --- /dev/null +++ b/admin/models/components_custom_admin_menus.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_custom_admin_menus Model + */ +class ComponentbuilderModelComponents_custom_admin_menus extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_custom_admin_menus.access', 'com_componentbuilder.component_custom_admin_menus.' . (int) $item->id) && $user->authorise('component_custom_admin_menus.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_component_custom_admin_menus', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_custom_admin_menus')); + $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_component_custom_admin_menus'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_custom_admin_views.php b/admin/models/components_custom_admin_views.php new file mode 100644 index 000000000..fbd280846 --- /dev/null +++ b/admin/models/components_custom_admin_views.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_custom_admin_views Model + */ +class ComponentbuilderModelComponents_custom_admin_views extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_custom_admin_views.access', 'com_componentbuilder.component_custom_admin_views.' . (int) $item->id) && $user->authorise('component_custom_admin_views.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_component_custom_admin_views', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_custom_admin_views')); + $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_component_custom_admin_views'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_dashboard.php b/admin/models/components_dashboard.php new file mode 100644 index 000000000..00f3a1cd5 --- /dev/null +++ b/admin/models/components_dashboard.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_dashboard Model + */ +class ComponentbuilderModelComponents_dashboard extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_dashboard.access', 'com_componentbuilder.component_dashboard.' . (int) $item->id) && $user->authorise('component_dashboard.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_component_dashboard', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_dashboard')); + $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_component_dashboard'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_files_folders.php b/admin/models/components_files_folders.php new file mode 100644 index 000000000..abc72b717 --- /dev/null +++ b/admin/models/components_files_folders.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_files_folders Model + */ +class ComponentbuilderModelComponents_files_folders extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_files_folders.access', 'com_componentbuilder.component_files_folders.' . (int) $item->id) && $user->authorise('component_files_folders.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_component_files_folders', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_files_folders')); + $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_component_files_folders'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_mysql_tweaks.php b/admin/models/components_mysql_tweaks.php new file mode 100644 index 000000000..79ec93014 --- /dev/null +++ b/admin/models/components_mysql_tweaks.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_mysql_tweaks Model + */ +class ComponentbuilderModelComponents_mysql_tweaks extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_mysql_tweaks.access', 'com_componentbuilder.component_mysql_tweaks.' . (int) $item->id) && $user->authorise('component_mysql_tweaks.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_component_mysql_tweaks', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_mysql_tweaks')); + $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_component_mysql_tweaks'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_site_views.php b/admin/models/components_site_views.php new file mode 100644 index 000000000..7e9219b16 --- /dev/null +++ b/admin/models/components_site_views.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_site_views Model + */ +class ComponentbuilderModelComponents_site_views extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_site_views.access', 'com_componentbuilder.component_site_views.' . (int) $item->id) && $user->authorise('component_site_views.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_component_site_views', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_site_views')); + $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_component_site_views'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/components_updates.php b/admin/models/components_updates.php new file mode 100644 index 000000000..f8aaf2759 --- /dev/null +++ b/admin/models/components_updates.php @@ -0,0 +1,256 @@ + + @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'); + +/** + * Components_updates Model + */ +class ComponentbuilderModelComponents_updates extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('component_updates.access', 'com_componentbuilder.component_updates.' . (int) $item->id) && $user->authorise('component_updates.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_component_updates', 'a')); + + // From the componentbuilder_joomla_component table. + $query->select($db->quoteName('g.system_name','joomla_component_system_name')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_component', 'g') . ' ON (' . $db->quoteName('a.joomla_component') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + if ($access = $this->getState('filter.access')) + { + $query->where('a.access = ' . (int) $access); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_component_updates')); + $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_component_updates'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index eac01ceb5..887ace17a 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_view.php @@ -198,7 +198,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.custom_admin_view'); } } - $this->addcustom_admin_viewsvvwa = $item->id; + $this->addcustom_admin_viewsvvvw = $item->id; return $item; } @@ -208,7 +208,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyjlinked_components() + public function getVyelinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -265,15 +265,15 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } } - // Filter by addcustom_admin_viewsvvwa in this Repetable Field - if (ComponentbuilderHelper::checkArray($items) && isset($this->addcustom_admin_viewsvvwa)) + // Filter by addcustom_admin_viewsvvvw in this Repetable Field + if (ComponentbuilderHelper::checkArray($items) && isset($this->addcustom_admin_viewsvvvw)) { foreach ($items as $nr => &$item) { if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views)) { $tmpArray = json_decode($item->addcustom_admin_views,true); - if (!isset($tmpArray['customadminview']) || !ComponentbuilderHelper::checkArray($tmpArray['customadminview']) || !in_array($this->addcustom_admin_viewsvvwa, $tmpArray['customadminview'])) + if (!isset($tmpArray['customadminview']) || !ComponentbuilderHelper::checkArray($tmpArray['customadminview']) || !in_array($this->addcustom_admin_viewsvvvw, $tmpArray['customadminview'])) { unset($items[$nr]); continue; diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 0287d9644..c4bcb8cc4 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_views.php diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index ff8535e42..03b791b2e 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_code.php diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index 34fe22303..81b96fadd 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_codes.php @@ -280,7 +280,7 @@ class ComponentbuilderModelCustom_codes extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.component LIKE '.$search.' OR g.system_name LIKE '.$search.' OR a.path LIKE '.$search.' OR a.comment_type LIKE '.$search.' OR a.function_name LIKE '.$search.' OR a.system_name LIKE '.$search.')'); + $query->where('(a.component LIKE '.$search.' OR a.path LIKE '.$search.' OR a.comment_type LIKE '.$search.' OR a.function_name LIKE '.$search.' OR a.system_name LIKE '.$search.')'); } } diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index 0c561c3a0..ed29acd17 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_get.php @@ -183,6 +183,42 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin { // base64 Decode php_calculation. $item->php_calculation = base64_decode($item->php_calculation); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'join_view_table' => 'view_table', + 'join_db_table' => 'db_table', + 'filter' => 'filter_type', + 'where' => 'table_key', + 'order' => 'table_key', + 'global' => 'name' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_dynamic_get', $objectUpdate, 'id'); } if (!empty($item->id)) diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 5ecc96b95..3d5c45262 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_gets.php diff --git a/admin/models/field.php b/admin/models/field.php index 9a63f570c..b856f549c 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.php diff --git a/admin/models/fields.php b/admin/models/fields.php index cc5717896..78ddc31d0 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php @@ -312,7 +312,7 @@ class ComponentbuilderModelFields extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.xml LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.xml LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.')'); } } diff --git a/admin/models/fields/ftps.php b/admin/models/fields/adminsviews.php similarity index 81% rename from admin/models/fields/ftps.php rename to admin/models/fields/adminsviews.php index 045b42153..559b3d68a 100644 --- a/admin/models/fields/ftps.php +++ b/admin/models/fields/adminsviews.php @@ -10,11 +10,11 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder - @subpackage ftps.php + @subpackage adminsviews.php @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -31,16 +31,16 @@ jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Ftps Form Field class for the Componentbuilder component + * Adminsviews Form Field class for the Componentbuilder component */ -class JFormFieldFtps extends JFormFieldList +class JFormFieldAdminsviews extends JFormFieldList { /** - * The ftps field type. + * The adminsviews field type. * * @var string */ - public $type = 'ftps'; + public $type = 'adminsviews'; /** * Override to add new button * @@ -78,8 +78,8 @@ class JFormFieldFtps extends JFormFieldList $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; } $user = JFactory::getUser(); - // only add if user allowed to create ftp - if ($user->authorise('ftp.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + // only add if user allowed to create admin_view + if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button $buttonNamee = trim($buttonName); @@ -88,11 +88,11 @@ class JFormFieldFtps extends JFormFieldList $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); $buttonNamee = ucfirst(strtolower($buttonNamee)); $button[] = ' + href="index.php?option=com_componentbuilder&view=admin_view&layout=edit'.$ref.'" > '; } - // only add if user allowed to edit ftp - if (($buttonName === 'ftp' || $buttonName === 'ftps') && $user->authorise('ftp.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + // only add if user allowed to edit admin_view + if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button $buttonNamee = trim($buttonName); @@ -119,7 +119,7 @@ class JFormFieldFtps extends JFormFieldList jQuery('#".$buttonName."Create').hide(); // show edit button jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_componentbuilder&view=ftps&task=ftp.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."'; jQuery('#".$buttonName."Edit').attr('href', url); } else { // show the create button @@ -129,7 +129,7 @@ class JFormFieldFtps extends JFormFieldList } }"; } - // check if button was created for ftp field. + // check if button was created for admin_view field. if (is_array($button) && count($button) > 0) { // Load the needed script. @@ -151,19 +151,18 @@ class JFormFieldFtps extends JFormFieldList { $db = JFactory::getDBO(); $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','sales_server_ftp_name'))); - $query->from($db->quoteName('#__componentbuilder_ftp', 'a')); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); $query->where($db->quoteName('a.published') . ' >= 1'); - $query->order('a.name ASC'); + $query->order('a.system_name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->sales_server_ftp_name); + $options[] = JHtml::_('select.option', $item->id, $item->adminviews_system_name); } } return $options; diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index 948ab3331..15866c243 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage adminviewfolderlist.php diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php index 720337861..fa862fcf8 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage adminviews.php @@ -153,7 +153,7 @@ class JFormFieldAdminviews extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminview_system_name'))); $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - $query->where($db->quoteName('a.published') . ' = 1'); + $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.system_name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 49c387925..68c393041 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage articles.php diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 907468023..a380025e2 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage component.php diff --git a/admin/models/fields/componentadminmenus.php b/admin/models/fields/componentadminmenus.php new file mode 100644 index 000000000..a23074bf9 --- /dev/null +++ b/admin/models/fields/componentadminmenus.php @@ -0,0 +1,216 @@ + + @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'); + +/** + * Componentadminmenus Form Field class for the Componentbuilder component + */ +class JFormFieldComponentadminmenus extends JFormFieldList +{ + /** + * The componentadminmenus field type. + * + * @var string + */ + public $type = 'componentadminmenus'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create admin_view + if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit admin_view + if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for admin_view field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // load the db opbject + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $ID = $jinput->getInt('id', 0); + // rest the fields ids + $viewids = array(); + if (is_numeric($ID) && $ID >= 1) + { + // get the joomla component ID + $joomlacomponent = ComponentbuilderHelper::getVar('component_custom_admin_menus', (int) $ID, 'id', 'joomla_component'); + } + else + { + // get the joomla component ID + $joomlacomponent = $jinput->getInt('refid', 0); + } + if (is_numeric($joomlacomponent) && $joomlacomponent >= 1) + { + // get all the admin views linked to the joomla component + if ($addAdminViews = ComponentbuilderHelper::getVar('component_admin_views', (int) $joomlacomponent, 'joomla_component', 'addadmin_views')) + { + if (ComponentbuilderHelper::checkJson($addAdminViews)) + { + $addAdminViews = json_decode($addAdminViews, true); + if (ComponentbuilderHelper::checkArray($addAdminViews)) + { + foreach($addAdminViews as $addAdminView) + { + if (isset($addAdminView['adminview'])) + { + $viewids[] = (int) $addAdminView['adminview']; + } + } + } + } + } + } + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + // filter by fields linked + if (ComponentbuilderHelper::checkArray($viewids)) + { + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $viewids) . ')'); + } + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->name); + } + } + + return $options; + } +} diff --git a/admin/models/fields/componentadminviews.php b/admin/models/fields/componentadminviews.php new file mode 100644 index 000000000..937f1d34d --- /dev/null +++ b/admin/models/fields/componentadminviews.php @@ -0,0 +1,216 @@ + + @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'); + +/** + * Componentadminviews Form Field class for the Componentbuilder component + */ +class JFormFieldComponentadminviews extends JFormFieldList +{ + /** + * The componentadminviews field type. + * + * @var string + */ + public $type = 'componentadminviews'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create admin_view + if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit admin_view + if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for admin_view field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // load the db opbject + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $ID = $jinput->getInt('id', 0); + // rest the fields ids + $viewids = array(); + if (is_numeric($ID) && $ID >= 1) + { + // get the joomla component ID + $joomlacomponent = ComponentbuilderHelper::getVar('component_mysql_tweaks', (int) $ID, 'id', 'joomla_component'); + } + else + { + // get the joomla component ID + $joomlacomponent = $jinput->getInt('refid', 0); + } + if (is_numeric($joomlacomponent) && $joomlacomponent >= 1) + { + // get all the admin views linked to the joomla component + if ($addAdminViews = ComponentbuilderHelper::getVar('component_admin_views', (int) $joomlacomponent, 'joomla_component', 'addadmin_views')) + { + if (ComponentbuilderHelper::checkJson($addAdminViews)) + { + $addAdminViews = json_decode($addAdminViews, true); + if (ComponentbuilderHelper::checkArray($addAdminViews)) + { + foreach($addAdminViews as $addAdminView) + { + if (isset($addAdminView['adminview'])) + { + $viewids[] = (int) $addAdminView['adminview']; + } + } + } + } + } + } + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + // filter by fields linked + if (ComponentbuilderHelper::checkArray($viewids)) + { + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $viewids) . ')'); + } + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->name); + } + } + + return $options; + } +} diff --git a/admin/models/fields/components.php b/admin/models/fields/components.php index 0e8712c79..aa8491e72 100644 --- a/admin/models/fields/components.php +++ b/admin/models/fields/components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage components.php diff --git a/admin/models/fields/customadminviews.php b/admin/models/fields/customadminviews.php index ef032fc95..4364ed856 100644 --- a/admin/models/fields/customadminviews.php +++ b/admin/models/fields/customadminviews.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage customadminviews.php @@ -153,13 +153,14 @@ class JFormFieldCustomadminviews extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','customadminview_system_name'))); $query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a')); - $query->where($db->quoteName('a.published') . ' = 1'); + $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.system_name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); $options = array(); if ($items) { + $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->customadminview_system_name); diff --git a/admin/models/fields/customfilelist.php b/admin/models/fields/customfilelist.php index bebe5e3f3..e0f7f0900 100644 --- a/admin/models/fields/customfilelist.php +++ b/admin/models/fields/customfilelist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage customfilelist.php diff --git a/admin/models/fields/customfolderlist.php b/admin/models/fields/customfolderlist.php index 0e2cce6b8..81c647312 100644 --- a/admin/models/fields/customfolderlist.php +++ b/admin/models/fields/customfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage customfolderlist.php diff --git a/admin/models/fields/customgets.php b/admin/models/fields/customgets.php index 452988d33..1d3db10d0 100644 --- a/admin/models/fields/customgets.php +++ b/admin/models/fields/customgets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage customgets.php diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php index 86b027ccc..84e82dbea 100644 --- a/admin/models/fields/dbtables.php +++ b/admin/models/fields/dbtables.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage dbtables.php diff --git a/admin/models/fields/dynamicget.php b/admin/models/fields/dynamicget.php index 90f70d3f3..a819f8760 100644 --- a/admin/models/fields/dynamicget.php +++ b/admin/models/fields/dynamicget.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamicget.php diff --git a/admin/models/fields/dynamicgets.php b/admin/models/fields/dynamicgets.php index fa24590dc..6cc995e29 100644 --- a/admin/models/fields/dynamicgets.php +++ b/admin/models/fields/dynamicgets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamicgets.php diff --git a/admin/models/fields/fields.php b/admin/models/fields/fields.php index f37c14ab7..b6c8a612b 100644 --- a/admin/models/fields/fields.php +++ b/admin/models/fields/fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php @@ -153,7 +153,7 @@ class JFormFieldFields extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','field_name'))); $query->from($db->quoteName('#__componentbuilder_field', 'a')); - $query->where($db->quoteName('a.published') . ' = 1'); + $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index 98c2e8746..40abc282d 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtypes.php diff --git a/admin/models/fields/joomlacomponents.php b/admin/models/fields/joomlacomponents.php new file mode 100644 index 000000000..47aea3109 --- /dev/null +++ b/admin/models/fields/joomlacomponents.php @@ -0,0 +1,171 @@ + + @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'); + +/** + * Joomlacomponents Form Field class for the Componentbuilder component + */ +class JFormFieldJoomlacomponents extends JFormFieldList +{ + /** + * The joomlacomponents field type. + * + * @var string + */ + public $type = 'joomlacomponents'; + /** + * 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 joomla_component + if ($user->authorise('joomla_component.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 joomla_component + if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('joomla_component.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=joomla_components&task=joomla_component.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 joomla_component field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','joomla_component_system_name'))); + $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->joomla_component_system_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index d025e410c..a5d99be3b 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage lang.php diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index a3bdccab3..cd316f5b7 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage maingets.php diff --git a/admin/models/fields/matchfield.php b/admin/models/fields/matchfield.php index 4b143d0a2..41c2eae44 100644 --- a/admin/models/fields/matchfield.php +++ b/admin/models/fields/matchfield.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage matchfield.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index b86f93a79..8f3c8590f 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage siteviewfolderlist.php diff --git a/admin/models/fields/siteviews.php b/admin/models/fields/siteviews.php index 4c128b10c..999fd92b0 100644 --- a/admin/models/fields/siteviews.php +++ b/admin/models/fields/siteviews.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage siteviews.php @@ -153,13 +153,14 @@ class JFormFieldSiteviews extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','siteview_system_name'))); $query->from($db->quoteName('#__componentbuilder_site_view', 'a')); - $query->where($db->quoteName('a.published') . ' = 1'); + $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.system_name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); $options = array(); if ($items) { + $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->siteview_system_name); diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index 9975c16af..a49420cbd 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage snippets.php diff --git a/admin/models/fields/targetfields.php b/admin/models/fields/targetfields.php index 20f358dd6..0d1c39518 100644 --- a/admin/models/fields/targetfields.php +++ b/admin/models/fields/targetfields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage targetfields.php diff --git a/admin/models/fields/viewtabs.php b/admin/models/fields/viewtabs.php index ec6b94c81..e5a3be148 100644 --- a/admin/models/fields/viewtabs.php +++ b/admin/models/fields/viewtabs.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage viewtabs.php @@ -177,7 +177,9 @@ class JFormFieldViewtabs extends JFormFieldList else { $options[] = JHtml::_('select.option', 1, JText::_('COM_COMPONENTBUILDER_DETAILS')); - } + } + // add the default publish tab as an option + $options[] = JHtml::_('select.option', 15, JText::_('COM_COMPONENTBUILDER_PUBLISHING')); return $options; } } diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 83026ce2d..5442204e9 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtype.php @@ -129,7 +129,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.fieldtype'); } } - $this->fieldtypevvwc = $item->id; + $this->fieldtypevvvy = $item->id; return $item; } @@ -139,7 +139,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWabfields() + public function getVzwfields() { // Get the user object. $user = JFactory::getUser(); @@ -159,15 +159,15 @@ class ComponentbuilderModelFieldtype extends JModelAdmin $query->select($db->quoteName('g.name','fieldtype_name')); $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'g') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('g.id') . ')'); - // Filter by fieldtypevvwc global. - $fieldtypevvwc = $this->fieldtypevvwc; - if (is_numeric($fieldtypevvwc )) + // Filter by fieldtypevvvy global. + $fieldtypevvvy = $this->fieldtypevvvy; + if (is_numeric($fieldtypevvvy )) { - $query->where('a.fieldtype = ' . (int) $fieldtypevvwc ); + $query->where('a.fieldtype = ' . (int) $fieldtypevvvy ); } - elseif (is_string($fieldtypevvwc)) + elseif (is_string($fieldtypevvvy)) { - $query->where('a.fieldtype = ' . $db->quote($fieldtypevvwc)); + $query->where('a.fieldtype = ' . $db->quote($fieldtypevvvy)); } else { @@ -223,13 +223,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationWabfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVzwfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationWabfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVzwfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationWabfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVzwfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationWabfields($item->store, 'store'); + $item->store = $this->selectionTranslationVzwfields($item->store, 'store'); } } @@ -243,7 +243,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationWabfields($value,$name) + public function selectionTranslationVzwfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index 96f3186ed..411d7f4fe 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtypes.php diff --git a/admin/models/forms/admin_fields.js b/admin/models/forms/admin_fields.js index f132f8860..69ee26e4a 100644 --- a/admin/models/forms/admin_fields.js +++ b/admin/models/forms/admin_fields.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields.js diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index c161bc2d3..032492169 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -96,14 +96,14 @@ name="admin_view" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_DESCRIPTION" - class="fieldMedium" + class="list_class" multiple="false" required="true" readonly="true" button="false" /> - + diff --git a/admin/models/forms/admin_fields_conditions.js b/admin/models/forms/admin_fields_conditions.js index 3d87f7918..3fe30a5f5 100644 --- a/admin/models/forms/admin_fields_conditions.js +++ b/admin/models/forms/admin_fields_conditions.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields_conditions.js diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index be2a9ef8e..fbcb058b1 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -96,7 +96,7 @@ name="admin_view" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_LABEL" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_DESCRIPTION" - class="fieldMedium" + class="list_class" multiple="false" required="true" readonly="true" diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index 581816193..faa5545ad 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.js @@ -23,332 +23,332 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvwxvwr_required = false; -jform_vvvvvwyvws_required = false; -jform_vvvvvwzvwt_required = false; -jform_vvvvvxavwu_required = false; -jform_vvvvvxbvwv_required = false; -jform_vvvvvxcvww_required = false; -jform_vvvvvxdvwx_required = false; -jform_vvvvvxevwy_required = false; -jform_vvvvvxfvwz_required = false; -jform_vvvvvxgvxa_required = false; -jform_vvvvvxhvxb_required = false; -jform_vvvvvxivxc_required = false; -jform_vvvvvxjvxd_required = false; -jform_vvvvvxkvxe_required = false; -jform_vvvvvxlvxf_required = false; -jform_vvvvvxmvxg_required = false; -jform_vvvvvxnvxh_required = false; -jform_vvvvvxovxi_required = false; -jform_vvvvvxpvxj_required = false; -jform_vvvvvxqvxk_required = false; -jform_vvvvvxrvxl_required = false; -jform_vvvvvxsvxm_required = false; -jform_vvvvvxtvxn_required = false; -jform_vvvvvxuvxo_required = false; -jform_vvvvvxyvxp_required = false; -jform_vvvvvxyvxq_required = false; -jform_vvvvvxyvxr_required = false; -jform_vvvvvxyvxs_required = false; -jform_vvvvvxyvxt_required = false; -jform_vvvvvxyvxu_required = false; -jform_vvvvvyavxv_required = false; -jform_vvvvvyavxw_required = false; -jform_vvvvvyavxx_required = false; -jform_vvvvvyavxy_required = false; +jform_vvvvvwwvwn_required = false; +jform_vvvvvwxvwo_required = false; +jform_vvvvvwyvwp_required = false; +jform_vvvvvwzvwq_required = false; +jform_vvvvvxavwr_required = false; +jform_vvvvvxbvws_required = false; +jform_vvvvvxcvwt_required = false; +jform_vvvvvxdvwu_required = false; +jform_vvvvvxevwv_required = false; +jform_vvvvvxfvww_required = false; +jform_vvvvvxgvwx_required = false; +jform_vvvvvxhvwy_required = false; +jform_vvvvvxivwz_required = false; +jform_vvvvvxjvxa_required = false; +jform_vvvvvxkvxb_required = false; +jform_vvvvvxlvxc_required = false; +jform_vvvvvxmvxd_required = false; +jform_vvvvvxnvxe_required = false; +jform_vvvvvxovxf_required = false; +jform_vvvvvxpvxg_required = false; +jform_vvvvvxqvxh_required = false; +jform_vvvvvxrvxi_required = false; +jform_vvvvvxsvxj_required = false; +jform_vvvvvxtvxk_required = false; +jform_vvvvvxxvxl_required = false; +jform_vvvvvxxvxm_required = false; +jform_vvvvvxxvxn_required = false; +jform_vvvvvxxvxo_required = false; +jform_vvvvvxxvxp_required = false; +jform_vvvvvxxvxq_required = false; +jform_vvvvvxzvxr_required = false; +jform_vvvvvxzvxs_required = false; +jform_vvvvvxzvxt_required = false; +jform_vvvvvxzvxu_required = false; // Initial Script jQuery(document).ready(function() { - var add_css_view_vvvvvwx = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvvwx(add_css_view_vvvvvwx); + var add_css_view_vvvvvww = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvvww(add_css_view_vvvvvww); - var add_css_views_vvvvvwy = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvvwy(add_css_views_vvvvvwy); + var add_css_views_vvvvvwx = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvvwx(add_css_views_vvvvvwx); - var add_javascript_view_file_vvvvvwz = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); - vvvvvwz(add_javascript_view_file_vvvvvwz); + var add_javascript_view_file_vvvvvwy = jQuery("#jform_add_javascript_view_file input[type='radio']:checked").val(); + vvvvvwy(add_javascript_view_file_vvvvvwy); - var add_javascript_views_file_vvvvvxa = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); - vvvvvxa(add_javascript_views_file_vvvvvxa); + var add_javascript_views_file_vvvvvwz = jQuery("#jform_add_javascript_views_file input[type='radio']:checked").val(); + vvvvvwz(add_javascript_views_file_vvvvvwz); - var add_javascript_view_footer_vvvvvxb = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvvxb(add_javascript_view_footer_vvvvvxb); + var add_javascript_view_footer_vvvvvxa = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvvxa(add_javascript_view_footer_vvvvvxa); - var add_javascript_views_footer_vvvvvxc = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvvxc(add_javascript_views_footer_vvvvvxc); + var add_javascript_views_footer_vvvvvxb = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvvxb(add_javascript_views_footer_vvvvvxb); - var add_php_ajax_vvvvvxd = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvxd(add_php_ajax_vvvvvxd); + var add_php_ajax_vvvvvxc = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvxc(add_php_ajax_vvvvvxc); - var add_php_getitem_vvvvvxe = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); - vvvvvxe(add_php_getitem_vvvvvxe); + var add_php_getitem_vvvvvxd = jQuery("#jform_add_php_getitem input[type='radio']:checked").val(); + vvvvvxd(add_php_getitem_vvvvvxd); - var add_php_getitems_vvvvvxf = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); - vvvvvxf(add_php_getitems_vvvvvxf); + var add_php_getitems_vvvvvxe = jQuery("#jform_add_php_getitems input[type='radio']:checked").val(); + vvvvvxe(add_php_getitems_vvvvvxe); - var add_php_getitems_after_all_vvvvvxg = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); - vvvvvxg(add_php_getitems_after_all_vvvvvxg); + var add_php_getitems_after_all_vvvvvxf = jQuery("#jform_add_php_getitems_after_all input[type='radio']:checked").val(); + vvvvvxf(add_php_getitems_after_all_vvvvvxf); - var add_php_getlistquery_vvvvvxh = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); - vvvvvxh(add_php_getlistquery_vvvvvxh); + var add_php_getlistquery_vvvvvxg = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + vvvvvxg(add_php_getlistquery_vvvvvxg); - var add_php_before_save_vvvvvxi = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); - vvvvvxi(add_php_before_save_vvvvvxi); + var add_php_before_save_vvvvvxh = jQuery("#jform_add_php_before_save input[type='radio']:checked").val(); + vvvvvxh(add_php_before_save_vvvvvxh); - var add_php_save_vvvvvxj = jQuery("#jform_add_php_save input[type='radio']:checked").val(); - vvvvvxj(add_php_save_vvvvvxj); + var add_php_save_vvvvvxi = jQuery("#jform_add_php_save input[type='radio']:checked").val(); + vvvvvxi(add_php_save_vvvvvxi); - var add_php_postsavehook_vvvvvxk = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); - vvvvvxk(add_php_postsavehook_vvvvvxk); + var add_php_postsavehook_vvvvvxj = jQuery("#jform_add_php_postsavehook input[type='radio']:checked").val(); + vvvvvxj(add_php_postsavehook_vvvvvxj); - var add_php_allowedit_vvvvvxl = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); - vvvvvxl(add_php_allowedit_vvvvvxl); + var add_php_allowedit_vvvvvxk = jQuery("#jform_add_php_allowedit input[type='radio']:checked").val(); + vvvvvxk(add_php_allowedit_vvvvvxk); - var add_php_batchcopy_vvvvvxm = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxm(add_php_batchcopy_vvvvvxm); + var add_php_batchcopy_vvvvvxl = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxl(add_php_batchcopy_vvvvvxl); - var add_php_batchmove_vvvvvxn = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxn(add_php_batchmove_vvvvvxn); + var add_php_batchmove_vvvvvxm = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxm(add_php_batchmove_vvvvvxm); - var add_php_before_publish_vvvvvxo = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxo(add_php_before_publish_vvvvvxo); + var add_php_before_publish_vvvvvxn = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxn(add_php_before_publish_vvvvvxn); - var add_php_after_publish_vvvvvxp = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxp(add_php_after_publish_vvvvvxp); + var add_php_after_publish_vvvvvxo = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxo(add_php_after_publish_vvvvvxo); - var add_php_before_delete_vvvvvxq = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxq(add_php_before_delete_vvvvvxq); + var add_php_before_delete_vvvvvxp = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvxp(add_php_before_delete_vvvvvxp); - var add_php_after_delete_vvvvvxr = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxr(add_php_after_delete_vvvvvxr); + var add_php_after_delete_vvvvvxq = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvxq(add_php_after_delete_vvvvvxq); - var add_php_document_vvvvvxs = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvxs(add_php_document_vvvvvxs); + var add_php_document_vvvvvxr = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvxr(add_php_document_vvvvvxr); + var add_sql_vvvvvxs = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvxs(add_sql_vvvvvxs); + + var source_vvvvvxt = jQuery("#jform_source input[type='radio']:checked").val(); var add_sql_vvvvvxt = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxt(add_sql_vvvvvxt); + vvvvvxt(source_vvvvvxt,add_sql_vvvvvxt); - var source_vvvvvxu = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvxu = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxu(source_vvvvvxu,add_sql_vvvvvxu); + var source_vvvvvxv = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvxv = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvxv(source_vvvvvxv,add_sql_vvvvvxv); - var source_vvvvvxw = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvxw = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxw(source_vvvvvxw,add_sql_vvvvvxw); + var add_custom_import_vvvvvxx = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvxx(add_custom_import_vvvvvxx); var add_custom_import_vvvvvxy = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); vvvvvxy(add_custom_import_vvvvvxy); - var add_custom_import_vvvvvxz = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvxz(add_custom_import_vvvvvxz); - - var add_custom_button_vvvvvya = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvya(add_custom_button_vvvvvya); + var add_custom_button_vvvvvxz = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvxz(add_custom_button_vvvvvxz); }); -// the vvvvvwx function -function vvvvvwx(add_css_view_vvvvvwx) +// the vvvvvww function +function vvvvvww(add_css_view_vvvvvww) { // set the function logic - if (add_css_view_vvvvvwx == 1) + if (add_css_view_vvvvvww == 1) { jQuery('#jform_css_view').closest('.control-group').show(); - if (jform_vvvvvwxvwr_required) + if (jform_vvvvvwwvwn_required) { updateFieldRequired('css_view',0); jQuery('#jform_css_view').prop('required','required'); jQuery('#jform_css_view').attr('aria-required',true); jQuery('#jform_css_view').addClass('required'); - jform_vvvvvwxvwr_required = false; + jform_vvvvvwwvwn_required = false; } } else { jQuery('#jform_css_view').closest('.control-group').hide(); - if (!jform_vvvvvwxvwr_required) + if (!jform_vvvvvwwvwn_required) { updateFieldRequired('css_view',1); jQuery('#jform_css_view').removeAttr('required'); jQuery('#jform_css_view').removeAttr('aria-required'); jQuery('#jform_css_view').removeClass('required'); - jform_vvvvvwxvwr_required = true; + jform_vvvvvwwvwn_required = true; } } } -// the vvvvvwy function -function vvvvvwy(add_css_views_vvvvvwy) +// the vvvvvwx function +function vvvvvwx(add_css_views_vvvvvwx) { // set the function logic - if (add_css_views_vvvvvwy == 1) + if (add_css_views_vvvvvwx == 1) { jQuery('#jform_css_views').closest('.control-group').show(); - if (jform_vvvvvwyvws_required) + if (jform_vvvvvwxvwo_required) { updateFieldRequired('css_views',0); jQuery('#jform_css_views').prop('required','required'); jQuery('#jform_css_views').attr('aria-required',true); jQuery('#jform_css_views').addClass('required'); - jform_vvvvvwyvws_required = false; + jform_vvvvvwxvwo_required = false; } } else { jQuery('#jform_css_views').closest('.control-group').hide(); - if (!jform_vvvvvwyvws_required) + if (!jform_vvvvvwxvwo_required) { updateFieldRequired('css_views',1); jQuery('#jform_css_views').removeAttr('required'); jQuery('#jform_css_views').removeAttr('aria-required'); jQuery('#jform_css_views').removeClass('required'); - jform_vvvvvwyvws_required = true; + jform_vvvvvwxvwo_required = true; } } } -// the vvvvvwz function -function vvvvvwz(add_javascript_view_file_vvvvvwz) +// the vvvvvwy function +function vvvvvwy(add_javascript_view_file_vvvvvwy) { // set the function logic - if (add_javascript_view_file_vvvvvwz == 1) + if (add_javascript_view_file_vvvvvwy == 1) { jQuery('#jform_javascript_view_file').closest('.control-group').show(); - if (jform_vvvvvwzvwt_required) + if (jform_vvvvvwyvwp_required) { updateFieldRequired('javascript_view_file',0); jQuery('#jform_javascript_view_file').prop('required','required'); jQuery('#jform_javascript_view_file').attr('aria-required',true); jQuery('#jform_javascript_view_file').addClass('required'); - jform_vvvvvwzvwt_required = false; + jform_vvvvvwyvwp_required = false; } } else { jQuery('#jform_javascript_view_file').closest('.control-group').hide(); - if (!jform_vvvvvwzvwt_required) + if (!jform_vvvvvwyvwp_required) { updateFieldRequired('javascript_view_file',1); jQuery('#jform_javascript_view_file').removeAttr('required'); jQuery('#jform_javascript_view_file').removeAttr('aria-required'); jQuery('#jform_javascript_view_file').removeClass('required'); - jform_vvvvvwzvwt_required = true; + jform_vvvvvwyvwp_required = true; } } } -// the vvvvvxa function -function vvvvvxa(add_javascript_views_file_vvvvvxa) +// the vvvvvwz function +function vvvvvwz(add_javascript_views_file_vvvvvwz) { // set the function logic - if (add_javascript_views_file_vvvvvxa == 1) + if (add_javascript_views_file_vvvvvwz == 1) { jQuery('#jform_javascript_views_file').closest('.control-group').show(); - if (jform_vvvvvxavwu_required) + if (jform_vvvvvwzvwq_required) { updateFieldRequired('javascript_views_file',0); jQuery('#jform_javascript_views_file').prop('required','required'); jQuery('#jform_javascript_views_file').attr('aria-required',true); jQuery('#jform_javascript_views_file').addClass('required'); - jform_vvvvvxavwu_required = false; + jform_vvvvvwzvwq_required = false; } } else { jQuery('#jform_javascript_views_file').closest('.control-group').hide(); - if (!jform_vvvvvxavwu_required) + if (!jform_vvvvvwzvwq_required) { updateFieldRequired('javascript_views_file',1); jQuery('#jform_javascript_views_file').removeAttr('required'); jQuery('#jform_javascript_views_file').removeAttr('aria-required'); jQuery('#jform_javascript_views_file').removeClass('required'); - jform_vvvvvxavwu_required = true; + jform_vvvvvwzvwq_required = true; } } } -// the vvvvvxb function -function vvvvvxb(add_javascript_view_footer_vvvvvxb) +// the vvvvvxa function +function vvvvvxa(add_javascript_view_footer_vvvvvxa) { // set the function logic - if (add_javascript_view_footer_vvvvvxb == 1) + if (add_javascript_view_footer_vvvvvxa == 1) { jQuery('#jform_javascript_view_footer').closest('.control-group').show(); - if (jform_vvvvvxbvwv_required) + if (jform_vvvvvxavwr_required) { updateFieldRequired('javascript_view_footer',0); jQuery('#jform_javascript_view_footer').prop('required','required'); jQuery('#jform_javascript_view_footer').attr('aria-required',true); jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvvxbvwv_required = false; + jform_vvvvvxavwr_required = false; } } else { jQuery('#jform_javascript_view_footer').closest('.control-group').hide(); - if (!jform_vvvvvxbvwv_required) + if (!jform_vvvvvxavwr_required) { updateFieldRequired('javascript_view_footer',1); jQuery('#jform_javascript_view_footer').removeAttr('required'); jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); jQuery('#jform_javascript_view_footer').removeClass('required'); - jform_vvvvvxbvwv_required = true; + jform_vvvvvxavwr_required = true; } } } -// the vvvvvxc function -function vvvvvxc(add_javascript_views_footer_vvvvvxc) +// the vvvvvxb function +function vvvvvxb(add_javascript_views_footer_vvvvvxb) { // set the function logic - if (add_javascript_views_footer_vvvvvxc == 1) + if (add_javascript_views_footer_vvvvvxb == 1) { jQuery('#jform_javascript_views_footer').closest('.control-group').show(); - if (jform_vvvvvxcvww_required) + if (jform_vvvvvxbvws_required) { updateFieldRequired('javascript_views_footer',0); jQuery('#jform_javascript_views_footer').prop('required','required'); jQuery('#jform_javascript_views_footer').attr('aria-required',true); jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvvxcvww_required = false; + jform_vvvvvxbvws_required = false; } } else { jQuery('#jform_javascript_views_footer').closest('.control-group').hide(); - if (!jform_vvvvvxcvww_required) + if (!jform_vvvvvxbvws_required) { updateFieldRequired('javascript_views_footer',1); jQuery('#jform_javascript_views_footer').removeAttr('required'); jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvvxcvww_required = true; + jform_vvvvvxbvws_required = true; } } } -// the vvvvvxd function -function vvvvvxd(add_php_ajax_vvvvvxd) +// the vvvvvxc function +function vvvvvxc(add_php_ajax_vvvvvxc) { // set the function logic - if (add_php_ajax_vvvvvxd == 1) + if (add_php_ajax_vvvvvxc == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod').closest('.control-group').show(); - if (jform_vvvvvxdvwx_required) + if (jform_vvvvvxcvwt_required) { updateFieldRequired('php_ajaxmethod',0); jQuery('#jform_php_ajaxmethod').prop('required','required'); jQuery('#jform_php_ajaxmethod').attr('aria-required',true); jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvxdvwx_required = false; + jform_vvvvvxcvwt_required = false; } } @@ -356,549 +356,549 @@ function vvvvvxd(add_php_ajax_vvvvvxd) { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod').closest('.control-group').hide(); - if (!jform_vvvvvxdvwx_required) + if (!jform_vvvvvxcvwt_required) { updateFieldRequired('php_ajaxmethod',1); jQuery('#jform_php_ajaxmethod').removeAttr('required'); jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvxdvwx_required = true; + jform_vvvvvxcvwt_required = true; } } } -// the vvvvvxe function -function vvvvvxe(add_php_getitem_vvvvvxe) +// the vvvvvxd function +function vvvvvxd(add_php_getitem_vvvvvxd) { // set the function logic - if (add_php_getitem_vvvvvxe == 1) + if (add_php_getitem_vvvvvxd == 1) { jQuery('#jform_php_getitem').closest('.control-group').show(); - if (jform_vvvvvxevwy_required) + if (jform_vvvvvxdvwu_required) { updateFieldRequired('php_getitem',0); jQuery('#jform_php_getitem').prop('required','required'); jQuery('#jform_php_getitem').attr('aria-required',true); jQuery('#jform_php_getitem').addClass('required'); - jform_vvvvvxevwy_required = false; + jform_vvvvvxdvwu_required = false; } } else { jQuery('#jform_php_getitem').closest('.control-group').hide(); - if (!jform_vvvvvxevwy_required) + if (!jform_vvvvvxdvwu_required) { updateFieldRequired('php_getitem',1); jQuery('#jform_php_getitem').removeAttr('required'); jQuery('#jform_php_getitem').removeAttr('aria-required'); jQuery('#jform_php_getitem').removeClass('required'); - jform_vvvvvxevwy_required = true; + jform_vvvvvxdvwu_required = true; } } } -// the vvvvvxf function -function vvvvvxf(add_php_getitems_vvvvvxf) +// the vvvvvxe function +function vvvvvxe(add_php_getitems_vvvvvxe) { // set the function logic - if (add_php_getitems_vvvvvxf == 1) + if (add_php_getitems_vvvvvxe == 1) { jQuery('#jform_php_getitems').closest('.control-group').show(); - if (jform_vvvvvxfvwz_required) + if (jform_vvvvvxevwv_required) { updateFieldRequired('php_getitems',0); jQuery('#jform_php_getitems').prop('required','required'); jQuery('#jform_php_getitems').attr('aria-required',true); jQuery('#jform_php_getitems').addClass('required'); - jform_vvvvvxfvwz_required = false; + jform_vvvvvxevwv_required = false; } } else { jQuery('#jform_php_getitems').closest('.control-group').hide(); - if (!jform_vvvvvxfvwz_required) + if (!jform_vvvvvxevwv_required) { updateFieldRequired('php_getitems',1); jQuery('#jform_php_getitems').removeAttr('required'); jQuery('#jform_php_getitems').removeAttr('aria-required'); jQuery('#jform_php_getitems').removeClass('required'); - jform_vvvvvxfvwz_required = true; + jform_vvvvvxevwv_required = true; } } } -// the vvvvvxg function -function vvvvvxg(add_php_getitems_after_all_vvvvvxg) +// the vvvvvxf function +function vvvvvxf(add_php_getitems_after_all_vvvvvxf) { // set the function logic - if (add_php_getitems_after_all_vvvvvxg == 1) + if (add_php_getitems_after_all_vvvvvxf == 1) { jQuery('#jform_php_getitems_after_all').closest('.control-group').show(); - if (jform_vvvvvxgvxa_required) + if (jform_vvvvvxfvww_required) { updateFieldRequired('php_getitems_after_all',0); jQuery('#jform_php_getitems_after_all').prop('required','required'); jQuery('#jform_php_getitems_after_all').attr('aria-required',true); jQuery('#jform_php_getitems_after_all').addClass('required'); - jform_vvvvvxgvxa_required = false; + jform_vvvvvxfvww_required = false; } } else { jQuery('#jform_php_getitems_after_all').closest('.control-group').hide(); - if (!jform_vvvvvxgvxa_required) + if (!jform_vvvvvxfvww_required) { updateFieldRequired('php_getitems_after_all',1); jQuery('#jform_php_getitems_after_all').removeAttr('required'); jQuery('#jform_php_getitems_after_all').removeAttr('aria-required'); jQuery('#jform_php_getitems_after_all').removeClass('required'); - jform_vvvvvxgvxa_required = true; + jform_vvvvvxfvww_required = true; } } } -// the vvvvvxh function -function vvvvvxh(add_php_getlistquery_vvvvvxh) +// the vvvvvxg function +function vvvvvxg(add_php_getlistquery_vvvvvxg) { // set the function logic - if (add_php_getlistquery_vvvvvxh == 1) + if (add_php_getlistquery_vvvvvxg == 1) { jQuery('#jform_php_getlistquery').closest('.control-group').show(); - if (jform_vvvvvxhvxb_required) + if (jform_vvvvvxgvwx_required) { updateFieldRequired('php_getlistquery',0); jQuery('#jform_php_getlistquery').prop('required','required'); jQuery('#jform_php_getlistquery').attr('aria-required',true); jQuery('#jform_php_getlistquery').addClass('required'); - jform_vvvvvxhvxb_required = false; + jform_vvvvvxgvwx_required = false; } } else { jQuery('#jform_php_getlistquery').closest('.control-group').hide(); - if (!jform_vvvvvxhvxb_required) + if (!jform_vvvvvxgvwx_required) { updateFieldRequired('php_getlistquery',1); jQuery('#jform_php_getlistquery').removeAttr('required'); jQuery('#jform_php_getlistquery').removeAttr('aria-required'); jQuery('#jform_php_getlistquery').removeClass('required'); - jform_vvvvvxhvxb_required = true; + jform_vvvvvxgvwx_required = true; } } } -// the vvvvvxi function -function vvvvvxi(add_php_before_save_vvvvvxi) +// the vvvvvxh function +function vvvvvxh(add_php_before_save_vvvvvxh) { // set the function logic - if (add_php_before_save_vvvvvxi == 1) + if (add_php_before_save_vvvvvxh == 1) { jQuery('#jform_php_before_save').closest('.control-group').show(); - if (jform_vvvvvxivxc_required) + if (jform_vvvvvxhvwy_required) { updateFieldRequired('php_before_save',0); jQuery('#jform_php_before_save').prop('required','required'); jQuery('#jform_php_before_save').attr('aria-required',true); jQuery('#jform_php_before_save').addClass('required'); - jform_vvvvvxivxc_required = false; + jform_vvvvvxhvwy_required = false; } } else { jQuery('#jform_php_before_save').closest('.control-group').hide(); - if (!jform_vvvvvxivxc_required) + if (!jform_vvvvvxhvwy_required) { updateFieldRequired('php_before_save',1); jQuery('#jform_php_before_save').removeAttr('required'); jQuery('#jform_php_before_save').removeAttr('aria-required'); jQuery('#jform_php_before_save').removeClass('required'); - jform_vvvvvxivxc_required = true; + jform_vvvvvxhvwy_required = true; } } } -// the vvvvvxj function -function vvvvvxj(add_php_save_vvvvvxj) +// the vvvvvxi function +function vvvvvxi(add_php_save_vvvvvxi) { // set the function logic - if (add_php_save_vvvvvxj == 1) + if (add_php_save_vvvvvxi == 1) { jQuery('#jform_php_save').closest('.control-group').show(); - if (jform_vvvvvxjvxd_required) + if (jform_vvvvvxivwz_required) { updateFieldRequired('php_save',0); jQuery('#jform_php_save').prop('required','required'); jQuery('#jform_php_save').attr('aria-required',true); jQuery('#jform_php_save').addClass('required'); - jform_vvvvvxjvxd_required = false; + jform_vvvvvxivwz_required = false; } } else { jQuery('#jform_php_save').closest('.control-group').hide(); - if (!jform_vvvvvxjvxd_required) + if (!jform_vvvvvxivwz_required) { updateFieldRequired('php_save',1); jQuery('#jform_php_save').removeAttr('required'); jQuery('#jform_php_save').removeAttr('aria-required'); jQuery('#jform_php_save').removeClass('required'); - jform_vvvvvxjvxd_required = true; + jform_vvvvvxivwz_required = true; } } } -// the vvvvvxk function -function vvvvvxk(add_php_postsavehook_vvvvvxk) +// the vvvvvxj function +function vvvvvxj(add_php_postsavehook_vvvvvxj) { // set the function logic - if (add_php_postsavehook_vvvvvxk == 1) + if (add_php_postsavehook_vvvvvxj == 1) { jQuery('#jform_php_postsavehook').closest('.control-group').show(); - if (jform_vvvvvxkvxe_required) + if (jform_vvvvvxjvxa_required) { updateFieldRequired('php_postsavehook',0); jQuery('#jform_php_postsavehook').prop('required','required'); jQuery('#jform_php_postsavehook').attr('aria-required',true); jQuery('#jform_php_postsavehook').addClass('required'); - jform_vvvvvxkvxe_required = false; + jform_vvvvvxjvxa_required = false; } } else { jQuery('#jform_php_postsavehook').closest('.control-group').hide(); - if (!jform_vvvvvxkvxe_required) + if (!jform_vvvvvxjvxa_required) { updateFieldRequired('php_postsavehook',1); jQuery('#jform_php_postsavehook').removeAttr('required'); jQuery('#jform_php_postsavehook').removeAttr('aria-required'); jQuery('#jform_php_postsavehook').removeClass('required'); - jform_vvvvvxkvxe_required = true; + jform_vvvvvxjvxa_required = true; } } } -// the vvvvvxl function -function vvvvvxl(add_php_allowedit_vvvvvxl) +// the vvvvvxk function +function vvvvvxk(add_php_allowedit_vvvvvxk) { // set the function logic - if (add_php_allowedit_vvvvvxl == 1) + if (add_php_allowedit_vvvvvxk == 1) { jQuery('#jform_php_allowedit').closest('.control-group').show(); - if (jform_vvvvvxlvxf_required) + if (jform_vvvvvxkvxb_required) { updateFieldRequired('php_allowedit',0); jQuery('#jform_php_allowedit').prop('required','required'); jQuery('#jform_php_allowedit').attr('aria-required',true); jQuery('#jform_php_allowedit').addClass('required'); - jform_vvvvvxlvxf_required = false; + jform_vvvvvxkvxb_required = false; } } else { jQuery('#jform_php_allowedit').closest('.control-group').hide(); - if (!jform_vvvvvxlvxf_required) + if (!jform_vvvvvxkvxb_required) { updateFieldRequired('php_allowedit',1); jQuery('#jform_php_allowedit').removeAttr('required'); jQuery('#jform_php_allowedit').removeAttr('aria-required'); jQuery('#jform_php_allowedit').removeClass('required'); - jform_vvvvvxlvxf_required = true; + jform_vvvvvxkvxb_required = true; } } } -// the vvvvvxm function -function vvvvvxm(add_php_batchcopy_vvvvvxm) +// the vvvvvxl function +function vvvvvxl(add_php_batchcopy_vvvvvxl) { // set the function logic - if (add_php_batchcopy_vvvvvxm == 1) + if (add_php_batchcopy_vvvvvxl == 1) { jQuery('#jform_php_batchcopy').closest('.control-group').show(); - if (jform_vvvvvxmvxg_required) + if (jform_vvvvvxlvxc_required) { updateFieldRequired('php_batchcopy',0); jQuery('#jform_php_batchcopy').prop('required','required'); jQuery('#jform_php_batchcopy').attr('aria-required',true); jQuery('#jform_php_batchcopy').addClass('required'); - jform_vvvvvxmvxg_required = false; + jform_vvvvvxlvxc_required = false; } } else { jQuery('#jform_php_batchcopy').closest('.control-group').hide(); - if (!jform_vvvvvxmvxg_required) + if (!jform_vvvvvxlvxc_required) { updateFieldRequired('php_batchcopy',1); jQuery('#jform_php_batchcopy').removeAttr('required'); jQuery('#jform_php_batchcopy').removeAttr('aria-required'); jQuery('#jform_php_batchcopy').removeClass('required'); - jform_vvvvvxmvxg_required = true; + jform_vvvvvxlvxc_required = true; } } } -// the vvvvvxn function -function vvvvvxn(add_php_batchmove_vvvvvxn) +// the vvvvvxm function +function vvvvvxm(add_php_batchmove_vvvvvxm) { // set the function logic - if (add_php_batchmove_vvvvvxn == 1) + if (add_php_batchmove_vvvvvxm == 1) { jQuery('#jform_php_batchmove').closest('.control-group').show(); - if (jform_vvvvvxnvxh_required) + if (jform_vvvvvxmvxd_required) { updateFieldRequired('php_batchmove',0); jQuery('#jform_php_batchmove').prop('required','required'); jQuery('#jform_php_batchmove').attr('aria-required',true); jQuery('#jform_php_batchmove').addClass('required'); - jform_vvvvvxnvxh_required = false; + jform_vvvvvxmvxd_required = false; } } else { jQuery('#jform_php_batchmove').closest('.control-group').hide(); - if (!jform_vvvvvxnvxh_required) + if (!jform_vvvvvxmvxd_required) { updateFieldRequired('php_batchmove',1); jQuery('#jform_php_batchmove').removeAttr('required'); jQuery('#jform_php_batchmove').removeAttr('aria-required'); jQuery('#jform_php_batchmove').removeClass('required'); - jform_vvvvvxnvxh_required = true; + jform_vvvvvxmvxd_required = true; } } } -// the vvvvvxo function -function vvvvvxo(add_php_before_publish_vvvvvxo) +// the vvvvvxn function +function vvvvvxn(add_php_before_publish_vvvvvxn) { // set the function logic - if (add_php_before_publish_vvvvvxo == 1) + if (add_php_before_publish_vvvvvxn == 1) { jQuery('#jform_php_before_publish').closest('.control-group').show(); - if (jform_vvvvvxovxi_required) + if (jform_vvvvvxnvxe_required) { updateFieldRequired('php_before_publish',0); jQuery('#jform_php_before_publish').prop('required','required'); jQuery('#jform_php_before_publish').attr('aria-required',true); jQuery('#jform_php_before_publish').addClass('required'); - jform_vvvvvxovxi_required = false; + jform_vvvvvxnvxe_required = false; } } else { jQuery('#jform_php_before_publish').closest('.control-group').hide(); - if (!jform_vvvvvxovxi_required) + if (!jform_vvvvvxnvxe_required) { updateFieldRequired('php_before_publish',1); jQuery('#jform_php_before_publish').removeAttr('required'); jQuery('#jform_php_before_publish').removeAttr('aria-required'); jQuery('#jform_php_before_publish').removeClass('required'); - jform_vvvvvxovxi_required = true; + jform_vvvvvxnvxe_required = true; } } } -// the vvvvvxp function -function vvvvvxp(add_php_after_publish_vvvvvxp) +// the vvvvvxo function +function vvvvvxo(add_php_after_publish_vvvvvxo) { // set the function logic - if (add_php_after_publish_vvvvvxp == 1) + if (add_php_after_publish_vvvvvxo == 1) { jQuery('#jform_php_after_publish').closest('.control-group').show(); - if (jform_vvvvvxpvxj_required) + if (jform_vvvvvxovxf_required) { updateFieldRequired('php_after_publish',0); jQuery('#jform_php_after_publish').prop('required','required'); jQuery('#jform_php_after_publish').attr('aria-required',true); jQuery('#jform_php_after_publish').addClass('required'); - jform_vvvvvxpvxj_required = false; + jform_vvvvvxovxf_required = false; } } else { jQuery('#jform_php_after_publish').closest('.control-group').hide(); - if (!jform_vvvvvxpvxj_required) + if (!jform_vvvvvxovxf_required) { updateFieldRequired('php_after_publish',1); jQuery('#jform_php_after_publish').removeAttr('required'); jQuery('#jform_php_after_publish').removeAttr('aria-required'); jQuery('#jform_php_after_publish').removeClass('required'); - jform_vvvvvxpvxj_required = true; + jform_vvvvvxovxf_required = true; } } } -// the vvvvvxq function -function vvvvvxq(add_php_before_delete_vvvvvxq) +// the vvvvvxp function +function vvvvvxp(add_php_before_delete_vvvvvxp) { // set the function logic - if (add_php_before_delete_vvvvvxq == 1) + if (add_php_before_delete_vvvvvxp == 1) { jQuery('#jform_php_before_delete').closest('.control-group').show(); - if (jform_vvvvvxqvxk_required) + if (jform_vvvvvxpvxg_required) { updateFieldRequired('php_before_delete',0); jQuery('#jform_php_before_delete').prop('required','required'); jQuery('#jform_php_before_delete').attr('aria-required',true); jQuery('#jform_php_before_delete').addClass('required'); - jform_vvvvvxqvxk_required = false; + jform_vvvvvxpvxg_required = false; } } else { jQuery('#jform_php_before_delete').closest('.control-group').hide(); - if (!jform_vvvvvxqvxk_required) + if (!jform_vvvvvxpvxg_required) { updateFieldRequired('php_before_delete',1); jQuery('#jform_php_before_delete').removeAttr('required'); jQuery('#jform_php_before_delete').removeAttr('aria-required'); jQuery('#jform_php_before_delete').removeClass('required'); - jform_vvvvvxqvxk_required = true; + jform_vvvvvxpvxg_required = true; } } } -// the vvvvvxr function -function vvvvvxr(add_php_after_delete_vvvvvxr) +// the vvvvvxq function +function vvvvvxq(add_php_after_delete_vvvvvxq) { // set the function logic - if (add_php_after_delete_vvvvvxr == 1) + if (add_php_after_delete_vvvvvxq == 1) { jQuery('#jform_php_after_delete').closest('.control-group').show(); - if (jform_vvvvvxrvxl_required) + if (jform_vvvvvxqvxh_required) { updateFieldRequired('php_after_delete',0); jQuery('#jform_php_after_delete').prop('required','required'); jQuery('#jform_php_after_delete').attr('aria-required',true); jQuery('#jform_php_after_delete').addClass('required'); - jform_vvvvvxrvxl_required = false; + jform_vvvvvxqvxh_required = false; } } else { jQuery('#jform_php_after_delete').closest('.control-group').hide(); - if (!jform_vvvvvxrvxl_required) + if (!jform_vvvvvxqvxh_required) { updateFieldRequired('php_after_delete',1); jQuery('#jform_php_after_delete').removeAttr('required'); jQuery('#jform_php_after_delete').removeAttr('aria-required'); jQuery('#jform_php_after_delete').removeClass('required'); - jform_vvvvvxrvxl_required = true; + jform_vvvvvxqvxh_required = true; } } } -// the vvvvvxs function -function vvvvvxs(add_php_document_vvvvvxs) +// the vvvvvxr function +function vvvvvxr(add_php_document_vvvvvxr) { // set the function logic - if (add_php_document_vvvvvxs == 1) + if (add_php_document_vvvvvxr == 1) { jQuery('#jform_php_document').closest('.control-group').show(); - if (jform_vvvvvxsvxm_required) + if (jform_vvvvvxrvxi_required) { updateFieldRequired('php_document',0); jQuery('#jform_php_document').prop('required','required'); jQuery('#jform_php_document').attr('aria-required',true); jQuery('#jform_php_document').addClass('required'); - jform_vvvvvxsvxm_required = false; + jform_vvvvvxrvxi_required = false; } } else { jQuery('#jform_php_document').closest('.control-group').hide(); - if (!jform_vvvvvxsvxm_required) + if (!jform_vvvvvxrvxi_required) { updateFieldRequired('php_document',1); jQuery('#jform_php_document').removeAttr('required'); jQuery('#jform_php_document').removeAttr('aria-required'); jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvxsvxm_required = true; + jform_vvvvvxrvxi_required = true; } } } -// the vvvvvxt function -function vvvvvxt(add_sql_vvvvvxt) +// the vvvvvxs function +function vvvvvxs(add_sql_vvvvvxs) { // set the function logic - if (add_sql_vvvvvxt == 1) + if (add_sql_vvvvvxs == 1) { jQuery('#jform_source').closest('.control-group').show(); - if (jform_vvvvvxtvxn_required) + if (jform_vvvvvxsvxj_required) { updateFieldRequired('source',0); jQuery('#jform_source').prop('required','required'); jQuery('#jform_source').attr('aria-required',true); jQuery('#jform_source').addClass('required'); - jform_vvvvvxtvxn_required = false; + jform_vvvvvxsvxj_required = false; } } else { jQuery('#jform_source').closest('.control-group').hide(); - if (!jform_vvvvvxtvxn_required) + if (!jform_vvvvvxsvxj_required) { updateFieldRequired('source',1); jQuery('#jform_source').removeAttr('required'); jQuery('#jform_source').removeAttr('aria-required'); jQuery('#jform_source').removeClass('required'); - jform_vvvvvxtvxn_required = true; + jform_vvvvvxsvxj_required = true; } } } -// the vvvvvxu function -function vvvvvxu(source_vvvvvxu,add_sql_vvvvvxu) +// the vvvvvxt function +function vvvvvxt(source_vvvvvxt,add_sql_vvvvvxt) { // set the function logic - if (source_vvvvvxu == 2 && add_sql_vvvvvxu == 1) + if (source_vvvvvxt == 2 && add_sql_vvvvvxt == 1) { jQuery('#jform_sql').closest('.control-group').show(); - if (jform_vvvvvxuvxo_required) + if (jform_vvvvvxtvxk_required) { updateFieldRequired('sql',0); jQuery('#jform_sql').prop('required','required'); jQuery('#jform_sql').attr('aria-required',true); jQuery('#jform_sql').addClass('required'); - jform_vvvvvxuvxo_required = false; + jform_vvvvvxtvxk_required = false; } } else { jQuery('#jform_sql').closest('.control-group').hide(); - if (!jform_vvvvvxuvxo_required) + if (!jform_vvvvvxtvxk_required) { updateFieldRequired('sql',1); jQuery('#jform_sql').removeAttr('required'); jQuery('#jform_sql').removeAttr('aria-required'); jQuery('#jform_sql').removeClass('required'); - jform_vvvvvxuvxo_required = true; + jform_vvvvvxtvxk_required = true; } } } -// the vvvvvxw function -function vvvvvxw(source_vvvvvxw,add_sql_vvvvvxw) +// the vvvvvxv function +function vvvvvxv(source_vvvvvxv,add_sql_vvvvvxv) { // set the function logic - if (source_vvvvvxw == 1 && add_sql_vvvvvxw == 1) + if (source_vvvvvxv == 1 && add_sql_vvvvvxv == 1) { jQuery('#jform_addtables-lbl').closest('.control-group').show(); } @@ -908,139 +908,139 @@ function vvvvvxw(source_vvvvvxw,add_sql_vvvvvxw) } } -// the vvvvvxy function -function vvvvvxy(add_custom_import_vvvvvxy) +// the vvvvvxx function +function vvvvvxx(add_custom_import_vvvvvxx) { // set the function logic - if (add_custom_import_vvvvvxy == 1) + if (add_custom_import_vvvvvxx == 1) { jQuery('#jform_html_import_view').closest('.control-group').show(); - if (jform_vvvvvxyvxp_required) + if (jform_vvvvvxxvxl_required) { updateFieldRequired('html_import_view',0); jQuery('#jform_html_import_view').prop('required','required'); jQuery('#jform_html_import_view').attr('aria-required',true); jQuery('#jform_html_import_view').addClass('required'); - jform_vvvvvxyvxp_required = false; + jform_vvvvvxxvxl_required = false; } jQuery('.note_advanced_import').closest('.control-group').show(); jQuery('#jform_php_import_display').closest('.control-group').show(); - if (jform_vvvvvxyvxq_required) + if (jform_vvvvvxxvxm_required) { updateFieldRequired('php_import_display',0); jQuery('#jform_php_import_display').prop('required','required'); jQuery('#jform_php_import_display').attr('aria-required',true); jQuery('#jform_php_import_display').addClass('required'); - jform_vvvvvxyvxq_required = false; + jform_vvvvvxxvxm_required = false; } jQuery('#jform_php_import_ext').closest('.control-group').show(); - if (jform_vvvvvxyvxr_required) + if (jform_vvvvvxxvxn_required) { updateFieldRequired('php_import_ext',0); jQuery('#jform_php_import_ext').prop('required','required'); jQuery('#jform_php_import_ext').attr('aria-required',true); jQuery('#jform_php_import_ext').addClass('required'); - jform_vvvvvxyvxr_required = false; + jform_vvvvvxxvxn_required = false; } jQuery('#jform_php_import').closest('.control-group').show(); - if (jform_vvvvvxyvxs_required) + if (jform_vvvvvxxvxo_required) { updateFieldRequired('php_import',0); jQuery('#jform_php_import').prop('required','required'); jQuery('#jform_php_import').attr('aria-required',true); jQuery('#jform_php_import').addClass('required'); - jform_vvvvvxyvxs_required = false; + jform_vvvvvxxvxo_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); - if (jform_vvvvvxyvxt_required) + if (jform_vvvvvxxvxp_required) { updateFieldRequired('php_import_save',0); jQuery('#jform_php_import_save').prop('required','required'); jQuery('#jform_php_import_save').attr('aria-required',true); jQuery('#jform_php_import_save').addClass('required'); - jform_vvvvvxyvxt_required = false; + jform_vvvvvxxvxp_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); - if (jform_vvvvvxyvxu_required) + if (jform_vvvvvxxvxq_required) { updateFieldRequired('php_import_setdata',0); jQuery('#jform_php_import_setdata').prop('required','required'); jQuery('#jform_php_import_setdata').attr('aria-required',true); jQuery('#jform_php_import_setdata').addClass('required'); - jform_vvvvvxyvxu_required = false; + jform_vvvvvxxvxq_required = false; } } else { jQuery('#jform_html_import_view').closest('.control-group').hide(); - if (!jform_vvvvvxyvxp_required) + if (!jform_vvvvvxxvxl_required) { updateFieldRequired('html_import_view',1); jQuery('#jform_html_import_view').removeAttr('required'); jQuery('#jform_html_import_view').removeAttr('aria-required'); jQuery('#jform_html_import_view').removeClass('required'); - jform_vvvvvxyvxp_required = true; + jform_vvvvvxxvxl_required = true; } jQuery('.note_advanced_import').closest('.control-group').hide(); jQuery('#jform_php_import_display').closest('.control-group').hide(); - if (!jform_vvvvvxyvxq_required) + if (!jform_vvvvvxxvxm_required) { updateFieldRequired('php_import_display',1); jQuery('#jform_php_import_display').removeAttr('required'); jQuery('#jform_php_import_display').removeAttr('aria-required'); jQuery('#jform_php_import_display').removeClass('required'); - jform_vvvvvxyvxq_required = true; + jform_vvvvvxxvxm_required = true; } jQuery('#jform_php_import_ext').closest('.control-group').hide(); - if (!jform_vvvvvxyvxr_required) + if (!jform_vvvvvxxvxn_required) { updateFieldRequired('php_import_ext',1); jQuery('#jform_php_import_ext').removeAttr('required'); jQuery('#jform_php_import_ext').removeAttr('aria-required'); jQuery('#jform_php_import_ext').removeClass('required'); - jform_vvvvvxyvxr_required = true; + jform_vvvvvxxvxn_required = true; } jQuery('#jform_php_import').closest('.control-group').hide(); - if (!jform_vvvvvxyvxs_required) + if (!jform_vvvvvxxvxo_required) { updateFieldRequired('php_import',1); jQuery('#jform_php_import').removeAttr('required'); jQuery('#jform_php_import').removeAttr('aria-required'); jQuery('#jform_php_import').removeClass('required'); - jform_vvvvvxyvxs_required = true; + jform_vvvvvxxvxo_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); - if (!jform_vvvvvxyvxt_required) + if (!jform_vvvvvxxvxp_required) { updateFieldRequired('php_import_save',1); jQuery('#jform_php_import_save').removeAttr('required'); jQuery('#jform_php_import_save').removeAttr('aria-required'); jQuery('#jform_php_import_save').removeClass('required'); - jform_vvvvvxyvxt_required = true; + jform_vvvvvxxvxp_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); - if (!jform_vvvvvxyvxu_required) + if (!jform_vvvvvxxvxq_required) { updateFieldRequired('php_import_setdata',1); jQuery('#jform_php_import_setdata').removeAttr('required'); jQuery('#jform_php_import_setdata').removeAttr('aria-required'); jQuery('#jform_php_import_setdata').removeClass('required'); - jform_vvvvvxyvxu_required = true; + jform_vvvvvxxvxq_required = true; } } } -// the vvvvvxz function -function vvvvvxz(add_custom_import_vvvvvxz) +// the vvvvvxy function +function vvvvvxy(add_custom_import_vvvvvxy) { // set the function logic - if (add_custom_import_vvvvvxz == 0) + if (add_custom_import_vvvvvxy == 0) { jQuery('.note_beginner_import').closest('.control-group').show(); } @@ -1050,51 +1050,51 @@ function vvvvvxz(add_custom_import_vvvvvxz) } } -// the vvvvvya function -function vvvvvya(add_custom_button_vvvvvya) +// the vvvvvxz function +function vvvvvxz(add_custom_button_vvvvvxz) { // set the function logic - if (add_custom_button_vvvvvya == 1) + if (add_custom_button_vvvvvxz == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvyavxv_required) + if (jform_vvvvvxzvxr_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvyavxv_required = false; + jform_vvvvvxzvxr_required = false; } jQuery('#jform_php_controller_list').closest('.control-group').show(); - if (jform_vvvvvyavxw_required) + if (jform_vvvvvxzvxs_required) { updateFieldRequired('php_controller_list',0); jQuery('#jform_php_controller_list').prop('required','required'); jQuery('#jform_php_controller_list').attr('aria-required',true); jQuery('#jform_php_controller_list').addClass('required'); - jform_vvvvvyavxw_required = false; + jform_vvvvvxzvxs_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvyavxx_required) + if (jform_vvvvvxzvxt_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvyavxx_required = false; + jform_vvvvvxzvxt_required = false; } jQuery('#jform_php_model_list').closest('.control-group').show(); - if (jform_vvvvvyavxy_required) + if (jform_vvvvvxzvxu_required) { updateFieldRequired('php_model_list',0); jQuery('#jform_php_model_list').prop('required','required'); jQuery('#jform_php_model_list').attr('aria-required',true); jQuery('#jform_php_model_list').addClass('required'); - jform_vvvvvyavxy_required = false; + jform_vvvvvxzvxu_required = false; } } @@ -1102,40 +1102,40 @@ function vvvvvya(add_custom_button_vvvvvya) { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvyavxv_required) + if (!jform_vvvvvxzvxr_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvyavxv_required = true; + jform_vvvvvxzvxr_required = true; } jQuery('#jform_php_controller_list').closest('.control-group').hide(); - if (!jform_vvvvvyavxw_required) + if (!jform_vvvvvxzvxs_required) { updateFieldRequired('php_controller_list',1); jQuery('#jform_php_controller_list').removeAttr('required'); jQuery('#jform_php_controller_list').removeAttr('aria-required'); jQuery('#jform_php_controller_list').removeClass('required'); - jform_vvvvvyavxw_required = true; + jform_vvvvvxzvxs_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvyavxx_required) + if (!jform_vvvvvxzvxt_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvyavxx_required = true; + jform_vvvvvxzvxt_required = true; } jQuery('#jform_php_model_list').closest('.control-group').hide(); - if (!jform_vvvvvyavxy_required) + if (!jform_vvvvvxzvxu_required) { updateFieldRequired('php_model_list',1); jQuery('#jform_php_model_list').removeAttr('required'); jQuery('#jform_php_model_list').removeAttr('aria-required'); jQuery('#jform_php_model_list').removeClass('required'); - jform_vvvvvyavxy_required = true; + jform_vvvvvxzvxu_required = true; } } } @@ -1183,16 +1183,16 @@ jQuery(document).ready(function() var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); getImportScripts(valueSwitch); // now load the fields - getFieldsDisplay('admin_fields'); - getFieldsDisplay('admin_fields_conditions'); + getAjaxDisplay('admin_fields'); + getAjaxDisplay('admin_fields_conditions'); // set button addButtonID('admin_fields_conditions','create_edit_buttons', 1); // <-- second - // set button to add more languages + // set button to create more fields addButton('field','create_edit_buttons'); // <-- third }); -function getFieldsDisplay(type){ - getFieldsDisplay_server(type).done(function(result) { +function getAjaxDisplay(type){ + getAjaxDisplay_server(type).done(function(result) { if(result){ jQuery('#display_'+type).html(result); } @@ -1201,8 +1201,8 @@ function getFieldsDisplay(type){ }); } -function getFieldsDisplay_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getFieldsDisplay&format=json&vdm="+vastDevMod; +function getAjaxDisplay_server(type){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod; if(token.length > 0 && type.length > 0){ var request = 'token='+token+'&type=' + type; } @@ -1216,7 +1216,7 @@ function getFieldsDisplay_server(type){ } function addData(result,where){ - jQuery(where).closest('.control-group').parent().append(result); + jQuery(result).insertAfter(jQuery(where).closest('.control-group')); } function addButtonID_server(type, size){ @@ -1235,10 +1235,10 @@ function addButtonID_server(type, size){ function addButtonID(type, where, size){ addButtonID_server(type, size).done(function(result) { if(result){ - if (1 == size) { - addData(result, '#jform_'+where); - } else if (2 == size) { + if (2 == size) { jQuery('#'+where).html(result); + } else { + addData(result, '#jform_'+where); } } }); diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 833893642..4fc0fa872 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -149,31 +149,34 @@ message="Error! Please add some short description here." hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" /> - + + + - + - - - - - - - - - - - - COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY - + + + @@ -293,19 +252,19 @@ filter="HTML" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_DESCRIPTION_HINT" /> - + - - - - + type="textarea" + name="php_allowedit" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_HINT" + required="true" + /> COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE + + + + + + + + + + + + - + - + + maximum="14"> - + @@ -606,7 +606,7 @@ required="true" /> - + + @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/component_admin_views.xml b/admin/models/forms/component_admin_views.xml new file mode 100644 index 000000000..6e594faac --- /dev/null +++ b/admin/models/forms/component_admin_views.xml @@ -0,0 +1,705 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_config.js b/admin/models/forms/component_config.js new file mode 100644 index 000000000..06018c607 --- /dev/null +++ b/admin/models/forms/component_config.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage component_config.js + @author Llewellyn van der Merwe + @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/component_config.xml b/admin/models/forms/component_config.xml new file mode 100644 index 000000000..fc05033e7 --- /dev/null +++ b/admin/models/forms/component_config.xml @@ -0,0 +1,184 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_custom_admin_menus.js b/admin/models/forms/component_custom_admin_menus.js new file mode 100644 index 000000000..dc5391903 --- /dev/null +++ b/admin/models/forms/component_custom_admin_menus.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage component_custom_admin_menus.js + @author Llewellyn van der Merwe + @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/component_custom_admin_menus.xml b/admin/models/forms/component_custom_admin_menus.xml new file mode 100644 index 000000000..282378b0c --- /dev/null +++ b/admin/models/forms/component_custom_admin_menus.xml @@ -0,0 +1,239 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_custom_admin_views.js b/admin/models/forms/component_custom_admin_views.js new file mode 100644 index 000000000..b31652e7d --- /dev/null +++ b/admin/models/forms/component_custom_admin_views.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_custom_admin_views.js + @author Llewellyn van der Merwe + @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/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml new file mode 100644 index 000000000..ea982aa31 --- /dev/null +++ b/admin/models/forms/component_custom_admin_views.xml @@ -0,0 +1,661 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_dashboard.js b/admin/models/forms/component_dashboard.js new file mode 100644 index 000000000..9b38f7a3e --- /dev/null +++ b/admin/models/forms/component_dashboard.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage component_dashboard.js + @author Llewellyn van der Merwe + @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/component_dashboard.xml b/admin/models/forms/component_dashboard.xml new file mode 100644 index 000000000..86f096fe0 --- /dev/null +++ b/admin/models/forms/component_dashboard.xml @@ -0,0 +1,198 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_files_folders.js b/admin/models/forms/component_files_folders.js new file mode 100644 index 000000000..ad57f8697 --- /dev/null +++ b/admin/models/forms/component_files_folders.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage component_files_folders.js + @author Llewellyn van der Merwe + @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/component_files_folders.xml b/admin/models/forms/component_files_folders.xml new file mode 100644 index 000000000..365a2bb6a --- /dev/null +++ b/admin/models/forms/component_files_folders.xml @@ -0,0 +1,233 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_mysql_tweaks.js b/admin/models/forms/component_mysql_tweaks.js new file mode 100644 index 000000000..afc5506a6 --- /dev/null +++ b/admin/models/forms/component_mysql_tweaks.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_mysql_tweaks.js + @author Llewellyn van der Merwe + @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/component_mysql_tweaks.xml b/admin/models/forms/component_mysql_tweaks.xml new file mode 100644 index 000000000..51cfa9b31 --- /dev/null +++ b/admin/models/forms/component_mysql_tweaks.xml @@ -0,0 +1,200 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_site_views.js b/admin/models/forms/component_site_views.js new file mode 100644 index 000000000..ee2efee72 --- /dev/null +++ b/admin/models/forms/component_site_views.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 4 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_site_views.js + @author Llewellyn van der Merwe + @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/component_site_views.xml b/admin/models/forms/component_site_views.xml new file mode 100644 index 000000000..dbdc2a004 --- /dev/null +++ b/admin/models/forms/component_site_views.xml @@ -0,0 +1,207 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/component_updates.js b/admin/models/forms/component_updates.js new file mode 100644 index 000000000..b376863af --- /dev/null +++ b/admin/models/forms/component_updates.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 8 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage component_updates.js + @author Llewellyn van der Merwe + @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/component_updates.xml b/admin/models/forms/component_updates.xml new file mode 100644 index 000000000..d11fac5f3 --- /dev/null +++ b/admin/models/forms/component_updates.xml @@ -0,0 +1,185 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index f45ce7e5d..212adfb90 100644 --- a/admin/models/forms/custom_admin_view.js +++ b/admin/models/forms/custom_admin_view.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_view.js @@ -23,255 +23,255 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvybvya_required = false; -jform_vvvvvycvyb_required = false; -jform_vvvvvydvyc_required = false; -jform_vvvvvyevyd_required = false; -jform_vvvvvyfvye_required = false; -jform_vvvvvygvyf_required = false; -jform_vvvvvyhvyg_required = false; -jform_vvvvvyhvyh_required = false; -jform_vvvvvyivyi_required = false; +jform_vvvvvyavxv_required = false; +jform_vvvvvybvxw_required = false; +jform_vvvvvycvxx_required = false; +jform_vvvvvydvxy_required = false; +jform_vvvvvyevxz_required = false; +jform_vvvvvyfvya_required = false; +jform_vvvvvygvyb_required = false; +jform_vvvvvygvyc_required = false; +jform_vvvvvyhvyd_required = false; // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvvyb = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyb(add_php_view_vvvvvyb); + var add_php_view_vvvvvya = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvya(add_php_view_vvvvvya); - var add_php_jview_display_vvvvvyc = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvyc(add_php_jview_display_vvvvvyc); + var add_php_jview_display_vvvvvyb = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvyb(add_php_jview_display_vvvvvyb); - var add_php_jview_vvvvvyd = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvyd(add_php_jview_vvvvvyd); + var add_php_jview_vvvvvyc = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvyc(add_php_jview_vvvvvyc); - var add_php_document_vvvvvye = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvye(add_php_document_vvvvvye); + var add_php_document_vvvvvyd = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyd(add_php_document_vvvvvyd); - var add_css_document_vvvvvyf = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvyf(add_css_document_vvvvvyf); + var add_css_document_vvvvvye = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvye(add_css_document_vvvvvye); - var add_js_document_vvvvvyg = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvyg(add_js_document_vvvvvyg); + var add_js_document_vvvvvyf = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvyf(add_js_document_vvvvvyf); - var add_custom_button_vvvvvyh = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyh(add_custom_button_vvvvvyh); + var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyg(add_custom_button_vvvvvyg); - var add_css_vvvvvyi = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvyi(add_css_vvvvvyi); + var add_css_vvvvvyh = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvyh(add_css_vvvvvyh); }); -// the vvvvvyb function -function vvvvvyb(add_php_view_vvvvvyb) +// the vvvvvya function +function vvvvvya(add_php_view_vvvvvya) { // set the function logic - if (add_php_view_vvvvvyb == 1) + if (add_php_view_vvvvvya == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvybvya_required) + if (jform_vvvvvyavxv_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvybvya_required = false; + jform_vvvvvyavxv_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvybvya_required) + if (!jform_vvvvvyavxv_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvybvya_required = true; + jform_vvvvvyavxv_required = true; } } } -// the vvvvvyc function -function vvvvvyc(add_php_jview_display_vvvvvyc) +// the vvvvvyb function +function vvvvvyb(add_php_jview_display_vvvvvyb) { // set the function logic - if (add_php_jview_display_vvvvvyc == 1) + if (add_php_jview_display_vvvvvyb == 1) { jQuery('#jform_php_jview_display').closest('.control-group').show(); - if (jform_vvvvvycvyb_required) + if (jform_vvvvvybvxw_required) { updateFieldRequired('php_jview_display',0); jQuery('#jform_php_jview_display').prop('required','required'); jQuery('#jform_php_jview_display').attr('aria-required',true); jQuery('#jform_php_jview_display').addClass('required'); - jform_vvvvvycvyb_required = false; + jform_vvvvvybvxw_required = false; } } else { jQuery('#jform_php_jview_display').closest('.control-group').hide(); - if (!jform_vvvvvycvyb_required) + if (!jform_vvvvvybvxw_required) { updateFieldRequired('php_jview_display',1); jQuery('#jform_php_jview_display').removeAttr('required'); jQuery('#jform_php_jview_display').removeAttr('aria-required'); jQuery('#jform_php_jview_display').removeClass('required'); - jform_vvvvvycvyb_required = true; + jform_vvvvvybvxw_required = true; } } } -// the vvvvvyd function -function vvvvvyd(add_php_jview_vvvvvyd) +// the vvvvvyc function +function vvvvvyc(add_php_jview_vvvvvyc) { // set the function logic - if (add_php_jview_vvvvvyd == 1) + if (add_php_jview_vvvvvyc == 1) { jQuery('#jform_php_jview').closest('.control-group').show(); - if (jform_vvvvvydvyc_required) + if (jform_vvvvvycvxx_required) { updateFieldRequired('php_jview',0); jQuery('#jform_php_jview').prop('required','required'); jQuery('#jform_php_jview').attr('aria-required',true); jQuery('#jform_php_jview').addClass('required'); - jform_vvvvvydvyc_required = false; + jform_vvvvvycvxx_required = false; } } else { jQuery('#jform_php_jview').closest('.control-group').hide(); - if (!jform_vvvvvydvyc_required) + if (!jform_vvvvvycvxx_required) { updateFieldRequired('php_jview',1); jQuery('#jform_php_jview').removeAttr('required'); jQuery('#jform_php_jview').removeAttr('aria-required'); jQuery('#jform_php_jview').removeClass('required'); - jform_vvvvvydvyc_required = true; + jform_vvvvvycvxx_required = true; } } } -// the vvvvvye function -function vvvvvye(add_php_document_vvvvvye) +// the vvvvvyd function +function vvvvvyd(add_php_document_vvvvvyd) { // set the function logic - if (add_php_document_vvvvvye == 1) + if (add_php_document_vvvvvyd == 1) { jQuery('#jform_php_document').closest('.control-group').show(); - if (jform_vvvvvyevyd_required) + if (jform_vvvvvydvxy_required) { updateFieldRequired('php_document',0); jQuery('#jform_php_document').prop('required','required'); jQuery('#jform_php_document').attr('aria-required',true); jQuery('#jform_php_document').addClass('required'); - jform_vvvvvyevyd_required = false; + jform_vvvvvydvxy_required = false; } } else { jQuery('#jform_php_document').closest('.control-group').hide(); - if (!jform_vvvvvyevyd_required) + if (!jform_vvvvvydvxy_required) { updateFieldRequired('php_document',1); jQuery('#jform_php_document').removeAttr('required'); jQuery('#jform_php_document').removeAttr('aria-required'); jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvyevyd_required = true; + jform_vvvvvydvxy_required = true; } } } -// the vvvvvyf function -function vvvvvyf(add_css_document_vvvvvyf) +// the vvvvvye function +function vvvvvye(add_css_document_vvvvvye) { // set the function logic - if (add_css_document_vvvvvyf == 1) + if (add_css_document_vvvvvye == 1) { jQuery('#jform_css_document').closest('.control-group').show(); - if (jform_vvvvvyfvye_required) + if (jform_vvvvvyevxz_required) { updateFieldRequired('css_document',0); jQuery('#jform_css_document').prop('required','required'); jQuery('#jform_css_document').attr('aria-required',true); jQuery('#jform_css_document').addClass('required'); - jform_vvvvvyfvye_required = false; + jform_vvvvvyevxz_required = false; } } else { jQuery('#jform_css_document').closest('.control-group').hide(); - if (!jform_vvvvvyfvye_required) + if (!jform_vvvvvyevxz_required) { updateFieldRequired('css_document',1); jQuery('#jform_css_document').removeAttr('required'); jQuery('#jform_css_document').removeAttr('aria-required'); jQuery('#jform_css_document').removeClass('required'); - jform_vvvvvyfvye_required = true; + jform_vvvvvyevxz_required = true; } } } -// the vvvvvyg function -function vvvvvyg(add_js_document_vvvvvyg) +// the vvvvvyf function +function vvvvvyf(add_js_document_vvvvvyf) { // set the function logic - if (add_js_document_vvvvvyg == 1) + if (add_js_document_vvvvvyf == 1) { jQuery('#jform_js_document').closest('.control-group').show(); - if (jform_vvvvvygvyf_required) + if (jform_vvvvvyfvya_required) { updateFieldRequired('js_document',0); jQuery('#jform_js_document').prop('required','required'); jQuery('#jform_js_document').attr('aria-required',true); jQuery('#jform_js_document').addClass('required'); - jform_vvvvvygvyf_required = false; + jform_vvvvvyfvya_required = false; } } else { jQuery('#jform_js_document').closest('.control-group').hide(); - if (!jform_vvvvvygvyf_required) + if (!jform_vvvvvyfvya_required) { updateFieldRequired('js_document',1); jQuery('#jform_js_document').removeAttr('required'); jQuery('#jform_js_document').removeAttr('aria-required'); jQuery('#jform_js_document').removeClass('required'); - jform_vvvvvygvyf_required = true; + jform_vvvvvyfvya_required = true; } } } -// the vvvvvyh function -function vvvvvyh(add_custom_button_vvvvvyh) +// the vvvvvyg function +function vvvvvyg(add_custom_button_vvvvvyg) { // set the function logic - if (add_custom_button_vvvvvyh == 1) + if (add_custom_button_vvvvvyg == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvyhvyg_required) + if (jform_vvvvvygvyb_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvyhvyg_required = false; + jform_vvvvvygvyb_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvyhvyh_required) + if (jform_vvvvvygvyc_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvyhvyh_required = false; + jform_vvvvvygvyc_required = false; } } @@ -279,53 +279,53 @@ function vvvvvyh(add_custom_button_vvvvvyh) { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvyhvyg_required) + if (!jform_vvvvvygvyb_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvyhvyg_required = true; + jform_vvvvvygvyb_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvyhvyh_required) + if (!jform_vvvvvygvyc_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvyhvyh_required = true; + jform_vvvvvygvyc_required = true; } } } -// the vvvvvyi function -function vvvvvyi(add_css_vvvvvyi) +// the vvvvvyh function +function vvvvvyh(add_css_vvvvvyh) { // set the function logic - if (add_css_vvvvvyi == 1) + if (add_css_vvvvvyh == 1) { jQuery('#jform_css').closest('.control-group').show(); - if (jform_vvvvvyivyi_required) + if (jform_vvvvvyhvyd_required) { updateFieldRequired('css',0); jQuery('#jform_css').prop('required','required'); jQuery('#jform_css').attr('aria-required',true); jQuery('#jform_css').addClass('required'); - jform_vvvvvyivyi_required = false; + jform_vvvvvyhvyd_required = false; } } else { jQuery('#jform_css').closest('.control-group').hide(); - if (!jform_vvvvvyivyi_required) + if (!jform_vvvvvyhvyd_required) { updateFieldRequired('css',1); jQuery('#jform_css').removeAttr('required'); jQuery('#jform_css').removeAttr('aria-required'); jQuery('#jform_css').removeClass('required'); - jform_vvvvvyivyi_required = true; + jform_vvvvvyhvyd_required = true; } } } diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js index cce93ceea..f52cdff4f 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_code.js @@ -23,43 +23,43 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvzrvzp_required = false; -jform_vvvvvzsvzq_required = false; -jform_vvvvvzsvzr_required = false; -jform_vvvvvzsvzs_required = false; +jform_vvvvvzqvzk_required = false; +jform_vvvvvzrvzl_required = false; +jform_vvvvvzrvzm_required = false; +jform_vvvvvzrvzn_required = false; // Initial Script jQuery(document).ready(function() { + var target_vvvvvzq = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvvzq(target_vvvvvzq); + var target_vvvvvzr = jQuery("#jform_target input[type='radio']:checked").val(); vvvvvzr(target_vvvvvzr); var target_vvvvvzs = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvvzs(target_vvvvvzs); + var type_vvvvvzs = jQuery("#jform_type input[type='radio']:checked").val(); + vvvvvzs(target_vvvvvzs,type_vvvvvzs); - var target_vvvvvzt = jQuery("#jform_target input[type='radio']:checked").val(); var type_vvvvvzt = jQuery("#jform_type input[type='radio']:checked").val(); - vvvvvzt(target_vvvvvzt,type_vvvvvzt); - - var type_vvvvvzu = jQuery("#jform_type input[type='radio']:checked").val(); - var target_vvvvvzu = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvvzu(type_vvvvvzu,target_vvvvvzu); + var target_vvvvvzt = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvvzt(type_vvvvvzt,target_vvvvvzt); }); -// the vvvvvzr function -function vvvvvzr(target_vvvvvzr) +// the vvvvvzq function +function vvvvvzq(target_vvvvvzq) { // set the function logic - if (target_vvvvvzr == 2) + if (target_vvvvvzq == 2) { jQuery('#jform_function_name').closest('.control-group').show(); - if (jform_vvvvvzrvzp_required) + if (jform_vvvvvzqvzk_required) { updateFieldRequired('function_name',0); jQuery('#jform_function_name').prop('required','required'); jQuery('#jform_function_name').attr('aria-required',true); jQuery('#jform_function_name').addClass('required'); - jform_vvvvvzrvzp_required = false; + jform_vvvvvzqvzk_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); @@ -68,99 +68,99 @@ function vvvvvzr(target_vvvvvzr) else { jQuery('#jform_function_name').closest('.control-group').hide(); - if (!jform_vvvvvzrvzp_required) + if (!jform_vvvvvzqvzk_required) { updateFieldRequired('function_name',1); jQuery('#jform_function_name').removeAttr('required'); jQuery('#jform_function_name').removeAttr('aria-required'); jQuery('#jform_function_name').removeClass('required'); - jform_vvvvvzrvzp_required = true; + jform_vvvvvzqvzk_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); } } -// the vvvvvzs function -function vvvvvzs(target_vvvvvzs) +// the vvvvvzr function +function vvvvvzr(target_vvvvvzr) { // set the function logic - if (target_vvvvvzs == 1) + if (target_vvvvvzr == 1) { jQuery('#jform_component').closest('.control-group').show(); - if (jform_vvvvvzsvzq_required) + if (jform_vvvvvzrvzl_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); - jform_vvvvvzsvzq_required = false; + jform_vvvvvzrvzl_required = false; } jQuery('#jform_path').closest('.control-group').show(); - if (jform_vvvvvzsvzr_required) + if (jform_vvvvvzrvzm_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvvzsvzr_required = false; + jform_vvvvvzrvzm_required = false; } jQuery('#jform_from_line').closest('.control-group').show(); jQuery('#jform_hashtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); jQuery('#jform_type').closest('.control-group').show(); - if (jform_vvvvvzsvzs_required) + if (jform_vvvvvzrvzn_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); - jform_vvvvvzsvzs_required = false; + jform_vvvvvzrvzn_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); - if (!jform_vvvvvzsvzq_required) + if (!jform_vvvvvzrvzl_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); - jform_vvvvvzsvzq_required = true; + jform_vvvvvzrvzl_required = true; } jQuery('#jform_path').closest('.control-group').hide(); - if (!jform_vvvvvzsvzr_required) + if (!jform_vvvvvzrvzm_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvvzsvzr_required = true; + jform_vvvvvzrvzm_required = true; } jQuery('#jform_from_line').closest('.control-group').hide(); jQuery('#jform_hashtarget').closest('.control-group').hide(); jQuery('#jform_to_line').closest('.control-group').hide(); jQuery('#jform_type').closest('.control-group').hide(); - if (!jform_vvvvvzsvzs_required) + if (!jform_vvvvvzrvzn_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); - jform_vvvvvzsvzs_required = true; + jform_vvvvvzrvzn_required = true; } } } -// the vvvvvzt function -function vvvvvzt(target_vvvvvzt,type_vvvvvzt) +// the vvvvvzs function +function vvvvvzs(target_vvvvvzs,type_vvvvvzs) { // set the function logic - if (target_vvvvvzt == 1 && type_vvvvvzt == 1) + if (target_vvvvvzs == 1 && type_vvvvvzs == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); @@ -172,11 +172,11 @@ function vvvvvzt(target_vvvvvzt,type_vvvvvzt) } } -// the vvvvvzu function -function vvvvvzu(type_vvvvvzu,target_vvvvvzu) +// the vvvvvzt function +function vvvvvzt(type_vvvvvzt,target_vvvvvzt) { // set the function logic - if (type_vvvvvzu == 1 && target_vvvvvzu == 1) + if (type_vvvvvzt == 1 && target_vvvvvzt == 1) { jQuery('#jform_hashendtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); @@ -317,7 +317,7 @@ function usedin(functioName, ide) { jQuery('#note-usedin-not').hide(); jQuery('#note-usedin-found').hide(); jQuery('#loading-usedin').show(); - var targets = ['a','b','c','d','e','f','g','h']; + var targets = ['a','b','c','d','e','f','g','h','i']; var run = 0; var usedinChecker = setInterval(function(){ var target = targets[run]; diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js index ab9cf8720..f6dd3d8ab 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_get.js @@ -23,30 +23,33 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvyvvyx_required = false; -jform_vvvvvywvyy_required = false; -jform_vvvvvyxvyz_required = false; -jform_vvvvvyyvza_required = false; -jform_vvvvvyzvzb_required = false; -jform_vvvvvzavzc_required = false; -jform_vvvvvzfvzd_required = false; -jform_vvvvvzhvze_required = false; -jform_vvvvvzivzf_required = false; -jform_vvvvvzkvzg_required = false; -jform_vvvvvzkvzh_required = false; -jform_vvvvvzlvzi_required = false; -jform_vvvvvzmvzj_required = false; -jform_vvvvvznvzk_required = false; -jform_vvvvvzpvzl_required = false; -jform_vvvvvzpvzm_required = false; -jform_vvvvvzpvzn_required = false; -jform_vvvvvzqvzo_required = false; +jform_vvvvvyuvys_required = false; +jform_vvvvvyvvyt_required = false; +jform_vvvvvywvyu_required = false; +jform_vvvvvyxvyv_required = false; +jform_vvvvvyyvyw_required = false; +jform_vvvvvyzvyx_required = false; +jform_vvvvvzevyy_required = false; +jform_vvvvvzgvyz_required = false; +jform_vvvvvzhvza_required = false; +jform_vvvvvzjvzb_required = false; +jform_vvvvvzjvzc_required = false; +jform_vvvvvzkvzd_required = false; +jform_vvvvvzlvze_required = false; +jform_vvvvvzmvzf_required = false; +jform_vvvvvzovzg_required = false; +jform_vvvvvzovzh_required = false; +jform_vvvvvzovzi_required = false; +jform_vvvvvzpvzj_required = false; // Initial Script jQuery(document).ready(function() { - var gettype_vvvvvyv = jQuery("#jform_gettype").val(); - vvvvvyv(gettype_vvvvvyv); + var gettype_vvvvvyu = jQuery("#jform_gettype").val(); + vvvvvyu(gettype_vvvvvyu); + + var main_source_vvvvvyv = jQuery("#jform_main_source").val(); + vvvvvyv(main_source_vvvvvyv); var main_source_vvvvvyw = jQuery("#jform_main_source").val(); vvvvvyw(main_source_vvvvvyw); @@ -57,105 +60,157 @@ jQuery(document).ready(function() var main_source_vvvvvyy = jQuery("#jform_main_source").val(); vvvvvyy(main_source_vvvvvyy); - var main_source_vvvvvyz = jQuery("#jform_main_source").val(); - vvvvvyz(main_source_vvvvvyz); + var addcalculation_vvvvvyz = jQuery("#jform_addcalculation input[type='radio']:checked").val(); + vvvvvyz(addcalculation_vvvvvyz); var addcalculation_vvvvvza = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - vvvvvza(addcalculation_vvvvvza); + var gettype_vvvvvza = jQuery("#jform_gettype").val(); + vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza); var addcalculation_vvvvvzb = jQuery("#jform_addcalculation input[type='radio']:checked").val(); var gettype_vvvvvzb = jQuery("#jform_gettype").val(); vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb); - var addcalculation_vvvvvzc = jQuery("#jform_addcalculation input[type='radio']:checked").val(); - var gettype_vvvvvzc = jQuery("#jform_gettype").val(); - vvvvvzc(addcalculation_vvvvvzc,gettype_vvvvvzc); + var main_source_vvvvvze = jQuery("#jform_main_source").val(); + vvvvvze(main_source_vvvvvze); var main_source_vvvvvzf = jQuery("#jform_main_source").val(); vvvvvzf(main_source_vvvvvzf); - var main_source_vvvvvzg = jQuery("#jform_main_source").val(); - vvvvvzg(main_source_vvvvvzg); + var add_php_before_getitem_vvvvvzg = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); + var gettype_vvvvvzg = jQuery("#jform_gettype").val(); + vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg); - var add_php_before_getitem_vvvvvzh = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val(); + var add_php_after_getitem_vvvvvzh = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); var gettype_vvvvvzh = jQuery("#jform_gettype").val(); - vvvvvzh(add_php_before_getitem_vvvvvzh,gettype_vvvvvzh); + vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh); - var add_php_after_getitem_vvvvvzi = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val(); - var gettype_vvvvvzi = jQuery("#jform_gettype").val(); - vvvvvzi(add_php_after_getitem_vvvvvzi,gettype_vvvvvzi); + var gettype_vvvvvzj = jQuery("#jform_gettype").val(); + vvvvvzj(gettype_vvvvvzj); + var add_php_getlistquery_vvvvvzk = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); var gettype_vvvvvzk = jQuery("#jform_gettype").val(); - vvvvvzk(gettype_vvvvvzk); + vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk); - var add_php_getlistquery_vvvvvzl = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val(); + var add_php_before_getitems_vvvvvzl = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); var gettype_vvvvvzl = jQuery("#jform_gettype").val(); - vvvvvzl(add_php_getlistquery_vvvvvzl,gettype_vvvvvzl); + vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl); - var add_php_before_getitems_vvvvvzm = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val(); + var add_php_after_getitems_vvvvvzm = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); var gettype_vvvvvzm = jQuery("#jform_gettype").val(); - vvvvvzm(add_php_before_getitems_vvvvvzm,gettype_vvvvvzm); + vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm); - var add_php_after_getitems_vvvvvzn = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val(); - var gettype_vvvvvzn = jQuery("#jform_gettype").val(); - vvvvvzn(add_php_after_getitems_vvvvvzn,gettype_vvvvvzn); + var gettype_vvvvvzo = jQuery("#jform_gettype").val(); + vvvvvzo(gettype_vvvvvzo); var gettype_vvvvvzp = jQuery("#jform_gettype").val(); vvvvvzp(gettype_vvvvvzp); - - var gettype_vvvvvzq = jQuery("#jform_gettype").val(); - vvvvvzq(gettype_vvvvvzq); }); -// the vvvvvyv function -function vvvvvyv(gettype_vvvvvyv) +// the vvvvvyu function +function vvvvvyu(gettype_vvvvvyu) { - if (isSet(gettype_vvvvvyv) && gettype_vvvvvyv.constructor !== Array) + if (isSet(gettype_vvvvvyu) && gettype_vvvvvyu.constructor !== Array) { - var temp_vvvvvyv = gettype_vvvvvyv; - var gettype_vvvvvyv = []; - gettype_vvvvvyv.push(temp_vvvvvyv); + var temp_vvvvvyu = gettype_vvvvvyu; + var gettype_vvvvvyu = []; + gettype_vvvvvyu.push(temp_vvvvvyu); } - else if (!isSet(gettype_vvvvvyv)) + else if (!isSet(gettype_vvvvvyu)) { - var gettype_vvvvvyv = []; + var gettype_vvvvvyu = []; } - var gettype = gettype_vvvvvyv.some(gettype_vvvvvyv_SomeFunc); + var gettype = gettype_vvvvvyu.some(gettype_vvvvvyu_SomeFunc); // set this function logic if (gettype) { jQuery('#jform_getcustom').closest('.control-group').show(); - if (jform_vvvvvyvvyx_required) + if (jform_vvvvvyuvys_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); - jform_vvvvvyvvyx_required = false; + jform_vvvvvyuvys_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); - if (!jform_vvvvvyvvyx_required) + if (!jform_vvvvvyuvys_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); - jform_vvvvvyvvyx_required = true; + jform_vvvvvyuvys_required = true; + } + } +} + +// the vvvvvyu Some function +function gettype_vvvvvyu_SomeFunc(gettype_vvvvvyu) +{ + // set the function logic + if (gettype_vvvvvyu == 3 || gettype_vvvvvyu == 4) + { + return true; + } + return false; +} + +// the vvvvvyv function +function vvvvvyv(main_source_vvvvvyv) +{ + if (isSet(main_source_vvvvvyv) && main_source_vvvvvyv.constructor !== Array) + { + var temp_vvvvvyv = main_source_vvvvvyv; + var main_source_vvvvvyv = []; + main_source_vvvvvyv.push(temp_vvvvvyv); + } + else if (!isSet(main_source_vvvvvyv)) + { + var main_source_vvvvvyv = []; + } + var main_source = main_source_vvvvvyv.some(main_source_vvvvvyv_SomeFunc); + + + // set this function logic + if (main_source) + { + jQuery('#jform_view_table_main').closest('.control-group').show(); + if (jform_vvvvvyvvyt_required) + { + updateFieldRequired('view_table_main',0); + jQuery('#jform_view_table_main').prop('required','required'); + jQuery('#jform_view_table_main').attr('aria-required',true); + jQuery('#jform_view_table_main').addClass('required'); + jform_vvvvvyvvyt_required = false; + } + + } + else + { + jQuery('#jform_view_table_main').closest('.control-group').hide(); + if (!jform_vvvvvyvvyt_required) + { + updateFieldRequired('view_table_main',1); + jQuery('#jform_view_table_main').removeAttr('required'); + jQuery('#jform_view_table_main').removeAttr('aria-required'); + jQuery('#jform_view_table_main').removeClass('required'); + jform_vvvvvyvvyt_required = true; } } } // the vvvvvyv Some function -function gettype_vvvvvyv_SomeFunc(gettype_vvvvvyv) +function main_source_vvvvvyv_SomeFunc(main_source_vvvvvyv) { // set the function logic - if (gettype_vvvvvyv == 3 || gettype_vvvvvyv == 4) + if (main_source_vvvvvyv == 1) { return true; } @@ -181,27 +236,27 @@ function vvvvvyw(main_source_vvvvvyw) // set this function logic if (main_source) { - jQuery('#jform_view_table_main').closest('.control-group').show(); - if (jform_vvvvvywvyy_required) + jQuery('#jform_view_selection').closest('.control-group').show(); + if (jform_vvvvvywvyu_required) { - updateFieldRequired('view_table_main',0); - jQuery('#jform_view_table_main').prop('required','required'); - jQuery('#jform_view_table_main').attr('aria-required',true); - jQuery('#jform_view_table_main').addClass('required'); - jform_vvvvvywvyy_required = false; + updateFieldRequired('view_selection',0); + jQuery('#jform_view_selection').prop('required','required'); + jQuery('#jform_view_selection').attr('aria-required',true); + jQuery('#jform_view_selection').addClass('required'); + jform_vvvvvywvyu_required = false; } } else { - jQuery('#jform_view_table_main').closest('.control-group').hide(); - if (!jform_vvvvvywvyy_required) + jQuery('#jform_view_selection').closest('.control-group').hide(); + if (!jform_vvvvvywvyu_required) { - updateFieldRequired('view_table_main',1); - jQuery('#jform_view_table_main').removeAttr('required'); - jQuery('#jform_view_table_main').removeAttr('aria-required'); - jQuery('#jform_view_table_main').removeClass('required'); - jform_vvvvvywvyy_required = true; + updateFieldRequired('view_selection',1); + jQuery('#jform_view_selection').removeAttr('required'); + jQuery('#jform_view_selection').removeAttr('aria-required'); + jQuery('#jform_view_selection').removeClass('required'); + jform_vvvvvywvyu_required = true; } } } @@ -236,27 +291,27 @@ function vvvvvyx(main_source_vvvvvyx) // set this function logic if (main_source) { - jQuery('#jform_view_selection').closest('.control-group').show(); - if (jform_vvvvvyxvyz_required) + jQuery('#jform_db_table_main').closest('.control-group').show(); + if (jform_vvvvvyxvyv_required) { - updateFieldRequired('view_selection',0); - jQuery('#jform_view_selection').prop('required','required'); - jQuery('#jform_view_selection').attr('aria-required',true); - jQuery('#jform_view_selection').addClass('required'); - jform_vvvvvyxvyz_required = false; + updateFieldRequired('db_table_main',0); + jQuery('#jform_db_table_main').prop('required','required'); + jQuery('#jform_db_table_main').attr('aria-required',true); + jQuery('#jform_db_table_main').addClass('required'); + jform_vvvvvyxvyv_required = false; } } else { - jQuery('#jform_view_selection').closest('.control-group').hide(); - if (!jform_vvvvvyxvyz_required) + jQuery('#jform_db_table_main').closest('.control-group').hide(); + if (!jform_vvvvvyxvyv_required) { - updateFieldRequired('view_selection',1); - jQuery('#jform_view_selection').removeAttr('required'); - jQuery('#jform_view_selection').removeAttr('aria-required'); - jQuery('#jform_view_selection').removeClass('required'); - jform_vvvvvyxvyz_required = true; + updateFieldRequired('db_table_main',1); + jQuery('#jform_db_table_main').removeAttr('required'); + jQuery('#jform_db_table_main').removeAttr('aria-required'); + jQuery('#jform_db_table_main').removeClass('required'); + jform_vvvvvyxvyv_required = true; } } } @@ -265,7 +320,7 @@ function vvvvvyx(main_source_vvvvvyx) function main_source_vvvvvyx_SomeFunc(main_source_vvvvvyx) { // set the function logic - if (main_source_vvvvvyx == 1) + if (main_source_vvvvvyx == 2) { return true; } @@ -291,27 +346,27 @@ function vvvvvyy(main_source_vvvvvyy) // set this function logic if (main_source) { - jQuery('#jform_db_table_main').closest('.control-group').show(); - if (jform_vvvvvyyvza_required) + jQuery('#jform_db_selection').closest('.control-group').show(); + if (jform_vvvvvyyvyw_required) { - updateFieldRequired('db_table_main',0); - jQuery('#jform_db_table_main').prop('required','required'); - jQuery('#jform_db_table_main').attr('aria-required',true); - jQuery('#jform_db_table_main').addClass('required'); - jform_vvvvvyyvza_required = false; + updateFieldRequired('db_selection',0); + jQuery('#jform_db_selection').prop('required','required'); + jQuery('#jform_db_selection').attr('aria-required',true); + jQuery('#jform_db_selection').addClass('required'); + jform_vvvvvyyvyw_required = false; } } else { - jQuery('#jform_db_table_main').closest('.control-group').hide(); - if (!jform_vvvvvyyvza_required) + jQuery('#jform_db_selection').closest('.control-group').hide(); + if (!jform_vvvvvyyvyw_required) { - updateFieldRequired('db_table_main',1); - jQuery('#jform_db_table_main').removeAttr('required'); - jQuery('#jform_db_table_main').removeAttr('aria-required'); - jQuery('#jform_db_table_main').removeClass('required'); - jform_vvvvvyyvza_required = true; + updateFieldRequired('db_selection',1); + jQuery('#jform_db_selection').removeAttr('required'); + jQuery('#jform_db_selection').removeAttr('aria-required'); + jQuery('#jform_db_selection').removeClass('required'); + jform_vvvvvyyvyw_required = true; } } } @@ -328,91 +383,97 @@ function main_source_vvvvvyy_SomeFunc(main_source_vvvvvyy) } // the vvvvvyz function -function vvvvvyz(main_source_vvvvvyz) -{ - if (isSet(main_source_vvvvvyz) && main_source_vvvvvyz.constructor !== Array) - { - var temp_vvvvvyz = main_source_vvvvvyz; - var main_source_vvvvvyz = []; - main_source_vvvvvyz.push(temp_vvvvvyz); - } - else if (!isSet(main_source_vvvvvyz)) - { - var main_source_vvvvvyz = []; - } - var main_source = main_source_vvvvvyz.some(main_source_vvvvvyz_SomeFunc); - - - // set this function logic - if (main_source) - { - jQuery('#jform_db_selection').closest('.control-group').show(); - if (jform_vvvvvyzvzb_required) - { - updateFieldRequired('db_selection',0); - jQuery('#jform_db_selection').prop('required','required'); - jQuery('#jform_db_selection').attr('aria-required',true); - jQuery('#jform_db_selection').addClass('required'); - jform_vvvvvyzvzb_required = false; - } - - } - else - { - jQuery('#jform_db_selection').closest('.control-group').hide(); - if (!jform_vvvvvyzvzb_required) - { - updateFieldRequired('db_selection',1); - jQuery('#jform_db_selection').removeAttr('required'); - jQuery('#jform_db_selection').removeAttr('aria-required'); - jQuery('#jform_db_selection').removeClass('required'); - jform_vvvvvyzvzb_required = true; - } - } -} - -// the vvvvvyz Some function -function main_source_vvvvvyz_SomeFunc(main_source_vvvvvyz) +function vvvvvyz(addcalculation_vvvvvyz) { // set the function logic - if (main_source_vvvvvyz == 2) - { - return true; - } - return false; -} - -// the vvvvvza function -function vvvvvza(addcalculation_vvvvvza) -{ - // set the function logic - if (addcalculation_vvvvvza == 1) + if (addcalculation_vvvvvyz == 1) { jQuery('#jform_php_calculation').closest('.control-group').show(); - if (jform_vvvvvzavzc_required) + if (jform_vvvvvyzvyx_required) { updateFieldRequired('php_calculation',0); jQuery('#jform_php_calculation').prop('required','required'); jQuery('#jform_php_calculation').attr('aria-required',true); jQuery('#jform_php_calculation').addClass('required'); - jform_vvvvvzavzc_required = false; + jform_vvvvvyzvyx_required = false; } } else { jQuery('#jform_php_calculation').closest('.control-group').hide(); - if (!jform_vvvvvzavzc_required) + if (!jform_vvvvvyzvyx_required) { updateFieldRequired('php_calculation',1); jQuery('#jform_php_calculation').removeAttr('required'); jQuery('#jform_php_calculation').removeAttr('aria-required'); jQuery('#jform_php_calculation').removeClass('required'); - jform_vvvvvzavzc_required = true; + jform_vvvvvyzvyx_required = true; } } } +// the vvvvvza function +function vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza) +{ + if (isSet(addcalculation_vvvvvza) && addcalculation_vvvvvza.constructor !== Array) + { + var temp_vvvvvza = addcalculation_vvvvvza; + var addcalculation_vvvvvza = []; + addcalculation_vvvvvza.push(temp_vvvvvza); + } + else if (!isSet(addcalculation_vvvvvza)) + { + var addcalculation_vvvvvza = []; + } + var addcalculation = addcalculation_vvvvvza.some(addcalculation_vvvvvza_SomeFunc); + + if (isSet(gettype_vvvvvza) && gettype_vvvvvza.constructor !== Array) + { + var temp_vvvvvza = gettype_vvvvvza; + var gettype_vvvvvza = []; + gettype_vvvvvza.push(temp_vvvvvza); + } + else if (!isSet(gettype_vvvvvza)) + { + var gettype_vvvvvza = []; + } + var gettype = gettype_vvvvvza.some(gettype_vvvvvza_SomeFunc); + + + // set this function logic + if (addcalculation && gettype) + { + jQuery('.note_calculation_item').closest('.control-group').show(); + } + else + { + jQuery('.note_calculation_item').closest('.control-group').hide(); + } +} + +// the vvvvvza Some function +function addcalculation_vvvvvza_SomeFunc(addcalculation_vvvvvza) +{ + // set the function logic + if (addcalculation_vvvvvza == 1) + { + return true; + } + return false; +} + +// the vvvvvza Some function +function gettype_vvvvvza_SomeFunc(gettype_vvvvvza) +{ + // set the function logic + if (gettype_vvvvvza == 1 || gettype_vvvvvza == 3) + { + return true; + } + return false; +} + // the vvvvvzb function function vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb) { @@ -444,11 +505,11 @@ function vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb) // set this function logic if (addcalculation && gettype) { - jQuery('.note_calculation_item').closest('.control-group').show(); + jQuery('.note_calculation_items').closest('.control-group').show(); } else { - jQuery('.note_calculation_item').closest('.control-group').hide(); + jQuery('.note_calculation_items').closest('.control-group').hide(); } } @@ -467,68 +528,62 @@ function addcalculation_vvvvvzb_SomeFunc(addcalculation_vvvvvzb) function gettype_vvvvvzb_SomeFunc(gettype_vvvvvzb) { // set the function logic - if (gettype_vvvvvzb == 1 || gettype_vvvvvzb == 3) + if (gettype_vvvvvzb == 2 || gettype_vvvvvzb == 4) { return true; } return false; } -// the vvvvvzc function -function vvvvvzc(addcalculation_vvvvvzc,gettype_vvvvvzc) +// the vvvvvze function +function vvvvvze(main_source_vvvvvze) { - if (isSet(addcalculation_vvvvvzc) && addcalculation_vvvvvzc.constructor !== Array) + if (isSet(main_source_vvvvvze) && main_source_vvvvvze.constructor !== Array) { - var temp_vvvvvzc = addcalculation_vvvvvzc; - var addcalculation_vvvvvzc = []; - addcalculation_vvvvvzc.push(temp_vvvvvzc); + var temp_vvvvvze = main_source_vvvvvze; + var main_source_vvvvvze = []; + main_source_vvvvvze.push(temp_vvvvvze); } - else if (!isSet(addcalculation_vvvvvzc)) + else if (!isSet(main_source_vvvvvze)) { - var addcalculation_vvvvvzc = []; + var main_source_vvvvvze = []; } - var addcalculation = addcalculation_vvvvvzc.some(addcalculation_vvvvvzc_SomeFunc); - - if (isSet(gettype_vvvvvzc) && gettype_vvvvvzc.constructor !== Array) - { - var temp_vvvvvzc = gettype_vvvvvzc; - var gettype_vvvvvzc = []; - gettype_vvvvvzc.push(temp_vvvvvzc); - } - else if (!isSet(gettype_vvvvvzc)) - { - var gettype_vvvvvzc = []; - } - var gettype = gettype_vvvvvzc.some(gettype_vvvvvzc_SomeFunc); + var main_source = main_source_vvvvvze.some(main_source_vvvvvze_SomeFunc); // set this function logic - if (addcalculation && gettype) + if (main_source) { - jQuery('.note_calculation_items').closest('.control-group').show(); + jQuery('#jform_php_custom_get').closest('.control-group').show(); + if (jform_vvvvvzevyy_required) + { + updateFieldRequired('php_custom_get',0); + jQuery('#jform_php_custom_get').prop('required','required'); + jQuery('#jform_php_custom_get').attr('aria-required',true); + jQuery('#jform_php_custom_get').addClass('required'); + jform_vvvvvzevyy_required = false; + } + } else { - jQuery('.note_calculation_items').closest('.control-group').hide(); + jQuery('#jform_php_custom_get').closest('.control-group').hide(); + if (!jform_vvvvvzevyy_required) + { + updateFieldRequired('php_custom_get',1); + jQuery('#jform_php_custom_get').removeAttr('required'); + jQuery('#jform_php_custom_get').removeAttr('aria-required'); + jQuery('#jform_php_custom_get').removeClass('required'); + jform_vvvvvzevyy_required = true; + } } } -// the vvvvvzc Some function -function addcalculation_vvvvvzc_SomeFunc(addcalculation_vvvvvzc) +// the vvvvvze Some function +function main_source_vvvvvze_SomeFunc(main_source_vvvvvze) { // set the function logic - if (addcalculation_vvvvvzc == 1) - { - return true; - } - return false; -} - -// the vvvvvzc Some function -function gettype_vvvvvzc_SomeFunc(gettype_vvvvvzc) -{ - // set the function logic - if (gettype_vvvvvzc == 2 || gettype_vvvvvzc == 4) + if (main_source_vvvvvze == 3) { return true; } @@ -551,61 +606,6 @@ function vvvvvzf(main_source_vvvvvzf) var main_source = main_source_vvvvvzf.some(main_source_vvvvvzf_SomeFunc); - // set this function logic - if (main_source) - { - jQuery('#jform_php_custom_get').closest('.control-group').show(); - if (jform_vvvvvzfvzd_required) - { - updateFieldRequired('php_custom_get',0); - jQuery('#jform_php_custom_get').prop('required','required'); - jQuery('#jform_php_custom_get').attr('aria-required',true); - jQuery('#jform_php_custom_get').addClass('required'); - jform_vvvvvzfvzd_required = false; - } - - } - else - { - jQuery('#jform_php_custom_get').closest('.control-group').hide(); - if (!jform_vvvvvzfvzd_required) - { - updateFieldRequired('php_custom_get',1); - jQuery('#jform_php_custom_get').removeAttr('required'); - jQuery('#jform_php_custom_get').removeAttr('aria-required'); - jQuery('#jform_php_custom_get').removeClass('required'); - jform_vvvvvzfvzd_required = true; - } - } -} - -// the vvvvvzf Some function -function main_source_vvvvvzf_SomeFunc(main_source_vvvvvzf) -{ - // set the function logic - if (main_source_vvvvvzf == 3) - { - return true; - } - return false; -} - -// the vvvvvzg function -function vvvvvzg(main_source_vvvvvzg) -{ - if (isSet(main_source_vvvvvzg) && main_source_vvvvvzg.constructor !== Array) - { - var temp_vvvvvzg = main_source_vvvvvzg; - var main_source_vvvvvzg = []; - main_source_vvvvvzg.push(temp_vvvvvzg); - } - else if (!isSet(main_source_vvvvvzg)) - { - var main_source_vvvvvzg = []; - } - var main_source = main_source_vvvvvzg.some(main_source_vvvvvzg_SomeFunc); - - // set this function logic if (main_source) { @@ -627,11 +627,89 @@ function vvvvvzg(main_source_vvvvvzg) } } -// the vvvvvzg Some function -function main_source_vvvvvzg_SomeFunc(main_source_vvvvvzg) +// the vvvvvzf Some function +function main_source_vvvvvzf_SomeFunc(main_source_vvvvvzf) { // set the function logic - if (main_source_vvvvvzg == 1 || main_source_vvvvvzg == 2) + if (main_source_vvvvvzf == 1 || main_source_vvvvvzf == 2) + { + return true; + } + return false; +} + +// the vvvvvzg function +function vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg) +{ + if (isSet(add_php_before_getitem_vvvvvzg) && add_php_before_getitem_vvvvvzg.constructor !== Array) + { + var temp_vvvvvzg = add_php_before_getitem_vvvvvzg; + var add_php_before_getitem_vvvvvzg = []; + add_php_before_getitem_vvvvvzg.push(temp_vvvvvzg); + } + else if (!isSet(add_php_before_getitem_vvvvvzg)) + { + var add_php_before_getitem_vvvvvzg = []; + } + var add_php_before_getitem = add_php_before_getitem_vvvvvzg.some(add_php_before_getitem_vvvvvzg_SomeFunc); + + if (isSet(gettype_vvvvvzg) && gettype_vvvvvzg.constructor !== Array) + { + var temp_vvvvvzg = gettype_vvvvvzg; + var gettype_vvvvvzg = []; + gettype_vvvvvzg.push(temp_vvvvvzg); + } + else if (!isSet(gettype_vvvvvzg)) + { + var gettype_vvvvvzg = []; + } + var gettype = gettype_vvvvvzg.some(gettype_vvvvvzg_SomeFunc); + + + // set this function logic + if (add_php_before_getitem && gettype) + { + jQuery('#jform_php_before_getitem').closest('.control-group').show(); + if (jform_vvvvvzgvyz_required) + { + updateFieldRequired('php_before_getitem',0); + jQuery('#jform_php_before_getitem').prop('required','required'); + jQuery('#jform_php_before_getitem').attr('aria-required',true); + jQuery('#jform_php_before_getitem').addClass('required'); + jform_vvvvvzgvyz_required = false; + } + + } + else + { + jQuery('#jform_php_before_getitem').closest('.control-group').hide(); + if (!jform_vvvvvzgvyz_required) + { + updateFieldRequired('php_before_getitem',1); + jQuery('#jform_php_before_getitem').removeAttr('required'); + jQuery('#jform_php_before_getitem').removeAttr('aria-required'); + jQuery('#jform_php_before_getitem').removeClass('required'); + jform_vvvvvzgvyz_required = true; + } + } +} + +// the vvvvvzg Some function +function add_php_before_getitem_vvvvvzg_SomeFunc(add_php_before_getitem_vvvvvzg) +{ + // set the function logic + if (add_php_before_getitem_vvvvvzg == 1) + { + return true; + } + return false; +} + +// the vvvvvzg Some function +function gettype_vvvvvzg_SomeFunc(gettype_vvvvvzg) +{ + // set the function logic + if (gettype_vvvvvzg == 1 || gettype_vvvvvzg == 3) { return true; } @@ -639,19 +717,19 @@ function main_source_vvvvvzg_SomeFunc(main_source_vvvvvzg) } // the vvvvvzh function -function vvvvvzh(add_php_before_getitem_vvvvvzh,gettype_vvvvvzh) +function vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh) { - if (isSet(add_php_before_getitem_vvvvvzh) && add_php_before_getitem_vvvvvzh.constructor !== Array) + if (isSet(add_php_after_getitem_vvvvvzh) && add_php_after_getitem_vvvvvzh.constructor !== Array) { - var temp_vvvvvzh = add_php_before_getitem_vvvvvzh; - var add_php_before_getitem_vvvvvzh = []; - add_php_before_getitem_vvvvvzh.push(temp_vvvvvzh); + var temp_vvvvvzh = add_php_after_getitem_vvvvvzh; + var add_php_after_getitem_vvvvvzh = []; + add_php_after_getitem_vvvvvzh.push(temp_vvvvvzh); } - else if (!isSet(add_php_before_getitem_vvvvvzh)) + else if (!isSet(add_php_after_getitem_vvvvvzh)) { - var add_php_before_getitem_vvvvvzh = []; + var add_php_after_getitem_vvvvvzh = []; } - var add_php_before_getitem = add_php_before_getitem_vvvvvzh.some(add_php_before_getitem_vvvvvzh_SomeFunc); + var add_php_after_getitem = add_php_after_getitem_vvvvvzh.some(add_php_after_getitem_vvvvvzh_SomeFunc); if (isSet(gettype_vvvvvzh) && gettype_vvvvvzh.constructor !== Array) { @@ -667,38 +745,38 @@ function vvvvvzh(add_php_before_getitem_vvvvvzh,gettype_vvvvvzh) // set this function logic - if (add_php_before_getitem && gettype) + if (add_php_after_getitem && gettype) { - jQuery('#jform_php_before_getitem').closest('.control-group').show(); - if (jform_vvvvvzhvze_required) + jQuery('#jform_php_after_getitem').closest('.control-group').show(); + if (jform_vvvvvzhvza_required) { - updateFieldRequired('php_before_getitem',0); - jQuery('#jform_php_before_getitem').prop('required','required'); - jQuery('#jform_php_before_getitem').attr('aria-required',true); - jQuery('#jform_php_before_getitem').addClass('required'); - jform_vvvvvzhvze_required = false; + updateFieldRequired('php_after_getitem',0); + jQuery('#jform_php_after_getitem').prop('required','required'); + jQuery('#jform_php_after_getitem').attr('aria-required',true); + jQuery('#jform_php_after_getitem').addClass('required'); + jform_vvvvvzhvza_required = false; } } else { - jQuery('#jform_php_before_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzhvze_required) + jQuery('#jform_php_after_getitem').closest('.control-group').hide(); + if (!jform_vvvvvzhvza_required) { - updateFieldRequired('php_before_getitem',1); - jQuery('#jform_php_before_getitem').removeAttr('required'); - jQuery('#jform_php_before_getitem').removeAttr('aria-required'); - jQuery('#jform_php_before_getitem').removeClass('required'); - jform_vvvvvzhvze_required = true; + updateFieldRequired('php_after_getitem',1); + jQuery('#jform_php_after_getitem').removeAttr('required'); + jQuery('#jform_php_after_getitem').removeAttr('aria-required'); + jQuery('#jform_php_after_getitem').removeClass('required'); + jform_vvvvvzhvza_required = true; } } } // the vvvvvzh Some function -function add_php_before_getitem_vvvvvzh_SomeFunc(add_php_before_getitem_vvvvvzh) +function add_php_after_getitem_vvvvvzh_SomeFunc(add_php_after_getitem_vvvvvzh) { // set the function logic - if (add_php_before_getitem_vvvvvzh == 1) + if (add_php_after_getitem_vvvvvzh == 1) { return true; } @@ -716,78 +794,74 @@ function gettype_vvvvvzh_SomeFunc(gettype_vvvvvzh) return false; } -// the vvvvvzi function -function vvvvvzi(add_php_after_getitem_vvvvvzi,gettype_vvvvvzi) +// the vvvvvzj function +function vvvvvzj(gettype_vvvvvzj) { - if (isSet(add_php_after_getitem_vvvvvzi) && add_php_after_getitem_vvvvvzi.constructor !== Array) + if (isSet(gettype_vvvvvzj) && gettype_vvvvvzj.constructor !== Array) { - var temp_vvvvvzi = add_php_after_getitem_vvvvvzi; - var add_php_after_getitem_vvvvvzi = []; - add_php_after_getitem_vvvvvzi.push(temp_vvvvvzi); + var temp_vvvvvzj = gettype_vvvvvzj; + var gettype_vvvvvzj = []; + gettype_vvvvvzj.push(temp_vvvvvzj); } - else if (!isSet(add_php_after_getitem_vvvvvzi)) + else if (!isSet(gettype_vvvvvzj)) { - var add_php_after_getitem_vvvvvzi = []; + var gettype_vvvvvzj = []; } - var add_php_after_getitem = add_php_after_getitem_vvvvvzi.some(add_php_after_getitem_vvvvvzi_SomeFunc); - - if (isSet(gettype_vvvvvzi) && gettype_vvvvvzi.constructor !== Array) - { - var temp_vvvvvzi = gettype_vvvvvzi; - var gettype_vvvvvzi = []; - gettype_vvvvvzi.push(temp_vvvvvzi); - } - else if (!isSet(gettype_vvvvvzi)) - { - var gettype_vvvvvzi = []; - } - var gettype = gettype_vvvvvzi.some(gettype_vvvvvzi_SomeFunc); + var gettype = gettype_vvvvvzj.some(gettype_vvvvvzj_SomeFunc); // set this function logic - if (add_php_after_getitem && gettype) + if (gettype) { - jQuery('#jform_php_after_getitem').closest('.control-group').show(); - if (jform_vvvvvzivzf_required) + jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); + if (jform_vvvvvzjvzb_required) { - updateFieldRequired('php_after_getitem',0); - jQuery('#jform_php_after_getitem').prop('required','required'); - jQuery('#jform_php_after_getitem').attr('aria-required',true); - jQuery('#jform_php_after_getitem').addClass('required'); - jform_vvvvvzivzf_required = false; + updateFieldRequired('add_php_after_getitem',0); + jQuery('#jform_add_php_after_getitem').prop('required','required'); + jQuery('#jform_add_php_after_getitem').attr('aria-required',true); + jQuery('#jform_add_php_after_getitem').addClass('required'); + jform_vvvvvzjvzb_required = false; + } + + jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); + if (jform_vvvvvzjvzc_required) + { + updateFieldRequired('add_php_before_getitem',0); + jQuery('#jform_add_php_before_getitem').prop('required','required'); + jQuery('#jform_add_php_before_getitem').attr('aria-required',true); + jQuery('#jform_add_php_before_getitem').addClass('required'); + jform_vvvvvzjvzc_required = false; } } else { - jQuery('#jform_php_after_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzivzf_required) + jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); + if (!jform_vvvvvzjvzb_required) { - updateFieldRequired('php_after_getitem',1); - jQuery('#jform_php_after_getitem').removeAttr('required'); - jQuery('#jform_php_after_getitem').removeAttr('aria-required'); - jQuery('#jform_php_after_getitem').removeClass('required'); - jform_vvvvvzivzf_required = true; + updateFieldRequired('add_php_after_getitem',1); + jQuery('#jform_add_php_after_getitem').removeAttr('required'); + jQuery('#jform_add_php_after_getitem').removeAttr('aria-required'); + jQuery('#jform_add_php_after_getitem').removeClass('required'); + jform_vvvvvzjvzb_required = true; + } + jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); + if (!jform_vvvvvzjvzc_required) + { + updateFieldRequired('add_php_before_getitem',1); + jQuery('#jform_add_php_before_getitem').removeAttr('required'); + jQuery('#jform_add_php_before_getitem').removeAttr('aria-required'); + jQuery('#jform_add_php_before_getitem').removeClass('required'); + jform_vvvvvzjvzc_required = true; } } } -// the vvvvvzi Some function -function add_php_after_getitem_vvvvvzi_SomeFunc(add_php_after_getitem_vvvvvzi) +// the vvvvvzj Some function +function gettype_vvvvvzj_SomeFunc(gettype_vvvvvzj) { // set the function logic - if (add_php_after_getitem_vvvvvzi == 1) - { - return true; - } - return false; -} - -// the vvvvvzi Some function -function gettype_vvvvvzi_SomeFunc(gettype_vvvvvzi) -{ - // set the function logic - if (gettype_vvvvvzi == 1 || gettype_vvvvvzi == 3) + if (gettype_vvvvvzj == 1 || gettype_vvvvvzj == 3) { return true; } @@ -795,8 +869,20 @@ function gettype_vvvvvzi_SomeFunc(gettype_vvvvvzi) } // the vvvvvzk function -function vvvvvzk(gettype_vvvvvzk) +function vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk) { + if (isSet(add_php_getlistquery_vvvvvzk) && add_php_getlistquery_vvvvvzk.constructor !== Array) + { + var temp_vvvvvzk = add_php_getlistquery_vvvvvzk; + var add_php_getlistquery_vvvvvzk = []; + add_php_getlistquery_vvvvvzk.push(temp_vvvvvzk); + } + else if (!isSet(add_php_getlistquery_vvvvvzk)) + { + var add_php_getlistquery_vvvvvzk = []; + } + var add_php_getlistquery = add_php_getlistquery_vvvvvzk.some(add_php_getlistquery_vvvvvzk_SomeFunc); + if (isSet(gettype_vvvvvzk) && gettype_vvvvvzk.constructor !== Array) { var temp_vvvvvzk = gettype_vvvvvzk; @@ -811,57 +897,49 @@ function vvvvvzk(gettype_vvvvvzk) // set this function logic - if (gettype) + if (add_php_getlistquery && gettype) { - jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); - if (jform_vvvvvzkvzg_required) + jQuery('#jform_php_getlistquery').closest('.control-group').show(); + if (jform_vvvvvzkvzd_required) { - updateFieldRequired('add_php_after_getitem',0); - jQuery('#jform_add_php_after_getitem').prop('required','required'); - jQuery('#jform_add_php_after_getitem').attr('aria-required',true); - jQuery('#jform_add_php_after_getitem').addClass('required'); - jform_vvvvvzkvzg_required = false; - } - - jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); - if (jform_vvvvvzkvzh_required) - { - updateFieldRequired('add_php_before_getitem',0); - jQuery('#jform_add_php_before_getitem').prop('required','required'); - jQuery('#jform_add_php_before_getitem').attr('aria-required',true); - jQuery('#jform_add_php_before_getitem').addClass('required'); - jform_vvvvvzkvzh_required = false; + updateFieldRequired('php_getlistquery',0); + jQuery('#jform_php_getlistquery').prop('required','required'); + jQuery('#jform_php_getlistquery').attr('aria-required',true); + jQuery('#jform_php_getlistquery').addClass('required'); + jform_vvvvvzkvzd_required = false; } } else { - jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzkvzg_required) + jQuery('#jform_php_getlistquery').closest('.control-group').hide(); + if (!jform_vvvvvzkvzd_required) { - updateFieldRequired('add_php_after_getitem',1); - jQuery('#jform_add_php_after_getitem').removeAttr('required'); - jQuery('#jform_add_php_after_getitem').removeAttr('aria-required'); - jQuery('#jform_add_php_after_getitem').removeClass('required'); - jform_vvvvvzkvzg_required = true; - } - jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzkvzh_required) - { - updateFieldRequired('add_php_before_getitem',1); - jQuery('#jform_add_php_before_getitem').removeAttr('required'); - jQuery('#jform_add_php_before_getitem').removeAttr('aria-required'); - jQuery('#jform_add_php_before_getitem').removeClass('required'); - jform_vvvvvzkvzh_required = true; + updateFieldRequired('php_getlistquery',1); + jQuery('#jform_php_getlistquery').removeAttr('required'); + jQuery('#jform_php_getlistquery').removeAttr('aria-required'); + jQuery('#jform_php_getlistquery').removeClass('required'); + jform_vvvvvzkvzd_required = true; } } } +// the vvvvvzk Some function +function add_php_getlistquery_vvvvvzk_SomeFunc(add_php_getlistquery_vvvvvzk) +{ + // set the function logic + if (add_php_getlistquery_vvvvvzk == 1) + { + return true; + } + return false; +} + // the vvvvvzk Some function function gettype_vvvvvzk_SomeFunc(gettype_vvvvvzk) { // set the function logic - if (gettype_vvvvvzk == 1 || gettype_vvvvvzk == 3) + if (gettype_vvvvvzk == 2 || gettype_vvvvvzk == 4) { return true; } @@ -869,19 +947,19 @@ function gettype_vvvvvzk_SomeFunc(gettype_vvvvvzk) } // the vvvvvzl function -function vvvvvzl(add_php_getlistquery_vvvvvzl,gettype_vvvvvzl) +function vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl) { - if (isSet(add_php_getlistquery_vvvvvzl) && add_php_getlistquery_vvvvvzl.constructor !== Array) + if (isSet(add_php_before_getitems_vvvvvzl) && add_php_before_getitems_vvvvvzl.constructor !== Array) { - var temp_vvvvvzl = add_php_getlistquery_vvvvvzl; - var add_php_getlistquery_vvvvvzl = []; - add_php_getlistquery_vvvvvzl.push(temp_vvvvvzl); + var temp_vvvvvzl = add_php_before_getitems_vvvvvzl; + var add_php_before_getitems_vvvvvzl = []; + add_php_before_getitems_vvvvvzl.push(temp_vvvvvzl); } - else if (!isSet(add_php_getlistquery_vvvvvzl)) + else if (!isSet(add_php_before_getitems_vvvvvzl)) { - var add_php_getlistquery_vvvvvzl = []; + var add_php_before_getitems_vvvvvzl = []; } - var add_php_getlistquery = add_php_getlistquery_vvvvvzl.some(add_php_getlistquery_vvvvvzl_SomeFunc); + var add_php_before_getitems = add_php_before_getitems_vvvvvzl.some(add_php_before_getitems_vvvvvzl_SomeFunc); if (isSet(gettype_vvvvvzl) && gettype_vvvvvzl.constructor !== Array) { @@ -897,38 +975,38 @@ function vvvvvzl(add_php_getlistquery_vvvvvzl,gettype_vvvvvzl) // set this function logic - if (add_php_getlistquery && gettype) + if (add_php_before_getitems && gettype) { - jQuery('#jform_php_getlistquery').closest('.control-group').show(); - if (jform_vvvvvzlvzi_required) + jQuery('#jform_php_before_getitems').closest('.control-group').show(); + if (jform_vvvvvzlvze_required) { - updateFieldRequired('php_getlistquery',0); - jQuery('#jform_php_getlistquery').prop('required','required'); - jQuery('#jform_php_getlistquery').attr('aria-required',true); - jQuery('#jform_php_getlistquery').addClass('required'); - jform_vvvvvzlvzi_required = false; + updateFieldRequired('php_before_getitems',0); + jQuery('#jform_php_before_getitems').prop('required','required'); + jQuery('#jform_php_before_getitems').attr('aria-required',true); + jQuery('#jform_php_before_getitems').addClass('required'); + jform_vvvvvzlvze_required = false; } } else { - jQuery('#jform_php_getlistquery').closest('.control-group').hide(); - if (!jform_vvvvvzlvzi_required) + jQuery('#jform_php_before_getitems').closest('.control-group').hide(); + if (!jform_vvvvvzlvze_required) { - updateFieldRequired('php_getlistquery',1); - jQuery('#jform_php_getlistquery').removeAttr('required'); - jQuery('#jform_php_getlistquery').removeAttr('aria-required'); - jQuery('#jform_php_getlistquery').removeClass('required'); - jform_vvvvvzlvzi_required = true; + updateFieldRequired('php_before_getitems',1); + jQuery('#jform_php_before_getitems').removeAttr('required'); + jQuery('#jform_php_before_getitems').removeAttr('aria-required'); + jQuery('#jform_php_before_getitems').removeClass('required'); + jform_vvvvvzlvze_required = true; } } } // the vvvvvzl Some function -function add_php_getlistquery_vvvvvzl_SomeFunc(add_php_getlistquery_vvvvvzl) +function add_php_before_getitems_vvvvvzl_SomeFunc(add_php_before_getitems_vvvvvzl) { // set the function logic - if (add_php_getlistquery_vvvvvzl == 1) + if (add_php_before_getitems_vvvvvzl == 1) { return true; } @@ -947,19 +1025,19 @@ function gettype_vvvvvzl_SomeFunc(gettype_vvvvvzl) } // the vvvvvzm function -function vvvvvzm(add_php_before_getitems_vvvvvzm,gettype_vvvvvzm) +function vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm) { - if (isSet(add_php_before_getitems_vvvvvzm) && add_php_before_getitems_vvvvvzm.constructor !== Array) + if (isSet(add_php_after_getitems_vvvvvzm) && add_php_after_getitems_vvvvvzm.constructor !== Array) { - var temp_vvvvvzm = add_php_before_getitems_vvvvvzm; - var add_php_before_getitems_vvvvvzm = []; - add_php_before_getitems_vvvvvzm.push(temp_vvvvvzm); + var temp_vvvvvzm = add_php_after_getitems_vvvvvzm; + var add_php_after_getitems_vvvvvzm = []; + add_php_after_getitems_vvvvvzm.push(temp_vvvvvzm); } - else if (!isSet(add_php_before_getitems_vvvvvzm)) + else if (!isSet(add_php_after_getitems_vvvvvzm)) { - var add_php_before_getitems_vvvvvzm = []; + var add_php_after_getitems_vvvvvzm = []; } - var add_php_before_getitems = add_php_before_getitems_vvvvvzm.some(add_php_before_getitems_vvvvvzm_SomeFunc); + var add_php_after_getitems = add_php_after_getitems_vvvvvzm.some(add_php_after_getitems_vvvvvzm_SomeFunc); if (isSet(gettype_vvvvvzm) && gettype_vvvvvzm.constructor !== Array) { @@ -975,38 +1053,38 @@ function vvvvvzm(add_php_before_getitems_vvvvvzm,gettype_vvvvvzm) // set this function logic - if (add_php_before_getitems && gettype) + if (add_php_after_getitems && gettype) { - jQuery('#jform_php_before_getitems').closest('.control-group').show(); - if (jform_vvvvvzmvzj_required) + jQuery('#jform_php_after_getitems').closest('.control-group').show(); + if (jform_vvvvvzmvzf_required) { - updateFieldRequired('php_before_getitems',0); - jQuery('#jform_php_before_getitems').prop('required','required'); - jQuery('#jform_php_before_getitems').attr('aria-required',true); - jQuery('#jform_php_before_getitems').addClass('required'); - jform_vvvvvzmvzj_required = false; + updateFieldRequired('php_after_getitems',0); + jQuery('#jform_php_after_getitems').prop('required','required'); + jQuery('#jform_php_after_getitems').attr('aria-required',true); + jQuery('#jform_php_after_getitems').addClass('required'); + jform_vvvvvzmvzf_required = false; } } else { - jQuery('#jform_php_before_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzmvzj_required) + jQuery('#jform_php_after_getitems').closest('.control-group').hide(); + if (!jform_vvvvvzmvzf_required) { - updateFieldRequired('php_before_getitems',1); - jQuery('#jform_php_before_getitems').removeAttr('required'); - jQuery('#jform_php_before_getitems').removeAttr('aria-required'); - jQuery('#jform_php_before_getitems').removeClass('required'); - jform_vvvvvzmvzj_required = true; + updateFieldRequired('php_after_getitems',1); + jQuery('#jform_php_after_getitems').removeAttr('required'); + jQuery('#jform_php_after_getitems').removeAttr('aria-required'); + jQuery('#jform_php_after_getitems').removeClass('required'); + jform_vvvvvzmvzf_required = true; } } } // the vvvvvzm Some function -function add_php_before_getitems_vvvvvzm_SomeFunc(add_php_before_getitems_vvvvvzm) +function add_php_after_getitems_vvvvvzm_SomeFunc(add_php_after_getitems_vvvvvzm) { // set the function logic - if (add_php_before_getitems_vvvvvzm == 1) + if (add_php_after_getitems_vvvvvzm == 1) { return true; } @@ -1024,78 +1102,93 @@ function gettype_vvvvvzm_SomeFunc(gettype_vvvvvzm) return false; } -// the vvvvvzn function -function vvvvvzn(add_php_after_getitems_vvvvvzn,gettype_vvvvvzn) +// the vvvvvzo function +function vvvvvzo(gettype_vvvvvzo) { - if (isSet(add_php_after_getitems_vvvvvzn) && add_php_after_getitems_vvvvvzn.constructor !== Array) + if (isSet(gettype_vvvvvzo) && gettype_vvvvvzo.constructor !== Array) { - var temp_vvvvvzn = add_php_after_getitems_vvvvvzn; - var add_php_after_getitems_vvvvvzn = []; - add_php_after_getitems_vvvvvzn.push(temp_vvvvvzn); + var temp_vvvvvzo = gettype_vvvvvzo; + var gettype_vvvvvzo = []; + gettype_vvvvvzo.push(temp_vvvvvzo); } - else if (!isSet(add_php_after_getitems_vvvvvzn)) + else if (!isSet(gettype_vvvvvzo)) { - var add_php_after_getitems_vvvvvzn = []; + var gettype_vvvvvzo = []; } - var add_php_after_getitems = add_php_after_getitems_vvvvvzn.some(add_php_after_getitems_vvvvvzn_SomeFunc); - - if (isSet(gettype_vvvvvzn) && gettype_vvvvvzn.constructor !== Array) - { - var temp_vvvvvzn = gettype_vvvvvzn; - var gettype_vvvvvzn = []; - gettype_vvvvvzn.push(temp_vvvvvzn); - } - else if (!isSet(gettype_vvvvvzn)) - { - var gettype_vvvvvzn = []; - } - var gettype = gettype_vvvvvzn.some(gettype_vvvvvzn_SomeFunc); + var gettype = gettype_vvvvvzo.some(gettype_vvvvvzo_SomeFunc); // set this function logic - if (add_php_after_getitems && gettype) + if (gettype) { - jQuery('#jform_php_after_getitems').closest('.control-group').show(); - if (jform_vvvvvznvzk_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); + if (jform_vvvvvzovzg_required) { - updateFieldRequired('php_after_getitems',0); - jQuery('#jform_php_after_getitems').prop('required','required'); - jQuery('#jform_php_after_getitems').attr('aria-required',true); - jQuery('#jform_php_after_getitems').addClass('required'); - jform_vvvvvznvzk_required = false; + updateFieldRequired('add_php_after_getitems',0); + jQuery('#jform_add_php_after_getitems').prop('required','required'); + jQuery('#jform_add_php_after_getitems').attr('aria-required',true); + jQuery('#jform_add_php_after_getitems').addClass('required'); + jform_vvvvvzovzg_required = false; + } + + jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); + if (jform_vvvvvzovzh_required) + { + updateFieldRequired('add_php_before_getitems',0); + jQuery('#jform_add_php_before_getitems').prop('required','required'); + jQuery('#jform_add_php_before_getitems').attr('aria-required',true); + jQuery('#jform_add_php_before_getitems').addClass('required'); + jform_vvvvvzovzh_required = false; + } + + jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); + if (jform_vvvvvzovzi_required) + { + updateFieldRequired('add_php_getlistquery',0); + jQuery('#jform_add_php_getlistquery').prop('required','required'); + jQuery('#jform_add_php_getlistquery').attr('aria-required',true); + jQuery('#jform_add_php_getlistquery').addClass('required'); + jform_vvvvvzovzi_required = false; } } else { - jQuery('#jform_php_after_getitems').closest('.control-group').hide(); - if (!jform_vvvvvznvzk_required) + jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); + if (!jform_vvvvvzovzg_required) { - updateFieldRequired('php_after_getitems',1); - jQuery('#jform_php_after_getitems').removeAttr('required'); - jQuery('#jform_php_after_getitems').removeAttr('aria-required'); - jQuery('#jform_php_after_getitems').removeClass('required'); - jform_vvvvvznvzk_required = true; + updateFieldRequired('add_php_after_getitems',1); + jQuery('#jform_add_php_after_getitems').removeAttr('required'); + jQuery('#jform_add_php_after_getitems').removeAttr('aria-required'); + jQuery('#jform_add_php_after_getitems').removeClass('required'); + jform_vvvvvzovzg_required = true; + } + jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); + if (!jform_vvvvvzovzh_required) + { + updateFieldRequired('add_php_before_getitems',1); + jQuery('#jform_add_php_before_getitems').removeAttr('required'); + jQuery('#jform_add_php_before_getitems').removeAttr('aria-required'); + jQuery('#jform_add_php_before_getitems').removeClass('required'); + jform_vvvvvzovzh_required = true; + } + jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); + if (!jform_vvvvvzovzi_required) + { + updateFieldRequired('add_php_getlistquery',1); + jQuery('#jform_add_php_getlistquery').removeAttr('required'); + jQuery('#jform_add_php_getlistquery').removeAttr('aria-required'); + jQuery('#jform_add_php_getlistquery').removeClass('required'); + jform_vvvvvzovzi_required = true; } } } -// the vvvvvzn Some function -function add_php_after_getitems_vvvvvzn_SomeFunc(add_php_after_getitems_vvvvvzn) +// the vvvvvzo Some function +function gettype_vvvvvzo_SomeFunc(gettype_vvvvvzo) { // set the function logic - if (add_php_after_getitems_vvvvvzn == 1) - { - return true; - } - return false; -} - -// the vvvvvzn Some function -function gettype_vvvvvzn_SomeFunc(gettype_vvvvvzn) -{ - // set the function logic - if (gettype_vvvvvzn == 2 || gettype_vvvvvzn == 4) + if (gettype_vvvvvzo == 2 || gettype_vvvvvzo == 4) { return true; } @@ -1121,65 +1214,27 @@ function vvvvvzp(gettype_vvvvvzp) // set this function logic if (gettype) { - jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); - if (jform_vvvvvzpvzl_required) + jQuery('#jform_pagination').closest('.control-group').show(); + if (jform_vvvvvzpvzj_required) { - updateFieldRequired('add_php_after_getitems',0); - jQuery('#jform_add_php_after_getitems').prop('required','required'); - jQuery('#jform_add_php_after_getitems').attr('aria-required',true); - jQuery('#jform_add_php_after_getitems').addClass('required'); - jform_vvvvvzpvzl_required = false; - } - - jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); - if (jform_vvvvvzpvzm_required) - { - updateFieldRequired('add_php_before_getitems',0); - jQuery('#jform_add_php_before_getitems').prop('required','required'); - jQuery('#jform_add_php_before_getitems').attr('aria-required',true); - jQuery('#jform_add_php_before_getitems').addClass('required'); - jform_vvvvvzpvzm_required = false; - } - - jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); - if (jform_vvvvvzpvzn_required) - { - updateFieldRequired('add_php_getlistquery',0); - jQuery('#jform_add_php_getlistquery').prop('required','required'); - jQuery('#jform_add_php_getlistquery').attr('aria-required',true); - jQuery('#jform_add_php_getlistquery').addClass('required'); - jform_vvvvvzpvzn_required = false; + updateFieldRequired('pagination',0); + jQuery('#jform_pagination').prop('required','required'); + jQuery('#jform_pagination').attr('aria-required',true); + jQuery('#jform_pagination').addClass('required'); + jform_vvvvvzpvzj_required = false; } } else { - jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzpvzl_required) + jQuery('#jform_pagination').closest('.control-group').hide(); + if (!jform_vvvvvzpvzj_required) { - updateFieldRequired('add_php_after_getitems',1); - jQuery('#jform_add_php_after_getitems').removeAttr('required'); - jQuery('#jform_add_php_after_getitems').removeAttr('aria-required'); - jQuery('#jform_add_php_after_getitems').removeClass('required'); - jform_vvvvvzpvzl_required = true; - } - jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzpvzm_required) - { - updateFieldRequired('add_php_before_getitems',1); - jQuery('#jform_add_php_before_getitems').removeAttr('required'); - jQuery('#jform_add_php_before_getitems').removeAttr('aria-required'); - jQuery('#jform_add_php_before_getitems').removeClass('required'); - jform_vvvvvzpvzm_required = true; - } - jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); - if (!jform_vvvvvzpvzn_required) - { - updateFieldRequired('add_php_getlistquery',1); - jQuery('#jform_add_php_getlistquery').removeAttr('required'); - jQuery('#jform_add_php_getlistquery').removeAttr('aria-required'); - jQuery('#jform_add_php_getlistquery').removeClass('required'); - jform_vvvvvzpvzn_required = true; + updateFieldRequired('pagination',1); + jQuery('#jform_pagination').removeAttr('required'); + jQuery('#jform_pagination').removeAttr('aria-required'); + jQuery('#jform_pagination').removeClass('required'); + jform_vvvvvzpvzj_required = true; } } } @@ -1188,62 +1243,7 @@ function vvvvvzp(gettype_vvvvvzp) function gettype_vvvvvzp_SomeFunc(gettype_vvvvvzp) { // set the function logic - if (gettype_vvvvvzp == 2 || gettype_vvvvvzp == 4) - { - return true; - } - return false; -} - -// the vvvvvzq function -function vvvvvzq(gettype_vvvvvzq) -{ - if (isSet(gettype_vvvvvzq) && gettype_vvvvvzq.constructor !== Array) - { - var temp_vvvvvzq = gettype_vvvvvzq; - var gettype_vvvvvzq = []; - gettype_vvvvvzq.push(temp_vvvvvzq); - } - else if (!isSet(gettype_vvvvvzq)) - { - var gettype_vvvvvzq = []; - } - var gettype = gettype_vvvvvzq.some(gettype_vvvvvzq_SomeFunc); - - - // set this function logic - if (gettype) - { - jQuery('#jform_pagination').closest('.control-group').show(); - if (jform_vvvvvzqvzo_required) - { - updateFieldRequired('pagination',0); - jQuery('#jform_pagination').prop('required','required'); - jQuery('#jform_pagination').attr('aria-required',true); - jQuery('#jform_pagination').addClass('required'); - jform_vvvvvzqvzo_required = false; - } - - } - else - { - jQuery('#jform_pagination').closest('.control-group').hide(); - if (!jform_vvvvvzqvzo_required) - { - updateFieldRequired('pagination',1); - jQuery('#jform_pagination').removeAttr('required'); - jQuery('#jform_pagination').removeAttr('aria-required'); - jQuery('#jform_pagination').removeClass('required'); - jform_vvvvvzqvzo_required = true; - } - } -} - -// the vvvvvzq Some function -function gettype_vvvvvzq_SomeFunc(gettype_vvvvvzq) -{ - // set the function logic - if (gettype_vvvvvzq == 2) + if (gettype_vvvvvzp == 2) { return true; } diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 3fe35bb02..a88cc7e77 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.js @@ -23,96 +23,151 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvzvvzt_required = false; -jform_vvvvvzwvzu_required = false; -jform_vvvvvzxvzv_required = false; -jform_vvvvvzyvzw_required = false; -jform_vvvvwabvzx_required = false; -jform_vvvvwacvzy_required = false; -jform_vvvvwadvzz_required = false; -jform_vvvvwaewaa_required = false; +jform_vvvvvzuvzo_required = false; +jform_vvvvvzvvzp_required = false; +jform_vvvvvzwvzq_required = false; +jform_vvvvvzxvzr_required = false; +jform_vvvvwaavzs_required = false; +jform_vvvvwabvzt_required = false; +jform_vvvvwacvzu_required = false; +jform_vvvvwadvzv_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvvzv = jQuery("#jform_datalenght").val(); - vvvvvzv(datalenght_vvvvvzv); + var datalenght_vvvvvzu = jQuery("#jform_datalenght").val(); + vvvvvzu(datalenght_vvvvvzu); - var datadefault_vvvvvzw = jQuery("#jform_datadefault").val(); - vvvvvzw(datadefault_vvvvvzw); + var datadefault_vvvvvzv = jQuery("#jform_datadefault").val(); + vvvvvzv(datadefault_vvvvvzv); + + var datatype_vvvvvzw = jQuery("#jform_datatype").val(); + vvvvvzw(datatype_vvvvvzw); var datatype_vvvvvzx = jQuery("#jform_datatype").val(); vvvvvzx(datatype_vvvvvzx); + var store_vvvvvzy = jQuery("#jform_store").val(); var datatype_vvvvvzy = jQuery("#jform_datatype").val(); - vvvvvzy(datatype_vvvvvzy); + vvvvvzy(store_vvvvvzy,datatype_vvvvvzy); - var store_vvvvvzz = jQuery("#jform_store").val(); - var datatype_vvvvvzz = jQuery("#jform_datatype").val(); - vvvvvzz(store_vvvvvzz,datatype_vvvvvzz); + var add_css_view_vvvvwaa = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwaa(add_css_view_vvvvwaa); - var add_css_view_vvvvwab = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwab(add_css_view_vvvvwab); + var add_css_views_vvvvwab = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwab(add_css_views_vvvvwab); - var add_css_views_vvvvwac = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwac(add_css_views_vvvvwac); + var add_javascript_view_footer_vvvvwac = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwac(add_javascript_view_footer_vvvvwac); - var add_javascript_view_footer_vvvvwad = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwad(add_javascript_view_footer_vvvvwad); - - var add_javascript_views_footer_vvvvwae = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwae(add_javascript_views_footer_vvvvwae); + var add_javascript_views_footer_vvvvwad = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwad(add_javascript_views_footer_vvvvwad); }); -// the vvvvvzv function -function vvvvvzv(datalenght_vvvvvzv) +// the vvvvvzu function +function vvvvvzu(datalenght_vvvvvzu) { - if (isSet(datalenght_vvvvvzv) && datalenght_vvvvvzv.constructor !== Array) + if (isSet(datalenght_vvvvvzu) && datalenght_vvvvvzu.constructor !== Array) { - var temp_vvvvvzv = datalenght_vvvvvzv; - var datalenght_vvvvvzv = []; - datalenght_vvvvvzv.push(temp_vvvvvzv); + var temp_vvvvvzu = datalenght_vvvvvzu; + var datalenght_vvvvvzu = []; + datalenght_vvvvvzu.push(temp_vvvvvzu); } - else if (!isSet(datalenght_vvvvvzv)) + else if (!isSet(datalenght_vvvvvzu)) { - var datalenght_vvvvvzv = []; + var datalenght_vvvvvzu = []; } - var datalenght = datalenght_vvvvvzv.some(datalenght_vvvvvzv_SomeFunc); + var datalenght = datalenght_vvvvvzu.some(datalenght_vvvvvzu_SomeFunc); // set this function logic if (datalenght) { jQuery('#jform_datalenght_other').closest('.control-group').show(); - if (jform_vvvvvzvvzt_required) + if (jform_vvvvvzuvzo_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvvzvvzt_required = false; + jform_vvvvvzuvzo_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); - if (!jform_vvvvvzvvzt_required) + if (!jform_vvvvvzuvzo_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvvzvvzt_required = true; + jform_vvvvvzuvzo_required = true; + } + } +} + +// the vvvvvzu Some function +function datalenght_vvvvvzu_SomeFunc(datalenght_vvvvvzu) +{ + // set the function logic + if (datalenght_vvvvvzu == 'Other') + { + return true; + } + return false; +} + +// the vvvvvzv function +function vvvvvzv(datadefault_vvvvvzv) +{ + if (isSet(datadefault_vvvvvzv) && datadefault_vvvvvzv.constructor !== Array) + { + var temp_vvvvvzv = datadefault_vvvvvzv; + var datadefault_vvvvvzv = []; + datadefault_vvvvvzv.push(temp_vvvvvzv); + } + else if (!isSet(datadefault_vvvvvzv)) + { + var datadefault_vvvvvzv = []; + } + var datadefault = datadefault_vvvvvzv.some(datadefault_vvvvvzv_SomeFunc); + + + // set this function logic + if (datadefault) + { + jQuery('#jform_datadefault_other').closest('.control-group').show(); + if (jform_vvvvvzvvzp_required) + { + updateFieldRequired('datadefault_other',0); + jQuery('#jform_datadefault_other').prop('required','required'); + jQuery('#jform_datadefault_other').attr('aria-required',true); + jQuery('#jform_datadefault_other').addClass('required'); + jform_vvvvvzvvzp_required = false; + } + + } + else + { + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + if (!jform_vvvvvzvvzp_required) + { + updateFieldRequired('datadefault_other',1); + jQuery('#jform_datadefault_other').removeAttr('required'); + jQuery('#jform_datadefault_other').removeAttr('aria-required'); + jQuery('#jform_datadefault_other').removeClass('required'); + jform_vvvvvzvvzp_required = true; } } } // the vvvvvzv Some function -function datalenght_vvvvvzv_SomeFunc(datalenght_vvvvvzv) +function datadefault_vvvvvzv_SomeFunc(datadefault_vvvvvzv) { // set the function logic - if (datalenght_vvvvvzv == 'Other') + if (datadefault_vvvvvzv == 'Other') { return true; } @@ -120,54 +175,58 @@ function datalenght_vvvvvzv_SomeFunc(datalenght_vvvvvzv) } // the vvvvvzw function -function vvvvvzw(datadefault_vvvvvzw) +function vvvvvzw(datatype_vvvvvzw) { - if (isSet(datadefault_vvvvvzw) && datadefault_vvvvvzw.constructor !== Array) + if (isSet(datatype_vvvvvzw) && datatype_vvvvvzw.constructor !== Array) { - var temp_vvvvvzw = datadefault_vvvvvzw; - var datadefault_vvvvvzw = []; - datadefault_vvvvvzw.push(temp_vvvvvzw); + var temp_vvvvvzw = datatype_vvvvvzw; + var datatype_vvvvvzw = []; + datatype_vvvvvzw.push(temp_vvvvvzw); } - else if (!isSet(datadefault_vvvvvzw)) + else if (!isSet(datatype_vvvvvzw)) { - var datadefault_vvvvvzw = []; + var datatype_vvvvvzw = []; } - var datadefault = datadefault_vvvvvzw.some(datadefault_vvvvvzw_SomeFunc); + var datatype = datatype_vvvvvzw.some(datatype_vvvvvzw_SomeFunc); // set this function logic - if (datadefault) + if (datatype) { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - if (jform_vvvvvzwvzu_required) + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_datalenght').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + if (jform_vvvvvzwvzq_required) { - updateFieldRequired('datadefault_other',0); - jQuery('#jform_datadefault_other').prop('required','required'); - jQuery('#jform_datadefault_other').attr('aria-required',true); - jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvvzwvzu_required = false; + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvvzwvzq_required = false; } } else { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - if (!jform_vvvvvzwvzu_required) + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_datalenght').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + if (!jform_vvvvvzwvzq_required) { - updateFieldRequired('datadefault_other',1); - jQuery('#jform_datadefault_other').removeAttr('required'); - jQuery('#jform_datadefault_other').removeAttr('aria-required'); - jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvvzwvzu_required = true; + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvvzwvzq_required = true; } } } // the vvvvvzw Some function -function datadefault_vvvvvzw_SomeFunc(datadefault_vvvvvzw) +function datatype_vvvvvzw_SomeFunc(datatype_vvvvvzw) { // set the function logic - if (datadefault_vvvvvzw == 'Other') + if (datatype_vvvvvzw == 'CHAR' || datatype_vvvvvzw == 'VARCHAR' || datatype_vvvvvzw == 'DATETIME' || datatype_vvvvvzw == 'DATE' || datatype_vvvvvzw == 'TIME' || datatype_vvvvvzw == 'INT' || datatype_vvvvvzw == 'TINYINT' || datatype_vvvvvzw == 'BIGINT' || datatype_vvvvvzw == 'FLOAT' || datatype_vvvvvzw == 'DECIMAL' || datatype_vvvvvzw == 'DOUBLE') { return true; } @@ -193,31 +252,27 @@ function vvvvvzx(datatype_vvvvvzx) // set this function logic if (datatype) { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - if (jform_vvvvvzxvzv_required) + jQuery('#jform_store').closest('.control-group').show(); + if (jform_vvvvvzxvzr_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvvzxvzv_required = false; + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvvzxvzr_required = false; } } else { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - if (!jform_vvvvvzxvzv_required) + jQuery('#jform_store').closest('.control-group').hide(); + if (!jform_vvvvvzxvzr_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvvzxvzv_required = true; + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvvzxvzr_required = true; } } } @@ -226,7 +281,7 @@ function vvvvvzx(datatype_vvvvvzx) function datatype_vvvvvzx_SomeFunc(datatype_vvvvvzx) { // set the function logic - if (datatype_vvvvvzx == 'CHAR' || datatype_vvvvvzx == 'VARCHAR' || datatype_vvvvvzx == 'DATETIME' || datatype_vvvvvzx == 'DATE' || datatype_vvvvvzx == 'TIME' || datatype_vvvvvzx == 'INT' || datatype_vvvvvzx == 'TINYINT' || datatype_vvvvvzx == 'BIGINT' || datatype_vvvvvzx == 'FLOAT' || datatype_vvvvvzx == 'DECIMAL' || datatype_vvvvvzx == 'DOUBLE') + if (datatype_vvvvvzx == 'CHAR' || datatype_vvvvvzx == 'VARCHAR' || datatype_vvvvvzx == 'TEXT' || datatype_vvvvvzx == 'MEDIUMTEXT' || datatype_vvvvvzx == 'LONGTEXT') { return true; } @@ -234,8 +289,20 @@ function datatype_vvvvvzx_SomeFunc(datatype_vvvvvzx) } // the vvvvvzy function -function vvvvvzy(datatype_vvvvvzy) +function vvvvvzy(store_vvvvvzy,datatype_vvvvvzy) { + if (isSet(store_vvvvvzy) && store_vvvvvzy.constructor !== Array) + { + var temp_vvvvvzy = store_vvvvvzy; + var store_vvvvvzy = []; + store_vvvvvzy.push(temp_vvvvvzy); + } + else if (!isSet(store_vvvvvzy)) + { + var store_vvvvvzy = []; + } + var store = store_vvvvvzy.some(store_vvvvvzy_SomeFunc); + if (isSet(datatype_vvvvvzy) && datatype_vvvvvzy.constructor !== Array) { var temp_vvvvvzy = datatype_vvvvvzy; @@ -250,33 +317,27 @@ function vvvvvzy(datatype_vvvvvzy) // set this function logic - if (datatype) + if (store && datatype) { - jQuery('#jform_store').closest('.control-group').show(); - if (jform_vvvvvzyvzw_required) - { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvvzyvzw_required = false; - } - + jQuery('.note_vdm_encryption').closest('.control-group').show(); } else { - jQuery('#jform_store').closest('.control-group').hide(); - if (!jform_vvvvvzyvzw_required) - { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvvzyvzw_required = true; - } + jQuery('.note_vdm_encryption').closest('.control-group').hide(); } } +// the vvvvvzy Some function +function store_vvvvvzy_SomeFunc(store_vvvvvzy) +{ + // set the function logic + if (store_vvvvvzy == 4) + { + return true; + } + return false; +} + // the vvvvvzy Some function function datatype_vvvvvzy_SomeFunc(datatype_vvvvvzy) { @@ -288,187 +349,126 @@ function datatype_vvvvvzy_SomeFunc(datatype_vvvvvzy) return false; } -// the vvvvvzz function -function vvvvvzz(store_vvvvvzz,datatype_vvvvvzz) -{ - if (isSet(store_vvvvvzz) && store_vvvvvzz.constructor !== Array) - { - var temp_vvvvvzz = store_vvvvvzz; - var store_vvvvvzz = []; - store_vvvvvzz.push(temp_vvvvvzz); - } - else if (!isSet(store_vvvvvzz)) - { - var store_vvvvvzz = []; - } - var store = store_vvvvvzz.some(store_vvvvvzz_SomeFunc); - - if (isSet(datatype_vvvvvzz) && datatype_vvvvvzz.constructor !== Array) - { - var temp_vvvvvzz = datatype_vvvvvzz; - var datatype_vvvvvzz = []; - datatype_vvvvvzz.push(temp_vvvvvzz); - } - else if (!isSet(datatype_vvvvvzz)) - { - var datatype_vvvvvzz = []; - } - var datatype = datatype_vvvvvzz.some(datatype_vvvvvzz_SomeFunc); - - - // set this function logic - if (store && datatype) - { - jQuery('.note_vdm_encryption').closest('.control-group').show(); - } - else - { - jQuery('.note_vdm_encryption').closest('.control-group').hide(); - } -} - -// the vvvvvzz Some function -function store_vvvvvzz_SomeFunc(store_vvvvvzz) +// the vvvvwaa function +function vvvvwaa(add_css_view_vvvvwaa) { // set the function logic - if (store_vvvvvzz == 4) - { - return true; - } - return false; -} - -// the vvvvvzz Some function -function datatype_vvvvvzz_SomeFunc(datatype_vvvvvzz) -{ - // set the function logic - if (datatype_vvvvvzz == 'CHAR' || datatype_vvvvvzz == 'VARCHAR' || datatype_vvvvvzz == 'TEXT' || datatype_vvvvvzz == 'MEDIUMTEXT' || datatype_vvvvvzz == 'LONGTEXT') - { - return true; - } - return false; -} - -// the vvvvwab function -function vvvvwab(add_css_view_vvvvwab) -{ - // set the function logic - if (add_css_view_vvvvwab == 1) + if (add_css_view_vvvvwaa == 1) { jQuery('#jform_css_view').closest('.control-group').show(); - if (jform_vvvvwabvzx_required) + if (jform_vvvvwaavzs_required) { updateFieldRequired('css_view',0); jQuery('#jform_css_view').prop('required','required'); jQuery('#jform_css_view').attr('aria-required',true); jQuery('#jform_css_view').addClass('required'); - jform_vvvvwabvzx_required = false; + jform_vvvvwaavzs_required = false; } } else { jQuery('#jform_css_view').closest('.control-group').hide(); - if (!jform_vvvvwabvzx_required) + if (!jform_vvvvwaavzs_required) { updateFieldRequired('css_view',1); jQuery('#jform_css_view').removeAttr('required'); jQuery('#jform_css_view').removeAttr('aria-required'); jQuery('#jform_css_view').removeClass('required'); - jform_vvvvwabvzx_required = true; + jform_vvvvwaavzs_required = true; } } } -// the vvvvwac function -function vvvvwac(add_css_views_vvvvwac) +// the vvvvwab function +function vvvvwab(add_css_views_vvvvwab) { // set the function logic - if (add_css_views_vvvvwac == 1) + if (add_css_views_vvvvwab == 1) { jQuery('#jform_css_views').closest('.control-group').show(); - if (jform_vvvvwacvzy_required) + if (jform_vvvvwabvzt_required) { updateFieldRequired('css_views',0); jQuery('#jform_css_views').prop('required','required'); jQuery('#jform_css_views').attr('aria-required',true); jQuery('#jform_css_views').addClass('required'); - jform_vvvvwacvzy_required = false; + jform_vvvvwabvzt_required = false; } } else { jQuery('#jform_css_views').closest('.control-group').hide(); - if (!jform_vvvvwacvzy_required) + if (!jform_vvvvwabvzt_required) { updateFieldRequired('css_views',1); jQuery('#jform_css_views').removeAttr('required'); jQuery('#jform_css_views').removeAttr('aria-required'); jQuery('#jform_css_views').removeClass('required'); - jform_vvvvwacvzy_required = true; + jform_vvvvwabvzt_required = true; } } } -// the vvvvwad function -function vvvvwad(add_javascript_view_footer_vvvvwad) +// the vvvvwac function +function vvvvwac(add_javascript_view_footer_vvvvwac) { // set the function logic - if (add_javascript_view_footer_vvvvwad == 1) + if (add_javascript_view_footer_vvvvwac == 1) { jQuery('#jform_javascript_view_footer').closest('.control-group').show(); - if (jform_vvvvwadvzz_required) + if (jform_vvvvwacvzu_required) { updateFieldRequired('javascript_view_footer',0); jQuery('#jform_javascript_view_footer').prop('required','required'); jQuery('#jform_javascript_view_footer').attr('aria-required',true); jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvwadvzz_required = false; + jform_vvvvwacvzu_required = false; } } else { jQuery('#jform_javascript_view_footer').closest('.control-group').hide(); - if (!jform_vvvvwadvzz_required) + if (!jform_vvvvwacvzu_required) { updateFieldRequired('javascript_view_footer',1); jQuery('#jform_javascript_view_footer').removeAttr('required'); jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); jQuery('#jform_javascript_view_footer').removeClass('required'); - jform_vvvvwadvzz_required = true; + jform_vvvvwacvzu_required = true; } } } -// the vvvvwae function -function vvvvwae(add_javascript_views_footer_vvvvwae) +// the vvvvwad function +function vvvvwad(add_javascript_views_footer_vvvvwad) { // set the function logic - if (add_javascript_views_footer_vvvvwae == 1) + if (add_javascript_views_footer_vvvvwad == 1) { jQuery('#jform_javascript_views_footer').closest('.control-group').show(); - if (jform_vvvvwaewaa_required) + if (jform_vvvvwadvzv_required) { updateFieldRequired('javascript_views_footer',0); jQuery('#jform_javascript_views_footer').prop('required','required'); jQuery('#jform_javascript_views_footer').attr('aria-required',true); jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvwaewaa_required = false; + jform_vvvvwadvzv_required = false; } } else { jQuery('#jform_javascript_views_footer').closest('.control-group').hide(); - if (!jform_vvvvwaewaa_required) + if (!jform_vvvvwadvzv_required) { updateFieldRequired('javascript_views_footer',1); jQuery('#jform_javascript_views_footer').removeAttr('required'); jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvwaewaa_required = true; + jform_vvvvwadvzv_required = true; } } } diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index ef060e03c..f5ca4e46e 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtype.js diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml index c6b100a69..5d00f59ae 100644 --- a/admin/models/forms/fieldtype.xml +++ b/admin/models/forms/fieldtype.xml @@ -107,7 +107,7 @@ hint="COM_COMPONENTBUILDER_FIELDTYPE_NAME_HINT" /> - + 0 && type.length > 0){ + var request = 'token='+token+'&type=' + type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function addData(result, where){ + jQuery(result).insertAfter(jQuery(where).closest('.control-group')); +} + + +function addButtonID_server(type, size){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod); + if(token.length > 0 && type.length > 0 && size > 0){ + var request = 'token='+token+'&type='+type+'&size='+size; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButtonID(type, where, size){ + addButtonID_server(type, size).done(function(result) { + if(result){ + if (2 == size) { + jQuery('#'+where).html(result); + } else { + addData(result, '#jform_'+where); + } + } + }); +} + +function addButton_server(type){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod); + if(token.length > 0 && type.length > 0){ + var request = 'token='+token+'&type='+type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButton(type,where){ + addButton_server(type).done(function(result) { + if(result){ + addData(result,'#jform_'+where); + } + }) +} + diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index 6b7093d35..638d6dec0 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -196,27 +196,14 @@ message="Error! Please add author name here." hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT" /> - - - + - + - - - - - - - - - - - - - - - - - - - - COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - + - - - - - - - - - - - - - + + type="radio" + name="update_server_target" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL" + description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_DESCRIPTION" + class="btn-group btn-group-yesno" + default="1" + required="true"> + + + + + - - + + - - - - - - + + - + @@ -743,17 +600,17 @@ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_DESCRIPTION" hide_default="true" /> - + @@ -764,19 +621,30 @@ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION" directory="" /> - + + + COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - - - - - - - - - - - - - - - - - - - - - COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - + + + - - - + type="hidden" + name="not_required" + default="[]" + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + type="radio" + name="add_php_postflight_install" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_INSTALL_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - - - - - - + + COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - - + + COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + type="radio" + name="emptycontributors" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL" + description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION" + class="btn-group btn-group-yesno" + default="0"> + + + - - + + - - + + - - + + COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO - - + + - - + + diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index 9ec0a3fb6..d0adb573d 100644 --- a/admin/models/forms/layout.js +++ b/admin/models/forms/layout.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layout.js @@ -23,42 +23,42 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvyuvyw_required = false; +jform_vvvvvytvyr_required = false; // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvvyu = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyu(add_php_view_vvvvvyu); + var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvyt(add_php_view_vvvvvyt); }); -// the vvvvvyu function -function vvvvvyu(add_php_view_vvvvvyu) +// the vvvvvyt function +function vvvvvyt(add_php_view_vvvvvyt) { // set the function logic - if (add_php_view_vvvvvyu == 1) + if (add_php_view_vvvvvyt == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvyuvyw_required) + if (jform_vvvvvytvyr_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvyuvyw_required = false; + jform_vvvvvytvyr_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvyuvyw_required) + if (!jform_vvvvvytvyr_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvyuvyw_required = true; + jform_vvvvvytvyr_required = true; } } } diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index 74f730bf1..4ebde48be 100644 --- a/admin/models/forms/site_view.js +++ b/admin/models/forms/site_view.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_view.js @@ -23,283 +23,283 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvyjvyk_required = false; -jform_vvvvvykvyl_required = false; -jform_vvvvvylvym_required = false; -jform_vvvvvymvyn_required = false; -jform_vvvvvynvyo_required = false; -jform_vvvvvyovyp_required = false; -jform_vvvvvypvyq_required = false; -jform_vvvvvyqvyr_required = false; -jform_vvvvvyrvys_required = false; -jform_vvvvvyrvyt_required = false; +jform_vvvvvyivyf_required = false; +jform_vvvvvyjvyg_required = false; +jform_vvvvvykvyh_required = false; +jform_vvvvvylvyi_required = false; +jform_vvvvvymvyj_required = false; +jform_vvvvvynvyk_required = false; +jform_vvvvvyovyl_required = false; +jform_vvvvvypvym_required = false; +jform_vvvvvyqvyn_required = false; +jform_vvvvvyqvyo_required = false; // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvvyj = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyj(add_php_view_vvvvvyj); + var add_php_view_vvvvvyi = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvyi(add_php_view_vvvvvyi); - var add_php_jview_display_vvvvvyk = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); - vvvvvyk(add_php_jview_display_vvvvvyk); + var add_php_jview_display_vvvvvyj = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val(); + vvvvvyj(add_php_jview_display_vvvvvyj); - var add_php_jview_vvvvvyl = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); - vvvvvyl(add_php_jview_vvvvvyl); + var add_php_jview_vvvvvyk = jQuery("#jform_add_php_jview input[type='radio']:checked").val(); + vvvvvyk(add_php_jview_vvvvvyk); - var add_php_document_vvvvvym = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvym(add_php_document_vvvvvym); + var add_php_document_vvvvvyl = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvyl(add_php_document_vvvvvyl); - var add_css_document_vvvvvyn = jQuery("#jform_add_css_document input[type='radio']:checked").val(); - vvvvvyn(add_css_document_vvvvvyn); + var add_css_document_vvvvvym = jQuery("#jform_add_css_document input[type='radio']:checked").val(); + vvvvvym(add_css_document_vvvvvym); - var add_js_document_vvvvvyo = jQuery("#jform_add_js_document input[type='radio']:checked").val(); - vvvvvyo(add_js_document_vvvvvyo); + var add_js_document_vvvvvyn = jQuery("#jform_add_js_document input[type='radio']:checked").val(); + vvvvvyn(add_js_document_vvvvvyn); - var add_css_vvvvvyp = jQuery("#jform_add_css input[type='radio']:checked").val(); - vvvvvyp(add_css_vvvvvyp); + var add_css_vvvvvyo = jQuery("#jform_add_css input[type='radio']:checked").val(); + vvvvvyo(add_css_vvvvvyo); - var add_php_ajax_vvvvvyq = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); - vvvvvyq(add_php_ajax_vvvvvyq); + var add_php_ajax_vvvvvyp = jQuery("#jform_add_php_ajax input[type='radio']:checked").val(); + vvvvvyp(add_php_ajax_vvvvvyp); - var add_custom_button_vvvvvyr = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyr(add_custom_button_vvvvvyr); + var add_custom_button_vvvvvyq = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyq(add_custom_button_vvvvvyq); - var button_position_vvvvvys = jQuery("#jform_button_position").val(); - vvvvvys(button_position_vvvvvys); + var button_position_vvvvvyr = jQuery("#jform_button_position").val(); + vvvvvyr(button_position_vvvvvyr); }); -// the vvvvvyj function -function vvvvvyj(add_php_view_vvvvvyj) +// the vvvvvyi function +function vvvvvyi(add_php_view_vvvvvyi) { // set the function logic - if (add_php_view_vvvvvyj == 1) + if (add_php_view_vvvvvyi == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvyjvyk_required) + if (jform_vvvvvyivyf_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvyjvyk_required = false; + jform_vvvvvyivyf_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvyjvyk_required) + if (!jform_vvvvvyivyf_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvyjvyk_required = true; + jform_vvvvvyivyf_required = true; } } } -// the vvvvvyk function -function vvvvvyk(add_php_jview_display_vvvvvyk) +// the vvvvvyj function +function vvvvvyj(add_php_jview_display_vvvvvyj) { // set the function logic - if (add_php_jview_display_vvvvvyk == 1) + if (add_php_jview_display_vvvvvyj == 1) { jQuery('#jform_php_jview_display').closest('.control-group').show(); - if (jform_vvvvvykvyl_required) + if (jform_vvvvvyjvyg_required) { updateFieldRequired('php_jview_display',0); jQuery('#jform_php_jview_display').prop('required','required'); jQuery('#jform_php_jview_display').attr('aria-required',true); jQuery('#jform_php_jview_display').addClass('required'); - jform_vvvvvykvyl_required = false; + jform_vvvvvyjvyg_required = false; } } else { jQuery('#jform_php_jview_display').closest('.control-group').hide(); - if (!jform_vvvvvykvyl_required) + if (!jform_vvvvvyjvyg_required) { updateFieldRequired('php_jview_display',1); jQuery('#jform_php_jview_display').removeAttr('required'); jQuery('#jform_php_jview_display').removeAttr('aria-required'); jQuery('#jform_php_jview_display').removeClass('required'); - jform_vvvvvykvyl_required = true; + jform_vvvvvyjvyg_required = true; } } } -// the vvvvvyl function -function vvvvvyl(add_php_jview_vvvvvyl) +// the vvvvvyk function +function vvvvvyk(add_php_jview_vvvvvyk) { // set the function logic - if (add_php_jview_vvvvvyl == 1) + if (add_php_jview_vvvvvyk == 1) { jQuery('#jform_php_jview').closest('.control-group').show(); - if (jform_vvvvvylvym_required) + if (jform_vvvvvykvyh_required) { updateFieldRequired('php_jview',0); jQuery('#jform_php_jview').prop('required','required'); jQuery('#jform_php_jview').attr('aria-required',true); jQuery('#jform_php_jview').addClass('required'); - jform_vvvvvylvym_required = false; + jform_vvvvvykvyh_required = false; } } else { jQuery('#jform_php_jview').closest('.control-group').hide(); - if (!jform_vvvvvylvym_required) + if (!jform_vvvvvykvyh_required) { updateFieldRequired('php_jview',1); jQuery('#jform_php_jview').removeAttr('required'); jQuery('#jform_php_jview').removeAttr('aria-required'); jQuery('#jform_php_jview').removeClass('required'); - jform_vvvvvylvym_required = true; + jform_vvvvvykvyh_required = true; } } } -// the vvvvvym function -function vvvvvym(add_php_document_vvvvvym) +// the vvvvvyl function +function vvvvvyl(add_php_document_vvvvvyl) { // set the function logic - if (add_php_document_vvvvvym == 1) + if (add_php_document_vvvvvyl == 1) { jQuery('#jform_php_document').closest('.control-group').show(); - if (jform_vvvvvymvyn_required) + if (jform_vvvvvylvyi_required) { updateFieldRequired('php_document',0); jQuery('#jform_php_document').prop('required','required'); jQuery('#jform_php_document').attr('aria-required',true); jQuery('#jform_php_document').addClass('required'); - jform_vvvvvymvyn_required = false; + jform_vvvvvylvyi_required = false; } } else { jQuery('#jform_php_document').closest('.control-group').hide(); - if (!jform_vvvvvymvyn_required) + if (!jform_vvvvvylvyi_required) { updateFieldRequired('php_document',1); jQuery('#jform_php_document').removeAttr('required'); jQuery('#jform_php_document').removeAttr('aria-required'); jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvymvyn_required = true; + jform_vvvvvylvyi_required = true; } } } -// the vvvvvyn function -function vvvvvyn(add_css_document_vvvvvyn) +// the vvvvvym function +function vvvvvym(add_css_document_vvvvvym) { // set the function logic - if (add_css_document_vvvvvyn == 1) + if (add_css_document_vvvvvym == 1) { jQuery('#jform_css_document').closest('.control-group').show(); - if (jform_vvvvvynvyo_required) + if (jform_vvvvvymvyj_required) { updateFieldRequired('css_document',0); jQuery('#jform_css_document').prop('required','required'); jQuery('#jform_css_document').attr('aria-required',true); jQuery('#jform_css_document').addClass('required'); - jform_vvvvvynvyo_required = false; + jform_vvvvvymvyj_required = false; } } else { jQuery('#jform_css_document').closest('.control-group').hide(); - if (!jform_vvvvvynvyo_required) + if (!jform_vvvvvymvyj_required) { updateFieldRequired('css_document',1); jQuery('#jform_css_document').removeAttr('required'); jQuery('#jform_css_document').removeAttr('aria-required'); jQuery('#jform_css_document').removeClass('required'); - jform_vvvvvynvyo_required = true; + jform_vvvvvymvyj_required = true; } } } -// the vvvvvyo function -function vvvvvyo(add_js_document_vvvvvyo) +// the vvvvvyn function +function vvvvvyn(add_js_document_vvvvvyn) { // set the function logic - if (add_js_document_vvvvvyo == 1) + if (add_js_document_vvvvvyn == 1) { jQuery('#jform_js_document').closest('.control-group').show(); - if (jform_vvvvvyovyp_required) + if (jform_vvvvvynvyk_required) { updateFieldRequired('js_document',0); jQuery('#jform_js_document').prop('required','required'); jQuery('#jform_js_document').attr('aria-required',true); jQuery('#jform_js_document').addClass('required'); - jform_vvvvvyovyp_required = false; + jform_vvvvvynvyk_required = false; } } else { jQuery('#jform_js_document').closest('.control-group').hide(); - if (!jform_vvvvvyovyp_required) + if (!jform_vvvvvynvyk_required) { updateFieldRequired('js_document',1); jQuery('#jform_js_document').removeAttr('required'); jQuery('#jform_js_document').removeAttr('aria-required'); jQuery('#jform_js_document').removeClass('required'); - jform_vvvvvyovyp_required = true; + jform_vvvvvynvyk_required = true; } } } -// the vvvvvyp function -function vvvvvyp(add_css_vvvvvyp) +// the vvvvvyo function +function vvvvvyo(add_css_vvvvvyo) { // set the function logic - if (add_css_vvvvvyp == 1) + if (add_css_vvvvvyo == 1) { jQuery('#jform_css').closest('.control-group').show(); - if (jform_vvvvvypvyq_required) + if (jform_vvvvvyovyl_required) { updateFieldRequired('css',0); jQuery('#jform_css').prop('required','required'); jQuery('#jform_css').attr('aria-required',true); jQuery('#jform_css').addClass('required'); - jform_vvvvvypvyq_required = false; + jform_vvvvvyovyl_required = false; } } else { jQuery('#jform_css').closest('.control-group').hide(); - if (!jform_vvvvvypvyq_required) + if (!jform_vvvvvyovyl_required) { updateFieldRequired('css',1); jQuery('#jform_css').removeAttr('required'); jQuery('#jform_css').removeAttr('aria-required'); jQuery('#jform_css').removeClass('required'); - jform_vvvvvypvyq_required = true; + jform_vvvvvyovyl_required = true; } } } -// the vvvvvyq function -function vvvvvyq(add_php_ajax_vvvvvyq) +// the vvvvvyp function +function vvvvvyp(add_php_ajax_vvvvvyp) { // set the function logic - if (add_php_ajax_vvvvvyq == 1) + if (add_php_ajax_vvvvvyp == 1) { jQuery('#jform_ajax_input-lbl').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod').closest('.control-group').show(); - if (jform_vvvvvyqvyr_required) + if (jform_vvvvvypvym_required) { updateFieldRequired('php_ajaxmethod',0); jQuery('#jform_php_ajaxmethod').prop('required','required'); jQuery('#jform_php_ajaxmethod').attr('aria-required',true); jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvyqvyr_required = false; + jform_vvvvvypvym_required = false; } } @@ -307,42 +307,42 @@ function vvvvvyq(add_php_ajax_vvvvvyq) { jQuery('#jform_ajax_input-lbl').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod').closest('.control-group').hide(); - if (!jform_vvvvvyqvyr_required) + if (!jform_vvvvvypvym_required) { updateFieldRequired('php_ajaxmethod',1); jQuery('#jform_php_ajaxmethod').removeAttr('required'); jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvyqvyr_required = true; + jform_vvvvvypvym_required = true; } } } -// the vvvvvyr function -function vvvvvyr(add_custom_button_vvvvvyr) +// the vvvvvyq function +function vvvvvyq(add_custom_button_vvvvvyq) { // set the function logic - if (add_custom_button_vvvvvyr == 1) + if (add_custom_button_vvvvvyq == 1) { jQuery('#jform_custom_button-lbl').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvyrvys_required) + if (jform_vvvvvyqvyn_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvyrvys_required = false; + jform_vvvvvyqvyn_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvyrvyt_required) + if (jform_vvvvvyqvyo_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvyrvyt_required = false; + jform_vvvvvyqvyo_required = false; } } @@ -350,40 +350,40 @@ function vvvvvyr(add_custom_button_vvvvvyr) { jQuery('#jform_custom_button-lbl').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvyrvys_required) + if (!jform_vvvvvyqvyn_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvyrvys_required = true; + jform_vvvvvyqvyn_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvyrvyt_required) + if (!jform_vvvvvyqvyo_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvyrvyt_required = true; + jform_vvvvvyqvyo_required = true; } } } -// the vvvvvys function -function vvvvvys(button_position_vvvvvys) +// the vvvvvyr function +function vvvvvyr(button_position_vvvvvyr) { - if (isSet(button_position_vvvvvys) && button_position_vvvvvys.constructor !== Array) + if (isSet(button_position_vvvvvyr) && button_position_vvvvvyr.constructor !== Array) { - var temp_vvvvvys = button_position_vvvvvys; - var button_position_vvvvvys = []; - button_position_vvvvvys.push(temp_vvvvvys); + var temp_vvvvvyr = button_position_vvvvvyr; + var button_position_vvvvvyr = []; + button_position_vvvvvyr.push(temp_vvvvvyr); } - else if (!isSet(button_position_vvvvvys)) + else if (!isSet(button_position_vvvvvyr)) { - var button_position_vvvvvys = []; + var button_position_vvvvvyr = []; } - var button_position = button_position_vvvvvys.some(button_position_vvvvvys_SomeFunc); + var button_position = button_position_vvvvvyr.some(button_position_vvvvvyr_SomeFunc); // set this function logic @@ -397,11 +397,11 @@ function vvvvvys(button_position_vvvvvys) } } -// the vvvvvys Some function -function button_position_vvvvvys_SomeFunc(button_position_vvvvvys) +// the vvvvvyr Some function +function button_position_vvvvvyr_SomeFunc(button_position_vvvvvyr) { // set the function logic - if (button_position_vvvvvys == 5) + if (button_position_vvvvvyr == 5) { return true; } diff --git a/admin/models/forms/snippet.js b/admin/models/forms/snippet.js index a645747af..8a7dab239 100644 --- a/admin/models/forms/snippet.js +++ b/admin/models/forms/snippet.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippet.js diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index 17a1540bc..d6160dae0 100644 --- a/admin/models/forms/template.js +++ b/admin/models/forms/template.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage template.js @@ -23,42 +23,42 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvytvyv_required = false; +jform_vvvvvysvyq_required = false; // Initial Script jQuery(document).ready(function() { - var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val(); - vvvvvyt(add_php_view_vvvvvyt); + var add_php_view_vvvvvys = jQuery("#jform_add_php_view input[type='radio']:checked").val(); + vvvvvys(add_php_view_vvvvvys); }); -// the vvvvvyt function -function vvvvvyt(add_php_view_vvvvvyt) +// the vvvvvys function +function vvvvvys(add_php_view_vvvvvys) { // set the function logic - if (add_php_view_vvvvvyt == 1) + if (add_php_view_vvvvvys == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvytvyv_required) + if (jform_vvvvvysvyq_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvytvyv_required = false; + jform_vvvvvysvyq_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvytvyv_required) + if (!jform_vvvvvysvyq_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvytvyv_required = true; + jform_vvvvvysvyq_required = true; } } } diff --git a/admin/models/ftp.php b/admin/models/ftp.php index 7591169f9..b4e1a67d5 100644 --- a/admin/models/ftp.php +++ b/admin/models/ftp.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftp.php @@ -112,7 +112,7 @@ class ComponentbuilderModelFtp extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.ftp'); } } - $this->sales_server_ftpupdate_server_ftp_vvwd = $item->id; + $this->sales_server_ftpupdate_server_ftp_vvvz = $item->id; return $item; } @@ -122,7 +122,7 @@ class ComponentbuilderModelFtp extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWaclinked_components() + public function getVzxlinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -136,15 +136,15 @@ class ComponentbuilderModelFtp extends JModelAdmin // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - // Filter by sales_server_ftpupdate_server_ftp_vvwd global. - $sales_server_ftpupdate_server_ftp_vvwd = $this->sales_server_ftpupdate_server_ftp_vvwd; - if (is_numeric($sales_server_ftpupdate_server_ftp_vvwd )) + // Filter by sales_server_ftpupdate_server_ftp_vvvz global. + $sales_server_ftpupdate_server_ftp_vvvz = $this->sales_server_ftpupdate_server_ftp_vvvz; + if (is_numeric($sales_server_ftpupdate_server_ftp_vvvz )) { - $query->where('a.sales_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvwd . ' OR a.update_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvwd, ' OR'); + $query->where('a.sales_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvvz . ' OR a.update_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvvz, ' OR'); } - elseif (is_string($sales_server_ftpupdate_server_ftp_vvwd)) + elseif (is_string($sales_server_ftpupdate_server_ftp_vvvz)) { - $query->where('a.sales_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvwd) . ' OR a.update_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvwd), ' OR'); + $query->where('a.sales_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvvz) . ' OR a.update_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvvz), ' OR'); } else { diff --git a/admin/models/ftps.php b/admin/models/ftps.php index a6ac2d4d0..7ef707f8f 100644 --- a/admin/models/ftps.php +++ b/admin/models/ftps.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftps.php diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 507d2fcdb..8ac8ddb89 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -266,7 +266,7 @@ class ComponentbuilderModelHelp_documents extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR g. LIKE '.$search.' OR a.site_view LIKE '.$search.' OR h. LIKE '.$search.')'); + $query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR a.site_view LIKE '.$search.')'); } } diff --git a/admin/models/import.php b/admin/models/import.php index 2bddbf916..339a50a55 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php index dfedd2285..b622dd65c 100644 --- a/admin/models/import_joomla_components.php +++ b/admin/models/import_joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage import_joomla_components.php @@ -642,80 +642,22 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy $this->user = JFactory::getUser(); // set some defaults $this->today = JFactory::getDate()->toSql(); - // we first store the fieldtype - if (!$this->saveSmartItems('fieldtype')) + // the array of tables to store + $tables = array( + 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view', + 'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code', + 'admin_fields', 'admin_fields_conditions', 'component_admin_views', 'component_site_views', + 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks', + 'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders' + ); + // smart table loop + foreach ($tables as $table) { - return false; - } - // we then store the field - if (!$this->saveSmartItems('field')) - { - return false; - } - // we then store the admin_view - if (!$this->saveSmartItems('admin_view')) - { - return false; - } - // we then store the snippet - if (!$this->saveSmartItems('snippet')) - { - return false; - } - // we then store the dynamic_get - if (!$this->saveSmartItems('dynamic_get')) - { - return false; - } - // we then store the custom_admin_view - if (!$this->saveSmartItems('custom_admin_view')) - { - return false; - } - // we then store the site_view - if (!$this->saveSmartItems('site_view')) - { - return false; - } - // we then store the template - if (!$this->saveSmartItems('template')) - { - return false; - } - // we then store the layout - if (!$this->saveSmartItems('layout')) - { - return false; - } - // we then store the components - if (!$this->saveSmartItems('joomla_component')) - { - return false; - } - // we then store the languages - if (!$this->saveSmartItems('language')) - { - return false; - } - // we then store the language translations - if (!$this->saveSmartItems('language_translation')) - { - return false; - } - // we then store the custom_code - if (!$this->saveSmartItems('custom_code')) - { - return false; - } - // we then store the admin_fields - if (!$this->saveSmartItems('admin_fields')) - { - return false; - } - // we then store the admin_fields_conditions - if (!$this->saveSmartItems('admin_fields_conditions')) - { - return false; + // save the table to database + if (!$this->saveSmartItems($table)) + { + return false; + } } // do a after all run on all items that need it $this->updateAfter(); @@ -1005,7 +947,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy // convert Repetable Fields if (ComponentbuilderHelper::checkArray($addlinked_views) && isset($addlinked_views['adminview'])) { - $addlinked_views = $this->convertRepeatable($addlinked_views, 'addlinked_views'); + $addlinked_views = ComponentbuilderHelper::convertRepeatable($addlinked_views, 'addlinked_views'); } // update the view IDs if (ComponentbuilderHelper::checkArray($addlinked_views)) @@ -1051,68 +993,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy } } - /* - * Convert repeatable field to subform - * - * @param array $item The array to convert - * @param string $name The main field name - * @param array $updater The updater (dynamic) option - * - * @return array - */ - protected function convertRepeatable($item, $name) - { - // continue only if we have an array - if (ComponentbuilderHelper::checkArray($item)) - { - $bucket = array(); - foreach ($item as $key => $values) - { - foreach ($values as $nr => $value) - { - if (!isset($bucket[$name . $nr]) || !ComponentbuilderHelper::checkArray($bucket[$name . $nr])) - { - $bucket[$name . $nr] = array(); - } - $bucket[$name . $nr][$key] = $value; - } - } - return $bucket; - } - return $item; - } - - /* - * Convert repeatable field to subform - * - * @param object $item The item to update - * @param json $updater The fields to check and update - * - * @return void - */ - protected function convertRepeatableFields($object, $updater) - { - // update the repeatable fields - foreach ($updater as $up => $sleutel) - { - if (isset($object->{$up}) && ComponentbuilderHelper::checkJson($object->{$up})) - { - $updateArray = json_decode($object->{$up}, true); - // check if this is old values for repeatable fields - if (ComponentbuilderHelper::checkArray($updateArray) && isset($updateArray[$sleutel])) - { - // load it back - $object->{$up} = json_encode($this->convertRepeatable($updateArray, $up)); - } - } - elseif (isset($object->{$up})) - { - unset($object->{$up}); - } - } - return $object; - } - /** * Update Many Subform IDs * @@ -1376,7 +1256,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy 'properties' => 'name' ); // update the repeatable fields - $item = $this->convertRepeatableFields($item, $updaterR); + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); break; case 'field': // update the fieldtype @@ -1417,7 +1297,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy 'filter' => 'filter_type' ); // update the repeatable fields - $item = $this->convertRepeatableFields($item, $updaterR); + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); // subform fields to target $updaterT = array( // subformfield => field => type_value @@ -1450,9 +1330,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy 'custom_button' => 'name' ); // update the repeatable fields - $item = $this->convertRepeatableFields($item, $updaterR); + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); break; case 'admin_view': + // set the getters anchors + $getter = array('admin_view' => $item->id); // we must clear the demo content (since it was not moved as far as we know) TODO if ($item->add_sql == 1 && $item->source == 1) { @@ -1464,17 +1346,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy // update the addfields (old dataset) if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields)) { - // set the anchors getters - $getter = array('admin_view' => $item->id); // move the old data $this->setDivergedDataMover($item->addfields, 'admin_fields', 'addfields', $getter); - // remove from this dataset - unset($item->addfields); - } - elseif (isset($item->addfields)) - { - unset($item->addfields); } + // remove from this dataset + unset($item->addfields); // update the addlinked_views if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views)) { @@ -1487,17 +1363,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy // update the addconditions (old dataset) if (isset($item->addconditions) && ComponentbuilderHelper::checkJson($item->addconditions)) { - // set the getters anchors - $getter = array('admin_view' => $item->id); // move the old data $this->setDivergedDataMover($item->addconditions, 'admin_fields_conditions', 'addconditions', $getter); - // remove from this dataset - unset($item->addconditions); - } - elseif (isset($item->addconditions)) - { - unset($item->addconditions); } + // remove from this dataset + unset($item->addconditions); // repeatable fields to update $updaterR = array( // repeatablefield => checker @@ -1509,109 +1379,249 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy 'addpermissions' => 'action' ); // update the repeatable fields - $item = $this->convertRepeatableFields($item, $updaterR); + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); break; case 'joomla_component': + // set the anchors getters + $getter = array('joomla_component' => $item->id); // update the addconfig if (isset($item->addconfig) && ComponentbuilderHelper::checkJson($item->addconfig)) { - $addconfig = json_decode($item->addconfig, true); - foreach ($addconfig['field'] as $nr => $id) - { - if (!is_numeric($id)) - { - continue; - } - // update the addconfig - if (isset($this->newID['field'][(int) $id])) - { - $addconfig['field'][$nr] = $this->newID['field'][(int) $id]; - } - else - { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BCONFIG_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning'); - $addconfig['field'][$nr] = ''; - } - } - // load it back - $item->addconfig = json_encode($addconfig); + // move the old data + $this->setDivergedDataMover($item->addconfig, 'component_config', 'addconfig', $getter); } + // remove from this dataset + unset($item->addconfig); // update the addadmin_views if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views)) { - $addadmin_views = json_decode($item->addadmin_views, true); - foreach ($addadmin_views['adminview'] as $nr => $id) - { - if (!is_numeric($id)) - { - continue; - } - // update the addadmin_views - if (isset($this->newID['admin_view'][(int) $id])) - { - $addadmin_views['adminview'][$nr] = $this->newID['admin_view'][(int) $id]; - } - else - { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning'); - $addadmin_views['adminview'][$nr] = ''; - } - } - // load it back - $item->addadmin_views = json_encode($addadmin_views); - } - else - { - unset($item->addadmin_views); + // move the old data + $this->setDivergedDataMover($item->addadmin_views, 'component_admin_views', 'addadmin_views', $getter); } + // remove from this dataset + unset($item->addadmin_views); // update the addcustom_admin_views if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views)) { - $addcustom_admin_views = json_decode($item->addcustom_admin_views, true); - foreach ($addcustom_admin_views['customadminview'] as $nr => $id) - { - if (!is_numeric($id)) - { - continue; - } - // update the addcustom_admin_views - if (isset($this->newID['custom_admin_view'][(int) $id])) - { - $addcustom_admin_views['customadminview'][$nr] = $this->newID['custom_admin_view'][(int) $id]; - } - else - { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BCUSTOM_ADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BCUSTOM_ADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning'); - $addcustom_admin_views['customadminview'][$nr] = ''; - } - } - // load it back - $item->addcustom_admin_views = json_encode($addcustom_admin_views); + // move the old data + $this->setDivergedDataMover($item->addcustom_admin_views, 'component_custom_admin_views', 'addcustom_admin_views', $getter); } + // remove from this dataset + unset($item->addcustom_admin_views); // update the addsite_views if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views)) { - $addsite_views = json_decode($item->addsite_views, true); - foreach ($addsite_views['siteview'] as $nr => $id) - { - if (!is_numeric($id)) - { - continue; - } - // update the addsite_views - if (isset($this->newID['site_view'][(int) $id])) - { - $addsite_views['siteview'][$nr] = $this->newID['site_view'][(int) $id]; - } - else - { - $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning'); - $addsite_views['siteview'][$nr] = ''; - } - } - // load it back - $item->addsite_views = json_encode($addsite_views); + // move the old data + $this->setDivergedDataMover($item->addsite_views, 'component_site_views', 'addsite_views', $getter); } + // remove from this dataset + unset($item->addsite_views); + // update the version_update + if (isset($item->version_update) && ComponentbuilderHelper::checkJson($item->version_update)) + { + // move the old data + $this->setDivergedDataMover($item->version_update, 'component_updates', 'version_update', $getter); + } + // remove from this dataset + unset($item->version_update); + // update the sql_tweak + if (isset($item->sql_tweak) && ComponentbuilderHelper::checkJson($item->sql_tweak)) + { + // move the old data + $this->setDivergedDataMover($item->sql_tweak, 'component_mysql_tweaks', 'sql_tweak', $getter); + } + // remove from this dataset + unset($item->sql_tweak); + // update the addcustommenus + if (isset($item->addcustommenus) && ComponentbuilderHelper::checkJson($item->addcustommenus)) + { + // move the old data + $this->setDivergedDataMover($item->addcustommenus, 'component_custom_admin_menus', 'addcustommenus', $getter); + } + // remove from this dataset + unset($item->addcustommenus); + // update the dashboard_tab + if (isset($item->dashboard_tab) && ComponentbuilderHelper::checkJson($item->dashboard_tab)) + { + // move the old data + $this->setDivergedDataMover($item->dashboard_tab, 'component_dashboard', 'dashboard_tab', $getter); + } + // remove from this dataset + unset($item->dashboard_tab); + // update the php_dashboard_methods + if (isset($item->php_dashboard_methods)) + { + // move the old data + $this->setDivergedDataMover($item->php_dashboard_methods, 'component_dashboard', 'php_dashboard_methods', $getter); + } + // remove from this dataset + unset($item->php_dashboard_methods); + unset($item->add_php_dashboard_methods); + // update the addfiles + if (isset($item->addfiles) && ComponentbuilderHelper::checkJson($item->addfiles)) + { + // move the old data + $this->setDivergedDataMover($item->addfiles, 'component_files_folders', 'addfiles', $getter); + } + // remove from this dataset + unset($item->addfiles); + // update the addfolders + if (isset($item->addfolders) && ComponentbuilderHelper::checkJson($item->addfolders)) + { + // move the old data + $this->setDivergedDataMover($item->addfolders, 'component_files_folders', 'addfolders', $getter); + } + // remove from this dataset + unset($item->addfolders); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addcontributors' => 'name' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + break; + case 'component_admin_views': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addadmin_views' => 'adminview' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'addadmin_views' => array('adminview' => 'admin_view') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_admin_views', $updaterT); + break; + case 'component_site_views': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addsite_views' => 'siteview' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'addsite_views' => array('siteview' => 'site_view') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_site_views', $updaterT); + break; + case 'component_custom_admin_views': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addcustom_admin_views' => 'customadminview' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'addcustom_admin_views' => array('customadminview' => 'custom_admin_view') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_custom_admin_views', $updaterT); + break; + case 'component_updates': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'version_update' => 'version' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + break; + case 'component_mysql_tweaks': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'sql_tweak' => 'adminview' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'sql_tweak' => array('adminview' => 'admin_view') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_mysql_tweaks', $updaterT); + break; + case 'component_custom_admin_menus': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addcustommenus' => 'name' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'addcustommenus' => array('before' => 'admin_view') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_custom_admin_menus', $updaterT); + break; + case 'component_config': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addconfig' => 'field' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + // subform fields to target + $updaterT = array( + // subformfield => array( field => type_value ) + 'addconfig' => array('field' => 'field') + ); + // update the subform ids + $this->updateSubformsIDs($item, 'component_config', $updaterT); + break; + case 'component_dashboard': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'dashboard_tab' => 'name' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); + break; + case 'component_files_folders': + // update the joomla_component ID where needed + $item = $this->setNewID($item, 'joomla_component', 'joomla_component', $type); + // repeatable fields to update + $updaterR = array( + // repeatablefield => checker + 'addfiles' => 'file', + 'addfolders' => 'folder' + ); + // update the repeatable fields + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); break; case 'custom_code': // update the component ID where needed @@ -1764,7 +1774,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy } // update the repeatable fields - $item = $this->convertRepeatableFields($item, $updaterR); + $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); // update the subform ids $this->updateSubformsIDs($item, $type, $updaterT); @@ -1887,7 +1897,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy // check if this is old values for repeatable fields if (isset($properties['name'])) { - $properties = $this->convertRepeatable($properties, 'properties'); + $properties = ComponentbuilderHelper::convertRepeatable($properties, 'properties'); } // now check to find type foreach ($properties as $property) @@ -2233,6 +2243,20 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy $retryAgain = 2; } break; + case 'component_admin_views': + case 'component_site_views': + case 'component_custom_admin_views': + case 'component_updates': + case 'component_mysql_tweaks': + case 'component_custom_admin_menus': + case 'component_config': + case 'component_dashboard': + case 'component_files_folders': + // get by admin_view (since there should only be one of each name) + $getter = array('joomla_component'); + $this->specialValue = array(); + $this->specialValue['joomla_component'] = $this->newID['joomla_component'][(int) $item->joomla_component]; + break; case 'language_translation': // get by English translation since there should just be one $getter = 'entranslation'; diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index e278b814d..40940cf64 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php @@ -64,6 +64,11 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin public function getTable($type = 'joomla_component', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); + } + + public function getVDM() + { + return $this->vastDevMod; } /** @@ -95,10 +100,36 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->sql)) + if (!empty($item->addcontributors)) { - // base64 Decode sql. - $item->sql = base64_decode($item->sql); + // Convert the addcontributors field to an array. + $addcontributors = new Registry; + $addcontributors->loadString($item->addcontributors); + $item->addcontributors = $addcontributors->toArray(); + } + + if (!empty($item->php_postflight_install)) + { + // base64 Decode php_postflight_install. + $item->php_postflight_install = base64_decode($item->php_postflight_install); + } + + if (!empty($item->readme)) + { + // base64 Decode readme. + $item->readme = base64_decode($item->readme); + } + + if (!empty($item->php_preflight_install)) + { + // base64 Decode php_preflight_install. + $item->php_preflight_install = base64_decode($item->php_preflight_install); + } + + if (!empty($item->php_method_uninstall)) + { + // base64 Decode php_method_uninstall. + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); } if (!empty($item->php_preflight_update)) @@ -113,28 +144,10 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->php_postflight_update = base64_decode($item->php_postflight_update); } - if (!empty($item->php_preflight_install)) + if (!empty($item->sql)) { - // base64 Decode php_preflight_install. - $item->php_preflight_install = base64_decode($item->php_preflight_install); - } - - if (!empty($item->php_postflight_install)) - { - // base64 Decode php_postflight_install. - $item->php_postflight_install = base64_decode($item->php_postflight_install); - } - - if (!empty($item->php_method_uninstall)) - { - // base64 Decode php_method_uninstall. - $item->php_method_uninstall = base64_decode($item->php_method_uninstall); - } - - if (!empty($item->readme)) - { - // base64 Decode readme. - $item->readme = base64_decode($item->readme); + // base64 Decode sql. + $item->sql = base64_decode($item->sql); } if (!empty($item->php_helper_both)) @@ -179,12 +192,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->css = base64_decode($item->css); } - if (!empty($item->php_dashboard_methods)) - { - // base64 Decode php_dashboard_methods. - $item->php_dashboard_methods = base64_decode($item->php_dashboard_methods); - } - if (!empty($item->buildcompsql)) { // base64 Decode buildcompsql. @@ -206,6 +213,58 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin { // basic decrypt data export_key. $item->export_key = rtrim($basic->decryptString($item->export_key), "\0"); + } + + + if (empty($item->id)) + { + $id = 0; + } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id); + ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod); + } + + // update the fields + $objectUpdate = new stdClass(); + $objectUpdate->id = (int) $item->id; + // repeatable values to check + $arrayChecker = array( + 'addcontributors' => 'name' + ); + foreach ($arrayChecker as $_value => $checker) + { + // check what type of array we have here (should be subform... but just in case) + // This could happen due to huge data sets + if (isset($item->{$_value}) && isset($item->{$_value}[$checker])) + { + $bucket = array(); + foreach($item->{$_value} as $option => $values) + { + foreach($values as $nr => $value) + { + $bucket[$_value.$nr][$option] = $value; + } + } + $item->{$_value} = $bucket; + $objectUpdate->{$_value} = json_encode($bucket); + } + } + // be sure to update the table if we found repeatable fields that are still not converted + if (count((array) $objectUpdate) > 1) + { + $this->_db->updateObject('#__componentbuilder_joomla_component', $objectUpdate, 'id'); } if (!empty($item->id)) @@ -214,10 +273,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.joomla_component'); } } - $this->idvvvv = $item->addadmin_views; - $this->idvvvw = $item->addcustom_admin_views; - $this->idvvvx = $item->addsite_views; - $this->componentsvvvy = $item->id; + $this->componentsvvvv = $item->id; return $item; } @@ -227,291 +283,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVwnadmin_views() - { - // 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_admin_view table - $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - - // 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 . ')'); - } - - // Order the results by ordering - $query->order('a.published ASC'); - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // set values to display correctly. - if (ComponentbuilderHelper::checkArray($items)) - { - // get user object. - $user = JFactory::getUser(); - foreach ($items as $nr => &$item) - { - $access = ($user->authorise('admin_view.access', 'com_componentbuilder.admin_view.' . (int) $item->id) && $user->authorise('admin_view.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - } - } - - // Filter by id Repetable Field - $idvvvv = json_decode($this->idvvvv,true); - if (ComponentbuilderHelper::checkArray($items) && isset($idvvvv) && ComponentbuilderHelper::checkArray($idvvvv)) - { - foreach ($items as $nr => &$item) - { - if ($item->id && isset($idvvvv['adminview']) && ComponentbuilderHelper::checkArray($idvvvv['adminview'])) - { - if (!in_array($item->id,$idvvvv['adminview'])) - { - unset($items[$nr]); - continue; - } - } - else - { - unset($items[$nr]); - continue; - } - } - } - else - { - return false; - } - return $items; - } - return false; - } - - /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getVwocustom_admin_views() - { - // 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_custom_admin_view table - $query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a')); - - // From the componentbuilder_snippet table. - $query->select($db->quoteName('g.name','snippet_name')); - $query->join('LEFT', $db->quoteName('#__componentbuilder_snippet', 'g') . ' ON (' . $db->quoteName('a.snippet') . ' = ' . $db->quoteName('g.id') . ')'); - - // 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 . ')'); - } - - // Order the results by ordering - $query->order('a.published ASC'); - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // set values to display correctly. - if (ComponentbuilderHelper::checkArray($items)) - { - // get user object. - $user = JFactory::getUser(); - foreach ($items as $nr => &$item) - { - $access = ($user->authorise('custom_admin_view.access', 'com_componentbuilder.custom_admin_view.' . (int) $item->id) && $user->authorise('custom_admin_view.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - } - } - - // Filter by id Repetable Field - $idvvvw = json_decode($this->idvvvw,true); - if (ComponentbuilderHelper::checkArray($items) && isset($idvvvw) && ComponentbuilderHelper::checkArray($idvvvw)) - { - foreach ($items as $nr => &$item) - { - if ($item->id && isset($idvvvw['customadminview']) && ComponentbuilderHelper::checkArray($idvvvw['customadminview'])) - { - if (!in_array($item->id,$idvvvw['customadminview'])) - { - unset($items[$nr]); - continue; - } - } - else - { - unset($items[$nr]); - continue; - } - } - } - else - { - return false; - } - return $items; - } - return false; - } - - /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getVwpsite_views() - { - // 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_site_view table - $query->from($db->quoteName('#__componentbuilder_site_view', 'a')); - - // From the componentbuilder_snippet table. - $query->select($db->quoteName('g.name','snippet_name')); - $query->join('LEFT', $db->quoteName('#__componentbuilder_snippet', 'g') . ' ON (' . $db->quoteName('a.snippet') . ' = ' . $db->quoteName('g.id') . ')'); - - // 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 . ')'); - } - - // Order the results by ordering - $query->order('a.published ASC'); - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // set values to display correctly. - if (ComponentbuilderHelper::checkArray($items)) - { - // get user object. - $user = JFactory::getUser(); - foreach ($items as $nr => &$item) - { - $access = ($user->authorise('site_view.access', 'com_componentbuilder.site_view.' . (int) $item->id) && $user->authorise('site_view.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - } - } - - // Filter by id Repetable Field - $idvvvx = json_decode($this->idvvvx,true); - if (ComponentbuilderHelper::checkArray($items) && isset($idvvvx) && ComponentbuilderHelper::checkArray($idvvvx)) - { - foreach ($items as $nr => &$item) - { - if ($item->id && isset($idvvvx['siteview']) && ComponentbuilderHelper::checkArray($idvvvx['siteview'])) - { - if (!in_array($item->id,$idvvvx['siteview'])) - { - unset($items[$nr]); - continue; - } - } - else - { - unset($items[$nr]); - continue; - } - } - } - else - { - return false; - } - return $items; - } - return false; - } - - /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getVwqtranslation() + public function getVwmtranslation() { // Get the user object. $user = JFactory::getUser(); @@ -568,9 +340,9 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } } - // Filter by componentsvvvy Array Field - $componentsvvvy = $this->componentsvvvy; - if (ComponentbuilderHelper::checkArray($items) && $componentsvvvy) + // Filter by componentsvvvv Array Field + $componentsvvvv = $this->componentsvvvv; + if (ComponentbuilderHelper::checkArray($items) && $componentsvvvv) { foreach ($items as $nr => &$item) { @@ -583,7 +355,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin unset($items[$nr]); continue; } - if (!in_array($componentsvvvy,$item->components)) + if (!in_array($componentsvvvv,$item->components)) { unset($items[$nr]); continue; @@ -951,6 +723,33 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin if (!parent::delete($pks)) { return false; + } + + // we must also delete the linked tables found + if (ComponentbuilderHelper::checkArray($pks)) + { + $_tablesArray = array( + 'component_admin_views', + 'component_site_views', + 'component_custom_admin_views', + 'component_updates', + 'component_mysql_tweaks', + 'component_custom_admin_menus', + 'component_config', + 'component_dashboard', + 'component_files_folders' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'joomla_component', 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->delete($_pks); + } + } } return true; @@ -971,6 +770,33 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin if (!parent::publish($pks, $value)) { return false; + } + + // we must also update all linked tables + if (ComponentbuilderHelper::checkArray($pks)) + { + $_tablesArray = array( + 'component_admin_views', + 'component_site_views', + 'component_custom_admin_views', + 'component_updates', + 'component_mysql_tweaks', + 'component_custom_admin_menus', + 'component_config', + 'component_dashboard', + 'component_files_folders' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked IDs + if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'joomla_component', 'id')) + { + // load the model + $_Model = ComponentbuilderHelper::getModel($_updateTable); + // change publish state + $_Model->publish($_pks, $value); + } + } } return true; @@ -1158,7 +984,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } } - $this->table->name = $this->generateUniqe('name',$this->table->name); + $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name); // insert all set values if (ComponentbuilderHelper::checkArray($values)) @@ -1357,10 +1183,41 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['metadata'] = (string) $metadata; } - // Set the sql string to base64 string. - if (isset($data['sql'])) + // Set the addcontributors items to data. + if (isset($data['addcontributors']) && is_array($data['addcontributors'])) { - $data['sql'] = base64_encode($data['sql']); + $addcontributors = new JRegistry; + $addcontributors->loadArray($data['addcontributors']); + $data['addcontributors'] = (string) $addcontributors; + } + elseif (!isset($data['addcontributors'])) + { + // Set the empty addcontributors to data + $data['addcontributors'] = ''; + } + + // Set the php_postflight_install string to base64 string. + if (isset($data['php_postflight_install'])) + { + $data['php_postflight_install'] = base64_encode($data['php_postflight_install']); + } + + // Set the readme string to base64 string. + if (isset($data['readme'])) + { + $data['readme'] = base64_encode($data['readme']); + } + + // Set the php_preflight_install string to base64 string. + if (isset($data['php_preflight_install'])) + { + $data['php_preflight_install'] = base64_encode($data['php_preflight_install']); + } + + // Set the php_method_uninstall string to base64 string. + if (isset($data['php_method_uninstall'])) + { + $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']); } // Set the php_preflight_update string to base64 string. @@ -1375,28 +1232,10 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['php_postflight_update'] = base64_encode($data['php_postflight_update']); } - // Set the php_preflight_install string to base64 string. - if (isset($data['php_preflight_install'])) + // Set the sql string to base64 string. + if (isset($data['sql'])) { - $data['php_preflight_install'] = base64_encode($data['php_preflight_install']); - } - - // Set the php_postflight_install string to base64 string. - if (isset($data['php_postflight_install'])) - { - $data['php_postflight_install'] = base64_encode($data['php_postflight_install']); - } - - // Set the php_method_uninstall string to base64 string. - if (isset($data['php_method_uninstall'])) - { - $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']); - } - - // Set the readme string to base64 string. - if (isset($data['readme'])) - { - $data['readme'] = base64_encode($data['readme']); + $data['sql'] = base64_encode($data['sql']); } // Set the php_helper_both string to base64 string. @@ -1441,12 +1280,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['css'] = base64_encode($data['css']); } - // Set the php_dashboard_methods string to base64 string. - if (isset($data['php_dashboard_methods'])) - { - $data['php_dashboard_methods'] = base64_encode($data['php_dashboard_methods']); - } - // Set the buildcompsql string to base64 string. if (isset($data['buildcompsql'])) { diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 35bdc87b1..4886acab9 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -186,15 +186,15 @@ class ComponentbuilderModelJoomla_components extends JModelList } // create the folders JFolder::create($this->packagePath); - // Get the basic encription. + // Get the basic encryption. $basickey = ComponentbuilderHelper::getCryptKey('basic'); // Get the encription object. if ($basickey) { $basic = new FOFEncryptAes($basickey, 128); } - // add custom code - $this->setData('custom_code', $pks, 'component'); + // update $pks with returned IDs + $pks = array(); // start loading the components $this->smartExport['joomla_component'] = array(); foreach ($items as $nr => &$item) @@ -252,27 +252,28 @@ class ComponentbuilderModelJoomla_components extends JModelList // keep the key locked for exported data set $this->exportPackageLinks[$keyName] = $item->export_package_link; } - // build files - $this->moveIt($item->addfiles, 'file'); - // build folders - $this->moveIt($item->addfolders, 'folder'); // component image - $this->moveIt(array('image' => array($item->image)), 'image'); - // add config fields - $this->setData('field', $this->getIds($item->addconfig, 'repeatable', 'field'), 'id'); - // add admin views - $this->setData('admin_view', $this->getIds($item->addadmin_views, 'repeatable', 'adminview'), 'id'); - // add custom admin views - $this->setData('custom_admin_view', $this->getIds($item->addcustom_admin_views, 'repeatable', 'customadminview'), 'id'); - // add site views - $this->setData('site_view', $this->getIds($item->addsite_views, 'repeatable', 'siteview'), 'id'); + $this->moveIt(array($item->image), 'image'); // set the custom code ID's $this->setCustomCodeIds($item, 'joomla_component'); // set the language strings for this component $this->setLanguageTranslation($item->id); // load to global object $this->smartExport['joomla_component'][$item->id] = $item; + // add to pks + $pks[] = $item->id; } + // load all tables linked to joomla_component + $this->setData('custom_code', $pks, 'component'); + $this->setData('component_files_folders', $pks, 'joomla_component'); + $this->setData('component_admin_views', $pks, 'joomla_component'); + $this->setData('component_config', $pks, 'joomla_component'); + $this->setData('component_site_views', $pks, 'joomla_component'); + $this->setData('component_custom_admin_views', $pks, 'joomla_component'); + $this->setData('component_updates', $pks, 'joomla_component'); + $this->setData('component_mysql_tweaks', $pks, 'joomla_component'); + $this->setData('component_custom_admin_menus', $pks, 'joomla_component'); + $this->setData('component_dashboard', $pks, 'joomla_component'); // add fields and conditions if (isset($this->exportIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->exportIDs['admin_view'])) { @@ -356,11 +357,11 @@ class ComponentbuilderModelJoomla_components extends JModelList } /** - * Method to get ids. + * Method to get values from repeatable or subform. * - * @return mixed An array of ids on success, false on failure. + * @return mixed An array of values on success, false on failure. */ - protected function getIds($values, $type, $key = null) + protected function getValues($values, $type, $key = null, $prep = 'table') { // the ids bucket $bucket = array(); @@ -385,7 +386,14 @@ class ComponentbuilderModelJoomla_components extends JModelList } elseif (ComponentbuilderHelper::checkString($value[$key])) { - $bucket[] = $this->_db->quote($value[$key]); + if ('table' === $prep) + { + $bucket[] = $this->_db->quote($value[$key]); + } + else + { + $bucket[] = $value[$key]; + } } } } @@ -396,19 +404,26 @@ class ComponentbuilderModelJoomla_components extends JModelList return array_unique($bucket); } } - // check if the key is an array (targeting subform) + // check if the key is an array (targeting repeatable) if ('repeatable' === $type && $key) { if (isset($values[$key])) { - return array_map(function($id) { - if (is_numeric($id)) + return array_map(function($value) use($prep){ + if (is_numeric($value)) { - return $id; + return $value; } - elseif (ComponentbuilderHelper::checkString($id)) + elseif (ComponentbuilderHelper::checkString($value)) { - return $this->_db->quote($id); + if ('table' === $prep) + { + return $this->_db->quote($value); + } + else + { + return $value; + } } }, array_unique($values[$key]) ); } @@ -489,23 +504,55 @@ class ComponentbuilderModelJoomla_components extends JModelList $this->smartExport[$table][$item->id] = $item; // set the custom code ID's $this->setCustomCodeIds($item, $table); + // actions to take if table is component_files_folders + if ('component_files_folders' === $table) + { + // build files + $this->moveIt($this->getValues($item->addfiles, 'subform', 'file', null), 'file'); + // build folders + $this->moveIt($this->getValues($item->addfolders, 'subform', 'folder', null), 'folder'); + } + // actions to take if table is component_config + if ('component_config' === $table) + { + // add config fields + $this->setData('field', $this->getValues($item->addconfig, 'subform', 'field'), 'id'); + } + // actions to take if table is component_admin_views + if ('component_admin_views' === $table) + { + // add admin views + $this->setData('admin_view', $this->getValues($item->addadmin_views, 'subform', 'adminview'), 'id'); + } + // actions to take if table is component_site_views + if ('component_site_views' === $table) + { + // add site views + $this->setData('site_view', $this->getValues($item->addsite_views, 'subform', 'siteview'), 'id'); + } + // actions to take if table is component_custom_admin_views + if ('component_custom_admin_views' === $table) + { + // add custom admin views + $this->setData('custom_admin_view', $this->getValues($item->addcustom_admin_views, 'subform', 'customadminview'), 'id'); + } // actions to take if table is admin_view if ('admin_view' === $table) { // add fields & conditions $this->setExportIDs($item->id, 'admin_view'); // admin icon - $this->moveIt(array('image' => array($item->icon)), 'image'); + $this->moveIt(array($item->icon), 'image'); // admin icon_add - $this->moveIt(array('image' => array($item->icon_add)), 'image'); + $this->moveIt(array($item->icon_add), 'image'); // admin icon_category - $this->moveIt(array('image' => array($item->icon_category)), 'image'); + $this->moveIt(array($item->icon_category), 'image'); } // actions to take if table is admin_fields if ('admin_fields' === $table) { // add fields - $this->setData('field', $this->getIds($item->addfields, 'subform', 'field'), 'id'); + $this->setData('field', $this->getValues($item->addfields, 'subform', 'field'), 'id'); } // actions to take if table is field if ('field' === $table) @@ -555,7 +602,7 @@ class ComponentbuilderModelJoomla_components extends JModelList if ('custom_admin_view' === $table && isset($item->icon)) { // view icon - $this->moveIt(array('image' => array($item->icon)), 'image'); + $this->moveIt(array($item->icon), 'image'); } // add snippets $this->setExportIDs((int) $item->snippet, 'snippet'); @@ -718,29 +765,24 @@ class ComponentbuilderModelJoomla_components extends JModelList * * @return bool */ - protected function moveIt($data, $type) + protected function moveIt($paths, $type) { - // if json convert to array - if (ComponentbuilderHelper::checkJson($data)) - { - $data = json_decode($data, true); - } // make sure we have an array - if (!ComponentbuilderHelper::checkArray($data) || !isset($data[$type]) || !ComponentbuilderHelper::checkArray($data[$type])) + if (!ComponentbuilderHelper::checkArray($paths)) { return false; } // set the name of the folder if ('file' === $type || 'folder' === $type) { - $name = 'custom'; + $folderName = 'custom'; } if ('image' === $type) { - $name = 'images'; + $folderName = 'images'; } // setup the type path - $tmpPath = str_replace('//', '/', $this->packagePath . '/' . $name); + $tmpPath = str_replace('//', '/', $this->packagePath . '/' . $folderName); // create type path if not set if (!JFolder::exists($tmpPath)) { @@ -748,7 +790,7 @@ class ComponentbuilderModelJoomla_components extends JModelList JFolder::create($tmpPath); } // now move it - foreach ($data[$type] as $item) + foreach ($paths as $item) { if (ComponentbuilderHelper::checkString($item)) { @@ -939,7 +981,7 @@ class ComponentbuilderModelJoomla_components extends JModelList $data = $this->getDataWithAlias($layout, 'layout'); if (ComponentbuilderHelper::checkArray($data)) { - if (!isset($this->exportIDs['layout']) && !isset($this->exportIDs['layout'][$data['id']])) + if (!isset($this->exportIDs['layout']) || !isset($this->exportIDs['layout'][$data['id']])) { $this->setExportIDs($data['id'], 'layout'); // call self to get child data @@ -1116,7 +1158,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // add languages if (isset($item->translation)) { - $this->setData('language', $this->getIds($item->translation, 'subform', 'language'), 'langtag'); + $this->setData('language', $this->getValues($item->translation, 'subform', 'language'), 'langtag'); } } } @@ -1159,15 +1201,20 @@ class ComponentbuilderModelJoomla_components extends JModelList protected function getCodeSearchKeys($target) { $targets = array(); - // #__componentbuilder_joomla_component as a + // #__componentbuilder_joomla_component $targets['joomla_component'] = array(); $targets['joomla_component']['search'] = array('php_preflight_install','php_postflight_install', 'php_preflight_update','php_postflight_update','php_method_uninstall', 'php_helper_admin','php_admin_event','php_helper_both','php_helper_site', - 'php_site_event','php_dashboard_methods','dashboard_tab'); - $targets['joomla_component']['not_base64'] = array('dashboard_tab' => 'json'); + 'php_site_event'); + $targets['joomla_component']['not_base64'] = array(); - // #__componentbuilder_admin_view as b + // #__componentbuilder_component_dashboard + $targets['component_dashboard'] = array(); + $targets['component_dashboard']['search'] = array('php_dashboard_methods','dashboard_tab'); + $targets['component_dashboard']['not_base64'] = array('dashboard_tab' => 'json'); + + // #__componentbuilder_admin_view $targets['admin_view'] = array(); $targets['admin_view']['search'] = array('javascript_view_file','javascript_view_footer','javascript_views_file', 'javascript_views_footer','php_getitem','php_save','php_postsavehook','php_getitems', @@ -1177,35 +1224,35 @@ class ComponentbuilderModelJoomla_components extends JModelList 'php_import','php_import_setdata','php_import_save','html_import_view','php_ajaxmethod'); $targets['admin_view']['not_base64'] = array(); - // #__componentbuilder_custom_admin_view as c + // #__componentbuilder_custom_admin_view $targets['custom_admin_view'] = array(); $targets['custom_admin_view']['search'] = array('default','php_view','php_jview','php_jview_display','php_document', 'js_document','css_document','css','php_model','php_controller'); $targets['custom_admin_view']['not_base64'] = array(); - // #__componentbuilder_site_view as d + // #__componentbuilder_site_view $targets['site_view'] = array(); $targets['site_view']['search'] = array('default','php_view','php_jview','php_jview_display','php_document', 'js_document','css_document','css','php_ajaxmethod','php_model','php_controller'); $targets['site_view']['not_base64'] = array(); - // #__componentbuilder_field as e + // #__componentbuilder_field $targets['field'] = array(); $targets['field']['search'] = array('xml','javascript_view_footer','javascript_views_footer'); $targets['field']['not_base64'] = array('xml' => 'json'); - // #__componentbuilder_dynamic_get as f + // #__componentbuilder_dynamic_get $targets['dynamic_get'] = array(); $targets['dynamic_get']['search'] = array('php_before_getitem','php_after_getitem','php_before_getitems','php_after_getitems', 'php_getlistquery'); $targets['dynamic_get']['not_base64'] = array(); - // #__componentbuilder_template as g + // #__componentbuilder_template $targets['template'] = array(); $targets['template']['search'] = array('php_view','template'); $targets['template']['not_base64'] = array(); - // #__componentbuilder_layout as h + // #__componentbuilder_layout $targets['layout'] = array(); $targets['layout']['search'] = array('php_view','layout'); $targets['layout']['not_base64'] = array(); @@ -1447,30 +1494,25 @@ class ComponentbuilderModelJoomla_components extends JModelList continue; } - // decode sql - $item->sql = base64_decode($item->sql); - // decode php_preflight_update - $item->php_preflight_update = base64_decode($item->php_preflight_update); - // decode php_postflight_update - $item->php_postflight_update = base64_decode($item->php_postflight_update); + // decode php_postflight_install + $item->php_postflight_install = base64_decode($item->php_postflight_install); + // decode readme + $item->readme = base64_decode($item->readme); + // decode php_preflight_install + $item->php_preflight_install = base64_decode($item->php_preflight_install); + // decode php_method_uninstall + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true))) { // decrypt whmcs_key $item->whmcs_key = $basic->decryptString($item->whmcs_key); } - // decode php_preflight_install - $item->php_preflight_install = base64_decode($item->php_preflight_install); - // decode php_postflight_install - $item->php_postflight_install = base64_decode($item->php_postflight_install); - // decode php_method_uninstall - $item->php_method_uninstall = base64_decode($item->php_method_uninstall); - // decode readme - $item->readme = base64_decode($item->readme); - if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true))) - { - // decrypt export_key - $item->export_key = $basic->decryptString($item->export_key); - } + // decode php_preflight_update + $item->php_preflight_update = base64_decode($item->php_preflight_update); + // decode php_postflight_update + $item->php_postflight_update = base64_decode($item->php_postflight_update); + // decode sql + $item->sql = base64_decode($item->sql); // decode php_helper_both $item->php_helper_both = base64_decode($item->php_helper_both); // decode php_helper_admin @@ -1485,8 +1527,11 @@ class ComponentbuilderModelJoomla_components extends JModelList $item->javascript = base64_decode($item->javascript); // decode css $item->css = base64_decode($item->css); - // decode php_dashboard_methods - $item->php_dashboard_methods = base64_decode($item->php_dashboard_methods); + if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true))) + { + // decrypt export_key + $item->export_key = $basic->decryptString($item->export_key); + } // decode buildcompsql $item->buildcompsql = base64_decode($item->buildcompsql); // unset the values we don't want exported. diff --git a/admin/models/language.php b/admin/models/language.php index 0351bb6f3..cd68b7e23 100644 --- a/admin/models/language.php +++ b/admin/models/language.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language.php diff --git a/admin/models/language_translation.php b/admin/models/language_translation.php index 1d0941a43..7ef736413 100644 --- a/admin/models/language_translation.php +++ b/admin/models/language_translation.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translation.php diff --git a/admin/models/language_translations.php b/admin/models/language_translations.php index c68957715..1d4970097 100644 --- a/admin/models/language_translations.php +++ b/admin/models/language_translations.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translations.php diff --git a/admin/models/languages.php b/admin/models/languages.php index 8bcf570cc..b69c606e7 100644 --- a/admin/models/languages.php +++ b/admin/models/languages.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage languages.php diff --git a/admin/models/layout.php b/admin/models/layout.php index e4f91cd75..ae1156be4 100644 --- a/admin/models/layout.php +++ b/admin/models/layout.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layout.php diff --git a/admin/models/layouts.php b/admin/models/layouts.php index 13eb16f27..56b2a5814 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layouts.php @@ -195,7 +195,7 @@ class ComponentbuilderModelLayouts extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.' OR g.name LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.alias LIKE '.$search.' OR a.description LIKE '.$search.' OR a.dynamic_get LIKE '.$search.')'); } } diff --git a/admin/models/site_view.php b/admin/models/site_view.php index 1667d48c9..0a04070be 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_view.php @@ -230,7 +230,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.site_view'); } } - $this->addsite_viewsvvwb = $item->id; + $this->addsite_viewsvvvx = $item->id; return $item; } @@ -240,7 +240,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyulinked_components() + public function getVyplinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -297,15 +297,15 @@ class ComponentbuilderModelSite_view extends JModelAdmin } } - // Filter by addsite_viewsvvwb in this Repetable Field - if (ComponentbuilderHelper::checkArray($items) && isset($this->addsite_viewsvvwb)) + // Filter by addsite_viewsvvvx in this Repetable Field + if (ComponentbuilderHelper::checkArray($items) && isset($this->addsite_viewsvvvx)) { foreach ($items as $nr => &$item) { if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views)) { $tmpArray = json_decode($item->addsite_views,true); - if (!isset($tmpArray['siteview']) || !ComponentbuilderHelper::checkArray($tmpArray['siteview']) || !in_array($this->addsite_viewsvvwb, $tmpArray['siteview'])) + if (!isset($tmpArray['siteview']) || !ComponentbuilderHelper::checkArray($tmpArray['siteview']) || !in_array($this->addsite_viewsvvvx, $tmpArray['siteview'])) { unset($items[$nr]); continue; diff --git a/admin/models/site_views.php b/admin/models/site_views.php index 7a08c7ffb..7ba7691ba 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_views.php diff --git a/admin/models/snippet.php b/admin/models/snippet.php index 39ed7f9b7..3a687b38b 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippet.php diff --git a/admin/models/snippets.php b/admin/models/snippets.php index 2f0ef9722..525c0e108 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippets.php diff --git a/admin/models/template.php b/admin/models/template.php index 39a764acc..fd0968ead 100644 --- a/admin/models/template.php +++ b/admin/models/template.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage template.php diff --git a/admin/models/templates.php b/admin/models/templates.php index 6a7503245..d99f00bd1 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage templates.php diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 4b1e96e8c..2b5274214 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -6,7 +6,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `add_email_helper` TINYINT(1) NOT NULL DEFAULT 0, `add_javascript` TINYINT(1) NOT NULL DEFAULT 0, `add_license` TINYINT(1) NOT NULL DEFAULT 0, - `add_php_dashboard_methods` TINYINT(1) NOT NULL DEFAULT 0, `add_php_helper_admin` TINYINT(1) NOT NULL DEFAULT 0, `add_php_helper_both` TINYINT(1) NOT NULL DEFAULT 0, `add_php_helper_site` TINYINT(1) NOT NULL DEFAULT 0, @@ -20,16 +19,9 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `add_site_event` TINYINT(1) NOT NULL DEFAULT 0, `add_sql` TINYINT(1) NOT NULL DEFAULT 0, `add_update_server` TINYINT(1) NOT NULL DEFAULT 0, - `addadmin_views` TEXT NOT NULL, - `addconfig` TEXT NOT NULL, `addcontributors` TEXT NOT NULL, - `addcustom_admin_views` TEXT NOT NULL, - `addcustommenus` TEXT NOT NULL, - `addfiles` TEXT NOT NULL, - `addfolders` TEXT NOT NULL, `addfootable` TINYINT(1) NOT NULL DEFAULT 0, `addreadme` TINYINT(1) NOT NULL DEFAULT 0, - `addsite_views` TEXT NOT NULL, `adduikit` TINYINT(1) NOT NULL DEFAULT 0, `author` VARCHAR(255) NOT NULL DEFAULT '', `bom` CHAR(64) NOT NULL DEFAULT '', @@ -40,7 +32,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `copyright` VARCHAR(255) NOT NULL DEFAULT '', `creatuserhelper` TINYINT(1) NOT NULL DEFAULT 0, `css` TEXT NOT NULL, - `dashboard_tab` TEXT NOT NULL, `debug_linenr` TINYINT(1) NOT NULL DEFAULT 0, `description` TEXT NOT NULL, `email` VARCHAR(255) NOT NULL DEFAULT '', @@ -58,7 +49,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `not_required` INT(1) NOT NULL DEFAULT 0, `number` INT(11) NOT NULL DEFAULT 0, `php_admin_event` MEDIUMTEXT NOT NULL, - `php_dashboard_methods` MEDIUMTEXT NOT NULL, `php_helper_admin` MEDIUMTEXT NOT NULL, `php_helper_both` MEDIUMTEXT NOT NULL, `php_helper_site` MEDIUMTEXT NOT NULL, @@ -72,13 +62,11 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `sales_server_ftp` INT(11) NOT NULL DEFAULT 0, `short_description` VARCHAR(255) NOT NULL DEFAULT '', `sql` MEDIUMTEXT NOT NULL, - `sql_tweak` TEXT NOT NULL, `system_name` VARCHAR(255) NOT NULL DEFAULT '', `toignore` TEXT NOT NULL, `update_server` VARCHAR(255) NOT NULL DEFAULT '', `update_server_ftp` INT(11) NOT NULL DEFAULT 0, `update_server_target` TINYINT(1) NOT NULL DEFAULT 0, - `version_update` TEXT NOT NULL, `website` CHAR(255) NOT NULL DEFAULT '', `whmcs_key` VARCHAR(255) NOT NULL DEFAULT '', `whmcs_url` VARCHAR(255) NOT NULL DEFAULT '', @@ -103,35 +91,34 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), + KEY `idx_system_name` (`system_name`), KEY `idx_name_code` (`name_code`), - KEY `idx_add_placeholders` (`add_placeholders`), + KEY `idx_mvc_versiondate` (`mvc_versiondate`), KEY `idx_add_css` (`add_css`), KEY `idx_add_admin_event` (`add_admin_event`), - KEY `idx_debug_linenr` (`debug_linenr`), - KEY `idx_mvc_versiondate` (`mvc_versiondate`), - KEY `idx_add_site_event` (`add_site_event`), - KEY `idx_name` (`name`), - KEY `idx_creatuserhelper` (`creatuserhelper`), + KEY `idx_add_placeholders` (`add_placeholders`), KEY `idx_add_php_helper_both` (`add_php_helper_both`), + KEY `idx_add_site_event` (`add_site_event`), + KEY `idx_debug_linenr` (`debug_linenr`), + KEY `idx_creatuserhelper` (`creatuserhelper`), + KEY `idx_update_server_target` (`update_server_target`), KEY `idx_add_license` (`add_license`), KEY `idx_addfootable` (`addfootable`), KEY `idx_license_type` (`license_type`), KEY `idx_add_php_helper_admin` (`add_php_helper_admin`), KEY `idx_add_php_helper_site` (`add_php_helper_site`), KEY `idx_add_javascript` (`add_javascript`), - KEY `idx_add_php_dashboard_methods` (`add_php_dashboard_methods`), KEY `idx_add_update_server` (`add_update_server`), - KEY `idx_update_server_target` (`update_server_target`), KEY `idx_adduikit` (`adduikit`), KEY `idx_add_email_helper` (`add_email_helper`), KEY `idx_add_php_preflight_install` (`add_php_preflight_install`), - KEY `idx_emptycontributors` (`emptycontributors`), KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_add_php_postflight_install` (`add_php_postflight_install`), KEY `idx_add_php_postflight_update` (`add_php_postflight_update`), KEY `idx_add_php_method_uninstall` (`add_php_method_uninstall`), KEY `idx_add_sql` (`add_sql`), KEY `idx_addreadme` (`addreadme`), + KEY `idx_emptycontributors` (`emptycontributors`), KEY `idx_add_sales_server` (`add_sales_server`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; @@ -235,8 +222,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( KEY `idx_name_single` (`name_single`), KEY `idx_name_list` (`name_list`), KEY `idx_type` (`type`), - KEY `idx_source` (`source`), KEY `idx_add_fadein` (`add_fadein`), + KEY `idx_source` (`source`), KEY `idx_add_css_view` (`add_css_view`), KEY `idx_add_php_getitems` (`add_php_getitems`), KEY `idx_add_css_views` (`add_css_views`), @@ -864,12 +851,248 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_conditions` ( KEY `idx_admin_view` (`admin_view`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addadmin_views` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_site_views` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addsite_views` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_views` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addcustom_admin_views` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_updates` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `version_update` TEXT NOT NULL, + `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_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_mysql_tweaks` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `sql_tweak` TEXT NOT NULL, + `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_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_menus` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addcustommenus` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_config` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconfig` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_dashboard` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `dashboard_tab` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `php_dashboard_methods` MEDIUMTEXT NOT NULL, + `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_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_files_folders` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addfiles` TEXT NOT NULL, + `addfolders` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + -- -- Dumping data for table `#__componentbuilder_joomla_component` -- -INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css`, `add_email_helper`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `addadmin_views`, `addconfig`, `addcontributors`, `addcustom_admin_views`, `addcustommenus`, `addfiles`, `addfolders`, `addfootable`, `adduikit`, `addsite_views`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `add_php_dashboard_methods`, `php_dashboard_methods`, `dashboard_tab`, `sales_server_ftp`, `update_server_ftp`, `update_server_target`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `update_server`, `copyright`, `creatuserhelper`, `css`, `debug_linenr`, `description`, `email`, `emptycontributors`, `image`, `license`, `name`, `system_name`, `name_code`, `not_required`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_tweak`, `website`, `version_update`, `params`, `published`, `created`, `modified`, `checked_out`, `checked_out_time`, `version`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`) VALUES -(25, '', 1, '', '', '', '', '', 1, 1, '', '', '', '', '', '', '{\"adminview\":[\"109\"],\"icomoon\":[\"eye-open\"],\"mainmenu\":[\"1\"],\"dashboard_add\":[\"1\"],\"dashboard_list\":[\"1\"],\"submenu\":[\"1\"],\"checkin\":[\"1\"],\"history\":[\"1\"],\"metadata\":[\"1\"],\"access\":[\"1\"],\"port\":[\"1\"],\"edit_create_site_view\":[\"1\"],\"order\":[\"1\"]}', '', '', '', '', '', '', '', 1, '{\"siteview\":[\"23\",\"25\"],\"menu\":[\"1\",\"0\"],\"metadata\":[\"1\",\"1\"],\"default_view\":[\"1\",\"0\"],\"access\":[\"1\",\"1\"],\"public\":[\"1\",\"1\"]}', '', '', 1, '', '', '', '', '', '', 2, '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'https://www.vdm.io/updates/demo_update_server.xml', 'Copyright (C) 2015. All Rights Reserved', '', '', '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'info@vdm.io', '', 'images/vdm/demo500.jpg', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', 'demo', '', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', '{\"version\":[\"1.0.5\",\"2.0.0\"],\"mysql\":[\"\",\"\"],\"url\":[\"https://github.com/namibia/demo-joomla-3-component/archive/v1.0.5.zip\",\"https://github.com/namibia/demo-joomla-3-component/archive/v2.0.0.zip\"]}', '', 1, '2016-10-18 11:44:09', '2017-08-25 00:36:01', '', '0000-00-00 00:00:00', 30, '', 3, 'V6inNhoApqD2JvhSrOd+R/OzoW8mTod30wXoypEZacY=', ''); +INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css`, `add_email_helper`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server_ftp`, `update_server_ftp`, `update_server_target`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `update_server`, `copyright`, `creatuserhelper`, `css`, `debug_linenr`, `description`, `email`, `emptycontributors`, `image`, `license`, `name`, `system_name`, `name_code`, `not_required`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `website`, `published`, `created`, `modified`, `version`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`) VALUES +(25, '', 1, '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'https://www.vdm.io/updates/demo_update_server.xml', 'Copyright (C) 2015. All Rights Reserved', '', '', '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'info@vdm.io', '', 'images/vdm/demo500.jpg', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', 'demo', '', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2017-08-25 00:36:01', 30, '', 3, 'V6inNhoApqD2JvhSrOd+R/OzoW8mTod30wXoypEZacY=', ''); -- -- Dumping data for table `#__componentbuilder_admin_view` @@ -1010,7 +1233,7 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, (100, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Email (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-05-05 23:44:32', '2016-02-07 22:43:18', 4, '', 285), (158, '', '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Image', 'NOT NULL', '', 12, '\"\"', 1, '2015-04-29 14:00:56', '2015-08-25 21:15:22', 1, '', 45), (196, '', '', '', '', '', '', '', '', '', 64, '', 'VARCHAR', '', '', '', 'Mobile Phone', 'NOT NULL', '', 23, '\"\"', 1, '2015-04-07 22:12:58', '2016-03-28 14:00:02', 2, '', 7), -(199, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2016-10-18 12:42:57', 6, '', 4), +(199, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2017-10-25 20:26:02', 8, '', 4), (203, '', '', '', '', '', '', '', '', '', 1, '', 'INT', '', '', '', 'Not Required', 'NOT NULL', '', 9, '\"\"', 1, '2015-05-08 16:19:16', '2015-08-25 21:15:22', 1, '', 19), (280, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Website', 'NOT NULL', '', 27, '\"\"', 1, '2015-04-08 00:36:16', '2015-08-25 21:15:22', 1, '', 105), (682, '', '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Add More', 'NOT NULL', '', 17, '\"\"', 1, '2015-08-05 01:18:20', '2016-10-18 12:16:27', 2, '', 196), @@ -1088,6 +1311,69 @@ INSERT INTO `#__componentbuilder_admin_fields` (`id`, `addfields`, `admin_view`, INSERT INTO `#__componentbuilder_admin_fields_conditions` (`id`, `addconditions`, `admin_view`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES (111, '{\"addconditions0\":{\"target_field\":[\"1011\",\"100\",\"158\",\"196\",\"280\"],\"target_behavior\":\"1\",\"target_relation\":\"0\",\"match_field\":\"682\",\"match_behavior\":\"1\",\"match_options\":\"1|Yes\"}}', 109, 1, '2017-10-12 21:36:00', '0000-00-00 00:00:00', 2, '', ''); +-- +-- Dumping data for table `#__componentbuilder_component_admin_views` +-- + +INSERT INTO `#__componentbuilder_component_admin_views` (`id`, `addadmin_views`, `joomla_component`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(27, '{\"addadmin_views0\":{\"adminview\":\"109\",\"icomoon\":\"eye-open\",\"mainmenu\":\"1\",\"dashboard_add\":\"1\",\"dashboard_list\":\"1\",\"submenu\":\"1\",\"checkin\":\"1\",\"history\":\"1\",\"metadata\":\"1\",\"access\":\"1\",\"port\":\"1\",\"edit_create_site_view\":\"1\",\"order\":\"1\"}}', 25, 1, '2017-10-28 03:56:26', '2017-10-28 04:13:39', 2, '', ''); + +-- +-- Dumping data for table `#__componentbuilder_component_site_views` +-- + +INSERT INTO `#__componentbuilder_component_site_views` (`id`, `addsite_views`, `joomla_component`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(27, '{\"addsite_views0\":{\"siteview\":\"23\",\"menu\":\"1\",\"metadata\":\"1\",\"default_view\":\"1\",\"access\":\"1\",\"public\":\"1\"},\"addsite_views1\":{\"siteview\":\"25\",\"menu\":\"0\",\"metadata\":\"1\",\"default_view\":\"0\",\"access\":\"1\",\"public\":\"1\"}}', 25, 1, '2017-10-28 03:56:26', '0000-00-00 00:00:00', 2, '', ''); + +-- +-- Dumping data for table `#__componentbuilder_component_custom_admin_views` +-- + +INSERT INTO `#__componentbuilder_component_custom_admin_views` (`id`, `addcustom_admin_views`, `joomla_component`, `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_component_updates` +-- + +INSERT INTO `#__componentbuilder_component_updates` (`id`, `joomla_component`, `version_update`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(27, 25, '{\"version_update0\":{\"version\":\"1.0.5\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v1.0.5.zip\"},\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"}}', 1, '2017-10-28 03:56:26', '0000-00-00 00:00:00', 2, '', ''); + +-- +-- Dumping data for table `#__componentbuilder_component_mysql_tweaks` +-- + +INSERT INTO `#__componentbuilder_component_mysql_tweaks` (`id`, `joomla_component`, `sql_tweak`, `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_component_custom_admin_menus` +-- + +INSERT INTO `#__componentbuilder_component_custom_admin_menus` (`id`, `addcustommenus`, `joomla_component`, `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_component_config` +-- + +INSERT INTO `#__componentbuilder_component_config` (`id`, `addconfig`, `joomla_component`, `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_component_dashboard` +-- + +INSERT INTO `#__componentbuilder_component_dashboard` (`id`, `dashboard_tab`, `joomla_component`, `php_dashboard_methods`, `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_component_files_folders` +-- + +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, '', ''); + -- diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index e6e5472f0..9152d3267 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -15,3 +15,12 @@ DROP TABLE IF EXISTS `#__componentbuilder_ftp`; DROP TABLE IF EXISTS `#__componentbuilder_help_document`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_conditions`; +DROP TABLE IF EXISTS `#__componentbuilder_component_admin_views`; +DROP TABLE IF EXISTS `#__componentbuilder_component_site_views`; +DROP TABLE IF EXISTS `#__componentbuilder_component_custom_admin_views`; +DROP TABLE IF EXISTS `#__componentbuilder_component_updates`; +DROP TABLE IF EXISTS `#__componentbuilder_component_mysql_tweaks`; +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`; diff --git a/admin/sql/updates/mysql/2.5.1.sql b/admin/sql/updates/mysql/2.5.1.sql index 58f264924..0c88ce16e 100644 --- a/admin/sql/updates/mysql/2.5.1.sql +++ b/admin/sql/updates/mysql/2.5.1.sql @@ -1,25 +1,25 @@ -CREATE TABLE IF NOT EXISTS `#__componentbuilder_ftp` ( - `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 '', - `signature` TEXT NOT NULL, - `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`) +CREATE TABLE IF NOT EXISTS `#__componentbuilder_ftp` ( + `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 '', + `signature` TEXT NOT NULL, + `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; diff --git a/admin/sql/updates/mysql/2.5.2.sql b/admin/sql/updates/mysql/2.5.2.sql index 47b9ba166..e84563a35 100644 --- a/admin/sql/updates/mysql/2.5.2.sql +++ b/admin/sql/updates/mysql/2.5.2.sql @@ -1,3 +1,3 @@ -ALTER TABLE `#__componentbuilder_admin_view` ADD `add_php_before_save` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_php_before_publish`; - +ALTER TABLE `#__componentbuilder_admin_view` ADD `add_php_before_save` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_php_before_publish`; + ALTER TABLE `#__componentbuilder_admin_view` ADD `php_before_save` MEDIUMTEXT NOT NULL AFTER `php_before_publish`; diff --git a/admin/sql/updates/mysql/2.5.5.sql b/admin/sql/updates/mysql/2.5.5.sql index c8a89bd53..b125678b1 100644 --- a/admin/sql/updates/mysql/2.5.5.sql +++ b/admin/sql/updates/mysql/2.5.5.sql @@ -1,3 +1,3 @@ -ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_javascript` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_email_helper`; - +ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_javascript` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_email_helper`; + ALTER TABLE `#__componentbuilder_joomla_component` ADD `javascript` TEXT NOT NULL AFTER `image`; diff --git a/admin/sql/updates/mysql/2.5.6.sql b/admin/sql/updates/mysql/2.5.6.sql index c3db53c1c..aeec130ac 100644 --- a/admin/sql/updates/mysql/2.5.6.sql +++ b/admin/sql/updates/mysql/2.5.6.sql @@ -1,24 +1,24 @@ -CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `addconditions` TEXT NOT NULL, - `addfields` TEXT NOT NULL, - `admin_view` INT(11) NOT NULL DEFAULT 0, - `params` text NOT NULL DEFAULT '', - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_admin_view` (`admin_view`) +CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconditions` TEXT NOT NULL, + `addfields` TEXT NOT NULL, + `admin_view` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_admin_view` (`admin_view`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; diff --git a/admin/sql/updates/mysql/2.5.7.sql b/admin/sql/updates/mysql/2.5.7.sql index e88173af0..7082f04a0 100644 --- a/admin/sql/updates/mysql/2.5.7.sql +++ b/admin/sql/updates/mysql/2.5.7.sql @@ -1,23 +1,23 @@ -CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_conditions` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `addconditions` TEXT NOT NULL, - `admin_view` INT(11) NOT NULL DEFAULT 0, - `params` text NOT NULL DEFAULT '', - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_admin_view` (`admin_view`) +CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_conditions` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconditions` TEXT NOT NULL, + `admin_view` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_admin_view` (`admin_view`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; diff --git a/admin/sql/updates/mysql/2.5.8.sql b/admin/sql/updates/mysql/2.5.8.sql new file mode 100644 index 000000000..e379b67c9 --- /dev/null +++ b/admin/sql/updates/mysql/2.5.8.sql @@ -0,0 +1,235 @@ +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addadmin_views` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_site_views` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addsite_views` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_views` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addcustom_admin_views` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_updates` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `version_update` TEXT NOT NULL, + `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_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_mysql_tweaks` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `sql_tweak` TEXT NOT NULL, + `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_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_menus` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addcustommenus` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_config` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addconfig` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_dashboard` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `dashboard_tab` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `php_dashboard_methods` MEDIUMTEXT NOT NULL, + `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_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_files_folders` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `addfiles` TEXT NOT NULL, + `addfolders` TEXT NOT NULL, + `joomla_component` INT(11) NOT NULL DEFAULT 0, + `params` text NOT NULL DEFAULT '', + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_joomla_component` (`joomla_component`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; diff --git a/admin/tables/admin_fields.php b/admin/tables/admin_fields.php index 04653a000..748eb736d 100644 --- a/admin/tables/admin_fields.php +++ b/admin/tables/admin_fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields.php diff --git a/admin/tables/admin_fields_conditions.php b/admin/tables/admin_fields_conditions.php index 0e3ee6876..1a56bc2db 100644 --- a/admin/tables/admin_fields_conditions.php +++ b/admin/tables/admin_fields_conditions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage admin_fields_conditions.php diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php index a92a8669a..b690e12c0 100644 --- a/admin/tables/admin_view.php +++ b/admin/tables/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php diff --git a/admin/tables/component_admin_views.php b/admin/tables/component_admin_views.php new file mode 100644 index 000000000..fc3c5c5ea --- /dev/null +++ b/admin/tables/component_admin_views.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_admin_views Table class + */ +class ComponentbuilderTableComponent_admin_views 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_component_admin_views', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_admin_views')); + } + + 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 Component_admin_views 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 component_admin_views. A component_admin_views 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('component_admin_views', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_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('component_admin_views', '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.component_admin_views.'.$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.component_admin_views.'.(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/component_config.php b/admin/tables/component_config.php new file mode 100644 index 000000000..612a87723 --- /dev/null +++ b/admin/tables/component_config.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_config Table class + */ +class ComponentbuilderTableComponent_config extends JTable +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__componentbuilder_component_config', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_config')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the Component_config table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New component_config. A component_config created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('component_config', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_CONFIG_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('component_config', 'componentbuilderTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = JString::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_componentbuilder.component_config.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count($_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_componentbuilder.component_config.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_componentbuilder'); + + return $asset->id; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); + } + + return $this->alias; + } + +} diff --git a/admin/tables/component_custom_admin_menus.php b/admin/tables/component_custom_admin_menus.php new file mode 100644 index 000000000..1c8cd1c20 --- /dev/null +++ b/admin/tables/component_custom_admin_menus.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_custom_admin_menus Table class + */ +class ComponentbuilderTableComponent_custom_admin_menus 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_component_custom_admin_menus', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_custom_admin_menus')); + } + + 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 Component_custom_admin_menus 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 component_custom_admin_menus. A component_custom_admin_menus 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('component_custom_admin_menus', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_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('component_custom_admin_menus', '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.component_custom_admin_menus.'.$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.component_custom_admin_menus.'.(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/component_custom_admin_views.php b/admin/tables/component_custom_admin_views.php new file mode 100644 index 000000000..c24717815 --- /dev/null +++ b/admin/tables/component_custom_admin_views.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_custom_admin_views Table class + */ +class ComponentbuilderTableComponent_custom_admin_views 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_component_custom_admin_views', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_custom_admin_views')); + } + + 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 Component_custom_admin_views 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 component_custom_admin_views. A component_custom_admin_views 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('component_custom_admin_views', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_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('component_custom_admin_views', '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.component_custom_admin_views.'.$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.component_custom_admin_views.'.(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/component_dashboard.php b/admin/tables/component_dashboard.php new file mode 100644 index 000000000..55e73a966 --- /dev/null +++ b/admin/tables/component_dashboard.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_dashboard Table class + */ +class ComponentbuilderTableComponent_dashboard 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_component_dashboard', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_dashboard')); + } + + 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 Component_dashboard 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 component_dashboard. A component_dashboard 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('component_dashboard', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_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('component_dashboard', '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.component_dashboard.'.$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.component_dashboard.'.(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/component_files_folders.php b/admin/tables/component_files_folders.php new file mode 100644 index 000000000..a72ac164f --- /dev/null +++ b/admin/tables/component_files_folders.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_files_folders Table class + */ +class ComponentbuilderTableComponent_files_folders 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_component_files_folders', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_files_folders')); + } + + 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 Component_files_folders 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 component_files_folders. A component_files_folders 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('component_files_folders', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_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('component_files_folders', '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.component_files_folders.'.$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.component_files_folders.'.(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/component_mysql_tweaks.php b/admin/tables/component_mysql_tweaks.php new file mode 100644 index 000000000..1e8a92133 --- /dev/null +++ b/admin/tables/component_mysql_tweaks.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_mysql_tweaks Table class + */ +class ComponentbuilderTableComponent_mysql_tweaks 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_component_mysql_tweaks', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_mysql_tweaks')); + } + + 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 Component_mysql_tweaks 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 component_mysql_tweaks. A component_mysql_tweaks 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('component_mysql_tweaks', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_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('component_mysql_tweaks', '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.component_mysql_tweaks.'.$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.component_mysql_tweaks.'.(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/component_site_views.php b/admin/tables/component_site_views.php new file mode 100644 index 000000000..9cc5131dc --- /dev/null +++ b/admin/tables/component_site_views.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_site_views Table class + */ +class ComponentbuilderTableComponent_site_views 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_component_site_views', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_site_views')); + } + + 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 Component_site_views 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 component_site_views. A component_site_views 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('component_site_views', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_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('component_site_views', '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.component_site_views.'.$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.component_site_views.'.(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/component_updates.php b/admin/tables/component_updates.php new file mode 100644 index 000000000..f98c70593 --- /dev/null +++ b/admin/tables/component_updates.php @@ -0,0 +1,351 @@ + + @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'); + +/** + * Components_updates Table class + */ +class ComponentbuilderTableComponent_updates 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_component_updates', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component_updates')); + } + + 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 Component_updates 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 component_updates. A component_updates 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('component_updates', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_UPDATES_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('component_updates', '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.component_updates.'.$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.component_updates.'.(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/custom_admin_view.php b/admin/tables/custom_admin_view.php index 7ad8c5275..3c8e29d77 100644 --- a/admin/tables/custom_admin_view.php +++ b/admin/tables/custom_admin_view.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage custom_admin_view.php diff --git a/admin/tables/custom_code.php b/admin/tables/custom_code.php index b5f4a14fa..5de0ccf77 100644 --- a/admin/tables/custom_code.php +++ b/admin/tables/custom_code.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 84 of this MVC - @build 13th October, 2017 + @version @update number 86 of this MVC + @build 27th October, 2017 @created 11th October, 2016 @package Component Builder @subpackage custom_code.php diff --git a/admin/tables/dynamic_get.php b/admin/tables/dynamic_get.php index 569080be3..e86f53ed3 100644 --- a/admin/tables/dynamic_get.php +++ b/admin/tables/dynamic_get.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 98 of this MVC - @build 20th October, 2017 + @version @update number 101 of this MVC + @build 26th October, 2017 @created 21st May, 2015 @package Component Builder @subpackage dynamic_get.php diff --git a/admin/tables/field.php b/admin/tables/field.php index 49d70b298..7395f7b6c 100644 --- a/admin/tables/field.php +++ b/admin/tables/field.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 40 of this MVC - @build 18th October, 2017 + @build 25th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.php diff --git a/admin/tables/fieldtype.php b/admin/tables/fieldtype.php index a9e180577..d26aad31f 100644 --- a/admin/tables/fieldtype.php +++ b/admin/tables/fieldtype.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 13th October, 2017 + @build 26th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtype.php diff --git a/admin/tables/ftp.php b/admin/tables/ftp.php index 368c10975..5b14888dc 100644 --- a/admin/tables/ftp.php +++ b/admin/tables/ftp.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 11 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 23rd August, 2017 @package Component Builder @subpackage ftp.php diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 2e129bbbd..5578b5f3e 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/tables/language.php b/admin/tables/language.php index 57370ff8c..bab539431 100644 --- a/admin/tables/language.php +++ b/admin/tables/language.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language.php diff --git a/admin/tables/language_translation.php b/admin/tables/language_translation.php index d66b646b1..16b7cdf4a 100644 --- a/admin/tables/language_translation.php +++ b/admin/tables/language_translation.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translation.php diff --git a/admin/tables/layout.php b/admin/tables/layout.php index 68b8f69dd..6acd899e4 100644 --- a/admin/tables/layout.php +++ b/admin/tables/layout.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 81 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 18th May, 2015 @package Component Builder @subpackage layout.php diff --git a/admin/tables/site_view.php b/admin/tables/site_view.php index 03be1d5fe..620348746 100644 --- a/admin/tables/site_view.php +++ b/admin/tables/site_view.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 63 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 29th May, 2015 @package Component Builder @subpackage site_view.php diff --git a/admin/tables/snippet.php b/admin/tables/snippet.php index c0d354783..45f0cd459 100644 --- a/admin/tables/snippet.php +++ b/admin/tables/snippet.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 17 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 19th May, 2015 @package Component Builder @subpackage snippet.php diff --git a/admin/tables/template.php b/admin/tables/template.php index f97562747..fe329cfba 100644 --- a/admin/tables/template.php +++ b/admin/tables/template.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 45 of this MVC - @build 27th September, 2017 + @build 25th October, 2017 @created 26th May, 2015 @package Component Builder @subpackage template.php diff --git a/admin/views/admin_fields/submitbutton.js b/admin/views/admin_fields/submitbutton.js index 66fe38b21..600c0eeb2 100644 --- a/admin/views/admin_fields/submitbutton.js +++ b/admin/views/admin_fields/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index 6edf256e9..bd9e779e9 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage edit.php diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index 35f8fb4d8..ae453f422 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 23 of this MVC - @build 16th October, 2017 + @version @update number 25 of this MVC + @build 26th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage view.html.php diff --git a/admin/views/admin_fields_conditions/submitbutton.js b/admin/views/admin_fields_conditions/submitbutton.js index d92055a81..d051cc80d 100644 --- a/admin/views/admin_fields_conditions/submitbutton.js +++ b/admin/views/admin_fields_conditions/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index a0bf57ba7..f5ea4a037 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage edit.php diff --git a/admin/views/admin_fields_conditions/view.html.php b/admin/views/admin_fields_conditions/view.html.php index 80a113988..b8f851ee2 100644 --- a/admin/views/admin_fields_conditions/view.html.php +++ b/admin/views/admin_fields_conditions/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 16 of this MVC - @build 16th October, 2017 + @build 25th October, 2017 @created 12th October, 2017 @package Component Builder @subpackage view.html.php diff --git a/admin/views/admin_view/submitbutton.js b/admin/views/admin_view/submitbutton.js index 55ea2776d..630e4d8cc 100644 --- a/admin/views/admin_view/submitbutton.js +++ b/admin/views/admin_view/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 6b1dceba8..dbfb130dd 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 192 of this MVC - @build 16th October, 2017 + @version @update number 247 of this MVC + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage edit.php @@ -156,18 +156,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); - canDo->get('joomla_component.access')) : ?> - -
-
-
-
- -
-
- - -
@@ -226,416 +214,431 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); + + + + + diff --git a/admin/views/component_admin_views/tmpl/index.html b/admin/views/component_admin_views/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_admin_views/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_admin_views/view.html.php b/admin/views/component_admin_views/view.html.php new file mode 100644 index 000000000..35b3ed4ec --- /dev/null +++ b/admin/views/component_admin_views/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_admin_views View class + */ +class ComponentbuilderViewComponent_admin_views 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('component_admin_views',$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_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_admin_views.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_admin_views.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_admin_views.edit')) + { + // We can save the record. + JToolBarHelper::save('component_admin_views.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_admin_views.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_admin_views.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_admin_views.create')) + { + JToolBarHelper::apply('component_admin_views.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_admin_views.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_admin_views.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_admin_views.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_admin_views.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_admin_views.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_admin_views.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('component_admin_views.create')) + { + JToolBarHelper::custom('component_admin_views.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_admin_views.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_admin_views.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_admin_views', $this->item->id); + } + if ($this->canDo->get('component_admin_views.create')) + { + JToolBarHelper::custom('component_admin_views.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_admin_views.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_admin_views'); + 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_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_admin_views.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_config/submitbutton.js b/admin/views/component_config/submitbutton.js new file mode 100644 index 000000000..faaeb3263 --- /dev/null +++ b/admin/views/component_config/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_config/tmpl/index.html b/admin/views/component_config/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_config/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_config/view.html.php b/admin/views/component_config/view.html.php new file mode 100644 index 000000000..1c7fa75de --- /dev/null +++ b/admin/views/component_config/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_config View class + */ +class ComponentbuilderViewComponent_config extends JViewLegacy +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = ComponentbuilderHelper::getActions('component_config',$this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; + if ($this->refid) + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } + + // Set the toolbar + $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_config.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_config.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_config.edit')) + { + // We can save the record. + JToolBarHelper::save('component_config.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_config.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_config.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_config.create')) + { + JToolBarHelper::apply('component_config.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_config.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_config.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_config.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_config.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_config.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_config.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('component_config.create')) + { + JToolBarHelper::custom('component_config.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_config.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_config.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_config', $this->item->id); + } + if ($this->canDo->get('component_config.create')) + { + JToolBarHelper::custom('component_config.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_config.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_config'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + $document = JFactory::getDocument(); + $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_config.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_config/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_custom_admin_menus/submitbutton.js b/admin/views/component_custom_admin_menus/submitbutton.js new file mode 100644 index 000000000..250d1d54e --- /dev/null +++ b/admin/views/component_custom_admin_menus/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 23rd October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_custom_admin_menus/tmpl/index.html b/admin/views/component_custom_admin_menus/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_custom_admin_menus/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_custom_admin_menus/view.html.php b/admin/views/component_custom_admin_menus/view.html.php new file mode 100644 index 000000000..654a6ce1d --- /dev/null +++ b/admin/views/component_custom_admin_menus/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_custom_admin_menus View class + */ +class ComponentbuilderViewComponent_custom_admin_menus 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('component_custom_admin_menus',$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_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_custom_admin_menus.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_custom_admin_menus.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_custom_admin_menus.edit')) + { + // We can save the record. + JToolBarHelper::save('component_custom_admin_menus.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_custom_admin_menus.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_custom_admin_menus.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_custom_admin_menus.create')) + { + JToolBarHelper::apply('component_custom_admin_menus.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_custom_admin_menus.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_custom_admin_menus.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_custom_admin_menus.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_custom_admin_menus.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_custom_admin_menus.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_custom_admin_menus.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('component_custom_admin_menus.create')) + { + JToolBarHelper::custom('component_custom_admin_menus.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_custom_admin_menus.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_custom_admin_menus.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_custom_admin_menus', $this->item->id); + } + if ($this->canDo->get('component_custom_admin_menus.create')) + { + JToolBarHelper::custom('component_custom_admin_menus.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_custom_admin_menus.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_custom_admin_menus'); + 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_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_custom_admin_views/submitbutton.js b/admin/views/component_custom_admin_views/submitbutton.js new file mode 100644 index 000000000..45e841447 --- /dev/null +++ b/admin/views/component_custom_admin_views/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_custom_admin_views/tmpl/index.html b/admin/views/component_custom_admin_views/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_custom_admin_views/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_custom_admin_views/view.html.php b/admin/views/component_custom_admin_views/view.html.php new file mode 100644 index 000000000..f56d35722 --- /dev/null +++ b/admin/views/component_custom_admin_views/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_custom_admin_views View class + */ +class ComponentbuilderViewComponent_custom_admin_views 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('component_custom_admin_views',$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_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_custom_admin_views.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_custom_admin_views.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_custom_admin_views.edit')) + { + // We can save the record. + JToolBarHelper::save('component_custom_admin_views.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_custom_admin_views.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_custom_admin_views.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_custom_admin_views.create')) + { + JToolBarHelper::apply('component_custom_admin_views.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_custom_admin_views.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_custom_admin_views.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_custom_admin_views.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_custom_admin_views.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_custom_admin_views.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_custom_admin_views.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('component_custom_admin_views.create')) + { + JToolBarHelper::custom('component_custom_admin_views.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_custom_admin_views.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_custom_admin_views.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_custom_admin_views', $this->item->id); + } + if ($this->canDo->get('component_custom_admin_views.create')) + { + JToolBarHelper::custom('component_custom_admin_views.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_custom_admin_views.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_custom_admin_views'); + 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_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_dashboard/submitbutton.js b/admin/views/component_dashboard/submitbutton.js new file mode 100644 index 000000000..66b9adbfe --- /dev/null +++ b/admin/views/component_dashboard/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 5 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_dashboard/tmpl/index.html b/admin/views/component_dashboard/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_dashboard/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_dashboard/view.html.php b/admin/views/component_dashboard/view.html.php new file mode 100644 index 000000000..942ade3be --- /dev/null +++ b/admin/views/component_dashboard/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_dashboard View class + */ +class ComponentbuilderViewComponent_dashboard 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('component_dashboard',$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_COMPONENT_DASHBOARD_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_dashboard.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_dashboard.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_dashboard.edit')) + { + // We can save the record. + JToolBarHelper::save('component_dashboard.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_dashboard.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_dashboard.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_dashboard.create')) + { + JToolBarHelper::apply('component_dashboard.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_dashboard.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_dashboard.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_dashboard.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_dashboard.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_dashboard.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_dashboard.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('component_dashboard.create')) + { + JToolBarHelper::custom('component_dashboard.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_dashboard.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_dashboard.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_dashboard', $this->item->id); + } + if ($this->canDo->get('component_dashboard.create')) + { + JToolBarHelper::custom('component_dashboard.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_dashboard.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_dashboard'); + 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_COMPONENT_DASHBOARD_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_dashboard.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_dashboard/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_files_folders/submitbutton.js b/admin/views/component_files_folders/submitbutton.js new file mode 100644 index 000000000..d8f50f641 --- /dev/null +++ b/admin/views/component_files_folders/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 26th October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_files_folders/tmpl/index.html b/admin/views/component_files_folders/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_files_folders/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_files_folders/view.html.php b/admin/views/component_files_folders/view.html.php new file mode 100644 index 000000000..bea8de576 --- /dev/null +++ b/admin/views/component_files_folders/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_files_folders View class + */ +class ComponentbuilderViewComponent_files_folders 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('component_files_folders',$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_COMPONENT_FILES_FOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_files_folders.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_files_folders.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_files_folders.edit')) + { + // We can save the record. + JToolBarHelper::save('component_files_folders.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_files_folders.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_files_folders.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_files_folders.create')) + { + JToolBarHelper::apply('component_files_folders.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_files_folders.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_files_folders.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_files_folders.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_files_folders.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_files_folders.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_files_folders.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('component_files_folders.create')) + { + JToolBarHelper::custom('component_files_folders.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_files_folders.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_files_folders.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_files_folders', $this->item->id); + } + if ($this->canDo->get('component_files_folders.create')) + { + JToolBarHelper::custom('component_files_folders.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_files_folders.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_files_folders'); + 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_COMPONENT_FILES_FOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_files_folders.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_files_folders/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_mysql_tweaks/submitbutton.js b/admin/views/component_mysql_tweaks/submitbutton.js new file mode 100644 index 000000000..339c72f87 --- /dev/null +++ b/admin/views/component_mysql_tweaks/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 6 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_mysql_tweaks/tmpl/index.html b/admin/views/component_mysql_tweaks/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_mysql_tweaks/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_mysql_tweaks/view.html.php b/admin/views/component_mysql_tweaks/view.html.php new file mode 100644 index 000000000..a773e3a29 --- /dev/null +++ b/admin/views/component_mysql_tweaks/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_mysql_tweaks View class + */ +class ComponentbuilderViewComponent_mysql_tweaks 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('component_mysql_tweaks',$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_COMPONENT_MYSQL_TWEAKS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_mysql_tweaks.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_mysql_tweaks.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_mysql_tweaks.edit')) + { + // We can save the record. + JToolBarHelper::save('component_mysql_tweaks.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_mysql_tweaks.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_mysql_tweaks.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_mysql_tweaks.create')) + { + JToolBarHelper::apply('component_mysql_tweaks.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_mysql_tweaks.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_mysql_tweaks.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_mysql_tweaks.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_mysql_tweaks.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_mysql_tweaks.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_mysql_tweaks.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('component_mysql_tweaks.create')) + { + JToolBarHelper::custom('component_mysql_tweaks.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_mysql_tweaks.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_mysql_tweaks.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_mysql_tweaks', $this->item->id); + } + if ($this->canDo->get('component_mysql_tweaks.create')) + { + JToolBarHelper::custom('component_mysql_tweaks.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_mysql_tweaks.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_mysql_tweaks'); + 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_COMPONENT_MYSQL_TWEAKS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_mysql_tweaks.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_mysql_tweaks/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_site_views/submitbutton.js b/admin/views/component_site_views/submitbutton.js new file mode 100644 index 000000000..7b61a9f96 --- /dev/null +++ b/admin/views/component_site_views/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 4 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_site_views/tmpl/index.html b/admin/views/component_site_views/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_site_views/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_site_views/view.html.php b/admin/views/component_site_views/view.html.php new file mode 100644 index 000000000..efeb13604 --- /dev/null +++ b/admin/views/component_site_views/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_site_views View class + */ +class ComponentbuilderViewComponent_site_views 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('component_site_views',$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_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_site_views.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_site_views.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_site_views.edit')) + { + // We can save the record. + JToolBarHelper::save('component_site_views.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_site_views.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_site_views.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_site_views.create')) + { + JToolBarHelper::apply('component_site_views.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_site_views.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_site_views.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_site_views.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_site_views.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_site_views.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_site_views.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('component_site_views.create')) + { + JToolBarHelper::custom('component_site_views.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_site_views.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_site_views.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_site_views', $this->item->id); + } + if ($this->canDo->get('component_site_views.create')) + { + JToolBarHelper::custom('component_site_views.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_site_views.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_site_views'); + 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_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_site_views.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/component_updates/submitbutton.js b/admin/views/component_updates/submitbutton.js new file mode 100644 index 000000000..3b413257e --- /dev/null +++ b/admin/views/component_updates/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 8 of this MVC + @build 29th October, 2017 + @created 22nd October, 2017 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @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 + @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/component_updates/tmpl/index.html b/admin/views/component_updates/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/component_updates/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/component_updates/view.html.php b/admin/views/component_updates/view.html.php new file mode 100644 index 000000000..346135db3 --- /dev/null +++ b/admin/views/component_updates/view.html.php @@ -0,0 +1,199 @@ + + @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'); + +/** + * Component_updates View class + */ +class ComponentbuilderViewComponent_updates 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('component_updates',$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_COMPONENT_UPDATES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('component_updates.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('component_updates.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('component_updates.edit')) + { + // We can save the record. + JToolBarHelper::save('component_updates.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('component_updates.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('component_updates.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('component_updates.create')) + { + JToolBarHelper::apply('component_updates.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_updates.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('component_updates.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('component_updates.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('component_updates.edit')) + { + // We can save the new record + JToolBarHelper::apply('component_updates.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('component_updates.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('component_updates.create')) + { + JToolBarHelper::custom('component_updates.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('component_updates.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('component_updates.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.component_updates', $this->item->id); + } + if ($this->canDo->get('component_updates.create')) + { + JToolBarHelper::custom('component_updates.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('component_updates.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('component_updates'); + 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_COMPONENT_UPDATES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_updates.css"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_updates/submitbutton.js"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/componentbuilder/tmpl/default.php b/admin/views/componentbuilder/tmpl/default.php index d070d81d3..c72e6a2e6 100644 --- a/admin/views/componentbuilder/tmpl/default.php +++ b/admin/views/componentbuilder/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php b/admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php index d4c143a11..19de6c744 100644 --- a/admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php +++ b/admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_issues_the_closed_issues_on_github.php diff --git a/admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php b/admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php index 09fd300f2..179e7f4d9 100644 --- a/admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php +++ b/admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_issues_the_open_issues_on_github.php diff --git a/admin/views/componentbuilder/tmpl/default_main.php b/admin/views/componentbuilder/tmpl/default_main.php index 188a3c016..5f81223eb 100644 --- a/admin/views/componentbuilder/tmpl/default_main.php +++ b/admin/views/componentbuilder/tmpl/default_main.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_main.php diff --git a/admin/views/componentbuilder/tmpl/default_readme_information.php b/admin/views/componentbuilder/tmpl/default_readme_information.php index 97984f9c7..c74236797 100644 --- a/admin/views/componentbuilder/tmpl/default_readme_information.php +++ b/admin/views/componentbuilder/tmpl/default_readme_information.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_readme_information.php diff --git a/admin/views/componentbuilder/tmpl/default_releases_information.php b/admin/views/componentbuilder/tmpl/default_releases_information.php index 00dcad660..e5d448dc3 100644 --- a/admin/views/componentbuilder/tmpl/default_releases_information.php +++ b/admin/views/componentbuilder/tmpl/default_releases_information.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_releases_information.php diff --git a/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php b/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php index 09ec04782..bea8083d8 100644 --- a/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php +++ b/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_vast_development_method_notice_board.php diff --git a/admin/views/componentbuilder/tmpl/default_vdm.php b/admin/views/componentbuilder/tmpl/default_vdm.php index 0e3ccfe49..fd547e642 100644 --- a/admin/views/componentbuilder/tmpl/default_vdm.php +++ b/admin/views/componentbuilder/tmpl/default_vdm.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_vdm.php diff --git a/admin/views/componentbuilder/tmpl/default_wiki_tutorials.php b/admin/views/componentbuilder/tmpl/default_wiki_tutorials.php index ade771655..8846e8a7a 100644 --- a/admin/views/componentbuilder/tmpl/default_wiki_tutorials.php +++ b/admin/views/componentbuilder/tmpl/default_wiki_tutorials.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_wiki_tutorials.php diff --git a/admin/views/componentbuilder/view.html.php b/admin/views/componentbuilder/view.html.php index 6d3128558..9f3834367 100644 --- a/admin/views/componentbuilder/view.html.php +++ b/admin/views/componentbuilder/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.8 - @build 20th October, 2017 + @version 2.6.0 + @build 30th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/components_admin_views/index.html b/admin/views/components_admin_views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_admin_views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_admin_views/tmpl/default.php b/admin/views/components_admin_views/tmpl/default.php new file mode 100644 index 000000000..0400688d3 --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_admin_views.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_admin_viewsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> +
" . implode("", $head) . "
'.$value.''.$value.''.$value.''.$value.'
+ loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_admin_views/tmpl/default_batch_body.php b/admin/views/components_admin_views/tmpl/default_batch_body.php new file mode 100644 index 000000000..66a3e1dce --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_admin_views/tmpl/default_batch_footer.php b/admin/views/components_admin_views/tmpl/default_batch_footer.php new file mode 100644 index 000000000..1d83be2a6 --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_admin_views/tmpl/default_body.php b/admin/views/components_admin_views/tmpl/default_body.php new file mode 100644 index 000000000..bd5dc415c --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_admin_views&task=component_admin_views.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('component_admin_views',$item,'components_admin_views'); + ?> + + + get('component_admin_views.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_admin_views.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_admin_views.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_admin_views.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_admin_views.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_admin_views.', true, 'cb'); ?> + + published, $i, 'components_admin_views.', false, 'cb'); ?> + + + published, $i, 'components_admin_views.', true, 'cb'); ?> + + + published, $i, 'components_admin_views.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_admin_views/tmpl/default_foot.php b/admin/views/components_admin_views/tmpl/default_foot.php new file mode 100644 index 000000000..7a0471733 --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_admin_views/tmpl/default_head.php b/admin/views/components_admin_views/tmpl/default_head.php new file mode 100644 index 000000000..a2c845854 --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_admin_views/tmpl/default_toolbar.php b/admin/views/components_admin_views/tmpl/default_toolbar.php new file mode 100644 index 000000000..313292d44 --- /dev/null +++ b/admin/views/components_admin_views/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_admin_views/tmpl/index.html b/admin/views/components_admin_views/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_admin_views/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_admin_views/view.html.php b/admin/views/components_admin_views/view.html.php new file mode 100644 index 000000000..739a3b39c --- /dev/null +++ b/admin/views/components_admin_views/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_admin_views + */ +class ComponentbuilderViewComponents_admin_views extends JViewLegacy +{ + /** + * Components_admin_views view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_admin_views'); + } + + // 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('component_admin_views'); + $this->canEdit = $this->canDo->get('component_admin_views.edit'); + $this->canState = $this->canDo->get('component_admin_views.edit.state'); + $this->canCreate = $this->canDo->get('component_admin_views.create'); + $this->canDelete = $this->canDo->get('component_admin_views.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_COMPONENTS_ADMIN_VIEWS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_admin_views'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_admin_views.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_admin_views.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_admin_views.publish'); + JToolBarHelper::unpublishList('components_admin_views.unpublish'); + JToolBarHelper::archiveList('components_admin_views.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_admin_views.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('', 'components_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_admin_views.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_admin_views'); + 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_COMPONENTS_ADMIN_VIEWS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_admin_views.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_config/index.html b/admin/views/components_config/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_config/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_config/tmpl/default.php b/admin/views/components_config/tmpl/default.php new file mode 100644 index 000000000..46c44e834 --- /dev/null +++ b/admin/views/components_config/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_config.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_configList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_CONFIG_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_config/tmpl/default_batch_body.php b/admin/views/components_config/tmpl/default_batch_body.php new file mode 100644 index 000000000..30033337a --- /dev/null +++ b/admin/views/components_config/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_config/tmpl/default_batch_footer.php b/admin/views/components_config/tmpl/default_batch_footer.php new file mode 100644 index 000000000..3092aa6b2 --- /dev/null +++ b/admin/views/components_config/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_config/tmpl/default_body.php b/admin/views/components_config/tmpl/default_body.php new file mode 100644 index 000000000..9597628e5 --- /dev/null +++ b/admin/views/components_config/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_config&task=component_config.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = ComponentbuilderHelper::getActions('component_config',$item,'components_config'); + ?> + + + get('component_config.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_config.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_config.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_config.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_config.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_config.', true, 'cb'); ?> + + published, $i, 'components_config.', false, 'cb'); ?> + + + published, $i, 'components_config.', true, 'cb'); ?> + + + published, $i, 'components_config.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_config/tmpl/default_foot.php b/admin/views/components_config/tmpl/default_foot.php new file mode 100644 index 000000000..5753bbe9a --- /dev/null +++ b/admin/views/components_config/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_config/tmpl/default_head.php b/admin/views/components_config/tmpl/default_head.php new file mode 100644 index 000000000..14a052a89 --- /dev/null +++ b/admin/views/components_config/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_config/tmpl/default_toolbar.php b/admin/views/components_config/tmpl/default_toolbar.php new file mode 100644 index 000000000..9b42fa887 --- /dev/null +++ b/admin/views/components_config/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_config/tmpl/index.html b/admin/views/components_config/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_config/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php new file mode 100644 index 000000000..e62d38897 --- /dev/null +++ b/admin/views/components_config/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_config + */ +class ComponentbuilderViewComponents_config extends JViewLegacy +{ + /** + * Components_config view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_config'); + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('component_config'); + $this->canEdit = $this->canDo->get('component_config.edit'); + $this->canState = $this->canDo->get('component_config.edit.state'); + $this->canCreate = $this->canDo->get('component_config.create'); + $this->canDelete = $this->canDo->get('component_config.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CONFIG'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_config'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_config.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_config.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_config.publish'); + JToolBarHelper::unpublishList('components_config.unpublish'); + JToolBarHelper::archiveList('components_config.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_config.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'components_config.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_config.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_config'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $document = JFactory::getDocument(); + $document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CONFIG')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_config.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_custom_admin_menus/index.html b/admin/views/components_custom_admin_menus/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_custom_admin_menus/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/tmpl/default.php b/admin/views/components_custom_admin_menus/tmpl/default.php new file mode 100644 index 000000000..470dc0484 --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_custom_admin_menus.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_custom_admin_menusList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/tmpl/default_batch_body.php b/admin/views/components_custom_admin_menus/tmpl/default_batch_body.php new file mode 100644 index 000000000..3a13bc31a --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_custom_admin_menus/tmpl/default_batch_footer.php b/admin/views/components_custom_admin_menus/tmpl/default_batch_footer.php new file mode 100644 index 000000000..94306074e --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_custom_admin_menus/tmpl/default_body.php b/admin/views/components_custom_admin_menus/tmpl/default_body.php new file mode 100644 index 000000000..3be6db8d0 --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_custom_admin_menus&task=component_custom_admin_menus.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('component_custom_admin_menus',$item,'components_custom_admin_menus'); + ?> + + + get('component_custom_admin_menus.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_custom_admin_menus.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_custom_admin_menus.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_custom_admin_menus.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_custom_admin_menus.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_custom_admin_menus.', true, 'cb'); ?> + + published, $i, 'components_custom_admin_menus.', false, 'cb'); ?> + + + published, $i, 'components_custom_admin_menus.', true, 'cb'); ?> + + + published, $i, 'components_custom_admin_menus.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/tmpl/default_foot.php b/admin/views/components_custom_admin_menus/tmpl/default_foot.php new file mode 100644 index 000000000..5753bbe9a --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_custom_admin_menus/tmpl/default_head.php b/admin/views/components_custom_admin_menus/tmpl/default_head.php new file mode 100644 index 000000000..1072f571a --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/tmpl/default_toolbar.php b/admin/views/components_custom_admin_menus/tmpl/default_toolbar.php new file mode 100644 index 000000000..ebe4a119e --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_custom_admin_menus/tmpl/index.html b/admin/views/components_custom_admin_menus/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_custom_admin_menus/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php new file mode 100644 index 000000000..c3e41bb09 --- /dev/null +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_custom_admin_menus + */ +class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy +{ + /** + * Components_custom_admin_menus view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_custom_admin_menus'); + } + + // 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('component_custom_admin_menus'); + $this->canEdit = $this->canDo->get('component_custom_admin_menus.edit'); + $this->canState = $this->canDo->get('component_custom_admin_menus.edit.state'); + $this->canCreate = $this->canDo->get('component_custom_admin_menus.create'); + $this->canDelete = $this->canDo->get('component_custom_admin_menus.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_COMPONENTS_CUSTOM_ADMIN_MENUS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_custom_admin_menus'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_custom_admin_menus.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_custom_admin_menus.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_custom_admin_menus.publish'); + JToolBarHelper::unpublishList('components_custom_admin_menus.unpublish'); + JToolBarHelper::archiveList('components_custom_admin_menus.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_custom_admin_menus.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('', 'components_custom_admin_menus.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_custom_admin_menus.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_menus'); + 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_COMPONENTS_CUSTOM_ADMIN_MENUS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_menus.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_custom_admin_views/index.html b/admin/views/components_custom_admin_views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_custom_admin_views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/tmpl/default.php b/admin/views/components_custom_admin_views/tmpl/default.php new file mode 100644 index 000000000..2facc1e6e --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_custom_admin_views.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_custom_admin_viewsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/tmpl/default_batch_body.php b/admin/views/components_custom_admin_views/tmpl/default_batch_body.php new file mode 100644 index 000000000..420ec4735 --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_custom_admin_views/tmpl/default_batch_footer.php b/admin/views/components_custom_admin_views/tmpl/default_batch_footer.php new file mode 100644 index 000000000..4e80e522d --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_custom_admin_views/tmpl/default_body.php b/admin/views/components_custom_admin_views/tmpl/default_body.php new file mode 100644 index 000000000..7f40ccd76 --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_custom_admin_views&task=component_custom_admin_views.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('component_custom_admin_views',$item,'components_custom_admin_views'); + ?> + + + get('component_custom_admin_views.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_custom_admin_views.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_custom_admin_views.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_custom_admin_views.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_custom_admin_views.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_custom_admin_views.', true, 'cb'); ?> + + published, $i, 'components_custom_admin_views.', false, 'cb'); ?> + + + published, $i, 'components_custom_admin_views.', true, 'cb'); ?> + + + published, $i, 'components_custom_admin_views.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/tmpl/default_foot.php b/admin/views/components_custom_admin_views/tmpl/default_foot.php new file mode 100644 index 000000000..0388ee72b --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_custom_admin_views/tmpl/default_head.php b/admin/views/components_custom_admin_views/tmpl/default_head.php new file mode 100644 index 000000000..fdfa74f65 --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/tmpl/default_toolbar.php b/admin/views/components_custom_admin_views/tmpl/default_toolbar.php new file mode 100644 index 000000000..11bb15b8a --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_custom_admin_views/tmpl/index.html b/admin/views/components_custom_admin_views/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_custom_admin_views/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php new file mode 100644 index 000000000..162c74a7a --- /dev/null +++ b/admin/views/components_custom_admin_views/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_custom_admin_views + */ +class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy +{ + /** + * Components_custom_admin_views view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_custom_admin_views'); + } + + // 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('component_custom_admin_views'); + $this->canEdit = $this->canDo->get('component_custom_admin_views.edit'); + $this->canState = $this->canDo->get('component_custom_admin_views.edit.state'); + $this->canCreate = $this->canDo->get('component_custom_admin_views.create'); + $this->canDelete = $this->canDo->get('component_custom_admin_views.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_COMPONENTS_CUSTOM_ADMIN_VIEWS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_custom_admin_views'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_custom_admin_views.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_custom_admin_views.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_custom_admin_views.publish'); + JToolBarHelper::unpublishList('components_custom_admin_views.unpublish'); + JToolBarHelper::archiveList('components_custom_admin_views.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_custom_admin_views.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('', 'components_custom_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_custom_admin_views.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_views'); + 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_COMPONENTS_CUSTOM_ADMIN_VIEWS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_views.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_dashboard/index.html b/admin/views/components_dashboard/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_dashboard/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_dashboard/tmpl/default.php b/admin/views/components_dashboard/tmpl/default.php new file mode 100644 index 000000000..4c0504031 --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_dashboard.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_dashboardList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_dashboard/tmpl/default_batch_body.php b/admin/views/components_dashboard/tmpl/default_batch_body.php new file mode 100644 index 000000000..6642995b6 --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_dashboard/tmpl/default_batch_footer.php b/admin/views/components_dashboard/tmpl/default_batch_footer.php new file mode 100644 index 000000000..c8789201d --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_dashboard/tmpl/default_body.php b/admin/views/components_dashboard/tmpl/default_body.php new file mode 100644 index 000000000..984eda721 --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_dashboard&task=component_dashboard.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('component_dashboard',$item,'components_dashboard'); + ?> + + + get('component_dashboard.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_dashboard.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_dashboard.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_dashboard.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_dashboard.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_dashboard.', true, 'cb'); ?> + + published, $i, 'components_dashboard.', false, 'cb'); ?> + + + published, $i, 'components_dashboard.', true, 'cb'); ?> + + + published, $i, 'components_dashboard.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_dashboard/tmpl/default_foot.php b/admin/views/components_dashboard/tmpl/default_foot.php new file mode 100644 index 000000000..374fa0ae5 --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_dashboard/tmpl/default_head.php b/admin/views/components_dashboard/tmpl/default_head.php new file mode 100644 index 000000000..96c3015ec --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_dashboard/tmpl/default_toolbar.php b/admin/views/components_dashboard/tmpl/default_toolbar.php new file mode 100644 index 000000000..8745a8e6d --- /dev/null +++ b/admin/views/components_dashboard/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_dashboard/tmpl/index.html b/admin/views/components_dashboard/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_dashboard/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php new file mode 100644 index 000000000..ab19e20ce --- /dev/null +++ b/admin/views/components_dashboard/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_dashboard + */ +class ComponentbuilderViewComponents_dashboard extends JViewLegacy +{ + /** + * Components_dashboard view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_dashboard'); + } + + // 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('component_dashboard'); + $this->canEdit = $this->canDo->get('component_dashboard.edit'); + $this->canState = $this->canDo->get('component_dashboard.edit.state'); + $this->canCreate = $this->canDo->get('component_dashboard.create'); + $this->canDelete = $this->canDo->get('component_dashboard.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_COMPONENTS_DASHBOARD'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_dashboard'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_dashboard.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_dashboard.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_dashboard.publish'); + JToolBarHelper::unpublishList('components_dashboard.unpublish'); + JToolBarHelper::archiveList('components_dashboard.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_dashboard.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('', 'components_dashboard.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_dashboard.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_dashboard'); + 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_COMPONENTS_DASHBOARD')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_dashboard.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_files_folders/index.html b/admin/views/components_files_folders/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_files_folders/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_files_folders/tmpl/default.php b/admin/views/components_files_folders/tmpl/default.php new file mode 100644 index 000000000..396a80bfe --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_files_folders.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_files_foldersList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_files_folders/tmpl/default_batch_body.php b/admin/views/components_files_folders/tmpl/default_batch_body.php new file mode 100644 index 000000000..251e7b33e --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_files_folders/tmpl/default_batch_footer.php b/admin/views/components_files_folders/tmpl/default_batch_footer.php new file mode 100644 index 000000000..f80d5c49f --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_files_folders/tmpl/default_body.php b/admin/views/components_files_folders/tmpl/default_body.php new file mode 100644 index 000000000..d237aea9d --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_files_folders&task=component_files_folders.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('component_files_folders',$item,'components_files_folders'); + ?> + + + get('component_files_folders.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_files_folders.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_files_folders.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_files_folders.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_files_folders.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_files_folders.', true, 'cb'); ?> + + published, $i, 'components_files_folders.', false, 'cb'); ?> + + + published, $i, 'components_files_folders.', true, 'cb'); ?> + + + published, $i, 'components_files_folders.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_files_folders/tmpl/default_foot.php b/admin/views/components_files_folders/tmpl/default_foot.php new file mode 100644 index 000000000..11a51abec --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_files_folders/tmpl/default_head.php b/admin/views/components_files_folders/tmpl/default_head.php new file mode 100644 index 000000000..68ab1e1bd --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_files_folders/tmpl/default_toolbar.php b/admin/views/components_files_folders/tmpl/default_toolbar.php new file mode 100644 index 000000000..ac951edfa --- /dev/null +++ b/admin/views/components_files_folders/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_files_folders/tmpl/index.html b/admin/views/components_files_folders/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_files_folders/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php new file mode 100644 index 000000000..5e7837608 --- /dev/null +++ b/admin/views/components_files_folders/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_files_folders + */ +class ComponentbuilderViewComponents_files_folders extends JViewLegacy +{ + /** + * Components_files_folders view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_files_folders'); + } + + // 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('component_files_folders'); + $this->canEdit = $this->canDo->get('component_files_folders.edit'); + $this->canState = $this->canDo->get('component_files_folders.edit.state'); + $this->canCreate = $this->canDo->get('component_files_folders.create'); + $this->canDelete = $this->canDo->get('component_files_folders.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_COMPONENTS_FILES_FOLDERS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_files_folders'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_files_folders.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_files_folders.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_files_folders.publish'); + JToolBarHelper::unpublishList('components_files_folders.unpublish'); + JToolBarHelper::archiveList('components_files_folders.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_files_folders.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('', 'components_files_folders.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_files_folders.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_files_folders'); + 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_COMPONENTS_FILES_FOLDERS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_files_folders.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_mysql_tweaks/index.html b/admin/views/components_mysql_tweaks/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_mysql_tweaks/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/tmpl/default.php b/admin/views/components_mysql_tweaks/tmpl/default.php new file mode 100644 index 000000000..45e3b9093 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_mysql_tweaks.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_mysql_tweaksList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/tmpl/default_batch_body.php b/admin/views/components_mysql_tweaks/tmpl/default_batch_body.php new file mode 100644 index 000000000..3487b4c05 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_mysql_tweaks/tmpl/default_batch_footer.php b/admin/views/components_mysql_tweaks/tmpl/default_batch_footer.php new file mode 100644 index 000000000..ea27a4642 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_mysql_tweaks/tmpl/default_body.php b/admin/views/components_mysql_tweaks/tmpl/default_body.php new file mode 100644 index 000000000..e85d52590 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_mysql_tweaks&task=component_mysql_tweaks.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('component_mysql_tweaks',$item,'components_mysql_tweaks'); + ?> + + + get('component_mysql_tweaks.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_mysql_tweaks.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_mysql_tweaks.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_mysql_tweaks.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_mysql_tweaks.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_mysql_tweaks.', true, 'cb'); ?> + + published, $i, 'components_mysql_tweaks.', false, 'cb'); ?> + + + published, $i, 'components_mysql_tweaks.', true, 'cb'); ?> + + + published, $i, 'components_mysql_tweaks.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/tmpl/default_foot.php b/admin/views/components_mysql_tweaks/tmpl/default_foot.php new file mode 100644 index 000000000..7a0471733 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_mysql_tweaks/tmpl/default_head.php b/admin/views/components_mysql_tweaks/tmpl/default_head.php new file mode 100644 index 000000000..4ed6b9116 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/tmpl/default_toolbar.php b/admin/views/components_mysql_tweaks/tmpl/default_toolbar.php new file mode 100644 index 000000000..970534526 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_mysql_tweaks/tmpl/index.html b/admin/views/components_mysql_tweaks/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_mysql_tweaks/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php new file mode 100644 index 000000000..42cbe6b90 --- /dev/null +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_mysql_tweaks + */ +class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy +{ + /** + * Components_mysql_tweaks view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_mysql_tweaks'); + } + + // 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('component_mysql_tweaks'); + $this->canEdit = $this->canDo->get('component_mysql_tweaks.edit'); + $this->canState = $this->canDo->get('component_mysql_tweaks.edit.state'); + $this->canCreate = $this->canDo->get('component_mysql_tweaks.create'); + $this->canDelete = $this->canDo->get('component_mysql_tweaks.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_COMPONENTS_MYSQL_TWEAKS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_mysql_tweaks'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_mysql_tweaks.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_mysql_tweaks.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_mysql_tweaks.publish'); + JToolBarHelper::unpublishList('components_mysql_tweaks.unpublish'); + JToolBarHelper::archiveList('components_mysql_tweaks.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_mysql_tweaks.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('', 'components_mysql_tweaks.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_mysql_tweaks.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_mysql_tweaks'); + 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_COMPONENTS_MYSQL_TWEAKS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_mysql_tweaks.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_site_views/index.html b/admin/views/components_site_views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_site_views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_site_views/tmpl/default.php b/admin/views/components_site_views/tmpl/default.php new file mode 100644 index 000000000..74fb7d8e9 --- /dev/null +++ b/admin/views/components_site_views/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_site_views.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_site_viewsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_site_views/tmpl/default_batch_body.php b/admin/views/components_site_views/tmpl/default_batch_body.php new file mode 100644 index 000000000..ae9717cdd --- /dev/null +++ b/admin/views/components_site_views/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_site_views/tmpl/default_batch_footer.php b/admin/views/components_site_views/tmpl/default_batch_footer.php new file mode 100644 index 000000000..6c90d58b3 --- /dev/null +++ b/admin/views/components_site_views/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_site_views/tmpl/default_body.php b/admin/views/components_site_views/tmpl/default_body.php new file mode 100644 index 000000000..1e0738b9d --- /dev/null +++ b/admin/views/components_site_views/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_site_views&task=component_site_views.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('component_site_views',$item,'components_site_views'); + ?> + + + get('component_site_views.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_site_views.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_site_views.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_site_views.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_site_views.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_site_views.', true, 'cb'); ?> + + published, $i, 'components_site_views.', false, 'cb'); ?> + + + published, $i, 'components_site_views.', true, 'cb'); ?> + + + published, $i, 'components_site_views.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_site_views/tmpl/default_foot.php b/admin/views/components_site_views/tmpl/default_foot.php new file mode 100644 index 000000000..3566334a9 --- /dev/null +++ b/admin/views/components_site_views/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_site_views/tmpl/default_head.php b/admin/views/components_site_views/tmpl/default_head.php new file mode 100644 index 000000000..8119fca20 --- /dev/null +++ b/admin/views/components_site_views/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_site_views/tmpl/default_toolbar.php b/admin/views/components_site_views/tmpl/default_toolbar.php new file mode 100644 index 000000000..ab0892231 --- /dev/null +++ b/admin/views/components_site_views/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_site_views/tmpl/index.html b/admin/views/components_site_views/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_site_views/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php new file mode 100644 index 000000000..93d3f82eb --- /dev/null +++ b/admin/views/components_site_views/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_site_views + */ +class ComponentbuilderViewComponents_site_views extends JViewLegacy +{ + /** + * Components_site_views view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_site_views'); + } + + // 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('component_site_views'); + $this->canEdit = $this->canDo->get('component_site_views.edit'); + $this->canState = $this->canDo->get('component_site_views.edit.state'); + $this->canCreate = $this->canDo->get('component_site_views.create'); + $this->canDelete = $this->canDo->get('component_site_views.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_COMPONENTS_SITE_VIEWS'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_site_views'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_site_views.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_site_views.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_site_views.publish'); + JToolBarHelper::unpublishList('components_site_views.unpublish'); + JToolBarHelper::archiveList('components_site_views.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_site_views.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('', 'components_site_views.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_site_views.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_site_views'); + 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_COMPONENTS_SITE_VIEWS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_site_views.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/components_updates/index.html b/admin/views/components_updates/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_updates/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_updates/tmpl/default.php b/admin/views/components_updates/tmpl/default.php new file mode 100644 index 000000000..657b87d28 --- /dev/null +++ b/admin/views/components_updates/tmpl/default.php @@ -0,0 +1,99 @@ + + @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=components_updates.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'component_updatesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_COMPONENTS_UPDATES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/components_updates/tmpl/default_batch_body.php b/admin/views/components_updates/tmpl/default_batch_body.php new file mode 100644 index 000000000..91a3acdbe --- /dev/null +++ b/admin/views/components_updates/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @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/components_updates/tmpl/default_batch_footer.php b/admin/views/components_updates/tmpl/default_batch_footer.php new file mode 100644 index 000000000..29029222b --- /dev/null +++ b/admin/views/components_updates/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @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/components_updates/tmpl/default_body.php b/admin/views/components_updates/tmpl/default_body.php new file mode 100644 index 000000000..acf6c9230 --- /dev/null +++ b/admin/views/components_updates/tmpl/default_body.php @@ -0,0 +1,108 @@ + + @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=components_updates&task=component_updates.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('component_updates',$item,'components_updates'); + ?> + + + get('component_updates.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('component_updates.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('component_updates.edit')): ?> +
+ escape($item->joomla_component_system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'components_updates.', $canCheckin); ?> + +
+ +
escape($item->joomla_component_system_name); ?>
+ + + + get('component_updates.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'components_updates.', true, 'cb'); ?> + + published, $i, 'components_updates.', false, 'cb'); ?> + + + published, $i, 'components_updates.', true, 'cb'); ?> + + + published, $i, 'components_updates.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/components_updates/tmpl/default_foot.php b/admin/views/components_updates/tmpl/default_foot.php new file mode 100644 index 000000000..57a6b2ddd --- /dev/null +++ b/admin/views/components_updates/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @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/components_updates/tmpl/default_head.php b/admin/views/components_updates/tmpl/default_head.php new file mode 100644 index 000000000..7b6ef1c62 --- /dev/null +++ b/admin/views/components_updates/tmpl/default_head.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + + ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/components_updates/tmpl/default_toolbar.php b/admin/views/components_updates/tmpl/default_toolbar.php new file mode 100644 index 000000000..034558c7c --- /dev/null +++ b/admin/views/components_updates/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @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/components_updates/tmpl/index.html b/admin/views/components_updates/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/components_updates/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php new file mode 100644 index 000000000..ba0b58328 --- /dev/null +++ b/admin/views/components_updates/view.html.php @@ -0,0 +1,238 @@ + + @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 Components_updates + */ +class ComponentbuilderViewComponents_updates extends JViewLegacy +{ + /** + * Components_updates view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('components_updates'); + } + + // 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('component_updates'); + $this->canEdit = $this->canDo->get('component_updates.edit'); + $this->canState = $this->canDo->get('component_updates.edit.state'); + $this->canCreate = $this->canDo->get('component_updates.create'); + $this->canDelete = $this->canDo->get('component_updates.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_COMPONENTS_UPDATES'), 'joomla'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_updates'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('component_updates.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('component_updates.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('components_updates.publish'); + JToolBarHelper::unpublishList('components_updates.unpublish'); + JToolBarHelper::archiveList('components_updates.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('components_updates.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('', 'components_updates.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('components_updates.trash'); + } + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('components_updates'); + 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_COMPONENTS_UPDATES')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_updates.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/custom_admin_view/submitbutton.js b/admin/views/custom_admin_view/submitbutton.js index 999c0d15c..90600acaa 100644 --- a/admin/views/custom_admin_view/submitbutton.js +++ b/admin/views/custom_admin_view/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index 487d58c35..4ccd91e49 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 32 of this MVC - @build 20th October, 2017 + @build 25th October, 2017 @created 13th August, 2015 @package Component Builder @subpackage edit.php @@ -165,123 +165,123 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index 23fec6c0e..3ef581991 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php @@ -64,16 +64,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy } // Get Linked view data - $this->vwnadmin_views = $this->get('Vwnadmin_views'); - - // Get Linked view data - $this->vwocustom_admin_views = $this->get('Vwocustom_admin_views'); - - // Get Linked view data - $this->vwpsite_views = $this->get('Vwpsite_views'); - - // Get Linked view data - $this->vwqtranslation = $this->get('Vwqtranslation'); + $this->vwmtranslation = $this->get('Vwmtranslation'); // Set the toolbar $this->addToolBar(); @@ -217,7 +208,16 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy $document->addScriptDeclaration($footable); $document->addScript(JURI::root() . $this->script); - $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js"); + $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js"); + // add JavaScripts + $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/uikit.min.js' ); + $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/lightbox.min.js', 'text/javascript', true); + $document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/notify.min.js', 'text/javascript', true); + // add the style sheets + $document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/uikit.gradient.min.css' ); + $document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/components/notify.gradient.min.css' ); + // add var key + $document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index 060cd0bac..c16c7e183 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php index e216ec82c..2efb95a35 100644 --- a/admin/views/joomla_components/tmpl/default_batch_body.php +++ b/admin/views/joomla_components/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_batch_body.php diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php index 6c3189335..046d9a2f1 100644 --- a/admin/views/joomla_components/tmpl/default_batch_footer.php +++ b/admin/views/joomla_components/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_batch_footer.php diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index d7bcd56a0..b8eba31d6 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_body.php @@ -85,16 +85,51 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
escape($item->system_name); ?>
+ +
+ get('component_admin_views.edit') && $component_admin_views_id = ComponentbuilderHelper::getVar('component_admin_views', $item->id, 'joomla_component', 'id')): ?> + + + get('component_custom_admin_views.edit') && $component_custom_admin_views_id = ComponentbuilderHelper::getVar('component_custom_admin_views', $item->id, 'joomla_component', 'id')): ?> + + + get('component_site_views.edit') && $component_site_views_id = ComponentbuilderHelper::getVar('component_site_views', $item->id, 'joomla_component', 'id')): ?> + + + get('component_config.edit') && $component_config_id = ComponentbuilderHelper::getVar('component_config', $item->id, 'joomla_component', 'id')): ?> + + +
- escape($item->name_code); ?> +
escape($item->name_code); ?>
+
+ get('component_updates.edit') && $component_updates_id = ComponentbuilderHelper::getVar('component_updates', $item->id, 'joomla_component', 'id')): ?> + + + get('component_mysql_tweaks.edit') && $component_mysql_tweaks_id = ComponentbuilderHelper::getVar('component_mysql_tweaks', $item->id, 'joomla_component', 'id')): ?> + + + get('component_files_folders.edit') && $component_files_folders_id = ComponentbuilderHelper::getVar('component_files_folders', $item->id, 'joomla_component', 'id')): ?> + + +
escape($item->component_version); ?> - escape($item->short_description); ?> +
escape($item->short_description); ?>
+
+ get('component_custom_admin_menus.edit') && $component_custom_admin_menus_id = ComponentbuilderHelper::getVar('component_custom_admin_menus', $item->id, 'joomla_component', 'id')): ?> + + + get('component_dashboard.edit') && $component_dashboard_id = ComponentbuilderHelper::getVar('component_dashboard', $item->id, 'joomla_component', 'id')): ?> + + +
+ escape($item->companyname); ?> diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php index 42c5cac83..4d13012e1 100644 --- a/admin/views/joomla_components/tmpl/default_foot.php +++ b/admin/views/joomla_components/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_foot.php diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index cdde05eba..1babdf006 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_head.php diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php index 68c44225e..73f715e39 100644 --- a/admin/views/joomla_components/tmpl/default_toolbar.php +++ b/admin/views/joomla_components/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_toolbar.php diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index a81803343..9387fa3fc 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 473 of this MVC - @build 20th October, 2017 + @version @update number 517 of this MVC + @build 30th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/language/submitbutton.js b/admin/views/language/submitbutton.js index 55d835eb0..e6ee30d31 100644 --- a/admin/views/language/submitbutton.js +++ b/admin/views/language/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/language/tmpl/edit.php b/admin/views/language/tmpl/edit.php index 2ec129591..daa445733 100644 --- a/admin/views/language/tmpl/edit.php +++ b/admin/views/language/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage edit.php diff --git a/admin/views/language/view.html.php b/admin/views/language/view.html.php index 0729bd219..4f4c5803c 100644 --- a/admin/views/language/view.html.php +++ b/admin/views/language/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version @update number 3 of this MVC - @build 3rd April, 2017 + @build 25th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage view.html.php diff --git a/admin/views/language_translation/submitbutton.js b/admin/views/language_translation/submitbutton.js index bada3b3a4..4ebfd88be 100644 --- a/admin/views/language_translation/submitbutton.js +++ b/admin/views/language_translation/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/language_translation/tmpl/edit.php b/admin/views/language_translation/tmpl/edit.php index 78bb256b5..d51b06262 100644 --- a/admin/views/language_translation/tmpl/edit.php +++ b/admin/views/language_translation/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 45 of this MVC - @build 14th October, 2017 + @version @update number 46 of this MVC + @build 26th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage edit.php @@ -58,7 +58,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');