From 82df61aa4a1995c1d1d94fb02569e80d9d34c09f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 26 Nov 2017 02:29:08 +0200 Subject: [PATCH 01/22] added interface of the new decoupled libraries concept gh-92 --- README.md | 12 +- admin/README.txt | 12 +- admin/access.xml | 60 +- admin/assets/css/custom_admin_view.css | 20 +- admin/assets/css/layout.css | 14 +- admin/assets/css/libraries_config.css | 27 + .../css/libraries_files_folders_urls.css | 27 + admin/assets/css/library_config.css | 27 + .../assets/css/library_files_folders_urls.css | 30 + admin/assets/css/site_view.css | 20 +- admin/assets/css/template.css | 14 +- admin/assets/images/icons/libraries.png | Bin 0 -> 16940 bytes admin/compiler/joomla_3/JModelAdmin_site.php | 2 +- admin/controller.php | 4 +- admin/controllers/ajax.json.php | 39 + admin/controllers/libraries_config.php | 48 + .../libraries_files_folders_urls.php | 48 + admin/controllers/library.php | 25 + admin/controllers/library_config.php | 326 ++++++ .../library_files_folders_urls.php | 326 ++++++ admin/helpers/componentbuilder.php | 107 ++ .../en-GB/en-GB.com_componentbuilder.ini | 297 +++++- .../en-GB/en-GB.com_componentbuilder.sys.ini | 45 + .../custom_admin_view/details_fullwidth.php | 1 - .../custom_admin_view/details_left.php | 5 +- .../custom_admin_view/details_right.php | 4 +- admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../ftp/linked_components_fullwidth.php | 2 +- admin/layouts/layout/details_fullwidth.php | 1 - admin/layouts/layout/details_left.php | 5 +- admin/layouts/layout/details_right.php | 4 +- admin/layouts/library/behaviour_above.php | 42 + admin/layouts/library/behaviour_fullwidth.php | 52 + ...{details_right.php => behaviour_right.php} | 2 +- admin/layouts/library/behaviour_under.php | 41 + admin/layouts/library/config_fullwidth.php | 50 + .../library/files_folders_urls_fullwidth.php | 49 + admin/layouts/library_config/index.html | 1 + .../publishing.php} | 8 +- admin/layouts/library_config/publlshing.php | 60 ++ admin/layouts/library_config/tweaks_above.php | 41 + .../library_config/tweaks_fullwidth.php | 48 + .../library_files_folders_urls/index.html | 1 + .../library_files_folders_urls/publishing.php | 58 ++ .../library_files_folders_urls/publlshing.php | 60 ++ .../settings_above.php | 41 + .../settings_fullwidth.php | 53 + admin/layouts/site_view/details_fullwidth.php | 1 - admin/layouts/site_view/details_left.php | 5 +- admin/layouts/site_view/details_right.php | 4 +- admin/layouts/template/details_fullwidth.php | 1 - admin/layouts/template/details_left.php | 5 +- admin/layouts/template/details_right.php | 4 +- admin/models/admin_fields.php | 2 +- admin/models/admin_fields_conditions.php | 2 +- admin/models/admin_view.php | 2 +- admin/models/ajax.php | 142 ++- admin/models/component_admin_views.php | 2 +- admin/models/component_config.php | 2 +- admin/models/component_custom_admin_menus.php | 2 +- admin/models/component_custom_admin_views.php | 2 +- admin/models/component_dashboard.php | 2 +- admin/models/component_files_folders.php | 2 +- admin/models/component_mysql_tweaks.php | 2 +- admin/models/component_site_views.php | 2 +- admin/models/component_updates.php | 2 +- admin/models/componentbuilder.php | 16 +- admin/models/custom_admin_view.php | 49 +- admin/models/custom_code.php | 2 +- admin/models/dynamic_get.php | 2 +- admin/models/field.php | 2 +- admin/models/fields/adminviewsreadonly.php | 170 ++++ admin/models/fields/joomlacomponents.php | 1 - admin/models/fields/libconfigfield.php | 206 ++++ admin/models/fields/libraries.php | 170 ++++ admin/models/fields/libraryfiles.php | 171 ++++ admin/models/fields/libraryreadonly.php | 170 ++++ admin/models/fields/snippets.php | 6 +- admin/models/fieldtype.php | 14 +- admin/models/forms/admin_fields.xml | 4 +- admin/models/forms/admin_fields_conditions.js | 10 +- .../models/forms/admin_fields_conditions.xml | 4 +- admin/models/forms/component_config.xml | 2 +- .../models/forms/component_files_folders.xml | 4 +- admin/models/forms/custom_admin_view.js | 72 ++ admin/models/forms/custom_admin_view.xml | 415 ++++---- admin/models/forms/field.js | 282 +++--- admin/models/forms/help_document.js | 174 ++-- admin/models/forms/layout.js | 72 ++ admin/models/forms/layout.xml | 47 +- admin/models/forms/library.js | 299 +++++- admin/models/forms/library.xml | 183 ++++ admin/models/forms/library_config.js | 25 + admin/models/forms/library_config.xml | 184 ++++ .../forms/library_files_folders_urls.js | 25 + .../forms/library_files_folders_urls.xml | 282 ++++++ admin/models/forms/site_view.js | 72 ++ admin/models/forms/site_view.xml | 301 +++--- admin/models/forms/template.js | 72 ++ admin/models/forms/template.xml | 43 +- admin/models/ftp.php | 4 +- admin/models/help_document.php | 2 +- admin/models/joomla_component.php | 2 +- admin/models/language.php | 2 +- admin/models/language_translation.php | 2 +- admin/models/layout.php | 23 +- admin/models/libraries.php | 38 +- admin/models/libraries_config.php | 256 +++++ admin/models/libraries_files_folders_urls.php | 256 +++++ admin/models/library.php | 188 +++- admin/models/library_config.php | 882 +++++++++++++++++ admin/models/library_files_folders_urls.php | 924 ++++++++++++++++++ admin/models/site_view.php | 95 +- admin/models/site_views.php | 12 +- admin/models/snippet.php | 2 +- admin/models/snippet_type.php | 2 +- admin/models/template.php | 23 +- admin/sql/install.mysql.utf8.sql | 205 ++-- admin/sql/uninstall.mysql.utf8.sql | 4 +- admin/sql/updates/mysql/2.6.5.sql | 115 +++ admin/tables/library_config.php | 351 +++++++ admin/tables/library_files_folders_urls.php | 351 +++++++ .../admin_fields_conditions/tmpl/edit.php | 6 +- admin/views/admin_view/tmpl/edit.php | 1 - admin/views/custom_admin_view/tmpl/edit.php | 15 +- admin/views/field/tmpl/edit.php | 108 +- admin/views/fieldtype/view.html.php | 2 +- admin/views/ftp/view.html.php | 2 +- admin/views/get_snippets/tmpl/default.php | 2 +- admin/views/help_document/tmpl/edit.php | 60 +- admin/views/layout/tmpl/edit.php | 14 +- admin/views/libraries/tmpl/default_body.php | 3 + admin/views/libraries/tmpl/default_foot.php | 2 +- admin/views/libraries/tmpl/default_head.php | 3 + admin/views/libraries/view.html.php | 2 +- admin/views/libraries_config/index.html | 1 + admin/views/libraries_config/tmpl/default.php | 99 ++ .../tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../libraries_config/tmpl/default_body.php | 108 ++ .../libraries_config/tmpl/default_foot.php | 32 + .../libraries_config/tmpl/default_head.php | 61 ++ .../libraries_config/tmpl/default_toolbar.php | 59 ++ admin/views/libraries_config/tmpl/index.html | 1 + admin/views/libraries_config/view.html.php | 238 +++++ .../libraries_files_folders_urls/index.html | 1 + .../tmpl/default.php | 99 ++ .../tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../tmpl/default_body.php | 108 ++ .../tmpl/default_foot.php | 32 + .../tmpl/default_head.php | 61 ++ .../tmpl/default_toolbar.php | 59 ++ .../tmpl/index.html | 1 + .../view.html.php | 238 +++++ admin/views/library/tmpl/edit.php | 189 +++- admin/views/library/view.html.php | 15 +- admin/views/library_config/submitbutton.js | 49 + admin/views/library_config/tmpl/edit.php | 117 +++ admin/views/library_config/tmpl/index.html | 1 + admin/views/library_config/view.html.php | 199 ++++ .../submitbutton.js | 49 + .../library_files_folders_urls/tmpl/edit.php | 117 +++ .../tmpl/index.html | 1 + .../library_files_folders_urls/view.html.php | 199 ++++ admin/views/site_view/tmpl/edit.php | 15 +- admin/views/snippets/tmpl/default_body.php | 10 +- admin/views/snippets/tmpl/default_head.php | 2 +- admin/views/template/tmpl/edit.php | 14 +- componentbuilder.xml | 7 +- componentbuilder_update_server.xml | 17 + script.php | 418 ++++++-- site/helpers/componentbuilder.php | 103 ++ .../en-GB/en-GB.com_componentbuilder.ini | 5 + 174 files changed, 11626 insertions(+), 1094 deletions(-) create mode 100644 admin/assets/css/libraries_config.css create mode 100644 admin/assets/css/libraries_files_folders_urls.css create mode 100644 admin/assets/css/library_config.css create mode 100644 admin/assets/css/library_files_folders_urls.css create mode 100644 admin/assets/images/icons/libraries.png create mode 100644 admin/controllers/libraries_config.php create mode 100644 admin/controllers/libraries_files_folders_urls.php create mode 100644 admin/controllers/library_config.php create mode 100644 admin/controllers/library_files_folders_urls.php create mode 100644 admin/layouts/library/behaviour_above.php create mode 100644 admin/layouts/library/behaviour_fullwidth.php rename admin/layouts/library/{details_right.php => behaviour_right.php} (96%) create mode 100644 admin/layouts/library/behaviour_under.php create mode 100644 admin/layouts/library/config_fullwidth.php create mode 100644 admin/layouts/library/files_folders_urls_fullwidth.php create mode 100644 admin/layouts/library_config/index.html rename admin/layouts/{library/details_left.php => library_config/publishing.php} (93%) create mode 100644 admin/layouts/library_config/publlshing.php create mode 100644 admin/layouts/library_config/tweaks_above.php create mode 100644 admin/layouts/library_config/tweaks_fullwidth.php create mode 100644 admin/layouts/library_files_folders_urls/index.html create mode 100644 admin/layouts/library_files_folders_urls/publishing.php create mode 100644 admin/layouts/library_files_folders_urls/publlshing.php create mode 100644 admin/layouts/library_files_folders_urls/settings_above.php create mode 100644 admin/layouts/library_files_folders_urls/settings_fullwidth.php create mode 100644 admin/models/fields/adminviewsreadonly.php create mode 100644 admin/models/fields/libconfigfield.php create mode 100644 admin/models/fields/libraries.php create mode 100644 admin/models/fields/libraryfiles.php create mode 100644 admin/models/fields/libraryreadonly.php create mode 100644 admin/models/forms/library_config.js create mode 100644 admin/models/forms/library_config.xml create mode 100644 admin/models/forms/library_files_folders_urls.js create mode 100644 admin/models/forms/library_files_folders_urls.xml create mode 100644 admin/models/libraries_config.php create mode 100644 admin/models/libraries_files_folders_urls.php create mode 100644 admin/models/library_config.php create mode 100644 admin/models/library_files_folders_urls.php create mode 100644 admin/sql/updates/mysql/2.6.5.sql create mode 100644 admin/tables/library_config.php create mode 100644 admin/tables/library_files_folders_urls.php create mode 100644 admin/views/libraries_config/index.html create mode 100644 admin/views/libraries_config/tmpl/default.php create mode 100644 admin/views/libraries_config/tmpl/default_batch_body.php create mode 100644 admin/views/libraries_config/tmpl/default_batch_footer.php create mode 100644 admin/views/libraries_config/tmpl/default_body.php create mode 100644 admin/views/libraries_config/tmpl/default_foot.php create mode 100644 admin/views/libraries_config/tmpl/default_head.php create mode 100644 admin/views/libraries_config/tmpl/default_toolbar.php create mode 100644 admin/views/libraries_config/tmpl/index.html create mode 100644 admin/views/libraries_config/view.html.php create mode 100644 admin/views/libraries_files_folders_urls/index.html create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default_batch_body.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default_batch_footer.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default_body.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default_foot.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default_head.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/default_toolbar.php create mode 100644 admin/views/libraries_files_folders_urls/tmpl/index.html create mode 100644 admin/views/libraries_files_folders_urls/view.html.php create mode 100644 admin/views/library_config/submitbutton.js create mode 100644 admin/views/library_config/tmpl/edit.php create mode 100644 admin/views/library_config/tmpl/index.html create mode 100644 admin/views/library_config/view.html.php create mode 100644 admin/views/library_files_folders_urls/submitbutton.js create mode 100644 admin/views/library_files_folders_urls/tmpl/edit.php create mode 100644 admin/views/library_files_folders_urls/tmpl/index.html create mode 100644 admin/views/library_files_folders_urls/view.html.php diff --git a/README.md b/README.md index 256f8941b..c6024ed39 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.5) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.6) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -111,13 +111,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 21st November, 2017 -+ *Version*: 2.6.5 ++ *Last Build*: 26th November, 2017 ++ *Version*: 2.6.6 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **168387** -+ *File count*: **1073** -+ *Folder count*: **176** ++ *Line count*: **178893** ++ *File count*: **1139** ++ *Folder count*: **184** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index 256f8941b..c6024ed39 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -10,7 +10,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.5) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.6) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -111,13 +111,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 21st November, 2017 -+ *Version*: 2.6.5 ++ *Last Build*: 26th November, 2017 ++ *Version*: 2.6.6 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **168387** -+ *File count*: **1073** -+ *Folder count*: **176** ++ *Line count*: **178893** ++ *File count*: **1139** ++ *Folder count*: **184** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/access.xml b/admin/access.xml index 7f2d7b47f..09ade1bd2 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -297,12 +297,34 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -418,6 +440,15 @@ +
+ + + + + + + +
@@ -619,14 +650,27 @@
-
- - - - - - - +
+ + + + + + + + + +
+
+ + + + + + + + +
diff --git a/admin/assets/css/custom_admin_view.css b/admin/assets/css/custom_admin_view.css index 97693c0d7..a6129ddb4 100644 --- a/admin/assets/css/custom_admin_view.css +++ b/admin/assets/css/custom_admin_view.css @@ -24,4 +24,22 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_main_get_chzn { +width: 100% !important; +} +.jform_main_get_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/css/layout.css b/admin/assets/css/layout.css index cdce5a733..62e6a7ebe 100644 --- a/admin/assets/css/layout.css +++ b/admin/assets/css/layout.css @@ -24,4 +24,16 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/css/libraries_config.css b/admin/assets/css/libraries_config.css new file mode 100644 index 000000000..7252bea7e --- /dev/null +++ b/admin/assets/css/libraries_config.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage libraries_config.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/libraries_files_folders_urls.css b/admin/assets/css/libraries_files_folders_urls.css new file mode 100644 index 000000000..e352c49b1 --- /dev/null +++ b/admin/assets/css/libraries_files_folders_urls.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage libraries_files_folders_urls.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/library_config.css b/admin/assets/css/library_config.css new file mode 100644 index 000000000..80a4b875b --- /dev/null +++ b/admin/assets/css/library_config.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library_config.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/library_files_folders_urls.css b/admin/assets/css/library_files_folders_urls.css new file mode 100644 index 000000000..21e162fa2 --- /dev/null +++ b/admin/assets/css/library_files_folders_urls.css @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.6.x + @created 30th April, 2015 + @package Component Builder + @subpackage library_files_folders_urls.css + @author Llewellyn van der Merwe + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + +.control-group, .controls, .controls input[type="url"], .controls input[type="text"], .controls input[type="number"], .controls input[type="email"], .controls select, .controls textarea { + max-width: 100%; +} diff --git a/admin/assets/css/site_view.css b/admin/assets/css/site_view.css index ace4683bf..715277974 100644 --- a/admin/assets/css/site_view.css +++ b/admin/assets/css/site_view.css @@ -24,4 +24,22 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_main_get_chzn { +width: 100% !important; +} +.jform_main_get_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/css/template.css b/admin/assets/css/template.css index 553aabec9..f0d90485b 100644 --- a/admin/assets/css/template.css +++ b/admin/assets/css/template.css @@ -24,4 +24,16 @@ /* CSS Document */ - + +#jform_snippet_chzn { +width: 100% !important; +} +.jform_snippet_input_width { +width: 90% !important; +} +#jform_dynamic_get_chzn { +width: 100% !important; +} +.jform_dynamic_get_input_width { +width: 90% !important; +} diff --git a/admin/assets/images/icons/libraries.png b/admin/assets/images/icons/libraries.png new file mode 100644 index 0000000000000000000000000000000000000000..3ad91662fb79cb154cd318d4525f8ec34760b936 GIT binary patch literal 16940 zcmXuKWmr_-_dYxf0}MTM!_XZf-9v-Y4N?MFi&%M@Od({q8RhGjB*9qslT9U<_% zW$0Kf7n}wqe9y{!=a@Z01Aa4sblXAW6?5J~^2xAPc1mpjbZr5pSp<#&JQW^Xp3Dv7 z2<`Dt$QpHA{9Q{c=Zfi^3L*imij0Wmd6&rD(ZT*ki#Rj6W{=P%!2n~qx6D+2mz2QO zr~r;+U1S6Sm1<7j#L9n1AGZSIEq3xLMemm+l9kv30qH37(TUM);)-S0EL7+~i7>z} z$?kcW1;pQ%u=J559|nBJilFyy zW&lT42L^B=TAj<&IXwKA3XAo>9j82RXx?FX>_b$$;Dp6xG7NC9<{CxW#`1xoB^g}n z3!VPGh|?1F!u9_zqD}oNmdyJDdKrHMXeQ}z`RR19LbA(!KLQ0j(RuYpMaIXON2bvs zK8GNHTWS)tWQCm)X6HIccdNty102`3(a$b1{Gu)i(q=}MsAzX?KB32|7|=oJ)^n5b5dp>q!SfK)0?Ga5VkXePl0mJlC04#N}2Lel*+yTS#? zapMo5E5}L~1vv6ns@L(z34LCr{-2?hYsF^8ya13LN zwYgxNHR2DvS4LFSc|05wlPvJYkR&!YHekXJHkDeBn8X*TI3RUUSEmR3l@qYL$tac=F_Rtpy*zZXFf45>Hvh%< zKgigQA_wd4ai+yv_*-@EiY#Z1ez*t{h-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~g1N)bsm!9VR-X>@9z`p$AU_wcr zT4y#3EciV})#SETL-hmg*{p(7{w&&Wj(4NT6m|6)AYk-Pdf?l_q~r|?ayI5-AbaDV zus%OZ*XhqUd1cDr_5>j>Q8gKD})_H6%oVJb$*K@M_)9710FxO7Z+B8;V84db;#OEU-(EU zkyW{zLCww+Qbpx6;Tu3B@N0Kp#X)Gj!>-b81NPB(;H&i?!Z)Q6upC!m!)P5eq*vlJX@d5pl%=RrPSomDJ0Mh+olZ3zKC*h?Xqb z#giZge5{YTZ%yp}p;vZHhHG>jpS<`EVAjbjoE@r?|I%DV2h=-bFlvj``@Vft-Z&si zyG8Wh;EuYZUcE+s{%n%tGty$e`x$rL%;7qMmBN5e+wP_e8>8cLyM>|S4ac$C{%Wd= zLmtmKI!uG0#&T4AtbNzNEer9*gcR1MFpVs}@&>&y{Plb^3^&eRRou+Lps zKlfSq`K~iOoMMII%3GYHWDXI0^rh4}*Yd!Br78MJ66eL8k@6h>z6=RR3d*y`#U@~i zFVP7vBVkRzM(1Bi7P+Wz;k=*i4caLbWn6)q6}Y`d3~Vq-AEX+;r{bCl8gP&*oWMfs zfUbOCIqg>aym6ORxP{lDv=!%9v?s;+zLm~0`i+QMmF))3xLX*b-8V+#)ki96MG>+l|ywk4$D^!Y%gGxKP3kq+o5+hK1()% z{=|@B65{yEqr=GjN0CtjhppTD#!%dzkO0X2V({tY{`^D314=&jUc+>E+bpeoS{}V4 zk=Z~vnqt#hCW!=lX4c7piZ}pC5ubt8u7;B*=K!ai3?W)+`|iIleXynM1dih}PZ_bL z3(6KYVJemQq0B+W|3W!$0E}F4CsF#JL*RubF3YL<{oCHO&EbDZV1i`Wn`=HX#qx^r) WBJ*VQPlN#g0000XW literal 0 HcmV?d00001 diff --git a/admin/compiler/joomla_3/JModelAdmin_site.php b/admin/compiler/joomla_3/JModelAdmin_site.php index 47374e011..4ac9a3908 100644 --- a/admin/compiler/joomla_3/JModelAdmin_site.php +++ b/admin/compiler/joomla_3/JModelAdmin_site.php @@ -82,7 +82,7 @@ class ###Component###Model###View### extends JModelAdmin {###LICENSE_LOCKED_CHECK### if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/controller.php b/admin/controller.php index 869c27073..9a52d777f 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -96,6 +96,7 @@ class ComponentbuilderController extends JControllerLegacy 'layout' => 'layouts', 'dynamic_get' => 'dynamic_gets', 'custom_code' => 'custom_codes', + 'library' => 'libraries', 'snippet' => 'snippets', 'field' => 'fields', 'fieldtype' => 'fieldtypes', @@ -115,7 +116,8 @@ class ComponentbuilderController extends JControllerLegacy 'component_dashboard' => 'components_dashboard', 'component_files_folders' => 'components_files_folders', 'snippet_type' => 'snippet_types', - 'library' => 'libraries' + 'library_config' => 'libraries_config', + 'library_files_folders_urls' => 'libraries_files_folders_urls' ); // check if this is a list view if (in_array($view,$views)) diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index fccde7093..f845eb1fc 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -52,6 +52,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('getButton', 'ajax'); $this->registerTask('getButtonID', 'ajax'); $this->registerTask('getAjaxDisplay', 'ajax'); + $this->registerTask('getSnippets', 'ajax'); $this->registerTask('templateDetails', 'ajax'); $this->registerTask('getLayoutDetails', 'ajax'); $this->registerTask('dbTableColumns', 'ajax'); @@ -457,6 +458,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'getSnippets': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $librariesValue = $jinput->get('libraries', NULL, 'STRING'); + if($librariesValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getSnippets($librariesValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'templateDetails': try { diff --git a/admin/controllers/libraries_config.php b/admin/controllers/libraries_config.php new file mode 100644 index 000000000..31fc0d49b --- /dev/null +++ b/admin/controllers/libraries_config.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Libraries_config Controller + */ +class ComponentbuilderControllerLibraries_config extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES_CONFIG'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Library_config', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/libraries_files_folders_urls.php b/admin/controllers/libraries_files_folders_urls.php new file mode 100644 index 000000000..61fc5d345 --- /dev/null +++ b/admin/controllers/libraries_files_folders_urls.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Libraries_files_folders_urls Controller + */ +class ComponentbuilderControllerLibraries_files_folders_urls extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Library_files_folders_urls', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/library.php b/admin/controllers/library.php index 025576ac8..e45db5475 100644 --- a/admin/controllers/library.php +++ b/admin/controllers/library.php @@ -320,6 +320,31 @@ class ComponentbuilderControllerLibrary extends JControllerForm */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { + // get the state object (Joomla\CMS\Object\CMSObject) + $state = $model->get('state'); + // if we save2copy we need to also copy linked tables found! + if ($state->task === 'save2copy' && $state->{'library.new'}) + { + // get new ID + $newID = $state->{'library.id'}; + // get old ID + $oldID = $this->input->get('id', 0, 'INT'); + // linked tables to update + $_tablesArray = array( + 'library_config', + 'library_files_folders_urls' + ); + foreach($_tablesArray as $_updateTable) + { + // get the linked ID + if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, 'library', 'id')) + { + // copy fields to new linked table + ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('library' => $newID)); + } + } + } + return; } diff --git a/admin/controllers/library_config.php b/admin/controllers/library_config.php new file mode 100644 index 000000000..2edb5eec0 --- /dev/null +++ b/admin/controllers/library_config.php @@ -0,0 +1,326 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Library_config Controller + */ +class ComponentbuilderControllerLibrary_config extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Libraries_config'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('library_config.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('library_config.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('library_config.access', 'com_componentbuilder.library_config.' . (int) $recordId) && $user->authorise('library_config.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library_config.edit', 'com_componentbuilder.library_config.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('library_config.edit.own', 'com_componentbuilder.library_config.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('library_config.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('library_config.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Library_config', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries_config' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/controllers/library_files_folders_urls.php b/admin/controllers/library_files_folders_urls.php new file mode 100644 index 000000000..b6061cfce --- /dev/null +++ b/admin/controllers/library_files_folders_urls.php @@ -0,0 +1,326 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Library_files_folders_urls Controller + */ +class ComponentbuilderControllerLibrary_files_folders_urls extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Libraries_files_folders_urls'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('library_files_folders_urls.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('library_files_folders_urls.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('library_files_folders_urls.access', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId) && $user->authorise('library_files_folders_urls.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('library_files_folders_urls.edit', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('library_files_folders_urls.edit.own', 'com_componentbuilder.library_files_folders_urls.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('library_files_folders_urls.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('library_files_folders_urls.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Library_files_folders_urls', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries_files_folders_urls' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 5e9f2d360..c098bc194 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -245,6 +245,11 @@ abstract class ComponentbuilderHelper return false; } + /** + * Locked Libraries (we can not have these change) + **/ + public static $libraryNames = array(1 => 'No Library', 2 => 'Bootstrap v4', 3 => 'Uikit v3', 4 => 'Uikit v2', 5 => 'FooTable v2', 6 => 'FooTable v3'); + /** * The global params **/ @@ -319,6 +324,104 @@ abstract class ComponentbuilderHelper return array('contributor_company' => self::$localCompany['company'] ,'contributor_name' => self::$localCompany['owner'], 'contributor_email' => self::$localCompany['email'], 'contributor_website' => self::$localCompany['website'], 'origin' => 'global'); } + /** + * Get the library files + * + * @param int $id The library id to target + * + * @return array On success the contributor details + * + */ + public static function getLibraryFiles($id) + { + // get the library files, folders, and urls + $files = array(); + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('addurls','addfolders','addfiles'))); + $query->from($db->quoteName('#__componentbuilder_library_files_folders_urls')); + $query->where($db->quoteName('library') . ' = ' . (int) $id); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // prepare the files + $result = $db->loadObject(); + // first we load the URLs + if (self::checkJson($result->addurls)) + { + // convert to array + $result->addurls = json_decode($result->addurls, true); + // set urls + if (self::checkArray($result->addurls)) + { + foreach($result->addurls as $url) + { + if (isset($url['url']) && isset($url['type'])) + { + switch ($url['type']) + { + case 1: + // link only + $files['1'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LINK'); + break; + case 2: + // local + $files['2'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LOCAL'); + break; + case 3: + // link and local + $files['1'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LINK'); + $files['2'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LOCAL'); + break; + } + } + } + } + } + // load the local files + if (self::checkJson($result->addfiles)) + { + // convert to array + $result->addfiles = json_decode($result->addfiles, true); + // set files + if (self::checkArray($result->addfiles)) + { + foreach($result->addfiles as $file) + { + if (isset($file['file']) && isset($file['path'])) + { + $files['3'.$file['path'].$file['file']] = '(' . JText::_('COM_COMPONENTBUILDER_FILE') . ') ' . $file['file']; + } + } + } + } + // load the files in the folder + if (self::checkJson($result->addfolders)) + { + // convert to array + $result->addfolders = json_decode($result->addfolders, true); + // set folder + if (self::checkArray($result->addfolders)) + { + foreach($result->addfolders as $folder) + { + // not yet set + } + $files['4folders'] = '(' . JText::_('COM_COMPONENTBUILDER_FOLDERS') . ') not yet able to deal with folders'; + } + } + // return files if found + if (self::checkArray($files)) + { + return $files; + } + } + return false; + } + /** * get all component IDs */ @@ -1802,6 +1905,10 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_CUSTOM_CODES'), 'index.php?option=com_componentbuilder&view=custom_codes', $submenu === 'custom_codes'); } + if ($user->authorise('library.access', 'com_componentbuilder') && $user->authorise('library.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_LIBRARIES'), 'index.php?option=com_componentbuilder&view=libraries', $submenu === 'libraries'); + } if ($user->authorise('snippet.access', 'com_componentbuilder') && $user->authorise('snippet.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_SNIPPETS'), 'index.php?option=com_componentbuilder&view=snippets', $submenu === 'snippets'); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index b2e960a7f..d2f945560 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1561,7 +1561,7 @@ COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_BY_DESC="The user that created thi COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_DATE_DESC="The date this Component Config was created." COM_COMPONENTBUILDER_COMPONENT_CONFIG_CREATED_DATE_LABEL="Created Date" -COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_DESCRIPTION="Enter custom value in needed" +COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_DESCRIPTION="Enter custom value if needed" COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_HINT="Custom Value Here" COM_COMPONENTBUILDER_COMPONENT_CONFIG_CUSTOM_VALUE_LABEL="Custom Value" COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT="Editing the Component Config" @@ -1584,7 +1584,7 @@ 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_HINT="Library" COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_LABEL="Tab Name" COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_MESSAGE="Error! Please add tab name here." COM_COMPONENTBUILDER_COMPONENT_CONFIG_TWEAKS="Tweaks" @@ -1973,7 +1973,7 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_LABEL="Adding Cust COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION="Should file be updated." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL="Update" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled file to see the structure. " +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure. " COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_HINT="Target Path Here" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_LABEL="Target Path" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_MESSAGE="Error! Please add target path." @@ -2392,6 +2392,7 @@ COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors" COM_COMPONENTBUILDER_COPYRIGHT="Copyright" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_CREATE="Create" +COM_COMPONENTBUILDER_CREATE_A_SNIPPET="create a snippet" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View" @@ -2620,6 +2621,9 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_LABEL="Custom Script (Documen COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_KEY="Key" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LAMP="Lamp" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LAST="Last" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_LABEL="Libraries" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LINK="Link" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIST="List" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIST_TWO="List 2" @@ -2657,6 +2661,8 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEXT="Next" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO="No" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_UIKIT_SNIPPET_LABEL="Snippet Details" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTIFICATION="Notification" @@ -2740,6 +2746,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SMILEY_SAD="Smiley Sad" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SMILEY_SAD_TWO="Smiley Sad 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SMILEY_TWO="Smiley 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET="Snippet" +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review." COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL="Select a Snippet" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SQUARE="Square" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_STACK="Stack" @@ -3045,6 +3052,7 @@ COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENT_ADD="Add Joomla ComponentgetForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'default' ); diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index ff3c7fd86..67dfa2a56 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'codename', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index 32cf0e554..6eec871a4 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -31,7 +31,9 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'icon', - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index fdfa5539b..b57918936 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzufields; +$items = $displayData->vzwfields; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/ftp/linked_components_fullwidth.php index f2557f52e..a437256a6 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/ftp/linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzvlinked_components; +$items = $displayData->vzxlinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index a2258aef9..649984a09 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'layout' ); diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index 35ea371dc..352879ab6 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'alias', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index 4665583e1..d5039e115 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/library/behaviour_above.php b/admin/layouts/library/behaviour_above.php new file mode 100644 index 000000000..55d0e6df3 --- /dev/null +++ b/admin/layouts/library/behaviour_above.php @@ -0,0 +1,42 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'name', + 'how' +); + +?> +

+ renderField($field); + } ?> +
diff --git a/admin/layouts/library/behaviour_fullwidth.php b/admin/layouts/library/behaviour_fullwidth.php new file mode 100644 index 000000000..0530f76ae --- /dev/null +++ b/admin/layouts/library/behaviour_fullwidth.php @@ -0,0 +1,52 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_no_behaviour_one', + 'note_yes_behaviour_one', + 'addconditions', + 'php_setdocument', + 'php_preparedocument' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/library/details_right.php b/admin/layouts/library/behaviour_right.php similarity index 96% rename from admin/layouts/library/details_right.php rename to admin/layouts/library/behaviour_right.php index 92112f79b..9371a467f 100644 --- a/admin/layouts/library/details_right.php +++ b/admin/layouts/library/behaviour_right.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage details_right.php + @subpackage behaviour_right.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved diff --git a/admin/layouts/library/behaviour_under.php b/admin/layouts/library/behaviour_under.php new file mode 100644 index 000000000..bb1c12abc --- /dev/null +++ b/admin/layouts/library/behaviour_under.php @@ -0,0 +1,41 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'not_required' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library/config_fullwidth.php b/admin/layouts/library/config_fullwidth.php new file mode 100644 index 000000000..f78b33db2 --- /dev/null +++ b/admin/layouts/library/config_fullwidth.php @@ -0,0 +1,50 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_no_behaviour_two', + 'note_yes_behaviour_two', + 'note_display_library_config' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/library/files_folders_urls_fullwidth.php b/admin/layouts/library/files_folders_urls_fullwidth.php new file mode 100644 index 000000000..9b00b61e2 --- /dev/null +++ b/admin/layouts/library/files_folders_urls_fullwidth.php @@ -0,0 +1,49 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_no_behaviour_three', + 'note_display_library_files_folders_urls' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/library_config/index.html b/admin/layouts/library_config/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/library_config/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/library/details_left.php b/admin/layouts/library_config/publishing.php similarity index 93% rename from admin/layouts/library/details_left.php rename to admin/layouts/library_config/publishing.php index 892f7233e..13d13ed74 100644 --- a/admin/layouts/library/details_left.php +++ b/admin/layouts/library_config/publishing.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage details_left.php + @subpackage publishing.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -27,10 +27,14 @@ defined('_JEXEC') or die('Restricted access'); +$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'name' + 'created', + 'created_by', + 'modified', + 'modified_by' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/library_config/publlshing.php b/admin/layouts/library_config/publlshing.php new file mode 100644 index 000000000..c982db556 --- /dev/null +++ b/admin/layouts/library_config/publlshing.php @@ -0,0 +1,60 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_config/tweaks_above.php b/admin/layouts/library_config/tweaks_above.php new file mode 100644 index 000000000..4c71d79d6 --- /dev/null +++ b/admin/layouts/library_config/tweaks_above.php @@ -0,0 +1,41 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'library' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library_config/tweaks_fullwidth.php b/admin/layouts/library_config/tweaks_fullwidth.php new file mode 100644 index 000000000..e832119f3 --- /dev/null +++ b/admin/layouts/library_config/tweaks_fullwidth.php @@ -0,0 +1,48 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'addconfig' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/library_files_folders_urls/index.html b/admin/layouts/library_files_folders_urls/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/library_files_folders_urls/publishing.php b/admin/layouts/library_files_folders_urls/publishing.php new file mode 100644 index 000000000..13d13ed74 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/publishing.php @@ -0,0 +1,58 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_files_folders_urls/publlshing.php b/admin/layouts/library_files_folders_urls/publlshing.php new file mode 100644 index 000000000..c982db556 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/publlshing.php @@ -0,0 +1,60 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/library_files_folders_urls/settings_above.php b/admin/layouts/library_files_folders_urls/settings_above.php new file mode 100644 index 000000000..dbfce2d87 --- /dev/null +++ b/admin/layouts/library_files_folders_urls/settings_above.php @@ -0,0 +1,41 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'library' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/library_files_folders_urls/settings_fullwidth.php b/admin/layouts/library_files_folders_urls/settings_fullwidth.php new file mode 100644 index 000000000..db6dbca1c --- /dev/null +++ b/admin/layouts/library_files_folders_urls/settings_fullwidth.php @@ -0,0 +1,53 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_add_urls', + 'addurls', + 'note_add_files', + 'addfiles', + 'note_add_folders', + 'addfolders' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 6c422bc54..1a572bf4e 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'default' ); diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index ff3c7fd86..67dfa2a56 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'codename', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index 4665583e1..d5039e115 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 682164c24..f8b5ac35b 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -30,7 +30,6 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_add_language_string', 'template' ); diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index 35ea371dc..352879ab6 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -33,8 +33,9 @@ $fields = $displayData->get('fields') ?: array( 'name', 'alias', 'description', - 'snippet', - 'note_snippet_usage' + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index 4665583e1..d5039e115 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -30,7 +30,9 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( - 'note_uikit_snippet' + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index e12ddf256..1027be741 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -79,7 +79,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index 51ba6843c..147f91bd9 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -79,7 +79,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 1e3eb3c26..395766bba 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -84,7 +84,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/ajax.php b/admin/models/ajax.php index c474abcd9..f5736e200 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -211,6 +211,8 @@ class ComponentbuilderModelAjax extends JModelList } protected $buttonArray = array( + 'library_config' => 'libraries_config', + 'library_files_folders_urls' => 'libraries_files_folders_urls', 'admin_fields' => 'admins_fields', 'admin_fields_conditions' => 'admins_fields_conditions', 'field' => 'fields', @@ -338,6 +340,10 @@ class ComponentbuilderModelAjax extends JModelList } protected $functionArray = array( + // Library + 'rename' => 'setYesNo', + 'update' => 'setYesNo', + 'type' => 'setURLType', // Admin View 'field' => 'setItemNames', 'list' => 'setYesNo', @@ -379,6 +385,10 @@ class ComponentbuilderModelAjax extends JModelList protected function getLanguage($key) { $language = array( + // Library (folder file url) + 'rename' => JText::_('COM_COMPONENTBUILDER_RENAME'), + 'path' => JText::_('COM_COMPONENTBUILDER_TARGET_PATH'), + 'update' => JText::_('COM_COMPONENTBUILDER_UPDATE'), // Admin View (fields) 'field' => JText::_('COM_COMPONENTBUILDER_FIELD'), 'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_LIST'), @@ -546,11 +556,17 @@ class ComponentbuilderModelAjax extends JModelList protected $ref; protected $fieldsArray = array( + 'library_config' => 'addconfig', + 'library_files_folders_urls' => array('addurls','addfiles','addfolders'), 'admin_fields' => 'addfields', 'admin_fields_conditions' => 'addconditions', 'component_admin_views' => 'addadmin_views', 'component_site_views' => 'addsite_views', 'component_custom_admin_views' => 'addcustom_admin_views'); + protected $allowedViewsArray = array( + 'admin_view', + 'joomla_component', + 'library'); public function getAjaxDisplay($type) { @@ -561,28 +577,39 @@ class ComponentbuilderModelAjax extends JModelList // get the view name & id $values = $this->getViewID(); // check if we are in the correct view. - if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && ($values['a_view'] === 'admin_view' || $values['a_view'] === 'joomla_component')) + if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && in_array($values['a_view'], $this->allowedViewsArray)) { $this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; - // get the field data - if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $values['a_id'], $values['a_view'], $this->fieldsArray[$type])) + // load the results + $result = array(); + // return field table + if (ComponentbuilderHelper::checkArray($this->fieldsArray[$type])) { - // check repeatable conversion - $this->checkRepeatableConversion($fieldsData, $type, $values['a_id'], $values['a_view']); - // get the table - $table = $this->getSubformTable($type, $fieldsData); - // set notice of bad practice - $notice = ''; - if ($values['a_view'] === 'admin_view' && isset($this->rowNumber) && $this->rowNumber > 50) + foreach ($this->fieldsArray[$type] as $fieldName) { - $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '
'; + if ($table = $this->getFieldTable($type, $values['a_id'], $values['a_view'], $fieldName, $typeName)) + { + $result[] = $table; + } } - elseif ($values['a_view'] === 'admin_view' && isset($this->rowNumber)) + } + elseif (ComponentbuilderHelper::checkString($this->fieldsArray[$type])) + { + if ($table = $this->getFieldTable($type, $values['a_id'], $values['a_view'], $this->fieldsArray[$type], $typeName)) { - $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '
'; + $result[] = $table; } - // return table - return $notice.$table; + } + // check if we have results + if (ComponentbuilderHelper::checkArray($result) && count($result) == 1) + { + // return the display + return implode('', $result); + } + elseif (ComponentbuilderHelper::checkArray($result)) + { + // return the display + return '
' . implode('
', $result) . '
'; } } return '
' . JText::sprintf('COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE', $typeName) . '
'; @@ -590,6 +617,31 @@ class ComponentbuilderModelAjax extends JModelList return '

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

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

'; } + protected function getFieldTable($type, $id, $idName, $fieldName, $typeName) + { + // get the field data + if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $id, $idName, $fieldName)) + { + // check repeatable conversion + $this->checkRepeatableConversion($fieldsData, $fieldName, $id, $idName); + // get the table + $table = $this->getSubformTable($type, $fieldsData); + // set notice of bad practice + $notice = ''; + if ($idName === 'admin_view' && isset($this->rowNumber) && $this->rowNumber > 50) + { + $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '
'; + } + elseif ($idName === 'admin_view' && isset($this->rowNumber)) + { + $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '
'; + } + // return table + return $notice.$table; + } + return false; + } + protected $conversionCheck = array( 'addfields' => 'field', 'addconditions' => 'target_field', @@ -601,26 +653,26 @@ class ComponentbuilderModelAjax extends JModelList 'sql_tweak' => 'adminview', 'version_update' => 'version'); - protected function checkRepeatableConversion(&$fieldsData, $type, $id, $linked_id_name) + protected function checkRepeatableConversion(&$fieldsData, $fieldsArrayType, $id, $linked_id_name) { - if (ComponentbuilderHelper::checkJson($fieldsData)) + if (ComponentbuilderHelper::checkJson($fieldsData) && isset($this->conversionCheck[$fieldsArrayType])) { $fieldsData = json_decode($fieldsData, true); - if (isset($fieldsData[$this->conversionCheck[$this->fieldsArray[$type]]])) + if (isset($fieldsData[$this->conversionCheck[$fieldsArrayType]])) { $bucket = array(); foreach($fieldsData as $option => $values) { foreach($values as $nr => $value) { - $bucket[$this->fieldsArray[$type].$nr][$option] = $value; + $bucket[$fieldsArrayType.$nr][$option] = $value; } } $fieldsData = json_encode($bucket); // update the fields $objectUpdate = new stdClass(); $objectUpdate->{$linked_id_name} = (int) $id; - $objectUpdate->{$this->fieldsArray[$type]} = $fieldsData; + $objectUpdate->{$fieldsArrayType} = $fieldsData; JFactory::getDbo()->updateObject('#__componentbuilder_'.$type, $objectUpdate, 'admin_view'); } } @@ -715,6 +767,23 @@ class ComponentbuilderModelAjax extends JModelList return JText::_('COM_COMPONENTBUILDER_NO_ITEM_FOUND'); } + protected function setURLType($header, $value) + { + switch ($value) + { + case 1: + return JText::_('COM_COMPONENTBUILDER_DEFAULT_LINK'); + break; + case 2: + return JText::_('COM_COMPONENTBUILDER_LOCAL_GET'); + break; + case 3: + return JText::_('COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC'); + break; + } + return JText::_('COM_COMPONENTBUILDER_NOT_SET'); + } + protected function setIcoMoon($header, $value) { if (ComponentbuilderHelper::checkString($value)) @@ -1003,6 +1072,39 @@ class ComponentbuilderModelAjax extends JModelList return false; } + // Used in site_view + + public function getSnippets($libraries) + { + if (ComponentbuilderHelper::checkJson($libraries)) + { + $libraries = json_decode($libraries, true); + } + // check if we have an array + if (ComponentbuilderHelper::checkArray($libraries)) + { + // insure we only have int values + $libraries = array_map( function($id){ return (int) $id; }, $libraries); + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName( array('a.id') )); + $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); + $query->where($db->quoteName('a.published') . ' = 1'); + // check for country and region + $query->where($db->quoteName('a.library') . ' IN ('. implode(',',$libraries) .')'); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadColumn(); + } + } + return false; + } + + // Used in template public function getTemplateDetails($id) { diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php index d0a7acf18..2ca81fed2 100644 --- a/admin/models/component_admin_views.php +++ b/admin/models/component_admin_views.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_config.php b/admin/models/component_config.php index 4fa5e7b26..5c2fd0bb4 100644 --- a/admin/models/component_config.php +++ b/admin/models/component_config.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_custom_admin_menus.php b/admin/models/component_custom_admin_menus.php index e7932e9e1..8c5900497 100644 --- a/admin/models/component_custom_admin_menus.php +++ b/admin/models/component_custom_admin_menus.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php index b8f91cbac..7046d87c5 100644 --- a/admin/models/component_custom_admin_views.php +++ b/admin/models/component_custom_admin_views.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index f25db9e09..a23ff3456 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php index b6d2db167..a01e64894 100644 --- a/admin/models/component_files_folders.php +++ b/admin/models/component_files_folders.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_mysql_tweaks.php b/admin/models/component_mysql_tweaks.php index 3d7148880..dbf351d42 100644 --- a/admin/models/component_mysql_tweaks.php +++ b/admin/models/component_mysql_tweaks.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_site_views.php b/admin/models/component_site_views.php index 25170119f..3ac82dcb3 100644 --- a/admin/models/component_site_views.php +++ b/admin/models/component_site_views.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/component_updates.php b/admin/models/component_updates.php index 36e30aaeb..a3b4df547 100644 --- a/admin/models/component_updates.php +++ b/admin/models/component_updates.php @@ -79,7 +79,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 03f328d15..1f40523fe 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -43,7 +43,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.ftps', 'png.help_document.add', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.ftps', 'png.help_document.add', 'png.help_documents') ); // view access array $viewAccess = array( @@ -92,6 +92,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'custom_code.access' => 'custom_code.access', 'custom_codes.submenu' => 'custom_code.submenu', 'custom_codes.dashboard_list' => 'custom_code.dashboard_list', + 'library.create' => 'library.create', + 'libraries.access' => 'library.access', + 'library.access' => 'library.access', + 'libraries.submenu' => 'library.submenu', + 'libraries.dashboard_list' => 'library.dashboard_list', 'snippets.access' => 'snippet.access', 'snippet.access' => 'snippet.access', 'snippets.submenu' => 'snippet.submenu', @@ -165,9 +170,12 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'snippet_type.create' => 'snippet_type.create', 'snippet_types.access' => 'snippet_type.access', 'snippet_type.access' => 'snippet_type.access', - 'library.create' => 'library.create', - 'libraries.access' => 'library.access', - 'library.access' => 'library.access'); + 'library_config.create' => 'library_config.create', + 'libraries_config.access' => 'library_config.access', + 'library_config.access' => 'library_config.access', + 'library_files_folders_urls.create' => 'library_files_folders_urls.create', + 'libraries_files_folders_urls.access' => 'library_files_folders_urls.access', + 'library_files_folders_urls.access' => 'library_files_folders_urls.access'); foreach($viewGroups as $group => $views) { $i = 0; diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index 18cbbf214..138b84f24 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -79,7 +79,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -95,12 +95,12 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->custom_get)) + if (!empty($item->libraries)) { - // Convert the custom_get field to an array. - $custom_get = new Registry; - $custom_get->loadString($item->custom_get); - $item->custom_get = $custom_get->toArray(); + // Convert the libraries field to an array. + $libraries = new Registry; + $libraries->loadString($item->libraries); + $item->libraries = $libraries->toArray(); } if (!empty($item->custom_button)) @@ -111,6 +111,14 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $item->custom_button = $custom_button->toArray(); } + if (!empty($item->custom_get)) + { + // Convert the custom_get field to an array. + $custom_get = new Registry; + $custom_get->loadString($item->custom_get); + $item->custom_get = $custom_get->toArray(); + } + if (!empty($item->php_controller)) { // base64 Decode php_controller. @@ -915,17 +923,17 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['metadata'] = (string) $metadata; } - // Set the custom_get items to data. - if (isset($data['custom_get']) && is_array($data['custom_get'])) + // Set the libraries items to data. + if (isset($data['libraries']) && is_array($data['libraries'])) { - $custom_get = new JRegistry; - $custom_get->loadArray($data['custom_get']); - $data['custom_get'] = (string) $custom_get; + $libraries = new JRegistry; + $libraries->loadArray($data['libraries']); + $data['libraries'] = (string) $libraries; } - elseif (!isset($data['custom_get'])) + elseif (!isset($data['libraries'])) { - // Set the empty custom_get to data - $data['custom_get'] = ''; + // Set the empty libraries to data + $data['libraries'] = ''; } // Set the custom_button items to data. @@ -941,6 +949,19 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin $data['custom_button'] = ''; } + // Set the custom_get items to data. + if (isset($data['custom_get']) && is_array($data['custom_get'])) + { + $custom_get = new JRegistry; + $custom_get->loadArray($data['custom_get']); + $data['custom_get'] = (string) $custom_get; + } + elseif (!isset($data['custom_get'])) + { + // Set the empty custom_get to data + $data['custom_get'] = ''; + } + // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 74ee3fe32..074986b1a 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -79,7 +79,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index bb8b6bb43..17483f157 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -79,7 +79,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/field.php b/admin/models/field.php index c8b932bbb..a057ede2a 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -79,7 +79,7 @@ class ComponentbuilderModelField extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; diff --git a/admin/models/fields/adminviewsreadonly.php b/admin/models/fields/adminviewsreadonly.php new file mode 100644 index 000000000..ff5e67b1c --- /dev/null +++ b/admin/models/fields/adminviewsreadonly.php @@ -0,0 +1,170 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsreadonly Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsreadonly extends JFormFieldList +{ + /** + * The adminviewsreadonly field type. + * + * @var string + */ + public $type = 'adminviewsreadonly'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create admin_view + if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit admin_view + if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for admin_view field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','admin_view_system_name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->admin_view_system_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/joomlacomponents.php b/admin/models/fields/joomlacomponents.php index 2401e1bc8..76db53a39 100644 --- a/admin/models/fields/joomlacomponents.php +++ b/admin/models/fields/joomlacomponents.php @@ -153,7 +153,6 @@ class JFormFieldJoomlacomponents extends JFormFieldList $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','joomla_component_system_name'))); $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.system_name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); diff --git a/admin/models/fields/libconfigfield.php b/admin/models/fields/libconfigfield.php new file mode 100644 index 000000000..61674254b --- /dev/null +++ b/admin/models/fields/libconfigfield.php @@ -0,0 +1,206 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libconfigfield Form Field class for the Componentbuilder component + */ +class JFormFieldLibconfigfield extends JFormFieldList +{ + /** + * The libconfigfield field type. + * + * @var string + */ + public $type = 'libconfigfield'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create field + if ($user->authorise('field.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit field + if (($buttonName === 'field' || $buttonName === 'fields') && $user->authorise('field.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=fields&task=field.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for field field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // load the db opbject + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $ID = $jinput->getInt('id', 0); + // rest the fields ids + $fieldIds = array(); + if (is_numeric($ID) && $ID >= 1) + { + // get all the fields linked to the library config + if ($addconfig = ComponentbuilderHelper::getVar('library_config', (int) $ID, 'library', 'addconfig')) + { + if (ComponentbuilderHelper::checkJson($addconfig)) + { + $addconfig = json_decode($addconfig, true); + if (ComponentbuilderHelper::checkArray($addconfig)) + { + foreach($addconfig as $field) + { + if (isset($field['field'])) + { + $fieldIds[] = (int) $field['field']; + } + } + } + } + } + } + // check if we have ids, since we should not show any fields that are not part of this config + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','name'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->name); + } + return $options; + } + } + return array(JHtml::_('select.option', '', 'No config fields linked')); + } +} diff --git a/admin/models/fields/libraries.php b/admin/models/fields/libraries.php new file mode 100644 index 000000000..9eda09545 --- /dev/null +++ b/admin/models/fields/libraries.php @@ -0,0 +1,170 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libraries Form Field class for the Componentbuilder component + */ +class JFormFieldLibraries extends JFormFieldList +{ + /** + * The libraries field type. + * + * @var string + */ + public $type = 'libraries'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create library + if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit library + if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for library field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','libraries_name'))); + $query->from($db->quoteName('#__componentbuilder_library', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->libraries_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/libraryfiles.php b/admin/models/fields/libraryfiles.php new file mode 100644 index 000000000..747d71611 --- /dev/null +++ b/admin/models/fields/libraryfiles.php @@ -0,0 +1,171 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libraryfiles Form Field class for the Componentbuilder component + */ +class JFormFieldLibraryfiles extends JFormFieldList +{ + /** + * The libraryfiles field type. + * + * @var string + */ + public $type = 'libraryfiles'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create + if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit + if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the library id + $id = $jinput->getInt('id', 0); + // get custom the files + $files = ComponentbuilderHelper::getLibraryFiles($id); + // set the default + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NO_FILES_LINKED')); + // now check if there are files in the folder + if (ComponentbuilderHelper::checkArray($files)) + { + $options = array(); + foreach ($files as $file => $name) + { + $options[] = JHtml::_('select.option', $file, $name); + } + } + return $options; + } +} diff --git a/admin/models/fields/libraryreadonly.php b/admin/models/fields/libraryreadonly.php new file mode 100644 index 000000000..71c7099b6 --- /dev/null +++ b/admin/models/fields/libraryreadonly.php @@ -0,0 +1,170 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Libraryreadonly Form Field class for the Componentbuilder component + */ +class JFormFieldLibraryreadonly extends JFormFieldList +{ + /** + * The libraryreadonly field type. + * + * @var string + */ + public $type = 'libraryreadonly'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create library + if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit library + if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for library field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','library_name'))); + $query->from($db->quoteName('#__componentbuilder_library', 'a')); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->library_name); + } + } + return $options; + } +} diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index e0495c20d..86f27c189 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -165,11 +165,11 @@ class JFormFieldSnippets extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { - $lib = (ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :''; - $options[] = JHtml::_('select.option', $item->id, $item->type . ' - ' . $item->snippet_name . $lib ); + $lib = (isset($item->library) && ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :''; + $type = (isset($item->type) && ComponentbuilderHelper::checkString($item->type)) ? $item->type :JText::_('COM_COMPONENTBUILDER_NO_TYPE'); + $options[] = JHtml::_('select.option', $item->id, $type . ' - ' . $item->snippet_name . $lib ); } } return $options; diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 592749075..b7a7378e4 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -79,7 +79,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin { if ($item = parent::getItem($pk)) { - if (!empty($item->params)) + if (!empty($item->params) && !is_array($item->params)) { // Convert the params field to an array. $registry = new Registry; @@ -139,7 +139,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVzufields() + public function getVzwfields() { // Get the user object. $user = JFactory::getUser(); @@ -223,13 +223,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVzufields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVzwfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVzufields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVzwfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVzufields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVzwfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVzufields($item->store, 'store'); + $item->store = $this->selectionTranslationVzwfields($item->store, 'store'); } } @@ -243,7 +243,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVzufields($value,$name) + public function selectionTranslationVzwfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index 032492169..248a5bd94 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -90,9 +90,9 @@ filter="unset" /> - + - + - + - + 0 && libraries.length > 0){ + var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getSnippets(){ + jQuery("#loading").show(); + // clear the selection + jQuery('#jform_snippet').find('option').remove().end(); + jQuery('#jform_snippet').trigger('liszt:updated'); + // get country value if set + var libraries = jQuery("#jform_libraries").val(); + if (libraries) { + getSnippets_server(libraries).done(function(result) { + setSnippets(result); + jQuery("#loading").hide(); + if (typeof snippetButton !== 'undefined') { + // ensure button is correct + var snippet = jQuery('#jform_snippet').val(); + snippetButton(snippet); + } + }); + } + else + { + // load all snippets in none is selected + setSnippets(snippetIds); + jQuery("#loading").hide(); + } +} +function setSnippets(array){ + if (array) { + jQuery('#jform_snippet').append(''); + jQuery.each( array, function( i, id ) { + if (id in snippets) { + jQuery('#jform_snippet').append(''); + } + if (id == snippet) { + jQuery('#jform_snippet').val(id); + } + }); + } else { + jQuery('#jform_snippet').append(''); + } + jQuery('#jform_snippet').trigger('liszt:updated'); } diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml index 65d36a555..10fbf7d69 100644 --- a/admin/models/forms/custom_admin_view.xml +++ b/admin/models/forms/custom_admin_view.xml @@ -153,11 +153,24 @@ type="snippets" name="snippet" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL" + description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION" class="list_class" multiple="false" required="false" button="true" /> + + + + + + COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO - - - - - - COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO - - - - - - - + @@ -226,13 +213,23 @@ - - - + + + @@ -255,6 +252,22 @@ hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_CONTROLLER_HINT" required="false" /> + + + + + + + + COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 && libraries.length > 0){ + var request = 'token='+token+'&libraries='+JSON.stringify(libraries); + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getSnippets(){ + jQuery("#loading").show(); + // clear the selection + jQuery('#jform_snippet').find('option').remove().end(); + jQuery('#jform_snippet').trigger('liszt:updated'); + // get country value if set + var libraries = jQuery("#jform_libraries").val(); + if (libraries) { + getSnippets_server(libraries).done(function(result) { + setSnippets(result); + jQuery("#loading").hide(); + if (typeof snippetButton !== 'undefined') { + // ensure button is correct + var snippet = jQuery('#jform_snippet').val(); + snippetButton(snippet); + } + }); + } + else + { + // load all snippets in none is selected + setSnippets(snippetIds); + jQuery("#loading").hide(); + } +} +function setSnippets(array){ + if (array) { + jQuery('#jform_snippet').append(''); + jQuery.each( array, function( i, id ) { + if (id in snippets) { + jQuery('#jform_snippet').append(''); + } + if (id == snippet) { + jQuery('#jform_snippet').val(id); + } + }); + } else { + jQuery('#jform_snippet').append(''); + } + jQuery('#jform_snippet').trigger('liszt:updated'); } diff --git a/admin/models/forms/layout.xml b/admin/models/forms/layout.xml index 420513859..0b3baebec 100644 --- a/admin/models/forms/layout.xml +++ b/admin/models/forms/layout.xml @@ -150,11 +150,26 @@ type="snippets" name="snippet" label="COM_COMPONENTBUILDER_LAYOUT_SNIPPET_LABEL" + description="COM_COMPONENTBUILDER_LAYOUT_SNIPPET_DESCRIPTION" class="list_class" multiple="false" required="false" button="true" /> + + + + COM_COMPONENTBUILDER_LAYOUT_NO - + + + - - - - + + - - + + 0 && type.length > 0 && size > 0){ + var request = 'token='+token+'&type='+type+'&size='+size; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButtonID(type, where, size){ + addButtonID_server(type, size).done(function(result) { + if(result){ + if (2 == size) { + jQuery('#'+where).html(result); + } else { + addData(result, '#jform_'+where); + } + } + }); +} + +function addButton_server(type){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod); + if(token.length > 0 && type.length > 0){ + var request = 'token='+token+'&type='+type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButton(type,where){ + addButton_server(type).done(function(result) { + if(result){ + addData(result,'#jform_'+where); + } + }) +} + +function getAjaxDisplay(type){ + getAjaxDisplay_server(type).done(function(result) { + if(result){ + jQuery('#display_'+type).html(result); + } + // set button + addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button + }); +} + +function getAjaxDisplay_server(type){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod; + if(token.length > 0 && type.length > 0){ + var request = 'token='+token+'&type=' + type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getFieldSelectOptions_server(fieldId){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"; + if(token.length > 0 && fieldId > 0){ + var request = 'token='+token+'&id='+fieldId; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getFieldSelectOptions(fieldKey){ + // first check if the field is set + if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field").length) { + var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field option:selected").val(); + getFieldSelectOptions_server(fieldId).done(function(result) { + if(result){ + jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(result); + } + else + { + jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(''); + } + }); + } +} diff --git a/admin/models/forms/library.xml b/admin/models/forms/library.xml index 36633167e..7ea100d37 100644 --- a/admin/models/forms/library.xml +++ b/admin/models/forms/library.xml @@ -122,6 +122,189 @@ message="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_MESSAGE" hint="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_HINT" /> + + + + + + + + + + + + + + +