From 06c97afa05c5f75438d7778236aff820a686a7d5 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 3 Dec 2020 07:24:20 +0200 Subject: [PATCH] Added filters above the admin list views to resolve gh-378 --- README.md | 8 +- admin/README.txt | 8 +- admin/helpers/compiler/e_Interpretation.php | 15 +- admin/helpers/compiler/f_Infusion.php | 2 +- .../en-GB/en-GB.com_componentbuilder.ini | 208 +++++++++++ admin/models/admin_views.php | 80 +++- admin/models/admins_custom_tabs.php | 9 +- admin/models/admins_fields.php | 9 +- admin/models/admins_fields_conditions.php | 9 +- admin/models/admins_fields_relations.php | 9 +- admin/models/class_extendings.php | 21 +- admin/models/class_methods.php | 27 +- admin/models/class_properties.php | 27 +- admin/models/components_admin_views.php | 9 +- admin/models/components_config.php | 9 +- .../models/components_custom_admin_menus.php | 9 +- .../models/components_custom_admin_views.php | 9 +- admin/models/components_dashboard.php | 9 +- admin/models/components_files_folders.php | 9 +- admin/models/components_modules.php | 9 +- admin/models/components_mysql_tweaks.php | 9 +- admin/models/components_placeholders.php | 9 +- admin/models/components_plugins.php | 9 +- admin/models/components_site_views.php | 9 +- admin/models/components_updates.php | 9 +- admin/models/custom_admin_views.php | 45 ++- admin/models/custom_codes.php | 39 +- admin/models/dynamic_gets.php | 27 +- admin/models/fields.php | 51 ++- .../adminviewsfilteraddcustombutton.php | 72 ++++ .../adminviewsfilteraddcustomimport.php | 72 ++++ .../fields/adminviewsfilteraddfadein.php | 72 ++++ .../fields/adminviewsfilteraddphpajax.php | 72 ++++ admin/models/fields/adminviewsfiltertype.php | 71 ++++ .../classextendingsfilterextensiontype.php | 72 ++++ .../classmethodsfilterextensiontype.php | 72 ++++ .../fields/classmethodsfiltervisibility.php | 72 ++++ .../classpropertiesfilterextensiontype.php | 72 ++++ .../classpropertiesfiltervisibility.php | 72 ++++ .../customadminviewsfilteraddcustombutton.php | 72 ++++ .../customadminviewsfilteraddphpajax.php | 72 ++++ .../fields/customcodesfiltercommenttype.php | 72 ++++ .../models/fields/customcodesfiltertarget.php | 72 ++++ admin/models/fields/customcodesfiltertype.php | 72 ++++ .../fields/dynamicgetsfiltergettype.php | 72 ++++ .../fields/dynamicgetsfiltermainsource.php | 72 ++++ admin/models/fields/fieldsfilterdatatype.php | 72 ++++ admin/models/fields/fieldsfilterindexes.php | 72 ++++ .../models/fields/fieldsfilternullswitch.php | 72 ++++ admin/models/fields/fieldsfilterstore.php | 72 ++++ .../fields/helpdocumentsfilterlocation.php | 72 ++++ .../models/fields/helpdocumentsfiltertype.php | 72 ++++ .../fields/joomlacomponentsfilterauthor.php | 68 ++++ .../joomlacomponentsfiltercompanyname.php | 68 ++++ .../fields/joomlamodulesfiltertarget.php | 72 ++++ .../models/fields/layoutsfilteraddphpview.php | 72 ++++ admin/models/fields/librariesfiltertarget.php | 72 ++++ admin/models/fields/librariesfiltertype.php | 72 ++++ admin/models/fields/serversfiltername.php | 68 ++++ admin/models/fields/serversfilterprotocol.php | 72 ++++ .../fields/siteviewsfilteraddcustombutton.php | 72 ++++ .../fields/siteviewsfilteraddphpajax.php | 72 ++++ .../fields/templatesfilteraddphpview.php | 72 ++++ admin/models/fieldtypes.php | 27 +- admin/models/forms/filter_admin_views.xml | 107 ++++++ .../forms/filter_admins_custom_tabs.xml | 65 ++++ admin/models/forms/filter_admins_fields.xml | 65 ++++ .../forms/filter_admins_fields_conditions.xml | 65 ++++ .../forms/filter_admins_fields_relations.xml | 65 ++++ .../models/forms/filter_class_extendings.xml | 76 ++++ admin/models/forms/filter_class_methods.xml | 85 +++++ .../models/forms/filter_class_properties.xml | 85 +++++ .../forms/filter_components_admin_views.xml | 65 ++++ .../models/forms/filter_components_config.xml | 65 ++++ .../filter_components_custom_admin_menus.xml | 65 ++++ .../filter_components_custom_admin_views.xml | 65 ++++ .../forms/filter_components_dashboard.xml | 65 ++++ .../forms/filter_components_files_folders.xml | 65 ++++ .../forms/filter_components_modules.xml | 65 ++++ .../forms/filter_components_mysql_tweaks.xml | 65 ++++ .../forms/filter_components_placeholders.xml | 65 ++++ .../forms/filter_components_plugins.xml | 65 ++++ .../forms/filter_components_site_views.xml | 65 ++++ .../forms/filter_components_updates.xml | 65 ++++ .../forms/filter_custom_admin_views.xml | 94 +++++ admin/models/forms/filter_custom_codes.xml | 103 ++++++ admin/models/forms/filter_dynamic_gets.xml | 85 +++++ admin/models/forms/filter_fields.xml | 125 +++++++ admin/models/forms/filter_fieldtypes.xml | 82 +++++ admin/models/forms/filter_help_documents.xml | 94 +++++ .../models/forms/filter_joomla_components.xml | 87 +++++ admin/models/forms/filter_joomla_modules.xml | 76 ++++ ...lter_joomla_modules_files_folders_urls.xml | 65 ++++ .../forms/filter_joomla_modules_updates.xml | 65 ++++ .../forms/filter_joomla_plugin_groups.xml | 76 ++++ admin/models/forms/filter_joomla_plugins.xml | 85 +++++ ...lter_joomla_plugins_files_folders_urls.xml | 65 ++++ .../forms/filter_joomla_plugins_updates.xml | 65 ++++ .../forms/filter_language_translations.xml | 67 ++++ admin/models/forms/filter_languages.xml | 69 ++++ admin/models/forms/filter_layouts.xml | 85 +++++ admin/models/forms/filter_libraries.xml | 94 +++++ .../models/forms/filter_libraries_config.xml | 65 ++++ .../filter_libraries_files_folders_urls.xml | 65 ++++ admin/models/forms/filter_placeholders.xml | 69 ++++ admin/models/forms/filter_servers.xml | 83 +++++ admin/models/forms/filter_site_views.xml | 96 +++++ admin/models/forms/filter_snippet_types.xml | 69 ++++ admin/models/forms/filter_snippets.xml | 89 +++++ admin/models/forms/filter_templates.xml | 85 +++++ .../models/forms/filter_validation_rules.xml | 69 ++++ admin/models/help_documents.php | 39 +- admin/models/joomla_components.php | 39 +- admin/models/joomla_modules.php | 27 +- .../joomla_modules_files_folders_urls.php | 9 +- admin/models/joomla_modules_updates.php | 9 +- admin/models/joomla_plugin_groups.php | 21 +- admin/models/joomla_plugins.php | 27 +- .../joomla_plugins_files_folders_urls.php | 9 +- admin/models/joomla_plugins_updates.php | 9 +- admin/models/language_translations.php | 15 +- admin/models/languages.php | 21 +- admin/models/layouts.php | 33 +- admin/models/libraries.php | 39 +- admin/models/libraries_config.php | 9 +- admin/models/libraries_files_folders_urls.php | 9 +- admin/models/placeholders.php | 21 +- admin/models/servers.php | 21 +- admin/models/site_views.php | 51 ++- admin/models/snippet_types.php | 21 +- admin/models/snippets.php | 39 +- admin/models/templates.php | 33 +- admin/models/validation_rules.php | 21 +- admin/views/admin_views/tmpl/default.php | 27 +- admin/views/admin_views/tmpl/default_head.php | 12 +- admin/views/admin_views/view.html.php | 345 +++--------------- .../views/admins_custom_tabs/tmpl/default.php | 26 +- .../admins_custom_tabs/tmpl/default_head.php | 6 +- admin/views/admins_custom_tabs/view.html.php | 20 +- admin/views/admins_fields/tmpl/default.php | 26 +- .../views/admins_fields/tmpl/default_head.php | 6 +- admin/views/admins_fields/view.html.php | 20 +- .../admins_fields_conditions/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../admins_fields_conditions/view.html.php | 20 +- .../admins_fields_relations/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../admins_fields_relations/view.html.php | 20 +- admin/views/class_extendings/tmpl/default.php | 26 +- .../class_extendings/tmpl/default_head.php | 10 +- admin/views/class_extendings/view.html.php | 85 +---- admin/views/class_methods/tmpl/default.php | 26 +- .../views/class_methods/tmpl/default_head.php | 12 +- admin/views/class_methods/view.html.php | 150 ++------ admin/views/class_properties/tmpl/default.php | 26 +- .../class_properties/tmpl/default_head.php | 12 +- admin/views/class_properties/view.html.php | 150 ++------ .../components_admin_views/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../components_admin_views/view.html.php | 20 +- .../views/components_config/tmpl/default.php | 26 +- .../components_config/tmpl/default_head.php | 6 +- admin/views/components_config/view.html.php | 20 +- .../tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../view.html.php | 20 +- .../tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../view.html.php | 20 +- .../components_dashboard/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../views/components_dashboard/view.html.php | 20 +- .../components_files_folders/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../components_files_folders/view.html.php | 20 +- .../views/components_modules/tmpl/default.php | 26 +- .../components_modules/tmpl/default_head.php | 6 +- admin/views/components_modules/view.html.php | 20 +- .../components_mysql_tweaks/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../components_mysql_tweaks/view.html.php | 20 +- .../components_placeholders/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../components_placeholders/view.html.php | 20 +- .../views/components_plugins/tmpl/default.php | 26 +- .../components_plugins/tmpl/default_head.php | 6 +- admin/views/components_plugins/view.html.php | 20 +- .../components_site_views/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../views/components_site_views/view.html.php | 20 +- .../views/components_updates/tmpl/default.php | 26 +- .../components_updates/tmpl/default_head.php | 6 +- admin/views/components_updates/view.html.php | 20 +- .../views/custom_admin_views/tmpl/default.php | 26 +- .../custom_admin_views/tmpl/default_head.php | 14 +- admin/views/custom_admin_views/view.html.php | 179 ++------- admin/views/custom_codes/tmpl/default.php | 26 +- .../views/custom_codes/tmpl/default_head.php | 16 +- admin/views/custom_codes/view.html.php | 244 ++----------- admin/views/dynamic_gets/tmpl/default.php | 26 +- .../views/dynamic_gets/tmpl/default_head.php | 12 +- admin/views/dynamic_gets/view.html.php | 150 ++------ admin/views/fields/tmpl/default.php | 27 +- admin/views/fields/tmpl/default_head.php | 20 +- admin/views/fields/view.html.php | 316 +++------------- admin/views/fieldtypes/tmpl/default.php | 27 +- admin/views/fieldtypes/tmpl/default_head.php | 12 +- admin/views/fieldtypes/view.html.php | 27 +- admin/views/help_documents/tmpl/default.php | 25 +- .../help_documents/tmpl/default_head.php | 16 +- admin/views/help_documents/view.html.php | 202 ++-------- .../views/joomla_components/tmpl/default.php | 26 +- .../joomla_components/tmpl/default_head.php | 14 +- admin/views/joomla_components/view.html.php | 142 ++----- admin/views/joomla_modules/tmpl/default.php | 26 +- .../joomla_modules/tmpl/default_head.php | 10 +- admin/views/joomla_modules/view.html.php | 85 +---- .../tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../view.html.php | 20 +- .../joomla_modules_updates/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../joomla_modules_updates/view.html.php | 20 +- .../joomla_plugin_groups/tmpl/default.php | 26 +- .../tmpl/default_head.php | 10 +- .../views/joomla_plugin_groups/view.html.php | 49 +-- admin/views/joomla_plugins/tmpl/default.php | 26 +- .../joomla_plugins/tmpl/default_head.php | 12 +- admin/views/joomla_plugins/view.html.php | 78 ++-- .../tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../view.html.php | 20 +- .../joomla_plugins_updates/tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../joomla_plugins_updates/view.html.php | 20 +- .../language_translations/tmpl/default.php | 26 +- .../tmpl/default_head.php | 8 +- .../views/language_translations/view.html.php | 20 +- admin/views/languages/tmpl/default.php | 26 +- admin/views/languages/tmpl/default_head.php | 10 +- admin/views/languages/view.html.php | 20 +- admin/views/layouts/tmpl/default.php | 26 +- admin/views/layouts/tmpl/default_head.php | 12 +- admin/views/layouts/view.html.php | 114 ++---- admin/views/libraries/tmpl/default.php | 26 +- admin/views/libraries/tmpl/default_head.php | 14 +- admin/views/libraries/view.html.php | 179 ++------- admin/views/libraries_config/tmpl/default.php | 26 +- .../libraries_config/tmpl/default_head.php | 6 +- admin/views/libraries_config/view.html.php | 20 +- .../tmpl/default.php | 26 +- .../tmpl/default_head.php | 6 +- .../view.html.php | 20 +- admin/views/placeholders/tmpl/default.php | 26 +- .../views/placeholders/tmpl/default_head.php | 10 +- admin/views/placeholders/view.html.php | 20 +- admin/views/servers/tmpl/default.php | 26 +- admin/views/servers/tmpl/default_head.php | 10 +- admin/views/servers/view.html.php | 146 ++------ admin/views/site_views/tmpl/default.php | 26 +- admin/views/site_views/tmpl/default_head.php | 14 +- admin/views/site_views/view.html.php | 179 ++------- admin/views/snippet_types/tmpl/default.php | 26 +- .../views/snippet_types/tmpl/default_head.php | 10 +- admin/views/snippet_types/view.html.php | 20 +- admin/views/snippets/tmpl/default.php | 26 +- admin/views/snippets/tmpl/default_head.php | 16 +- admin/views/snippets/view.html.php | 78 ++-- admin/views/templates/tmpl/default.php | 26 +- admin/views/templates/tmpl/default_head.php | 12 +- admin/views/templates/view.html.php | 114 ++---- admin/views/validation_rules/tmpl/default.php | 26 +- .../validation_rules/tmpl/default_head.php | 10 +- admin/views/validation_rules/view.html.php | 20 +- componentbuilder.xml | 4 +- componentbuilder_update_server.xml | 4 +- script.php | 2 +- 277 files changed, 8176 insertions(+), 4301 deletions(-) create mode 100644 admin/models/fields/adminviewsfilteraddcustombutton.php create mode 100644 admin/models/fields/adminviewsfilteraddcustomimport.php create mode 100644 admin/models/fields/adminviewsfilteraddfadein.php create mode 100644 admin/models/fields/adminviewsfilteraddphpajax.php create mode 100644 admin/models/fields/adminviewsfiltertype.php create mode 100644 admin/models/fields/classextendingsfilterextensiontype.php create mode 100644 admin/models/fields/classmethodsfilterextensiontype.php create mode 100644 admin/models/fields/classmethodsfiltervisibility.php create mode 100644 admin/models/fields/classpropertiesfilterextensiontype.php create mode 100644 admin/models/fields/classpropertiesfiltervisibility.php create mode 100644 admin/models/fields/customadminviewsfilteraddcustombutton.php create mode 100644 admin/models/fields/customadminviewsfilteraddphpajax.php create mode 100644 admin/models/fields/customcodesfiltercommenttype.php create mode 100644 admin/models/fields/customcodesfiltertarget.php create mode 100644 admin/models/fields/customcodesfiltertype.php create mode 100644 admin/models/fields/dynamicgetsfiltergettype.php create mode 100644 admin/models/fields/dynamicgetsfiltermainsource.php create mode 100644 admin/models/fields/fieldsfilterdatatype.php create mode 100644 admin/models/fields/fieldsfilterindexes.php create mode 100644 admin/models/fields/fieldsfilternullswitch.php create mode 100644 admin/models/fields/fieldsfilterstore.php create mode 100644 admin/models/fields/helpdocumentsfilterlocation.php create mode 100644 admin/models/fields/helpdocumentsfiltertype.php create mode 100644 admin/models/fields/joomlacomponentsfilterauthor.php create mode 100644 admin/models/fields/joomlacomponentsfiltercompanyname.php create mode 100644 admin/models/fields/joomlamodulesfiltertarget.php create mode 100644 admin/models/fields/layoutsfilteraddphpview.php create mode 100644 admin/models/fields/librariesfiltertarget.php create mode 100644 admin/models/fields/librariesfiltertype.php create mode 100644 admin/models/fields/serversfiltername.php create mode 100644 admin/models/fields/serversfilterprotocol.php create mode 100644 admin/models/fields/siteviewsfilteraddcustombutton.php create mode 100644 admin/models/fields/siteviewsfilteraddphpajax.php create mode 100644 admin/models/fields/templatesfilteraddphpview.php create mode 100644 admin/models/forms/filter_admin_views.xml create mode 100644 admin/models/forms/filter_admins_custom_tabs.xml create mode 100644 admin/models/forms/filter_admins_fields.xml create mode 100644 admin/models/forms/filter_admins_fields_conditions.xml create mode 100644 admin/models/forms/filter_admins_fields_relations.xml create mode 100644 admin/models/forms/filter_class_extendings.xml create mode 100644 admin/models/forms/filter_class_methods.xml create mode 100644 admin/models/forms/filter_class_properties.xml create mode 100644 admin/models/forms/filter_components_admin_views.xml create mode 100644 admin/models/forms/filter_components_config.xml create mode 100644 admin/models/forms/filter_components_custom_admin_menus.xml create mode 100644 admin/models/forms/filter_components_custom_admin_views.xml create mode 100644 admin/models/forms/filter_components_dashboard.xml create mode 100644 admin/models/forms/filter_components_files_folders.xml create mode 100644 admin/models/forms/filter_components_modules.xml create mode 100644 admin/models/forms/filter_components_mysql_tweaks.xml create mode 100644 admin/models/forms/filter_components_placeholders.xml create mode 100644 admin/models/forms/filter_components_plugins.xml create mode 100644 admin/models/forms/filter_components_site_views.xml create mode 100644 admin/models/forms/filter_components_updates.xml create mode 100644 admin/models/forms/filter_custom_admin_views.xml create mode 100644 admin/models/forms/filter_custom_codes.xml create mode 100644 admin/models/forms/filter_dynamic_gets.xml create mode 100644 admin/models/forms/filter_fields.xml create mode 100644 admin/models/forms/filter_fieldtypes.xml create mode 100644 admin/models/forms/filter_help_documents.xml create mode 100644 admin/models/forms/filter_joomla_components.xml create mode 100644 admin/models/forms/filter_joomla_modules.xml create mode 100644 admin/models/forms/filter_joomla_modules_files_folders_urls.xml create mode 100644 admin/models/forms/filter_joomla_modules_updates.xml create mode 100644 admin/models/forms/filter_joomla_plugin_groups.xml create mode 100644 admin/models/forms/filter_joomla_plugins.xml create mode 100644 admin/models/forms/filter_joomla_plugins_files_folders_urls.xml create mode 100644 admin/models/forms/filter_joomla_plugins_updates.xml create mode 100644 admin/models/forms/filter_language_translations.xml create mode 100644 admin/models/forms/filter_languages.xml create mode 100644 admin/models/forms/filter_layouts.xml create mode 100644 admin/models/forms/filter_libraries.xml create mode 100644 admin/models/forms/filter_libraries_config.xml create mode 100644 admin/models/forms/filter_libraries_files_folders_urls.xml create mode 100644 admin/models/forms/filter_placeholders.xml create mode 100644 admin/models/forms/filter_servers.xml create mode 100644 admin/models/forms/filter_site_views.xml create mode 100644 admin/models/forms/filter_snippet_types.xml create mode 100644 admin/models/forms/filter_snippets.xml create mode 100644 admin/models/forms/filter_templates.xml create mode 100644 admin/models/forms/filter_validation_rules.xml diff --git a/README.md b/README.md index b2fc72de9..43a82d111 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,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 save 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.11.7) 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.12.1) 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) @@ -145,12 +145,12 @@ TODO + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 + *Last Build*: 3rd December, 2020 -+ *Version*: 2.11.7 ++ *Version*: 2.12.1 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **285207** ++ *Line count*: **289034** + *Field count*: **1537** -+ *File count*: **1799** ++ *File count*: **1880** + *Folder count*: **304** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index b2fc72de9..43a82d111 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,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 save 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.11.7) 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.12.1) 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) @@ -145,12 +145,12 @@ TODO + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 + *Last Build*: 3rd December, 2020 -+ *Version*: 2.11.7 ++ *Version*: 2.12.1 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **285207** ++ *Line count*: **289034** + *Field count*: **1537** -+ *File count*: **1799** ++ *File count*: **1880** + *Folder count*: **304** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 3c61545bf..6d29e529c 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -20868,8 +20868,6 @@ class Interpretation extends Fields $state = ''; // keep track of all fields already added $donelist = array(); - // add the default populate states (this must be added first) - $state .= $this->setDefaultPopulateState($nameSingleCode); // we must add the formSubmited code if new above filters is used $new_filter = false; if (isset($this->adminFilterType[$nameListCode]) @@ -20881,6 +20879,8 @@ class Interpretation extends Fields . " = \$app->input->post->get('form_submited');"; $new_filter = true; } + // add the default populate states (this must be added first) + $state .= $this->setDefaultPopulateState($nameSingleCode, $new_filter); // add the filters if (isset($this->filterBuilder[$nameListCode]) && ComponentbuilderHelper::checkArray( @@ -20923,13 +20923,13 @@ class Interpretation extends Fields * Add the code of the filter in the populate state * * @param array $filter The field/filter array - * @param bool $new_filter The switch to use the new filter + * @param bool $newFilter The switch to use the new filter * @param string $extra The defaults/extra options of the filter * * @return string The code for the populate state * */ - protected function getPopulateStateFilterCode(&$filter, $new_filter, + protected function getPopulateStateFilterCode(&$filter, $newFilter, $extra = '' ) { $state = ''; @@ -20950,7 +20950,7 @@ class Interpretation extends Fields . " = \$this->getUserStateFromRequest(\$this->context . '.filter." . $filter['code'] . "', 'filter_" . $filter['code'] . "'" . $extra . ");"; - if ($new_filter) + if ($newFilter) { // add the new filter option $state .= PHP_EOL . $this->_t(2) @@ -20978,11 +20978,12 @@ class Interpretation extends Fields * set the default populate state code * * @param string $nameSingleCode The single view name + * @param bool $newFilter The switch to use the new filter * * @return string The state code added * */ - protected function setDefaultPopulateState(&$nameSingleCode) + protected function setDefaultPopulateState(&$nameSingleCode, $newFilter) { $state = ''; // start filter @@ -20992,7 +20993,7 @@ class Interpretation extends Fields { $filter['code'] = "access"; $state .= $this->getPopulateStateFilterCode( - $filter, false, ", 0, 'int'" + $filter, $newFilter, ", 0, 'int'" ); } // if published is not set add its default filter here diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 439200d24..300bde63a 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); /** - * Interpretation class + * Infusion class */ class Infusion extends Interpretation { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index bfb988e87..601958392 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -5336,6 +5336,214 @@ COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB="File %s was moved to % COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB="File %s was not moved to %s" COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED="File %s was successfully unlocked!" COM_COMPONENTBUILDER_FILTER="Filter" +COM_COMPONENTBUILDER_FILTER_ADMIN_VIEW_ASCENDING="Admin View ascending" +COM_COMPONENTBUILDER_FILTER_ADMIN_VIEW_DESCENDING="Admin View descending" +COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_ASCENDING="Class Extends ascending" +COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_DESCENDING="Class Extends descending" +COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_ASCENDING="Comment Type ascending" +COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_DESCENDING="Comment Type descending" +COM_COMPONENTBUILDER_FILTER_COMPANYNAME_ASCENDING="Companyname ascending" +COM_COMPONENTBUILDER_FILTER_COMPANYNAME_DESCENDING="Companyname descending" +COM_COMPONENTBUILDER_FILTER_COMPONENT_ASCENDING="Component ascending" +COM_COMPONENTBUILDER_FILTER_COMPONENT_DESCENDING="Component descending" +COM_COMPONENTBUILDER_FILTER_CONTEXT_ASCENDING="Context ascending" +COM_COMPONENTBUILDER_FILTER_CONTEXT_DESCENDING="Context descending" +COM_COMPONENTBUILDER_FILTER_DATATYPE_ASCENDING="Datatype ascending" +COM_COMPONENTBUILDER_FILTER_DATATYPE_DESCENDING="Datatype descending" +COM_COMPONENTBUILDER_FILTER_DESCRIPTION_ASCENDING="Description ascending" +COM_COMPONENTBUILDER_FILTER_DESCRIPTION_DESCENDING="Description descending" +COM_COMPONENTBUILDER_FILTER_DYNAMIC_GET_ASCENDING="Dynamic Get ascending" +COM_COMPONENTBUILDER_FILTER_DYNAMIC_GET_DESCENDING="Dynamic Get descending" +COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_ASCENDING="Extension Type ascending" +COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_DESCENDING="Extension Type descending" +COM_COMPONENTBUILDER_FILTER_FIELDS_CATEGORIES_ASCENDING="Fields Categories ascending" +COM_COMPONENTBUILDER_FILTER_FIELDS_CATEGORIES_DESCENDING="Fields Categories descending" +COM_COMPONENTBUILDER_FILTER_FIELDTYPES_CATEGORIES_ASCENDING="Fieldtypes Categories ascending" +COM_COMPONENTBUILDER_FILTER_FIELDTYPES_CATEGORIES_DESCENDING="Fieldtypes Categories descending" +COM_COMPONENTBUILDER_FILTER_FIELDTYPE_ASCENDING="Fieldtype ascending" +COM_COMPONENTBUILDER_FILTER_FIELDTYPE_DESCENDING="Fieldtype descending" +COM_COMPONENTBUILDER_FILTER_GETTYPE_ASCENDING="Gettype ascending" +COM_COMPONENTBUILDER_FILTER_GETTYPE_DESCENDING="Gettype descending" +COM_COMPONENTBUILDER_FILTER_HEADING_ASCENDING="Heading ascending" +COM_COMPONENTBUILDER_FILTER_HEADING_DESCENDING="Heading descending" +COM_COMPONENTBUILDER_FILTER_INDEXES_ASCENDING="Indexes ascending" +COM_COMPONENTBUILDER_FILTER_INDEXES_DESCENDING="Indexes descending" +COM_COMPONENTBUILDER_FILTER_JOOMLA_PLUGIN_GROUP_ASCENDING="Joomla Plugin Group ascending" +COM_COMPONENTBUILDER_FILTER_JOOMLA_PLUGIN_GROUP_DESCENDING="Joomla Plugin Group descending" +COM_COMPONENTBUILDER_FILTER_LANGTAG_ASCENDING="Langtag ascending" +COM_COMPONENTBUILDER_FILTER_LANGTAG_DESCENDING="Langtag descending" +COM_COMPONENTBUILDER_FILTER_LIBRARY_ASCENDING="Library ascending" +COM_COMPONENTBUILDER_FILTER_LIBRARY_DESCENDING="Library descending" +COM_COMPONENTBUILDER_FILTER_LOCATION_ASCENDING="Location ascending" +COM_COMPONENTBUILDER_FILTER_LOCATION_DESCENDING="Location descending" +COM_COMPONENTBUILDER_FILTER_MAIN_GET_ASCENDING="Main Get ascending" +COM_COMPONENTBUILDER_FILTER_MAIN_GET_DESCENDING="Main Get descending" +COM_COMPONENTBUILDER_FILTER_MAIN_SOURCE_ASCENDING="Main Source ascending" +COM_COMPONENTBUILDER_FILTER_MAIN_SOURCE_DESCENDING="Main Source descending" +COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING="Name ascending" +COM_COMPONENTBUILDER_FILTER_NAME_CODE_ASCENDING="Name Code ascending" +COM_COMPONENTBUILDER_FILTER_NAME_CODE_DESCENDING="Name Code descending" +COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING="Name descending" +COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_ASCENDING="Name Single ascending" +COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_DESCENDING="Name Single descending" +COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_ASCENDING="Null Switch ascending" +COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_DESCENDING="Null Switch descending" +COM_COMPONENTBUILDER_FILTER_PATH_ASCENDING="Path ascending" +COM_COMPONENTBUILDER_FILTER_PATH_DESCENDING="Path descending" +COM_COMPONENTBUILDER_FILTER_PROTOCOL_ASCENDING="Protocol ascending" +COM_COMPONENTBUILDER_FILTER_PROTOCOL_DESCENDING="Protocol descending" +COM_COMPONENTBUILDER_FILTER_PUBLISHED="Status" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_CUSTOM_TABS="Status options for admins custom tabs" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_FIELDS="Status options for admins fields" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_FIELDS_CONDITIONS="Status options for admins fields conditions" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_FIELDS_RELATIONS="Status options for admins fields relations" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMIN_VIEWS="Status options for admin views" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_CLASS_EXTENDINGS="Status options for class extendings" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_CLASS_METHODS="Status options for class methods" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_CLASS_PROPERTIES="Status options for class properties" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_ADMIN_VIEWS="Status options for components admin views" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_CONFIG="Status options for components config" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_CUSTOM_ADMIN_MENUS="Status options for components custom admin menus" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_CUSTOM_ADMIN_VIEWS="Status options for components custom admin views" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_DASHBOARD="Status options for components dashboard" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_FILES_FOLDERS="Status options for components files folders" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_MODULES="Status options for components modules" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_MYSQL_TWEAKS="Status options for components mysql tweaks" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_PLACEHOLDERS="Status options for components placeholders" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_PLUGINS="Status options for components plugins" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_SITE_VIEWS="Status options for components site views" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_UPDATES="Status options for components updates" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_CUSTOM_ADMIN_VIEWS="Status options for custom admin views" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_CUSTOM_CODES="Status options for custom codes" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_DYNAMIC_GETS="Status options for dynamic gets" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_FIELDS="Status options for fields" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_FIELDTYPES="Status options for fieldtypes" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_HELP_DOCUMENTS="Status options for help documents" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_COMPONENTS="Status options for joomla components" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_MODULES="Status options for joomla modules" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_MODULES_FILES_FOLDERS_URLS="Status options for joomla modules files folders urls" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_MODULES_UPDATES="Status options for joomla modules updates" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGINS="Status options for joomla plugins" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGINS_FILES_FOLDERS_URLS="Status options for joomla plugins files folders urls" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGINS_UPDATES="Status options for joomla plugins updates" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGIN_GROUPS="Status options for joomla plugin groups" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_LANGUAGES="Status options for languages" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_LANGUAGE_TRANSLATIONS="Status options for language translations" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_LAYOUTS="Status options for layouts" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES="Status options for libraries" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_CONFIG="Status options for libraries config" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_FILES_FOLDERS_URLS="Status options for libraries files folders urls" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_PLACEHOLDERS="Status options for placeholders" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_SERVERS="Status options for servers" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_SITE_VIEWS="Status options for site views" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPETS="Status options for snippets" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPET_TYPES="Status options for snippet types" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_TEMPLATES="Status options for templates" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_VALIDATION_RULES="Status options for validation rules" +COM_COMPONENTBUILDER_FILTER_SEARCH="Searchjoomla components" +COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_CUSTOM_TABS="Search the admin custom tabs items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS="Search the admin fields items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS_CONDITIONS="Search the admin fields conditions items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS_RELATIONS="Search the admin fields relations items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_ADMIN_VIEWS="Search the admin view items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_CLASS_EXTENDINGS="Search the class extends items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_CLASS_METHODS="Search the class method items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_CLASS_PROPERTIES="Search the class property items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_ADMIN_VIEWS="Search the component admin views items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_CONFIG="Search the component config items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_CUSTOM_ADMIN_MENUS="Search the component custom admin menus items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_CUSTOM_ADMIN_VIEWS="Search the component custom admin views items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_DASHBOARD="Search the component dashboard items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_FILES_FOLDERS="Search the component files folders items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_MODULES="Search the component modules items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_MYSQL_TWEAKS="Search the component mysql tweaks items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_PLACEHOLDERS="Search the component placeholders items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_PLUGINS="Search the component plugins items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_SITE_VIEWS="Search the component site views items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_UPDATES="Search the component updates items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_CUSTOM_ADMIN_VIEWS="Search the custom admin view items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_CUSTOM_CODES="Search the custom code items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_DYNAMIC_GETS="Search the dynamic get items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_FIELDS="Search the field items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_FIELDTYPES="Search the fieldtype items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_HELP_DOCUMENTS="Search the help document items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_COMPONENTS="Search the joomla component items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_MODULES="Search the joomla module items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_MODULES_FILES_FOLDERS_URLS="Search the joomla module files folders urls items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_MODULES_UPDATES="Search the joomla module updates items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGINS="Search the joomla plugin items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGINS_FILES_FOLDERS_URLS="Search the joomla plugin files folders urls items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGINS_UPDATES="Search the joomla plugin updates items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGIN_GROUPS="Search the joomla plugin group items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_LANGUAGES="Search the language items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_LANGUAGE_TRANSLATIONS="Search the language translation items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_LAYOUTS="Search the layout items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES="Search the library items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_CONFIG="Search the library config items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_FILES_FOLDERS_URLS="Search the library files folders urls items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_PLACEHOLDERS="Search the placeholder items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_SERVERS="Search the server items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_SITE_VIEWS="Search the site view items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_SNIPPETS="Search the snippet items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_SNIPPET_TYPES="Search the snippet type items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_TEMPLATES="Search the template items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_VALIDATION_RULES="Search the validation rule items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS="Select Access" +COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON="Select Add Custom Button" +COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT="Select Add Custom Import" +COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN="Select Add Fadein" +COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX="Select Add Php Ajax" +COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW="Select Add Php View" +COM_COMPONENTBUILDER_FILTER_SELECT_ADMIN_VIEW="Select Admin View" +COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR="Select Author" +COM_COMPONENTBUILDER_FILTER_SELECT_CLASS_EXTENDS="Select Class Extends" +COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE="Select Comment Type" +COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME="Select Companyname" +COM_COMPONENTBUILDER_FILTER_SELECT_COMPONENT="Select Component" +COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE="Select Datatype" +COM_COMPONENTBUILDER_FILTER_SELECT_DYNAMIC_GET="Select Dynamic Get" +COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE="Select Extension Type" +COM_COMPONENTBUILDER_FILTER_SELECT_FIELDS_CATEGORIES="Select Fields Categories" +COM_COMPONENTBUILDER_FILTER_SELECT_FIELDTYPE="Select Fieldtype" +COM_COMPONENTBUILDER_FILTER_SELECT_FIELDTYPES_CATEGORIES="Select Fieldtypes Categories" +COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE="Select Gettype" +COM_COMPONENTBUILDER_FILTER_SELECT_HOW="Select How" +COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES="Select Indexes" +COM_COMPONENTBUILDER_FILTER_SELECT_JOOMLA_PLUGIN_GROUP="Select Joomla Plugin Group" +COM_COMPONENTBUILDER_FILTER_SELECT_LIBRARY="Select Library" +COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION="Select Location" +COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_GET="Select Main Get" +COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE="Select Main Source" +COM_COMPONENTBUILDER_FILTER_SELECT_NAME="Select Name" +COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH="Select Null Switch" +COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL="Select Protocol" +COM_COMPONENTBUILDER_FILTER_SELECT_SITE_VIEW="Select Site View" +COM_COMPONENTBUILDER_FILTER_SELECT_STORE="Select Store" +COM_COMPONENTBUILDER_FILTER_SELECT_TARGET="Select Target" +COM_COMPONENTBUILDER_FILTER_SELECT_TYPE="Select Type" +COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY="Select Visibility" +COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_ASCENDING="Short Description ascending" +COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_DESCENDING="Short Description descending" +COM_COMPONENTBUILDER_FILTER_SITE_VIEW_ASCENDING="Site View ascending" +COM_COMPONENTBUILDER_FILTER_SITE_VIEW_DESCENDING="Site View descending" +COM_COMPONENTBUILDER_FILTER_SOURCE_ASCENDING="Source ascending" +COM_COMPONENTBUILDER_FILTER_SOURCE_DESCENDING="Source descending" +COM_COMPONENTBUILDER_FILTER_STORE_ASCENDING="Store ascending" +COM_COMPONENTBUILDER_FILTER_STORE_DESCENDING="Store descending" +COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_ASCENDING="System Name ascending" +COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_DESCENDING="System Name descending" +COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING="Target ascending" +COM_COMPONENTBUILDER_FILTER_TARGET_DESCENDING="Target descending" +COM_COMPONENTBUILDER_FILTER_TITLE_ASCENDING="Title ascending" +COM_COMPONENTBUILDER_FILTER_TITLE_DESCENDING="Title descending" +COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING="Type ascending" +COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING="Type descending" +COM_COMPONENTBUILDER_FILTER_URL_ASCENDING="Url ascending" +COM_COMPONENTBUILDER_FILTER_URL_DESCENDING="Url descending" +COM_COMPONENTBUILDER_FILTER_VALUE_ASCENDING="Value ascending" +COM_COMPONENTBUILDER_FILTER_VALUE_DESCENDING="Value descending" +COM_COMPONENTBUILDER_FILTER_VISIBILITY_ASCENDING="Visibility ascending" +COM_COMPONENTBUILDER_FILTER_VISIBILITY_DESCENDING="Visibility descending" COM_COMPONENTBUILDER_FOLDER="Folder" COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder %s was moved to %s" COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB="Folder %s was not moved to %s" diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 14014c039..748b65187 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -65,8 +65,15 @@ class ComponentbuilderModelAdmin_views extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -84,28 +91,60 @@ class ComponentbuilderModelAdmin_views extends JModelList $this->setState('filter.search', $search); $add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein'); - $this->setState('filter.add_fadein', $add_fadein); + if ($formSubmited) + { + $add_fadein = $app->input->post->get('add_fadein'); + $this->setState('filter.add_fadein', $add_fadein); + } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); - $this->setState('filter.add_custom_button', $add_custom_button); + if ($formSubmited) + { + $add_custom_button = $app->input->post->get('add_custom_button'); + $this->setState('filter.add_custom_button', $add_custom_button); + } $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); - $this->setState('filter.add_php_ajax', $add_php_ajax); + if ($formSubmited) + { + $add_php_ajax = $app->input->post->get('add_php_ajax'); + $this->setState('filter.add_php_ajax', $add_php_ajax); + } $add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import'); - $this->setState('filter.add_custom_import', $add_custom_import); + if ($formSubmited) + { + $add_custom_import = $app->input->post->get('add_custom_import'); + $this->setState('filter.add_custom_import', $add_custom_import); + } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); - $this->setState('filter.system_name', $system_name); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } $name_single = $this->getUserStateFromRequest($this->context . '.filter.name_single', 'filter_name_single'); - $this->setState('filter.name_single', $name_single); + if ($formSubmited) + { + $name_single = $app->input->post->get('name_single'); + $this->setState('filter.name_single', $name_single); + } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); - $this->setState('filter.short_description', $short_description); + if ($formSubmited) + { + $short_description = $app->input->post->get('short_description'); + $this->setState('filter.short_description', $short_description); + } // List state information. parent::populateState($ordering, $direction); @@ -344,6 +383,29 @@ class ComponentbuilderModelAdmin_views extends JModelList { $query->where('a.type = ' . $db->quote($db->escape($_type))); } + elseif (ComponentbuilderHelper::checkArray($_type)) + { + // Secure the array for the query + $_type = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (ComponentbuilderHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_type); + // Filter by the Type Array. + $query->where('a.type IN (' . implode(',', $_type) . ')'); + } // Filter by Add_custom_button. $_add_custom_button = $this->getState('filter.add_custom_button'); if (is_numeric($_add_custom_button)) diff --git a/admin/models/admins_custom_tabs.php b/admin/models/admins_custom_tabs.php index 918c5408b..e79220393 100644 --- a/admin/models/admins_custom_tabs.php +++ b/admin/models/admins_custom_tabs.php @@ -57,8 +57,15 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/admins_fields.php b/admin/models/admins_fields.php index 1ca8fbeba..e55d376e1 100644 --- a/admin/models/admins_fields.php +++ b/admin/models/admins_fields.php @@ -57,8 +57,15 @@ class ComponentbuilderModelAdmins_fields extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/admins_fields_conditions.php b/admin/models/admins_fields_conditions.php index a72e2ca2e..2ea69a40f 100644 --- a/admin/models/admins_fields_conditions.php +++ b/admin/models/admins_fields_conditions.php @@ -57,8 +57,15 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/admins_fields_relations.php b/admin/models/admins_fields_relations.php index 9bd570096..ac101022b 100644 --- a/admin/models/admins_fields_relations.php +++ b/admin/models/admins_fields_relations.php @@ -57,8 +57,15 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/class_extendings.php b/admin/models/class_extendings.php index 7f27ea83c..d34a6e84f 100644 --- a/admin/models/class_extendings.php +++ b/admin/models/class_extendings.php @@ -59,8 +59,15 @@ class ComponentbuilderModelClass_extendings extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -78,10 +85,18 @@ class ComponentbuilderModelClass_extendings extends JModelList $this->setState('filter.search', $search); $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); - $this->setState('filter.extension_type', $extension_type); + if ($formSubmited) + { + $extension_type = $app->input->post->get('extension_type'); + $this->setState('filter.extension_type', $extension_type); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index db4525561..38a6dfe5c 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -60,8 +60,15 @@ class ComponentbuilderModelClass_methods extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -79,13 +86,25 @@ class ComponentbuilderModelClass_methods extends JModelList $this->setState('filter.search', $search); $visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility'); - $this->setState('filter.visibility', $visibility); + if ($formSubmited) + { + $visibility = $app->input->post->get('visibility'); + $this->setState('filter.visibility', $visibility); + } $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); - $this->setState('filter.extension_type', $extension_type); + if ($formSubmited) + { + $extension_type = $app->input->post->get('extension_type'); + $this->setState('filter.extension_type', $extension_type); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index 8e2b85934..6eaa225f6 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -60,8 +60,15 @@ class ComponentbuilderModelClass_properties extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -79,13 +86,25 @@ class ComponentbuilderModelClass_properties extends JModelList $this->setState('filter.search', $search); $visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility'); - $this->setState('filter.visibility', $visibility); + if ($formSubmited) + { + $visibility = $app->input->post->get('visibility'); + $this->setState('filter.visibility', $visibility); + } $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); - $this->setState('filter.extension_type', $extension_type); + if ($formSubmited) + { + $extension_type = $app->input->post->get('extension_type'); + $this->setState('filter.extension_type', $extension_type); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/components_admin_views.php b/admin/models/components_admin_views.php index 6accc1b0c..0cf48fadd 100644 --- a/admin/models/components_admin_views.php +++ b/admin/models/components_admin_views.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_admin_views extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_config.php b/admin/models/components_config.php index ac1693e82..05834e3ec 100644 --- a/admin/models/components_config.php +++ b/admin/models/components_config.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_config extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_custom_admin_menus.php b/admin/models/components_custom_admin_menus.php index 706fdd4d8..c0cb22b26 100644 --- a/admin/models/components_custom_admin_menus.php +++ b/admin/models/components_custom_admin_menus.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_custom_admin_views.php b/admin/models/components_custom_admin_views.php index f59edcd26..6880647a7 100644 --- a/admin/models/components_custom_admin_views.php +++ b/admin/models/components_custom_admin_views.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_dashboard.php b/admin/models/components_dashboard.php index 4108f69f1..4a93f3043 100644 --- a/admin/models/components_dashboard.php +++ b/admin/models/components_dashboard.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_dashboard extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_files_folders.php b/admin/models/components_files_folders.php index 9dee8f0f8..88100176c 100644 --- a/admin/models/components_files_folders.php +++ b/admin/models/components_files_folders.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_files_folders extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_modules.php b/admin/models/components_modules.php index 404505fdd..dbaaeea92 100644 --- a/admin/models/components_modules.php +++ b/admin/models/components_modules.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_modules extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_mysql_tweaks.php b/admin/models/components_mysql_tweaks.php index 3d12771c1..9f0ff8646 100644 --- a/admin/models/components_mysql_tweaks.php +++ b/admin/models/components_mysql_tweaks.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_placeholders.php b/admin/models/components_placeholders.php index 94eb60770..ae5cdd222 100644 --- a/admin/models/components_placeholders.php +++ b/admin/models/components_placeholders.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_placeholders extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_plugins.php b/admin/models/components_plugins.php index dfaa4f074..654f2ff25 100644 --- a/admin/models/components_plugins.php +++ b/admin/models/components_plugins.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_plugins extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_site_views.php b/admin/models/components_site_views.php index 6ca160011..11024a95d 100644 --- a/admin/models/components_site_views.php +++ b/admin/models/components_site_views.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_site_views extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/components_updates.php b/admin/models/components_updates.php index c7582bcfd..99c9dfd75 100644 --- a/admin/models/components_updates.php +++ b/admin/models/components_updates.php @@ -57,8 +57,15 @@ class ComponentbuilderModelComponents_updates extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 2f529843a..0e44c6be2 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -63,8 +63,15 @@ class ComponentbuilderModelCustom_admin_views extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -82,22 +89,46 @@ class ComponentbuilderModelCustom_admin_views extends JModelList $this->setState('filter.search', $search); $main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get'); - $this->setState('filter.main_get', $main_get); + if ($formSubmited) + { + $main_get = $app->input->post->get('main_get'); + $this->setState('filter.main_get', $main_get); + } $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); - $this->setState('filter.add_php_ajax', $add_php_ajax); + if ($formSubmited) + { + $add_php_ajax = $app->input->post->get('add_php_ajax'); + $this->setState('filter.add_php_ajax', $add_php_ajax); + } $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); - $this->setState('filter.add_custom_button', $add_custom_button); + if ($formSubmited) + { + $add_custom_button = $app->input->post->get('add_custom_button'); + $this->setState('filter.add_custom_button', $add_custom_button); + } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); - $this->setState('filter.system_name', $system_name); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index edff310dc..9d3e88c00 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -62,8 +62,15 @@ class ComponentbuilderModelCustom_codes extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -81,19 +88,39 @@ class ComponentbuilderModelCustom_codes extends JModelList $this->setState('filter.search', $search); $component = $this->getUserStateFromRequest($this->context . '.filter.component', 'filter_component'); - $this->setState('filter.component', $component); + if ($formSubmited) + { + $component = $app->input->post->get('component'); + $this->setState('filter.component', $component); + } $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); - $this->setState('filter.target', $target); + if ($formSubmited) + { + $target = $app->input->post->get('target'); + $this->setState('filter.target', $target); + } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } $comment_type = $this->getUserStateFromRequest($this->context . '.filter.comment_type', 'filter_comment_type'); - $this->setState('filter.comment_type', $comment_type); + if ($formSubmited) + { + $comment_type = $app->input->post->get('comment_type'); + $this->setState('filter.comment_type', $comment_type); + } $path = $this->getUserStateFromRequest($this->context . '.filter.path', 'filter_path'); - $this->setState('filter.path', $path); + if ($formSubmited) + { + $path = $app->input->post->get('path'); + $this->setState('filter.path', $path); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 0c312b04e..a6d06820f 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -60,8 +60,15 @@ class ComponentbuilderModelDynamic_gets extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -79,13 +86,25 @@ class ComponentbuilderModelDynamic_gets extends JModelList $this->setState('filter.search', $search); $main_source = $this->getUserStateFromRequest($this->context . '.filter.main_source', 'filter_main_source'); - $this->setState('filter.main_source', $main_source); + if ($formSubmited) + { + $main_source = $app->input->post->get('main_source'); + $this->setState('filter.main_source', $main_source); + } $gettype = $this->getUserStateFromRequest($this->context . '.filter.gettype', 'filter_gettype'); - $this->setState('filter.gettype', $gettype); + if ($formSubmited) + { + $gettype = $app->input->post->get('gettype'); + $this->setState('filter.gettype', $gettype); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/fields.php b/admin/models/fields.php index d53e75fd2..734b7dadc 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -66,8 +66,15 @@ class ComponentbuilderModelFields extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -85,19 +92,39 @@ class ComponentbuilderModelFields extends JModelList $this->setState('filter.search', $search); $fieldtype = $this->getUserStateFromRequest($this->context . '.filter.fieldtype', 'filter_fieldtype'); - $this->setState('filter.fieldtype', $fieldtype); + if ($formSubmited) + { + $fieldtype = $app->input->post->get('fieldtype'); + $this->setState('filter.fieldtype', $fieldtype); + } $datatype = $this->getUserStateFromRequest($this->context . '.filter.datatype', 'filter_datatype'); - $this->setState('filter.datatype', $datatype); + if ($formSubmited) + { + $datatype = $app->input->post->get('datatype'); + $this->setState('filter.datatype', $datatype); + } $indexes = $this->getUserStateFromRequest($this->context . '.filter.indexes', 'filter_indexes'); - $this->setState('filter.indexes', $indexes); + if ($formSubmited) + { + $indexes = $app->input->post->get('indexes'); + $this->setState('filter.indexes', $indexes); + } $null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch'); - $this->setState('filter.null_switch', $null_switch); + if ($formSubmited) + { + $null_switch = $app->input->post->get('null_switch'); + $this->setState('filter.null_switch', $null_switch); + } $store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store'); - $this->setState('filter.store', $store); + if ($formSubmited) + { + $store = $app->input->post->get('store'); + $this->setState('filter.store', $store); + } $category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category'); $this->setState('filter.category', $category); @@ -106,10 +133,18 @@ class ComponentbuilderModelFields extends JModelList $this->setState('filter.category_id', $categoryId); $catid = $this->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); - $this->setState('filter.catid', $catid); + if ($formSubmited) + { + $catid = $app->input->post->get('catid'); + $this->setState('filter.catid', $catid); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/fields/adminviewsfilteraddcustombutton.php b/admin/models/fields/adminviewsfilteraddcustombutton.php new file mode 100644 index 000000000..1bce36980 --- /dev/null +++ b/admin/models/fields/adminviewsfilteraddcustombutton.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsfilteraddcustombutton Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList +{ + /** + * The adminviewsfilteraddcustombutton field type. + * + * @var string + */ + public $type = 'adminviewsfilteraddcustombutton'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_custom_button')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_custom_button') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get admin_viewsmodel + $model = ComponentbuilderHelper::getModel('admin_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); + foreach ($results as $add_custom_button) + { + // Translate the add_custom_button selection + $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); + // Now add the add_custom_button and its text to the options array + $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/adminviewsfilteraddcustomimport.php b/admin/models/fields/adminviewsfilteraddcustomimport.php new file mode 100644 index 000000000..87e61454c --- /dev/null +++ b/admin/models/fields/adminviewsfilteraddcustomimport.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsfilteraddcustomimport Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList +{ + /** + * The adminviewsfilteraddcustomimport field type. + * + * @var string + */ + public $type = 'adminviewsfilteraddcustomimport'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_custom_import')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_custom_import') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get admin_viewsmodel + $model = ComponentbuilderHelper::getModel('admin_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -'); + foreach ($results as $add_custom_import) + { + // Translate the add_custom_import selection + $text = $model->selectionTranslation($add_custom_import,'add_custom_import'); + // Now add the add_custom_import and its text to the options array + $_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/adminviewsfilteraddfadein.php b/admin/models/fields/adminviewsfilteraddfadein.php new file mode 100644 index 000000000..d6d673f01 --- /dev/null +++ b/admin/models/fields/adminviewsfilteraddfadein.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsfilteraddfadein Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList +{ + /** + * The adminviewsfilteraddfadein field type. + * + * @var string + */ + public $type = 'adminviewsfilteraddfadein'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_fadein')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_fadein') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get admin_viewsmodel + $model = ComponentbuilderHelper::getModel('admin_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -'); + foreach ($results as $add_fadein) + { + // Translate the add_fadein selection + $text = $model->selectionTranslation($add_fadein,'add_fadein'); + // Now add the add_fadein and its text to the options array + $_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/adminviewsfilteraddphpajax.php b/admin/models/fields/adminviewsfilteraddphpajax.php new file mode 100644 index 000000000..d05e413a3 --- /dev/null +++ b/admin/models/fields/adminviewsfilteraddphpajax.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsfilteraddphpajax Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList +{ + /** + * The adminviewsfilteraddphpajax field type. + * + * @var string + */ + public $type = 'adminviewsfilteraddphpajax'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_php_ajax')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_php_ajax') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get admin_viewsmodel + $model = ComponentbuilderHelper::getModel('admin_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); + foreach ($results as $add_php_ajax) + { + // Translate the add_php_ajax selection + $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); + // Now add the add_php_ajax and its text to the options array + $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/adminviewsfiltertype.php b/admin/models/fields/adminviewsfiltertype.php new file mode 100644 index 000000000..75f995a3d --- /dev/null +++ b/admin/models/fields/adminviewsfiltertype.php @@ -0,0 +1,71 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminviewsfiltertype Form Field class for the Componentbuilder component + */ +class JFormFieldAdminviewsfiltertype extends JFormFieldList +{ + /** + * The adminviewsfiltertype field type. + * + * @var string + */ + public $type = 'adminviewsfiltertype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get admin_viewsmodel + $model = ComponentbuilderHelper::getModel('admin_views'); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/classextendingsfilterextensiontype.php b/admin/models/fields/classextendingsfilterextensiontype.php new file mode 100644 index 000000000..8a89da556 --- /dev/null +++ b/admin/models/fields/classextendingsfilterextensiontype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classextendingsfilterextensiontype Form Field class for the Componentbuilder component + */ +class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList +{ + /** + * The classextendingsfilterextensiontype field type. + * + * @var string + */ + public $type = 'classextendingsfilterextensiontype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('extension_type')); + $query->from($db->quoteName('#__componentbuilder_class_extends')); + $query->order($db->quoteName('extension_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get class_extendingsmodel + $model = ComponentbuilderHelper::getModel('class_extendings'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); + foreach ($results as $extension_type) + { + // Translate the extension_type selection + $text = $model->selectionTranslation($extension_type,'extension_type'); + // Now add the extension_type and its text to the options array + $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/classmethodsfilterextensiontype.php b/admin/models/fields/classmethodsfilterextensiontype.php new file mode 100644 index 000000000..dc1e827be --- /dev/null +++ b/admin/models/fields/classmethodsfilterextensiontype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classmethodsfilterextensiontype Form Field class for the Componentbuilder component + */ +class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList +{ + /** + * The classmethodsfilterextensiontype field type. + * + * @var string + */ + public $type = 'classmethodsfilterextensiontype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('extension_type')); + $query->from($db->quoteName('#__componentbuilder_class_method')); + $query->order($db->quoteName('extension_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get class_methodsmodel + $model = ComponentbuilderHelper::getModel('class_methods'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); + foreach ($results as $extension_type) + { + // Translate the extension_type selection + $text = $model->selectionTranslation($extension_type,'extension_type'); + // Now add the extension_type and its text to the options array + $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/classmethodsfiltervisibility.php b/admin/models/fields/classmethodsfiltervisibility.php new file mode 100644 index 000000000..6f3937849 --- /dev/null +++ b/admin/models/fields/classmethodsfiltervisibility.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classmethodsfiltervisibility Form Field class for the Componentbuilder component + */ +class JFormFieldClassmethodsfiltervisibility extends JFormFieldList +{ + /** + * The classmethodsfiltervisibility field type. + * + * @var string + */ + public $type = 'classmethodsfiltervisibility'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('visibility')); + $query->from($db->quoteName('#__componentbuilder_class_method')); + $query->order($db->quoteName('visibility') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get class_methodsmodel + $model = ComponentbuilderHelper::getModel('class_methods'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -'); + foreach ($results as $visibility) + { + // Translate the visibility selection + $text = $model->selectionTranslation($visibility,'visibility'); + // Now add the visibility and its text to the options array + $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/classpropertiesfilterextensiontype.php b/admin/models/fields/classpropertiesfilterextensiontype.php new file mode 100644 index 000000000..543cce231 --- /dev/null +++ b/admin/models/fields/classpropertiesfilterextensiontype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classpropertiesfilterextensiontype Form Field class for the Componentbuilder component + */ +class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList +{ + /** + * The classpropertiesfilterextensiontype field type. + * + * @var string + */ + public $type = 'classpropertiesfilterextensiontype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('extension_type')); + $query->from($db->quoteName('#__componentbuilder_class_property')); + $query->order($db->quoteName('extension_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get class_propertiesmodel + $model = ComponentbuilderHelper::getModel('class_properties'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -'); + foreach ($results as $extension_type) + { + // Translate the extension_type selection + $text = $model->selectionTranslation($extension_type,'extension_type'); + // Now add the extension_type and its text to the options array + $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/classpropertiesfiltervisibility.php b/admin/models/fields/classpropertiesfiltervisibility.php new file mode 100644 index 000000000..354ec431d --- /dev/null +++ b/admin/models/fields/classpropertiesfiltervisibility.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classpropertiesfiltervisibility Form Field class for the Componentbuilder component + */ +class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList +{ + /** + * The classpropertiesfiltervisibility field type. + * + * @var string + */ + public $type = 'classpropertiesfiltervisibility'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('visibility')); + $query->from($db->quoteName('#__componentbuilder_class_property')); + $query->order($db->quoteName('visibility') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get class_propertiesmodel + $model = ComponentbuilderHelper::getModel('class_properties'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -'); + foreach ($results as $visibility) + { + // Translate the visibility selection + $text = $model->selectionTranslation($visibility,'visibility'); + // Now add the visibility and its text to the options array + $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/customadminviewsfilteraddcustombutton.php b/admin/models/fields/customadminviewsfilteraddcustombutton.php new file mode 100644 index 000000000..eface73ee --- /dev/null +++ b/admin/models/fields/customadminviewsfilteraddcustombutton.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Customadminviewsfilteraddcustombutton Form Field class for the Componentbuilder component + */ +class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList +{ + /** + * The customadminviewsfilteraddcustombutton field type. + * + * @var string + */ + public $type = 'customadminviewsfilteraddcustombutton'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_custom_button')); + $query->from($db->quoteName('#__componentbuilder_custom_admin_view')); + $query->order($db->quoteName('add_custom_button') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get custom_admin_viewsmodel + $model = ComponentbuilderHelper::getModel('custom_admin_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); + foreach ($results as $add_custom_button) + { + // Translate the add_custom_button selection + $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); + // Now add the add_custom_button and its text to the options array + $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/customadminviewsfilteraddphpajax.php b/admin/models/fields/customadminviewsfilteraddphpajax.php new file mode 100644 index 000000000..adfe747f8 --- /dev/null +++ b/admin/models/fields/customadminviewsfilteraddphpajax.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Customadminviewsfilteraddphpajax Form Field class for the Componentbuilder component + */ +class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList +{ + /** + * The customadminviewsfilteraddphpajax field type. + * + * @var string + */ + public $type = 'customadminviewsfilteraddphpajax'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_php_ajax')); + $query->from($db->quoteName('#__componentbuilder_custom_admin_view')); + $query->order($db->quoteName('add_php_ajax') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get custom_admin_viewsmodel + $model = ComponentbuilderHelper::getModel('custom_admin_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); + foreach ($results as $add_php_ajax) + { + // Translate the add_php_ajax selection + $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); + // Now add the add_php_ajax and its text to the options array + $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/customcodesfiltercommenttype.php b/admin/models/fields/customcodesfiltercommenttype.php new file mode 100644 index 000000000..26af81b2f --- /dev/null +++ b/admin/models/fields/customcodesfiltercommenttype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Customcodesfiltercommenttype Form Field class for the Componentbuilder component + */ +class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList +{ + /** + * The customcodesfiltercommenttype field type. + * + * @var string + */ + public $type = 'customcodesfiltercommenttype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('comment_type')); + $query->from($db->quoteName('#__componentbuilder_custom_code')); + $query->order($db->quoteName('comment_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get custom_codesmodel + $model = ComponentbuilderHelper::getModel('custom_codes'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -'); + foreach ($results as $comment_type) + { + // Translate the comment_type selection + $text = $model->selectionTranslation($comment_type,'comment_type'); + // Now add the comment_type and its text to the options array + $_filter[] = JHtml::_('select.option', $comment_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/customcodesfiltertarget.php b/admin/models/fields/customcodesfiltertarget.php new file mode 100644 index 000000000..605d37176 --- /dev/null +++ b/admin/models/fields/customcodesfiltertarget.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Customcodesfiltertarget Form Field class for the Componentbuilder component + */ +class JFormFieldCustomcodesfiltertarget extends JFormFieldList +{ + /** + * The customcodesfiltertarget field type. + * + * @var string + */ + public $type = 'customcodesfiltertarget'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('target')); + $query->from($db->quoteName('#__componentbuilder_custom_code')); + $query->order($db->quoteName('target') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get custom_codesmodel + $model = ComponentbuilderHelper::getModel('custom_codes'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); + foreach ($results as $target) + { + // Translate the target selection + $text = $model->selectionTranslation($target,'target'); + // Now add the target and its text to the options array + $_filter[] = JHtml::_('select.option', $target, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/customcodesfiltertype.php b/admin/models/fields/customcodesfiltertype.php new file mode 100644 index 000000000..573a6466f --- /dev/null +++ b/admin/models/fields/customcodesfiltertype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Customcodesfiltertype Form Field class for the Componentbuilder component + */ +class JFormFieldCustomcodesfiltertype extends JFormFieldList +{ + /** + * The customcodesfiltertype field type. + * + * @var string + */ + public $type = 'customcodesfiltertype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_custom_code')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get custom_codesmodel + $model = ComponentbuilderHelper::getModel('custom_codes'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/dynamicgetsfiltergettype.php b/admin/models/fields/dynamicgetsfiltergettype.php new file mode 100644 index 000000000..171343be2 --- /dev/null +++ b/admin/models/fields/dynamicgetsfiltergettype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Dynamicgetsfiltergettype Form Field class for the Componentbuilder component + */ +class JFormFieldDynamicgetsfiltergettype extends JFormFieldList +{ + /** + * The dynamicgetsfiltergettype field type. + * + * @var string + */ + public $type = 'dynamicgetsfiltergettype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('gettype')); + $query->from($db->quoteName('#__componentbuilder_dynamic_get')); + $query->order($db->quoteName('gettype') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get dynamic_getsmodel + $model = ComponentbuilderHelper::getModel('dynamic_gets'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -'); + foreach ($results as $gettype) + { + // Translate the gettype selection + $text = $model->selectionTranslation($gettype,'gettype'); + // Now add the gettype and its text to the options array + $_filter[] = JHtml::_('select.option', $gettype, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/dynamicgetsfiltermainsource.php b/admin/models/fields/dynamicgetsfiltermainsource.php new file mode 100644 index 000000000..4d16def53 --- /dev/null +++ b/admin/models/fields/dynamicgetsfiltermainsource.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Dynamicgetsfiltermainsource Form Field class for the Componentbuilder component + */ +class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList +{ + /** + * The dynamicgetsfiltermainsource field type. + * + * @var string + */ + public $type = 'dynamicgetsfiltermainsource'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('main_source')); + $query->from($db->quoteName('#__componentbuilder_dynamic_get')); + $query->order($db->quoteName('main_source') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get dynamic_getsmodel + $model = ComponentbuilderHelper::getModel('dynamic_gets'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -'); + foreach ($results as $main_source) + { + // Translate the main_source selection + $text = $model->selectionTranslation($main_source,'main_source'); + // Now add the main_source and its text to the options array + $_filter[] = JHtml::_('select.option', $main_source, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/fieldsfilterdatatype.php b/admin/models/fields/fieldsfilterdatatype.php new file mode 100644 index 000000000..894a13e89 --- /dev/null +++ b/admin/models/fields/fieldsfilterdatatype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Fieldsfilterdatatype Form Field class for the Componentbuilder component + */ +class JFormFieldFieldsfilterdatatype extends JFormFieldList +{ + /** + * The fieldsfilterdatatype field type. + * + * @var string + */ + public $type = 'fieldsfilterdatatype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('datatype')); + $query->from($db->quoteName('#__componentbuilder_field')); + $query->order($db->quoteName('datatype') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get fieldsmodel + $model = ComponentbuilderHelper::getModel('fields'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -'); + foreach ($results as $datatype) + { + // Translate the datatype selection + $text = $model->selectionTranslation($datatype,'datatype'); + // Now add the datatype and its text to the options array + $_filter[] = JHtml::_('select.option', $datatype, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/fieldsfilterindexes.php b/admin/models/fields/fieldsfilterindexes.php new file mode 100644 index 000000000..c187c8891 --- /dev/null +++ b/admin/models/fields/fieldsfilterindexes.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Fieldsfilterindexes Form Field class for the Componentbuilder component + */ +class JFormFieldFieldsfilterindexes extends JFormFieldList +{ + /** + * The fieldsfilterindexes field type. + * + * @var string + */ + public $type = 'fieldsfilterindexes'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('indexes')); + $query->from($db->quoteName('#__componentbuilder_field')); + $query->order($db->quoteName('indexes') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get fieldsmodel + $model = ComponentbuilderHelper::getModel('fields'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -'); + foreach ($results as $indexes) + { + // Translate the indexes selection + $text = $model->selectionTranslation($indexes,'indexes'); + // Now add the indexes and its text to the options array + $_filter[] = JHtml::_('select.option', $indexes, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/fieldsfilternullswitch.php b/admin/models/fields/fieldsfilternullswitch.php new file mode 100644 index 000000000..43e3f2f8d --- /dev/null +++ b/admin/models/fields/fieldsfilternullswitch.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Fieldsfilternullswitch Form Field class for the Componentbuilder component + */ +class JFormFieldFieldsfilternullswitch extends JFormFieldList +{ + /** + * The fieldsfilternullswitch field type. + * + * @var string + */ + public $type = 'fieldsfilternullswitch'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('null_switch')); + $query->from($db->quoteName('#__componentbuilder_field')); + $query->order($db->quoteName('null_switch') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get fieldsmodel + $model = ComponentbuilderHelper::getModel('fields'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -'); + foreach ($results as $null_switch) + { + // Translate the null_switch selection + $text = $model->selectionTranslation($null_switch,'null_switch'); + // Now add the null_switch and its text to the options array + $_filter[] = JHtml::_('select.option', $null_switch, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/fieldsfilterstore.php b/admin/models/fields/fieldsfilterstore.php new file mode 100644 index 000000000..f94685398 --- /dev/null +++ b/admin/models/fields/fieldsfilterstore.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Fieldsfilterstore Form Field class for the Componentbuilder component + */ +class JFormFieldFieldsfilterstore extends JFormFieldList +{ + /** + * The fieldsfilterstore field type. + * + * @var string + */ + public $type = 'fieldsfilterstore'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('store')); + $query->from($db->quoteName('#__componentbuilder_field')); + $query->order($db->quoteName('store') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get fieldsmodel + $model = ComponentbuilderHelper::getModel('fields'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -'); + foreach ($results as $store) + { + // Translate the store selection + $text = $model->selectionTranslation($store,'store'); + // Now add the store and its text to the options array + $_filter[] = JHtml::_('select.option', $store, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/helpdocumentsfilterlocation.php b/admin/models/fields/helpdocumentsfilterlocation.php new file mode 100644 index 000000000..20c42c2df --- /dev/null +++ b/admin/models/fields/helpdocumentsfilterlocation.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Helpdocumentsfilterlocation Form Field class for the Componentbuilder component + */ +class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList +{ + /** + * The helpdocumentsfilterlocation field type. + * + * @var string + */ + public $type = 'helpdocumentsfilterlocation'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('location')); + $query->from($db->quoteName('#__componentbuilder_help_document')); + $query->order($db->quoteName('location') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get help_documentsmodel + $model = ComponentbuilderHelper::getModel('help_documents'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -'); + foreach ($results as $location) + { + // Translate the location selection + $text = $model->selectionTranslation($location,'location'); + // Now add the location and its text to the options array + $_filter[] = JHtml::_('select.option', $location, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/helpdocumentsfiltertype.php b/admin/models/fields/helpdocumentsfiltertype.php new file mode 100644 index 000000000..3d43e3f44 --- /dev/null +++ b/admin/models/fields/helpdocumentsfiltertype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Helpdocumentsfiltertype Form Field class for the Componentbuilder component + */ +class JFormFieldHelpdocumentsfiltertype extends JFormFieldList +{ + /** + * The helpdocumentsfiltertype field type. + * + * @var string + */ + public $type = 'helpdocumentsfiltertype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_help_document')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get help_documentsmodel + $model = ComponentbuilderHelper::getModel('help_documents'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/joomlacomponentsfilterauthor.php b/admin/models/fields/joomlacomponentsfilterauthor.php new file mode 100644 index 000000000..3975831b9 --- /dev/null +++ b/admin/models/fields/joomlacomponentsfilterauthor.php @@ -0,0 +1,68 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Joomlacomponentsfilterauthor Form Field class for the Componentbuilder component + */ +class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList +{ + /** + * The joomlacomponentsfilterauthor field type. + * + * @var string + */ + public $type = 'joomlacomponentsfilterauthor'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('author')); + $query->from($db->quoteName('#__componentbuilder_joomla_component')); + $query->order($db->quoteName('author') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -'); + foreach ($results as $author) + { + // Now add the author and its text to the options array + $_filter[] = JHtml::_('select.option', $author, $author); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/joomlacomponentsfiltercompanyname.php b/admin/models/fields/joomlacomponentsfiltercompanyname.php new file mode 100644 index 000000000..932d7aa82 --- /dev/null +++ b/admin/models/fields/joomlacomponentsfiltercompanyname.php @@ -0,0 +1,68 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Joomlacomponentsfiltercompanyname Form Field class for the Componentbuilder component + */ +class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList +{ + /** + * The joomlacomponentsfiltercompanyname field type. + * + * @var string + */ + public $type = 'joomlacomponentsfiltercompanyname'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('companyname')); + $query->from($db->quoteName('#__componentbuilder_joomla_component')); + $query->order($db->quoteName('companyname') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -'); + foreach ($results as $companyname) + { + // Now add the companyname and its text to the options array + $_filter[] = JHtml::_('select.option', $companyname, $companyname); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/joomlamodulesfiltertarget.php b/admin/models/fields/joomlamodulesfiltertarget.php new file mode 100644 index 000000000..6cba43f71 --- /dev/null +++ b/admin/models/fields/joomlamodulesfiltertarget.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Joomlamodulesfiltertarget Form Field class for the Componentbuilder component + */ +class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList +{ + /** + * The joomlamodulesfiltertarget field type. + * + * @var string + */ + public $type = 'joomlamodulesfiltertarget'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('target')); + $query->from($db->quoteName('#__componentbuilder_joomla_module')); + $query->order($db->quoteName('target') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get joomla_modulesmodel + $model = ComponentbuilderHelper::getModel('joomla_modules'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); + foreach ($results as $target) + { + // Translate the target selection + $text = $model->selectionTranslation($target,'target'); + // Now add the target and its text to the options array + $_filter[] = JHtml::_('select.option', $target, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/layoutsfilteraddphpview.php b/admin/models/fields/layoutsfilteraddphpview.php new file mode 100644 index 000000000..6837653db --- /dev/null +++ b/admin/models/fields/layoutsfilteraddphpview.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Layoutsfilteraddphpview Form Field class for the Componentbuilder component + */ +class JFormFieldLayoutsfilteraddphpview extends JFormFieldList +{ + /** + * The layoutsfilteraddphpview field type. + * + * @var string + */ + public $type = 'layoutsfilteraddphpview'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_php_view')); + $query->from($db->quoteName('#__componentbuilder_layout')); + $query->order($db->quoteName('add_php_view') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get layoutsmodel + $model = ComponentbuilderHelper::getModel('layouts'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -'); + foreach ($results as $add_php_view) + { + // Translate the add_php_view selection + $text = $model->selectionTranslation($add_php_view,'add_php_view'); + // Now add the add_php_view and its text to the options array + $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/librariesfiltertarget.php b/admin/models/fields/librariesfiltertarget.php new file mode 100644 index 000000000..7032f8890 --- /dev/null +++ b/admin/models/fields/librariesfiltertarget.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Librariesfiltertarget Form Field class for the Componentbuilder component + */ +class JFormFieldLibrariesfiltertarget extends JFormFieldList +{ + /** + * The librariesfiltertarget field type. + * + * @var string + */ + public $type = 'librariesfiltertarget'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('target')); + $query->from($db->quoteName('#__componentbuilder_library')); + $query->order($db->quoteName('target') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get librariesmodel + $model = ComponentbuilderHelper::getModel('libraries'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -'); + foreach ($results as $target) + { + // Translate the target selection + $text = $model->selectionTranslation($target,'target'); + // Now add the target and its text to the options array + $_filter[] = JHtml::_('select.option', $target, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/librariesfiltertype.php b/admin/models/fields/librariesfiltertype.php new file mode 100644 index 000000000..5a85e5b14 --- /dev/null +++ b/admin/models/fields/librariesfiltertype.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Librariesfiltertype Form Field class for the Componentbuilder component + */ +class JFormFieldLibrariesfiltertype extends JFormFieldList +{ + /** + * The librariesfiltertype field type. + * + * @var string + */ + public $type = 'librariesfiltertype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_library')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get librariesmodel + $model = ComponentbuilderHelper::getModel('libraries'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -'); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/serversfiltername.php b/admin/models/fields/serversfiltername.php new file mode 100644 index 000000000..f56c942e2 --- /dev/null +++ b/admin/models/fields/serversfiltername.php @@ -0,0 +1,68 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Serversfiltername Form Field class for the Componentbuilder component + */ +class JFormFieldServersfiltername extends JFormFieldList +{ + /** + * The serversfiltername field type. + * + * @var string + */ + public $type = 'serversfiltername'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('name')); + $query->from($db->quoteName('#__componentbuilder_server')); + $query->order($db->quoteName('name') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -'); + foreach ($results as $name) + { + // Now add the name and its text to the options array + $_filter[] = JHtml::_('select.option', $name, $name); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/serversfilterprotocol.php b/admin/models/fields/serversfilterprotocol.php new file mode 100644 index 000000000..b097e393b --- /dev/null +++ b/admin/models/fields/serversfilterprotocol.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Serversfilterprotocol Form Field class for the Componentbuilder component + */ +class JFormFieldServersfilterprotocol extends JFormFieldList +{ + /** + * The serversfilterprotocol field type. + * + * @var string + */ + public $type = 'serversfilterprotocol'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('protocol')); + $query->from($db->quoteName('#__componentbuilder_server')); + $query->order($db->quoteName('protocol') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get serversmodel + $model = ComponentbuilderHelper::getModel('servers'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -'); + foreach ($results as $protocol) + { + // Translate the protocol selection + $text = $model->selectionTranslation($protocol,'protocol'); + // Now add the protocol and its text to the options array + $_filter[] = JHtml::_('select.option', $protocol, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/siteviewsfilteraddcustombutton.php b/admin/models/fields/siteviewsfilteraddcustombutton.php new file mode 100644 index 000000000..584b1886a --- /dev/null +++ b/admin/models/fields/siteviewsfilteraddcustombutton.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Siteviewsfilteraddcustombutton Form Field class for the Componentbuilder component + */ +class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList +{ + /** + * The siteviewsfilteraddcustombutton field type. + * + * @var string + */ + public $type = 'siteviewsfilteraddcustombutton'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_custom_button')); + $query->from($db->quoteName('#__componentbuilder_site_view')); + $query->order($db->quoteName('add_custom_button') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get site_viewsmodel + $model = ComponentbuilderHelper::getModel('site_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -'); + foreach ($results as $add_custom_button) + { + // Translate the add_custom_button selection + $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); + // Now add the add_custom_button and its text to the options array + $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/siteviewsfilteraddphpajax.php b/admin/models/fields/siteviewsfilteraddphpajax.php new file mode 100644 index 000000000..0260ca22e --- /dev/null +++ b/admin/models/fields/siteviewsfilteraddphpajax.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Siteviewsfilteraddphpajax Form Field class for the Componentbuilder component + */ +class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList +{ + /** + * The siteviewsfilteraddphpajax field type. + * + * @var string + */ + public $type = 'siteviewsfilteraddphpajax'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_php_ajax')); + $query->from($db->quoteName('#__componentbuilder_site_view')); + $query->order($db->quoteName('add_php_ajax') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get site_viewsmodel + $model = ComponentbuilderHelper::getModel('site_views'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -'); + foreach ($results as $add_php_ajax) + { + // Translate the add_php_ajax selection + $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); + // Now add the add_php_ajax and its text to the options array + $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/templatesfilteraddphpview.php b/admin/models/fields/templatesfilteraddphpview.php new file mode 100644 index 000000000..441b0408e --- /dev/null +++ b/admin/models/fields/templatesfilteraddphpview.php @@ -0,0 +1,72 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Templatesfilteraddphpview Form Field class for the Componentbuilder component + */ +class JFormFieldTemplatesfilteraddphpview extends JFormFieldList +{ + /** + * The templatesfilteraddphpview field type. + * + * @var string + */ + public $type = 'templatesfilteraddphpview'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_php_view')); + $query->from($db->quoteName('#__componentbuilder_template')); + $query->order($db->quoteName('add_php_view') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get templatesmodel + $model = ComponentbuilderHelper::getModel('templates'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -'); + foreach ($results as $add_php_view) + { + // Translate the add_php_view selection + $text = $model->selectionTranslation($add_php_view,'add_php_view'); + // Now add the add_php_view and its text to the options array + $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index ca610db2d..9cb909ac5 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -62,8 +62,15 @@ class ComponentbuilderModelFieldtypes extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -87,13 +94,25 @@ class ComponentbuilderModelFieldtypes extends JModelList $this->setState('filter.category_id', $categoryId); $catid = $this->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); - $this->setState('filter.catid', $catid); + if ($formSubmited) + { + $catid = $app->input->post->get('catid'); + $this->setState('filter.catid', $catid); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); - $this->setState('filter.short_description', $short_description); + if ($formSubmited) + { + $short_description = $app->input->post->get('short_description'); + $this->setState('filter.short_description', $short_description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/forms/filter_admin_views.xml b/admin/models/forms/filter_admin_views.xml new file mode 100644 index 000000000..fbb390c83 --- /dev/null +++ b/admin/models/forms/filter_admin_views.xml @@ -0,0 +1,107 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_admins_custom_tabs.xml b/admin/models/forms/filter_admins_custom_tabs.xml new file mode 100644 index 000000000..2b55a6e88 --- /dev/null +++ b/admin/models/forms/filter_admins_custom_tabs.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_admins_fields.xml b/admin/models/forms/filter_admins_fields.xml new file mode 100644 index 000000000..6411451e9 --- /dev/null +++ b/admin/models/forms/filter_admins_fields.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_admins_fields_conditions.xml b/admin/models/forms/filter_admins_fields_conditions.xml new file mode 100644 index 000000000..d9b7415c2 --- /dev/null +++ b/admin/models/forms/filter_admins_fields_conditions.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_admins_fields_relations.xml b/admin/models/forms/filter_admins_fields_relations.xml new file mode 100644 index 000000000..e0d7edb13 --- /dev/null +++ b/admin/models/forms/filter_admins_fields_relations.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_class_extendings.xml b/admin/models/forms/filter_class_extendings.xml new file mode 100644 index 000000000..47a7e8268 --- /dev/null +++ b/admin/models/forms/filter_class_extendings.xml @@ -0,0 +1,76 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_class_methods.xml b/admin/models/forms/filter_class_methods.xml new file mode 100644 index 000000000..a77f4e808 --- /dev/null +++ b/admin/models/forms/filter_class_methods.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_class_properties.xml b/admin/models/forms/filter_class_properties.xml new file mode 100644 index 000000000..5ae2f1d79 --- /dev/null +++ b/admin/models/forms/filter_class_properties.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_admin_views.xml b/admin/models/forms/filter_components_admin_views.xml new file mode 100644 index 000000000..eb293e63a --- /dev/null +++ b/admin/models/forms/filter_components_admin_views.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_config.xml b/admin/models/forms/filter_components_config.xml new file mode 100644 index 000000000..8db6c6364 --- /dev/null +++ b/admin/models/forms/filter_components_config.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_custom_admin_menus.xml b/admin/models/forms/filter_components_custom_admin_menus.xml new file mode 100644 index 000000000..9c8d34f21 --- /dev/null +++ b/admin/models/forms/filter_components_custom_admin_menus.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_custom_admin_views.xml b/admin/models/forms/filter_components_custom_admin_views.xml new file mode 100644 index 000000000..9d544c496 --- /dev/null +++ b/admin/models/forms/filter_components_custom_admin_views.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_dashboard.xml b/admin/models/forms/filter_components_dashboard.xml new file mode 100644 index 000000000..a46720a43 --- /dev/null +++ b/admin/models/forms/filter_components_dashboard.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_files_folders.xml b/admin/models/forms/filter_components_files_folders.xml new file mode 100644 index 000000000..48adf987a --- /dev/null +++ b/admin/models/forms/filter_components_files_folders.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_modules.xml b/admin/models/forms/filter_components_modules.xml new file mode 100644 index 000000000..1e546dc2f --- /dev/null +++ b/admin/models/forms/filter_components_modules.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_mysql_tweaks.xml b/admin/models/forms/filter_components_mysql_tweaks.xml new file mode 100644 index 000000000..6129b42a7 --- /dev/null +++ b/admin/models/forms/filter_components_mysql_tweaks.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_placeholders.xml b/admin/models/forms/filter_components_placeholders.xml new file mode 100644 index 000000000..22d6ee656 --- /dev/null +++ b/admin/models/forms/filter_components_placeholders.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_plugins.xml b/admin/models/forms/filter_components_plugins.xml new file mode 100644 index 000000000..88c0cb397 --- /dev/null +++ b/admin/models/forms/filter_components_plugins.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_site_views.xml b/admin/models/forms/filter_components_site_views.xml new file mode 100644 index 000000000..85624d045 --- /dev/null +++ b/admin/models/forms/filter_components_site_views.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_components_updates.xml b/admin/models/forms/filter_components_updates.xml new file mode 100644 index 000000000..42268e30e --- /dev/null +++ b/admin/models/forms/filter_components_updates.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_custom_admin_views.xml b/admin/models/forms/filter_custom_admin_views.xml new file mode 100644 index 000000000..c71190273 --- /dev/null +++ b/admin/models/forms/filter_custom_admin_views.xml @@ -0,0 +1,94 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_custom_codes.xml b/admin/models/forms/filter_custom_codes.xml new file mode 100644 index 000000000..2039ecd87 --- /dev/null +++ b/admin/models/forms/filter_custom_codes.xml @@ -0,0 +1,103 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_dynamic_gets.xml b/admin/models/forms/filter_dynamic_gets.xml new file mode 100644 index 000000000..e16ff1597 --- /dev/null +++ b/admin/models/forms/filter_dynamic_gets.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_fields.xml b/admin/models/forms/filter_fields.xml new file mode 100644 index 000000000..aa2329fb2 --- /dev/null +++ b/admin/models/forms/filter_fields.xml @@ -0,0 +1,125 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_fieldtypes.xml b/admin/models/forms/filter_fieldtypes.xml new file mode 100644 index 000000000..8586b1bdb --- /dev/null +++ b/admin/models/forms/filter_fieldtypes.xml @@ -0,0 +1,82 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_help_documents.xml b/admin/models/forms/filter_help_documents.xml new file mode 100644 index 000000000..f93806abc --- /dev/null +++ b/admin/models/forms/filter_help_documents.xml @@ -0,0 +1,94 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_components.xml b/admin/models/forms/filter_joomla_components.xml new file mode 100644 index 000000000..c9511c33f --- /dev/null +++ b/admin/models/forms/filter_joomla_components.xml @@ -0,0 +1,87 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_modules.xml b/admin/models/forms/filter_joomla_modules.xml new file mode 100644 index 000000000..e560ba4e9 --- /dev/null +++ b/admin/models/forms/filter_joomla_modules.xml @@ -0,0 +1,76 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_modules_files_folders_urls.xml b/admin/models/forms/filter_joomla_modules_files_folders_urls.xml new file mode 100644 index 000000000..cab6c16b6 --- /dev/null +++ b/admin/models/forms/filter_joomla_modules_files_folders_urls.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_modules_updates.xml b/admin/models/forms/filter_joomla_modules_updates.xml new file mode 100644 index 000000000..957f4448e --- /dev/null +++ b/admin/models/forms/filter_joomla_modules_updates.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_plugin_groups.xml b/admin/models/forms/filter_joomla_plugin_groups.xml new file mode 100644 index 000000000..e81d622ac --- /dev/null +++ b/admin/models/forms/filter_joomla_plugin_groups.xml @@ -0,0 +1,76 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_plugins.xml b/admin/models/forms/filter_joomla_plugins.xml new file mode 100644 index 000000000..26e38a2b6 --- /dev/null +++ b/admin/models/forms/filter_joomla_plugins.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_plugins_files_folders_urls.xml b/admin/models/forms/filter_joomla_plugins_files_folders_urls.xml new file mode 100644 index 000000000..c8557b8f0 --- /dev/null +++ b/admin/models/forms/filter_joomla_plugins_files_folders_urls.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_plugins_updates.xml b/admin/models/forms/filter_joomla_plugins_updates.xml new file mode 100644 index 000000000..9935d595b --- /dev/null +++ b/admin/models/forms/filter_joomla_plugins_updates.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_language_translations.xml b/admin/models/forms/filter_language_translations.xml new file mode 100644 index 000000000..b1ba97812 --- /dev/null +++ b/admin/models/forms/filter_language_translations.xml @@ -0,0 +1,67 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_languages.xml b/admin/models/forms/filter_languages.xml new file mode 100644 index 000000000..fb8a30b5a --- /dev/null +++ b/admin/models/forms/filter_languages.xml @@ -0,0 +1,69 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_layouts.xml b/admin/models/forms/filter_layouts.xml new file mode 100644 index 000000000..abd4ebee5 --- /dev/null +++ b/admin/models/forms/filter_layouts.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_libraries.xml b/admin/models/forms/filter_libraries.xml new file mode 100644 index 000000000..c7fec9af5 --- /dev/null +++ b/admin/models/forms/filter_libraries.xml @@ -0,0 +1,94 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_libraries_config.xml b/admin/models/forms/filter_libraries_config.xml new file mode 100644 index 000000000..0454c4040 --- /dev/null +++ b/admin/models/forms/filter_libraries_config.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_libraries_files_folders_urls.xml b/admin/models/forms/filter_libraries_files_folders_urls.xml new file mode 100644 index 000000000..33a62505a --- /dev/null +++ b/admin/models/forms/filter_libraries_files_folders_urls.xml @@ -0,0 +1,65 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_placeholders.xml b/admin/models/forms/filter_placeholders.xml new file mode 100644 index 000000000..945d7eefe --- /dev/null +++ b/admin/models/forms/filter_placeholders.xml @@ -0,0 +1,69 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_servers.xml b/admin/models/forms/filter_servers.xml new file mode 100644 index 000000000..20879d214 --- /dev/null +++ b/admin/models/forms/filter_servers.xml @@ -0,0 +1,83 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_site_views.xml b/admin/models/forms/filter_site_views.xml new file mode 100644 index 000000000..fb96c35ee --- /dev/null +++ b/admin/models/forms/filter_site_views.xml @@ -0,0 +1,96 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_snippet_types.xml b/admin/models/forms/filter_snippet_types.xml new file mode 100644 index 000000000..9572ad0a4 --- /dev/null +++ b/admin/models/forms/filter_snippet_types.xml @@ -0,0 +1,69 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_snippets.xml b/admin/models/forms/filter_snippets.xml new file mode 100644 index 000000000..786434ab9 --- /dev/null +++ b/admin/models/forms/filter_snippets.xml @@ -0,0 +1,89 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_templates.xml b/admin/models/forms/filter_templates.xml new file mode 100644 index 000000000..a7213e91b --- /dev/null +++ b/admin/models/forms/filter_templates.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_validation_rules.xml b/admin/models/forms/filter_validation_rules.xml new file mode 100644 index 000000000..be1547564 --- /dev/null +++ b/admin/models/forms/filter_validation_rules.xml @@ -0,0 +1,69 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index caad44a81..c98eec942 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -61,8 +61,15 @@ class ComponentbuilderModelHelp_documents extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -80,19 +87,39 @@ class ComponentbuilderModelHelp_documents extends JModelList $this->setState('filter.search', $search); $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } $location = $this->getUserStateFromRequest($this->context . '.filter.location', 'filter_location'); - $this->setState('filter.location', $location); + if ($formSubmited) + { + $location = $app->input->post->get('location'); + $this->setState('filter.location', $location); + } $admin_view = $this->getUserStateFromRequest($this->context . '.filter.admin_view', 'filter_admin_view'); - $this->setState('filter.admin_view', $admin_view); + if ($formSubmited) + { + $admin_view = $app->input->post->get('admin_view'); + $this->setState('filter.admin_view', $admin_view); + } $site_view = $this->getUserStateFromRequest($this->context . '.filter.site_view', 'filter_site_view'); - $this->setState('filter.site_view', $site_view); + if ($formSubmited) + { + $site_view = $app->input->post->get('site_view'); + $this->setState('filter.site_view', $site_view); + } $title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title'); - $this->setState('filter.title', $title); + if ($formSubmited) + { + $title = $app->input->post->get('title'); + $this->setState('filter.title', $title); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index dfeca31ef..bf2a8b23b 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -2098,8 +2098,15 @@ class ComponentbuilderModelJoomla_components extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -2117,19 +2124,39 @@ class ComponentbuilderModelJoomla_components extends JModelList $this->setState('filter.search', $search); $companyname = $this->getUserStateFromRequest($this->context . '.filter.companyname', 'filter_companyname'); - $this->setState('filter.companyname', $companyname); + if ($formSubmited) + { + $companyname = $app->input->post->get('companyname'); + $this->setState('filter.companyname', $companyname); + } $author = $this->getUserStateFromRequest($this->context . '.filter.author', 'filter_author'); - $this->setState('filter.author', $author); + if ($formSubmited) + { + $author = $app->input->post->get('author'); + $this->setState('filter.author', $author); + } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); - $this->setState('filter.system_name', $system_name); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } $name_code = $this->getUserStateFromRequest($this->context . '.filter.name_code', 'filter_name_code'); - $this->setState('filter.name_code', $name_code); + if ($formSubmited) + { + $name_code = $app->input->post->get('name_code'); + $this->setState('filter.name_code', $name_code); + } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); - $this->setState('filter.short_description', $short_description); + if ($formSubmited) + { + $short_description = $app->input->post->get('short_description'); + $this->setState('filter.short_description', $short_description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/joomla_modules.php b/admin/models/joomla_modules.php index 8a240b8c9..2bfbde2ff 100644 --- a/admin/models/joomla_modules.php +++ b/admin/models/joomla_modules.php @@ -60,8 +60,15 @@ class ComponentbuilderModelJoomla_modules extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -79,13 +86,25 @@ class ComponentbuilderModelJoomla_modules extends JModelList $this->setState('filter.search', $search); $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); - $this->setState('filter.target', $target); + if ($formSubmited) + { + $target = $app->input->post->get('target'); + $this->setState('filter.target', $target); + } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); - $this->setState('filter.system_name', $system_name); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/joomla_modules_files_folders_urls.php b/admin/models/joomla_modules_files_folders_urls.php index 48690e4f4..2adf63f2d 100644 --- a/admin/models/joomla_modules_files_folders_urls.php +++ b/admin/models/joomla_modules_files_folders_urls.php @@ -57,8 +57,15 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/joomla_modules_updates.php b/admin/models/joomla_modules_updates.php index 6afa748d1..eb8c309f2 100644 --- a/admin/models/joomla_modules_updates.php +++ b/admin/models/joomla_modules_updates.php @@ -57,8 +57,15 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/joomla_plugin_groups.php b/admin/models/joomla_plugin_groups.php index 371a97016..7ccdafdcc 100644 --- a/admin/models/joomla_plugin_groups.php +++ b/admin/models/joomla_plugin_groups.php @@ -59,8 +59,15 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -78,10 +85,18 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList $this->setState('filter.search', $search); $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); - $this->setState('filter.class_extends', $class_extends); + if ($formSubmited) + { + $class_extends = $app->input->post->get('class_extends'); + $this->setState('filter.class_extends', $class_extends); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/joomla_plugins.php b/admin/models/joomla_plugins.php index 2eeffdd4d..7f010891e 100644 --- a/admin/models/joomla_plugins.php +++ b/admin/models/joomla_plugins.php @@ -230,8 +230,15 @@ class ComponentbuilderModelJoomla_plugins extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -249,13 +256,25 @@ class ComponentbuilderModelJoomla_plugins extends JModelList $this->setState('filter.search', $search); $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); - $this->setState('filter.class_extends', $class_extends); + if ($formSubmited) + { + $class_extends = $app->input->post->get('class_extends'); + $this->setState('filter.class_extends', $class_extends); + } $joomla_plugin_group = $this->getUserStateFromRequest($this->context . '.filter.joomla_plugin_group', 'filter_joomla_plugin_group'); - $this->setState('filter.joomla_plugin_group', $joomla_plugin_group); + if ($formSubmited) + { + $joomla_plugin_group = $app->input->post->get('joomla_plugin_group'); + $this->setState('filter.joomla_plugin_group', $joomla_plugin_group); + } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); - $this->setState('filter.system_name', $system_name); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/joomla_plugins_files_folders_urls.php b/admin/models/joomla_plugins_files_folders_urls.php index 1ac147696..62ff159fe 100644 --- a/admin/models/joomla_plugins_files_folders_urls.php +++ b/admin/models/joomla_plugins_files_folders_urls.php @@ -57,8 +57,15 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/joomla_plugins_updates.php b/admin/models/joomla_plugins_updates.php index 544556a73..25e08bae6 100644 --- a/admin/models/joomla_plugins_updates.php +++ b/admin/models/joomla_plugins_updates.php @@ -57,8 +57,15 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/language_translations.php b/admin/models/language_translations.php index 922789cd3..cd1fe680e 100644 --- a/admin/models/language_translations.php +++ b/admin/models/language_translations.php @@ -58,8 +58,15 @@ class ComponentbuilderModelLanguage_translations extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -77,7 +84,11 @@ class ComponentbuilderModelLanguage_translations extends JModelList $this->setState('filter.search', $search); $source = $this->getUserStateFromRequest($this->context . '.filter.source', 'filter_source'); - $this->setState('filter.source', $source); + if ($formSubmited) + { + $source = $app->input->post->get('source'); + $this->setState('filter.source', $source); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/languages.php b/admin/models/languages.php index be73a6638..efe450d61 100644 --- a/admin/models/languages.php +++ b/admin/models/languages.php @@ -182,8 +182,15 @@ class ComponentbuilderModelLanguages extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -201,10 +208,18 @@ class ComponentbuilderModelLanguages extends JModelList $this->setState('filter.search', $search); $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $langtag = $this->getUserStateFromRequest($this->context . '.filter.langtag', 'filter_langtag'); - $this->setState('filter.langtag', $langtag); + if ($formSubmited) + { + $langtag = $app->input->post->get('langtag'); + $this->setState('filter.langtag', $langtag); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/layouts.php b/admin/models/layouts.php index 5f0fc8669..d3a436cf1 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -61,8 +61,15 @@ class ComponentbuilderModelLayouts extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -80,16 +87,32 @@ class ComponentbuilderModelLayouts extends JModelList $this->setState('filter.search', $search); $dynamic_get = $this->getUserStateFromRequest($this->context . '.filter.dynamic_get', 'filter_dynamic_get'); - $this->setState('filter.dynamic_get', $dynamic_get); + if ($formSubmited) + { + $dynamic_get = $app->input->post->get('dynamic_get'); + $this->setState('filter.dynamic_get', $dynamic_get); + } $add_php_view = $this->getUserStateFromRequest($this->context . '.filter.add_php_view', 'filter_add_php_view'); - $this->setState('filter.add_php_view', $add_php_view); + if ($formSubmited) + { + $add_php_view = $app->input->post->get('add_php_view'); + $this->setState('filter.add_php_view', $add_php_view); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/libraries.php b/admin/models/libraries.php index 43104f790..eb280227c 100644 --- a/admin/models/libraries.php +++ b/admin/models/libraries.php @@ -62,8 +62,15 @@ class ComponentbuilderModelLibraries extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -81,19 +88,39 @@ class ComponentbuilderModelLibraries extends JModelList $this->setState('filter.search', $search); $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); - $this->setState('filter.target', $target); + if ($formSubmited) + { + $target = $app->input->post->get('target'); + $this->setState('filter.target', $target); + } $how = $this->getUserStateFromRequest($this->context . '.filter.how', 'filter_how'); - $this->setState('filter.how', $how); + if ($formSubmited) + { + $how = $app->input->post->get('how'); + $this->setState('filter.how', $how); + } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/libraries_config.php b/admin/models/libraries_config.php index 8e01fdf9c..beb1a291f 100644 --- a/admin/models/libraries_config.php +++ b/admin/models/libraries_config.php @@ -57,8 +57,15 @@ class ComponentbuilderModelLibraries_config extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/libraries_files_folders_urls.php b/admin/models/libraries_files_folders_urls.php index 02d3bdb1d..cfb31ee06 100644 --- a/admin/models/libraries_files_folders_urls.php +++ b/admin/models/libraries_files_folders_urls.php @@ -57,8 +57,15 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); diff --git a/admin/models/placeholders.php b/admin/models/placeholders.php index b56c2a263..7eeea84b5 100644 --- a/admin/models/placeholders.php +++ b/admin/models/placeholders.php @@ -59,8 +59,15 @@ class ComponentbuilderModelPlaceholders extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -78,10 +85,18 @@ class ComponentbuilderModelPlaceholders extends JModelList $this->setState('filter.search', $search); $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); - $this->setState('filter.target', $target); + if ($formSubmited) + { + $target = $app->input->post->get('target'); + $this->setState('filter.target', $target); + } $value = $this->getUserStateFromRequest($this->context . '.filter.value', 'filter_value'); - $this->setState('filter.value', $value); + if ($formSubmited) + { + $value = $app->input->post->get('value'); + $this->setState('filter.value', $value); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/servers.php b/admin/models/servers.php index fd0122e5f..e2494f10d 100644 --- a/admin/models/servers.php +++ b/admin/models/servers.php @@ -59,8 +59,15 @@ class ComponentbuilderModelServers extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -78,10 +85,18 @@ class ComponentbuilderModelServers extends JModelList $this->setState('filter.search', $search); $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $protocol = $this->getUserStateFromRequest($this->context . '.filter.protocol', 'filter_protocol'); - $this->setState('filter.protocol', $protocol); + if ($formSubmited) + { + $protocol = $app->input->post->get('protocol'); + $this->setState('filter.protocol', $protocol); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/site_views.php b/admin/models/site_views.php index e5c530231..b3973fd6d 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -64,8 +64,15 @@ class ComponentbuilderModelSite_views extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -83,25 +90,53 @@ class ComponentbuilderModelSite_views extends JModelList $this->setState('filter.search', $search); $main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get'); - $this->setState('filter.main_get', $main_get); + if ($formSubmited) + { + $main_get = $app->input->post->get('main_get'); + $this->setState('filter.main_get', $main_get); + } $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); - $this->setState('filter.add_php_ajax', $add_php_ajax); + if ($formSubmited) + { + $add_php_ajax = $app->input->post->get('add_php_ajax'); + $this->setState('filter.add_php_ajax', $add_php_ajax); + } $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); - $this->setState('filter.add_custom_button', $add_custom_button); + if ($formSubmited) + { + $add_custom_button = $app->input->post->get('add_custom_button'); + $this->setState('filter.add_custom_button', $add_custom_button); + } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); - $this->setState('filter.system_name', $system_name); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } $context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context'); - $this->setState('filter.context', $context); + if ($formSubmited) + { + $context = $app->input->post->get('context'); + $this->setState('filter.context', $context); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/snippet_types.php b/admin/models/snippet_types.php index 49260361b..66ba91cd0 100644 --- a/admin/models/snippet_types.php +++ b/admin/models/snippet_types.php @@ -59,8 +59,15 @@ class ComponentbuilderModelSnippet_types extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -78,10 +85,18 @@ class ComponentbuilderModelSnippet_types extends JModelList $this->setState('filter.search', $search); $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/snippets.php b/admin/models/snippets.php index 5f6284d45..d5ecd65e0 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -176,8 +176,15 @@ class ComponentbuilderModelSnippets extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -195,19 +202,39 @@ class ComponentbuilderModelSnippets extends JModelList $this->setState('filter.search', $search); $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } $library = $this->getUserStateFromRequest($this->context . '.filter.library', 'filter_library'); - $this->setState('filter.library', $library); + if ($formSubmited) + { + $library = $app->input->post->get('library'); + $this->setState('filter.library', $library); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $url = $this->getUserStateFromRequest($this->context . '.filter.url', 'filter_url'); - $this->setState('filter.url', $url); + if ($formSubmited) + { + $url = $app->input->post->get('url'); + $this->setState('filter.url', $url); + } $heading = $this->getUserStateFromRequest($this->context . '.filter.heading', 'filter_heading'); - $this->setState('filter.heading', $heading); + if ($formSubmited) + { + $heading = $app->input->post->get('heading'); + $this->setState('filter.heading', $heading); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/templates.php b/admin/models/templates.php index f16b44084..2071d4758 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -61,8 +61,15 @@ class ComponentbuilderModelTemplates extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -80,16 +87,32 @@ class ComponentbuilderModelTemplates extends JModelList $this->setState('filter.search', $search); $dynamic_get = $this->getUserStateFromRequest($this->context . '.filter.dynamic_get', 'filter_dynamic_get'); - $this->setState('filter.dynamic_get', $dynamic_get); + if ($formSubmited) + { + $dynamic_get = $app->input->post->get('dynamic_get'); + $this->setState('filter.dynamic_get', $dynamic_get); + } $add_php_view = $this->getUserStateFromRequest($this->context . '.filter.add_php_view', 'filter_add_php_view'); - $this->setState('filter.add_php_view', $add_php_view); + if ($formSubmited) + { + $add_php_view = $app->input->post->get('add_php_view'); + $this->setState('filter.add_php_view', $add_php_view); + } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/models/validation_rules.php b/admin/models/validation_rules.php index b0e936ba8..5b6fd0655 100644 --- a/admin/models/validation_rules.php +++ b/admin/models/validation_rules.php @@ -59,8 +59,15 @@ class ComponentbuilderModelValidation_rules extends JModelList $this->context .= '.' . $layout; } + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); @@ -78,10 +85,18 @@ class ComponentbuilderModelValidation_rules extends JModelList $this->setState('filter.search', $search); $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); - $this->setState('filter.short_description', $short_description); + if ($formSubmited) + { + $short_description = $app->input->post->get('short_description'); + $this->setState('filter.short_description', $short_description); + } // List state information. parent::populateState($ordering, $direction); diff --git a/admin/views/admin_views/tmpl/default.php b/admin/views/admin_views/tmpl/default.php index ad91b6171..fe4741d7e 100644 --- a/admin/views/admin_views/tmpl/default.php +++ b/admin/views/admin_views/tmpl/default.php @@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAdminviewsfiltertype', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -')); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +24,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'admin_viewList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -
sidebar)): ?>
@@ -48,13 +33,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?> loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +59,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 7de3fdddd..67725fabb 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index 170fe0d18..ca53e2a15 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,122 +163,6 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Add Fadein Selection - $this->add_fadeinOptions = $this->getTheAdd_fadeinSelections(); - // We do some sanitation for Add Fadein filter - if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions) && - isset($this->add_fadeinOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_fadeinOptions[0]->value)) - { - unset($this->add_fadeinOptions[0]); - } - // Only load Add Fadein filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions)) - { - // Add Fadein Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_FADEIN_LABEL').' -', - 'filter_add_fadein', - JHtml::_('select.options', $this->add_fadeinOptions, 'value', 'text', $this->state->get('filter.add_fadein')) - ); - } - - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - // We do some sanitation for Type filter - if (ComponentbuilderHelper::checkArray($this->typeOptions) && - isset($this->typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) - { - unset($this->typeOptions[0]); - } - // Only load Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->typeOptions)) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) - ); - } - - // Set Add Custom Button Selection - $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); - // We do some sanitation for Add Custom Button filter - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && - isset($this->add_custom_buttonOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) - { - unset($this->add_custom_buttonOptions[0]); - } - // Only load Add Custom Button filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions)) - { - // Add Custom Button Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', - 'filter_add_custom_button', - JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button')) - ); - } - - // Set Add Php Ajax Selection - $this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections(); - // We do some sanitation for Add Php Ajax filter - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && - isset($this->add_php_ajaxOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) - { - unset($this->add_php_ajaxOptions[0]); - } - // Only load Add Php Ajax filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions)) - { - // Add Php Ajax Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', - 'filter_add_php_ajax', - JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax')) - ); - } - - // Set Add Custom Import Selection - $this->add_custom_importOptions = $this->getTheAdd_custom_importSelections(); - // We do some sanitation for Add Custom Import filter - if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions) && - isset($this->add_custom_importOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_custom_importOptions[0]->value)) - { - unset($this->add_custom_importOptions[0]); - } - // Only load Add Custom Import filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions)) - { - // Add Custom Import Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL').' -', - 'filter_add_custom_import', - JHtml::_('select.options', $this->add_custom_importOptions, 'value', 'text', $this->state->get('filter.add_custom_import')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -298,6 +186,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Only load Add Fadein batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Fadein Selection + $this->add_fadeinOptions = JFormHelper::loadFieldType('adminviewsfilteraddfadein')->options; + // We do some sanitation for Add Fadein filter + if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions) && + isset($this->add_fadeinOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_fadeinOptions[0]->value)) + { + unset($this->add_fadeinOptions[0]); + } // Add Fadein Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_FADEIN_LABEL').' -', @@ -309,6 +206,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Only load Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Type Selection + $this->typeOptions = JFormHelper::loadFieldType('adminviewsfiltertype')->options; + // We do some sanitation for Type filter + if (ComponentbuilderHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) + { + unset($this->typeOptions[0]); + } // Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', @@ -320,6 +226,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Only load Add Custom Button batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Custom Button Selection + $this->add_custom_buttonOptions = JFormHelper::loadFieldType('adminviewsfilteraddcustombutton')->options; + // We do some sanitation for Add Custom Button filter + if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && + isset($this->add_custom_buttonOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) + { + unset($this->add_custom_buttonOptions[0]); + } // Add Custom Button Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', @@ -331,6 +246,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Only load Add Php Ajax batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Php Ajax Selection + $this->add_php_ajaxOptions = JFormHelper::loadFieldType('adminviewsfilteraddphpajax')->options; + // We do some sanitation for Add Php Ajax filter + if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && + isset($this->add_php_ajaxOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) + { + unset($this->add_php_ajaxOptions[0]); + } // Add Php Ajax Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', @@ -342,6 +266,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Only load Add Custom Import batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Custom Import Selection + $this->add_custom_importOptions = JFormHelper::loadFieldType('adminviewsfilteraddcustomimport')->options; + // We do some sanitation for Add Custom Import filter + if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions) && + isset($this->add_custom_importOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_custom_importOptions[0]->value)) + { + unset($this->add_custom_importOptions[0]); + } // Add Custom Import Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL').' -', @@ -399,185 +332,5 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy 'a.short_description' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheAdd_fadeinSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_fadein')); - $query->from($db->quoteName('#__componentbuilder_admin_view')); - $query->order($db->quoteName('add_fadein') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_fadein) - { - // Translate the add_fadein selection - $text = $model->selectionTranslation($add_fadein,'add_fadein'); - // Now add the add_fadein and its text to the options array - $_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheTypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('type')); - $query->from($db->quoteName('#__componentbuilder_admin_view')); - $query->order($db->quoteName('type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $type) - { - // Translate the type selection - $text = $model->selectionTranslation($type,'type'); - // Now add the type and its text to the options array - $_filter[] = JHtml::_('select.option', $type, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheAdd_custom_buttonSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_custom_button')); - $query->from($db->quoteName('#__componentbuilder_admin_view')); - $query->order($db->quoteName('add_custom_button') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_custom_button) - { - // Translate the add_custom_button selection - $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); - // Now add the add_custom_button and its text to the options array - $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheAdd_php_ajaxSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_php_ajax')); - $query->from($db->quoteName('#__componentbuilder_admin_view')); - $query->order($db->quoteName('add_php_ajax') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_php_ajax) - { - // Translate the add_php_ajax selection - $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); - // Now add the add_php_ajax and its text to the options array - $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheAdd_custom_importSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_custom_import')); - $query->from($db->quoteName('#__componentbuilder_admin_view')); - $query->order($db->quoteName('add_custom_import') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_custom_import) - { - // Translate the add_custom_import selection - $text = $model->selectionTranslation($add_custom_import,'add_custom_import'); - // Now add the add_custom_import and its text to the options array - $_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/admins_custom_tabs/tmpl/default.php b/admin/views/admins_custom_tabs/tmpl/default.php index 8ee23facd..10dd8320f 100644 --- a/admin/views/admins_custom_tabs/tmpl/default.php +++ b/admin/views/admins_custom_tabs/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'admin_custom_tabsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/admins_custom_tabs/tmpl/default_head.php b/admin/views/admins_custom_tabs/tmpl/default_head.php index dd912b16f..b29f76534 100644 --- a/admin/views/admins_custom_tabs/tmpl/default_head.php +++ b/admin/views/admins_custom_tabs/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/admins_custom_tabs/view.html.php b/admin/views/admins_custom_tabs/view.html.php index 6b4e2a5f8..7c2522a0d 100644 --- a/admin/views/admins_custom_tabs/view.html.php +++ b/admin/views/admins_custom_tabs/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/admins_fields/tmpl/default.php b/admin/views/admins_fields/tmpl/default.php index a90540ce7..3ece44ae4 100644 --- a/admin/views/admins_fields/tmpl/default.php +++ b/admin/views/admins_fields/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'admin_fieldsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/admins_fields/tmpl/default_head.php b/admin/views/admins_fields/tmpl/default_head.php index 721e4daf0..bcd84b2c0 100644 --- a/admin/views/admins_fields/tmpl/default_head.php +++ b/admin/views/admins_fields/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index ffac7d551..9224a35fd 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/admins_fields_conditions/tmpl/default.php b/admin/views/admins_fields_conditions/tmpl/default.php index 06fa8b440..01eb8d8d5 100644 --- a/admin/views/admins_fields_conditions/tmpl/default.php +++ b/admin/views/admins_fields_conditions/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'admin_fields_conditionsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/admins_fields_conditions/tmpl/default_head.php b/admin/views/admins_fields_conditions/tmpl/default_head.php index 5293adc66..4cb801025 100644 --- a/admin/views/admins_fields_conditions/tmpl/default_head.php +++ b/admin/views/admins_fields_conditions/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index 836cf2244..ab0e3a86f 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/admins_fields_relations/tmpl/default.php b/admin/views/admins_fields_relations/tmpl/default.php index a111494b7..97e8a1e49 100644 --- a/admin/views/admins_fields_relations/tmpl/default.php +++ b/admin/views/admins_fields_relations/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'admin_fields_relationsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/admins_fields_relations/tmpl/default_head.php b/admin/views/admins_fields_relations/tmpl/default_head.php index a205db3c1..4478a3043 100644 --- a/admin/views/admins_fields_relations/tmpl/default_head.php +++ b/admin/views/admins_fields_relations/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/admins_fields_relations/view.html.php b/admin/views/admins_fields_relations/view.html.php index bd0c23f0b..7d22cf1df 100644 --- a/admin/views/admins_fields_relations/view.html.php +++ b/admin/views/admins_fields_relations/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/class_extendings/tmpl/default.php b/admin/views/class_extendings/tmpl/default.php index c63cc84da..d36e6945b 100644 --- a/admin/views/class_extendings/tmpl/default.php +++ b/admin/views/class_extendings/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'class_extendsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/class_extendings/tmpl/default_head.php b/admin/views/class_extendings/tmpl/default_head.php index 2a48fce9b..bb35648fe 100644 --- a/admin/views/class_extendings/tmpl/default_head.php +++ b/admin/views/class_extendings/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/class_extendings/view.html.php b/admin/views/class_extendings/view.html.php index 31d5517eb..d1bfe51bb 100644 --- a/admin/views/class_extendings/view.html.php +++ b/admin/views/class_extendings/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,42 +148,6 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Extension Type Selection - $this->extension_typeOptions = $this->getTheExtension_typeSelections(); - // We do some sanitation for Extension Type filter - if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && - isset($this->extension_typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) - { - unset($this->extension_typeOptions[0]); - } - // Only load Extension Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->extension_typeOptions)) - { - // Extension Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL').' -', - 'filter_extension_type', - JHtml::_('select.options', $this->extension_typeOptions, 'value', 'text', $this->state->get('filter.extension_type')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -203,6 +171,15 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy // Only load Extension Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Extension Type Selection + $this->extension_typeOptions = JFormHelper::loadFieldType('classextendingsfilterextensiontype')->options; + // We do some sanitation for Extension Type filter + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && + isset($this->extension_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) + { + unset($this->extension_typeOptions[0]); + } // Extension Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL').' -', @@ -259,41 +236,5 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheExtension_typeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('extension_type')); - $query->from($db->quoteName('#__componentbuilder_class_extends')); - $query->order($db->quoteName('extension_type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $extension_type) - { - // Translate the extension_type selection - $text = $model->selectionTranslation($extension_type,'extension_type'); - // Now add the extension_type and its text to the options array - $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/class_methods/tmpl/default.php b/admin/views/class_methods/tmpl/default.php index d9daa5268..cefe2cede 100644 --- a/admin/views/class_methods/tmpl/default.php +++ b/admin/views/class_methods/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'class_methodList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/class_methods/tmpl/default_head.php b/admin/views/class_methods/tmpl/default_head.php index 65d83aa93..4269a7383 100644 --- a/admin/views/class_methods/tmpl/default_head.php +++ b/admin/views/class_methods/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/class_methods/view.html.php b/admin/views/class_methods/view.html.php index 98c0abb94..aadb6a920 100644 --- a/admin/views/class_methods/view.html.php +++ b/admin/views/class_methods/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewClass_methods extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -154,62 +158,6 @@ class ComponentbuilderViewClass_methods extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Visibility Selection - $this->visibilityOptions = $this->getTheVisibilitySelections(); - // We do some sanitation for Visibility filter - if (ComponentbuilderHelper::checkArray($this->visibilityOptions) && - isset($this->visibilityOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->visibilityOptions[0]->value)) - { - unset($this->visibilityOptions[0]); - } - // Only load Visibility filter if it has values - if (ComponentbuilderHelper::checkArray($this->visibilityOptions)) - { - // Visibility Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL').' -', - 'filter_visibility', - JHtml::_('select.options', $this->visibilityOptions, 'value', 'text', $this->state->get('filter.visibility')) - ); - } - - // Set Extension Type Selection - $this->extension_typeOptions = $this->getTheExtension_typeSelections(); - // We do some sanitation for Extension Type filter - if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && - isset($this->extension_typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) - { - unset($this->extension_typeOptions[0]); - } - // Only load Extension Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->extension_typeOptions)) - { - // Extension Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL').' -', - 'filter_extension_type', - JHtml::_('select.options', $this->extension_typeOptions, 'value', 'text', $this->state->get('filter.extension_type')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -233,6 +181,15 @@ class ComponentbuilderViewClass_methods extends JViewLegacy // Only load Visibility batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Visibility Selection + $this->visibilityOptions = JFormHelper::loadFieldType('classmethodsfiltervisibility')->options; + // We do some sanitation for Visibility filter + if (ComponentbuilderHelper::checkArray($this->visibilityOptions) && + isset($this->visibilityOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->visibilityOptions[0]->value)) + { + unset($this->visibilityOptions[0]); + } // Visibility Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL').' -', @@ -244,6 +201,15 @@ class ComponentbuilderViewClass_methods extends JViewLegacy // Only load Extension Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Extension Type Selection + $this->extension_typeOptions = JFormHelper::loadFieldType('classmethodsfilterextensiontype')->options; + // We do some sanitation for Extension Type filter + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && + isset($this->extension_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) + { + unset($this->extension_typeOptions[0]); + } // Extension Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL').' -', @@ -301,77 +267,5 @@ class ComponentbuilderViewClass_methods extends JViewLegacy 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheVisibilitySelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('visibility')); - $query->from($db->quoteName('#__componentbuilder_class_method')); - $query->order($db->quoteName('visibility') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $visibility) - { - // Translate the visibility selection - $text = $model->selectionTranslation($visibility,'visibility'); - // Now add the visibility and its text to the options array - $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheExtension_typeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('extension_type')); - $query->from($db->quoteName('#__componentbuilder_class_method')); - $query->order($db->quoteName('extension_type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $extension_type) - { - // Translate the extension_type selection - $text = $model->selectionTranslation($extension_type,'extension_type'); - // Now add the extension_type and its text to the options array - $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/class_properties/tmpl/default.php b/admin/views/class_properties/tmpl/default.php index 8c970d170..f7c38aaaf 100644 --- a/admin/views/class_properties/tmpl/default.php +++ b/admin/views/class_properties/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'class_propertyList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/class_properties/tmpl/default_head.php b/admin/views/class_properties/tmpl/default_head.php index 17263d2a3..e7c4f1994 100644 --- a/admin/views/class_properties/tmpl/default_head.php +++ b/admin/views/class_properties/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/class_properties/view.html.php b/admin/views/class_properties/view.html.php index fd503c023..b58f64222 100644 --- a/admin/views/class_properties/view.html.php +++ b/admin/views/class_properties/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewClass_properties extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -154,62 +158,6 @@ class ComponentbuilderViewClass_properties extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Visibility Selection - $this->visibilityOptions = $this->getTheVisibilitySelections(); - // We do some sanitation for Visibility filter - if (ComponentbuilderHelper::checkArray($this->visibilityOptions) && - isset($this->visibilityOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->visibilityOptions[0]->value)) - { - unset($this->visibilityOptions[0]); - } - // Only load Visibility filter if it has values - if (ComponentbuilderHelper::checkArray($this->visibilityOptions)) - { - // Visibility Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL').' -', - 'filter_visibility', - JHtml::_('select.options', $this->visibilityOptions, 'value', 'text', $this->state->get('filter.visibility')) - ); - } - - // Set Extension Type Selection - $this->extension_typeOptions = $this->getTheExtension_typeSelections(); - // We do some sanitation for Extension Type filter - if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && - isset($this->extension_typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) - { - unset($this->extension_typeOptions[0]); - } - // Only load Extension Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->extension_typeOptions)) - { - // Extension Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL').' -', - 'filter_extension_type', - JHtml::_('select.options', $this->extension_typeOptions, 'value', 'text', $this->state->get('filter.extension_type')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -233,6 +181,15 @@ class ComponentbuilderViewClass_properties extends JViewLegacy // Only load Visibility batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Visibility Selection + $this->visibilityOptions = JFormHelper::loadFieldType('classpropertiesfiltervisibility')->options; + // We do some sanitation for Visibility filter + if (ComponentbuilderHelper::checkArray($this->visibilityOptions) && + isset($this->visibilityOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->visibilityOptions[0]->value)) + { + unset($this->visibilityOptions[0]); + } // Visibility Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL').' -', @@ -244,6 +201,15 @@ class ComponentbuilderViewClass_properties extends JViewLegacy // Only load Extension Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Extension Type Selection + $this->extension_typeOptions = JFormHelper::loadFieldType('classpropertiesfilterextensiontype')->options; + // We do some sanitation for Extension Type filter + if (ComponentbuilderHelper::checkArray($this->extension_typeOptions) && + isset($this->extension_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extension_typeOptions[0]->value)) + { + unset($this->extension_typeOptions[0]); + } // Extension Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL').' -', @@ -301,77 +267,5 @@ class ComponentbuilderViewClass_properties extends JViewLegacy 'a.extension_type' => JText::_('COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheVisibilitySelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('visibility')); - $query->from($db->quoteName('#__componentbuilder_class_property')); - $query->order($db->quoteName('visibility') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $visibility) - { - // Translate the visibility selection - $text = $model->selectionTranslation($visibility,'visibility'); - // Now add the visibility and its text to the options array - $_filter[] = JHtml::_('select.option', $visibility, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheExtension_typeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('extension_type')); - $query->from($db->quoteName('#__componentbuilder_class_property')); - $query->order($db->quoteName('extension_type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $extension_type) - { - // Translate the extension_type selection - $text = $model->selectionTranslation($extension_type,'extension_type'); - // Now add the extension_type and its text to the options array - $_filter[] = JHtml::_('select.option', $extension_type, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/components_admin_views/tmpl/default.php b/admin/views/components_admin_views/tmpl/default.php index 890abcb92..48980a4ca 100644 --- a/admin/views/components_admin_views/tmpl/default.php +++ b/admin/views/components_admin_views/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_admin_viewsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_admin_views/tmpl/default_head.php b/admin/views/components_admin_views/tmpl/default_head.php index 6c291c3a4..b4515bb34 100644 --- a/admin/views/components_admin_views/tmpl/default_head.php +++ b/admin/views/components_admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_admin_views/view.html.php b/admin/views/components_admin_views/view.html.php index 74e2ad2ee..8d65799e2 100644 --- a/admin/views/components_admin_views/view.html.php +++ b/admin/views/components_admin_views/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_config/tmpl/default.php b/admin/views/components_config/tmpl/default.php index f91110868..423d8486c 100644 --- a/admin/views/components_config/tmpl/default.php +++ b/admin/views/components_config/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_configList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_config/tmpl/default_head.php b/admin/views/components_config/tmpl/default_head.php index 17baaa72c..10404bdd5 100644 --- a/admin/views/components_config/tmpl/default_head.php +++ b/admin/views/components_config/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_config/view.html.php b/admin/views/components_config/view.html.php index a20c3dd9e..52110c6e9 100644 --- a/admin/views/components_config/view.html.php +++ b/admin/views/components_config/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_config extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_config extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_custom_admin_menus/tmpl/default.php b/admin/views/components_custom_admin_menus/tmpl/default.php index 7130c4ae8..574a4ab7a 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default.php +++ b/admin/views/components_custom_admin_menus/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_custom_admin_menusList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_custom_admin_menus/tmpl/default_head.php b/admin/views/components_custom_admin_menus/tmpl/default_head.php index 342dbb186..57aa10b7d 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default_head.php +++ b/admin/views/components_custom_admin_menus/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_custom_admin_menus/view.html.php b/admin/views/components_custom_admin_menus/view.html.php index 6dc35be6c..fae5588af 100644 --- a/admin/views/components_custom_admin_menus/view.html.php +++ b/admin/views/components_custom_admin_menus/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_custom_admin_views/tmpl/default.php b/admin/views/components_custom_admin_views/tmpl/default.php index b64c13041..4c8d67ea9 100644 --- a/admin/views/components_custom_admin_views/tmpl/default.php +++ b/admin/views/components_custom_admin_views/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_custom_admin_viewsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_custom_admin_views/tmpl/default_head.php b/admin/views/components_custom_admin_views/tmpl/default_head.php index 4283f651e..ea3665f0c 100644 --- a/admin/views/components_custom_admin_views/tmpl/default_head.php +++ b/admin/views/components_custom_admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_custom_admin_views/view.html.php b/admin/views/components_custom_admin_views/view.html.php index 2eb2cb027..bc028949e 100644 --- a/admin/views/components_custom_admin_views/view.html.php +++ b/admin/views/components_custom_admin_views/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_dashboard/tmpl/default.php b/admin/views/components_dashboard/tmpl/default.php index 988dcd94c..498f384d1 100644 --- a/admin/views/components_dashboard/tmpl/default.php +++ b/admin/views/components_dashboard/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_dashboardList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_dashboard/tmpl/default_head.php b/admin/views/components_dashboard/tmpl/default_head.php index e403d6242..da9c070ea 100644 --- a/admin/views/components_dashboard/tmpl/default_head.php +++ b/admin/views/components_dashboard/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_dashboard/view.html.php b/admin/views/components_dashboard/view.html.php index 51f11e7dc..6e7c590ca 100644 --- a/admin/views/components_dashboard/view.html.php +++ b/admin/views/components_dashboard/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_files_folders/tmpl/default.php b/admin/views/components_files_folders/tmpl/default.php index 4b3395800..852863acf 100644 --- a/admin/views/components_files_folders/tmpl/default.php +++ b/admin/views/components_files_folders/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_files_foldersList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_files_folders/tmpl/default_head.php b/admin/views/components_files_folders/tmpl/default_head.php index cefcc65c4..0b37bd86b 100644 --- a/admin/views/components_files_folders/tmpl/default_head.php +++ b/admin/views/components_files_folders/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_files_folders/view.html.php b/admin/views/components_files_folders/view.html.php index 78bda1670..35bc76535 100644 --- a/admin/views/components_files_folders/view.html.php +++ b/admin/views/components_files_folders/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_modules/tmpl/default.php b/admin/views/components_modules/tmpl/default.php index 24c6e5ead..a36cf555b 100644 --- a/admin/views/components_modules/tmpl/default.php +++ b/admin/views/components_modules/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_modulesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_modules/tmpl/default_head.php b/admin/views/components_modules/tmpl/default_head.php index 7f756c199..a4976daf0 100644 --- a/admin/views/components_modules/tmpl/default_head.php +++ b/admin/views/components_modules/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_modules/view.html.php b/admin/views/components_modules/view.html.php index eb045dafb..cd4f9617c 100644 --- a/admin/views/components_modules/view.html.php +++ b/admin/views/components_modules/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_modules extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_mysql_tweaks/tmpl/default.php b/admin/views/components_mysql_tweaks/tmpl/default.php index d074e9286..b01c46192 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default.php +++ b/admin/views/components_mysql_tweaks/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_mysql_tweaksList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_mysql_tweaks/tmpl/default_head.php b/admin/views/components_mysql_tweaks/tmpl/default_head.php index 66bd7bf1c..1c09bc8c6 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default_head.php +++ b/admin/views/components_mysql_tweaks/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_mysql_tweaks/view.html.php b/admin/views/components_mysql_tweaks/view.html.php index 87dbbbdb9..8f99000be 100644 --- a/admin/views/components_mysql_tweaks/view.html.php +++ b/admin/views/components_mysql_tweaks/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_placeholders/tmpl/default.php b/admin/views/components_placeholders/tmpl/default.php index d1f3b1124..c89e720a3 100644 --- a/admin/views/components_placeholders/tmpl/default.php +++ b/admin/views/components_placeholders/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_placeholdersList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_placeholders/tmpl/default_head.php b/admin/views/components_placeholders/tmpl/default_head.php index e0912ee95..fa984ea45 100644 --- a/admin/views/components_placeholders/tmpl/default_head.php +++ b/admin/views/components_placeholders/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_placeholders/view.html.php b/admin/views/components_placeholders/view.html.php index 4dc369296..e404ef607 100644 --- a/admin/views/components_placeholders/view.html.php +++ b/admin/views/components_placeholders/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_placeholders extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_plugins/tmpl/default.php b/admin/views/components_plugins/tmpl/default.php index 661842ba8..60e35ed77 100644 --- a/admin/views/components_plugins/tmpl/default.php +++ b/admin/views/components_plugins/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_pluginsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_plugins/tmpl/default_head.php b/admin/views/components_plugins/tmpl/default_head.php index 9b526bf58..f5a6829b5 100644 --- a/admin/views/components_plugins/tmpl/default_head.php +++ b/admin/views/components_plugins/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_plugins/view.html.php b/admin/views/components_plugins/view.html.php index a1f3bf575..c50f55e9e 100644 --- a/admin/views/components_plugins/view.html.php +++ b/admin/views/components_plugins/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_plugins extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_site_views/tmpl/default.php b/admin/views/components_site_views/tmpl/default.php index 8a014e839..017e156d8 100644 --- a/admin/views/components_site_views/tmpl/default.php +++ b/admin/views/components_site_views/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_site_viewsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_site_views/tmpl/default_head.php b/admin/views/components_site_views/tmpl/default_head.php index 3d6577be6..470cb9814 100644 --- a/admin/views/components_site_views/tmpl/default_head.php +++ b/admin/views/components_site_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_site_views/view.html.php b/admin/views/components_site_views/view.html.php index c5876a804..4049b4b53 100644 --- a/admin/views/components_site_views/view.html.php +++ b/admin/views/components_site_views/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/components_updates/tmpl/default.php b/admin/views/components_updates/tmpl/default.php index f8095541c..f6c024f60 100644 --- a/admin/views/components_updates/tmpl/default.php +++ b/admin/views/components_updates/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'component_updatesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/components_updates/tmpl/default_head.php b/admin/views/components_updates/tmpl/default_head.php index 750421607..0e9128ffc 100644 --- a/admin/views/components_updates/tmpl/default_head.php +++ b/admin/views/components_updates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/components_updates/view.html.php b/admin/views/components_updates/view.html.php index 9deca770f..216ff9e24 100644 --- a/admin/views/components_updates/view.html.php +++ b/admin/views/components_updates/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/custom_admin_views/tmpl/default.php b/admin/views/custom_admin_views/tmpl/default.php index 0f9e68ac6..74f9ce02d 100644 --- a/admin/views/custom_admin_views/tmpl/default.php +++ b/admin/views/custom_admin_views/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'custom_admin_viewList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/custom_admin_views/tmpl/default_head.php b/admin/views/custom_admin_views/tmpl/default_head.php index 56f2bf317..741b6f0a8 100644 --- a/admin/views/custom_admin_views/tmpl/default_head.php +++ b/admin/views/custom_admin_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index 09e557e5e..d580d3ff7 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,82 +163,6 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Main Get Name Selection - $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; - // We do some sanitation for Main Get Name filter - if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && - isset($this->main_getNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) - { - unset($this->main_getNameOptions[0]); - } - // Only load Main Get Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->main_getNameOptions)) - { - // Main Get Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL') . ' -', - 'filter_main_get', - JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get')) - ); - } - - // Set Add Php Ajax Selection - $this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections(); - // We do some sanitation for Add Php Ajax filter - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && - isset($this->add_php_ajaxOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) - { - unset($this->add_php_ajaxOptions[0]); - } - // Only load Add Php Ajax filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions)) - { - // Add Php Ajax Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', - 'filter_add_php_ajax', - JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax')) - ); - } - - // Set Add Custom Button Selection - $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); - // We do some sanitation for Add Custom Button filter - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && - isset($this->add_custom_buttonOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) - { - unset($this->add_custom_buttonOptions[0]); - } - // Only load Add Custom Button filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions)) - { - // Add Custom Button Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', - 'filter_add_custom_button', - JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -258,6 +186,15 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy // Only load Main Get Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Main Get Name Selection + $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; + // We do some sanitation for Main Get Name filter + if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && + isset($this->main_getNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) + { + unset($this->main_getNameOptions[0]); + } // Main Get Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL').' -', @@ -269,6 +206,15 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy // Only load Add Php Ajax batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Php Ajax Selection + $this->add_php_ajaxOptions = JFormHelper::loadFieldType('customadminviewsfilteraddphpajax')->options; + // We do some sanitation for Add Php Ajax filter + if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && + isset($this->add_php_ajaxOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) + { + unset($this->add_php_ajaxOptions[0]); + } // Add Php Ajax Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', @@ -280,6 +226,15 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy // Only load Add Custom Button batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Custom Button Selection + $this->add_custom_buttonOptions = JFormHelper::loadFieldType('customadminviewsfilteraddcustombutton')->options; + // We do some sanitation for Add Custom Button filter + if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && + isset($this->add_custom_buttonOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) + { + unset($this->add_custom_buttonOptions[0]); + } // Add Custom Button Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', @@ -338,77 +293,5 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy 'g.name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheAdd_php_ajaxSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_php_ajax')); - $query->from($db->quoteName('#__componentbuilder_custom_admin_view')); - $query->order($db->quoteName('add_php_ajax') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_php_ajax) - { - // Translate the add_php_ajax selection - $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); - // Now add the add_php_ajax and its text to the options array - $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheAdd_custom_buttonSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_custom_button')); - $query->from($db->quoteName('#__componentbuilder_custom_admin_view')); - $query->order($db->quoteName('add_custom_button') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_custom_button) - { - // Translate the add_custom_button selection - $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); - // Now add the add_custom_button and its text to the options array - $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/custom_codes/tmpl/default.php b/admin/views/custom_codes/tmpl/default.php index d592910ba..e08c1ca0d 100644 --- a/admin/views/custom_codes/tmpl/default.php +++ b/admin/views/custom_codes/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'custom_codeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,20 +30,20 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/custom_codes/tmpl/default_head.php b/admin/views/custom_codes/tmpl/default_head.php index ca58c11f3..b5fcdb665 100644 --- a/admin/views/custom_codes/tmpl/default_head.php +++ b/admin/views/custom_codes/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 9dbc0f36d..5258d068a 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,102 +163,6 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Component System Name Selection - $this->componentSystem_nameOptions = JFormHelper::loadFieldType('Component')->options; - // We do some sanitation for Component System Name filter - if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions) && - isset($this->componentSystem_nameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->componentSystem_nameOptions[0]->value)) - { - unset($this->componentSystem_nameOptions[0]); - } - // Only load Component System Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions)) - { - // Component System Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL') . ' -', - 'filter_component', - JHtml::_('select.options', $this->componentSystem_nameOptions, 'value', 'text', $this->state->get('filter.component')) - ); - } - - // Set Target Selection - $this->targetOptions = $this->getTheTargetSelections(); - // We do some sanitation for Target filter - if (ComponentbuilderHelper::checkArray($this->targetOptions) && - isset($this->targetOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->targetOptions[0]->value)) - { - unset($this->targetOptions[0]); - } - // Only load Target filter if it has values - if (ComponentbuilderHelper::checkArray($this->targetOptions)) - { - // Target Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_TARGET_LABEL').' -', - 'filter_target', - JHtml::_('select.options', $this->targetOptions, 'value', 'text', $this->state->get('filter.target')) - ); - } - - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - // We do some sanitation for Type filter - if (ComponentbuilderHelper::checkArray($this->typeOptions) && - isset($this->typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) - { - unset($this->typeOptions[0]); - } - // Only load Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->typeOptions)) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) - ); - } - - // Set Comment Type Selection - $this->comment_typeOptions = $this->getTheComment_typeSelections(); - // We do some sanitation for Comment Type filter - if (ComponentbuilderHelper::checkArray($this->comment_typeOptions) && - isset($this->comment_typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->comment_typeOptions[0]->value)) - { - unset($this->comment_typeOptions[0]); - } - // Only load Comment Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->comment_typeOptions)) - { - // Comment Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMMENT_TYPE_LABEL').' -', - 'filter_comment_type', - JHtml::_('select.options', $this->comment_typeOptions, 'value', 'text', $this->state->get('filter.comment_type')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -278,6 +186,15 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Only load Component System Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Component System Name Selection + $this->componentSystem_nameOptions = JFormHelper::loadFieldType('Component')->options; + // We do some sanitation for Component System Name filter + if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions) && + isset($this->componentSystem_nameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->componentSystem_nameOptions[0]->value)) + { + unset($this->componentSystem_nameOptions[0]); + } // Component System Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL').' -', @@ -289,6 +206,15 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Only load Target batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Target Selection + $this->targetOptions = JFormHelper::loadFieldType('customcodesfiltertarget')->options; + // We do some sanitation for Target filter + if (ComponentbuilderHelper::checkArray($this->targetOptions) && + isset($this->targetOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->targetOptions[0]->value)) + { + unset($this->targetOptions[0]); + } // Target Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_TARGET_LABEL').' -', @@ -300,6 +226,15 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Only load Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Type Selection + $this->typeOptions = JFormHelper::loadFieldType('customcodesfiltertype')->options; + // We do some sanitation for Type filter + if (ComponentbuilderHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) + { + unset($this->typeOptions[0]); + } // Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL').' -', @@ -311,6 +246,15 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Only load Comment Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Comment Type Selection + $this->comment_typeOptions = JFormHelper::loadFieldType('customcodesfiltercommenttype')->options; + // We do some sanitation for Comment Type filter + if (ComponentbuilderHelper::checkArray($this->comment_typeOptions) && + isset($this->comment_typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->comment_typeOptions[0]->value)) + { + unset($this->comment_typeOptions[0]); + } // Comment Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMMENT_TYPE_LABEL').' -', @@ -370,113 +314,5 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy 'a.comment_type' => JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMMENT_TYPE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheTargetSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('target')); - $query->from($db->quoteName('#__componentbuilder_custom_code')); - $query->order($db->quoteName('target') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $target) - { - // Translate the target selection - $text = $model->selectionTranslation($target,'target'); - // Now add the target and its text to the options array - $_filter[] = JHtml::_('select.option', $target, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheTypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('type')); - $query->from($db->quoteName('#__componentbuilder_custom_code')); - $query->order($db->quoteName('type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $type) - { - // Translate the type selection - $text = $model->selectionTranslation($type,'type'); - // Now add the type and its text to the options array - $_filter[] = JHtml::_('select.option', $type, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheComment_typeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('comment_type')); - $query->from($db->quoteName('#__componentbuilder_custom_code')); - $query->order($db->quoteName('comment_type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $comment_type) - { - // Translate the comment_type selection - $text = $model->selectionTranslation($comment_type,'comment_type'); - // Now add the comment_type and its text to the options array - $_filter[] = JHtml::_('select.option', $comment_type, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/dynamic_gets/tmpl/default.php b/admin/views/dynamic_gets/tmpl/default.php index a14c7a004..db6a6f997 100644 --- a/admin/views/dynamic_gets/tmpl/default.php +++ b/admin/views/dynamic_gets/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'dynamic_getList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,23 +30,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/dynamic_gets/tmpl/default_head.php b/admin/views/dynamic_gets/tmpl/default_head.php index fe77912fd..d1ab47390 100644 --- a/admin/views/dynamic_gets/tmpl/default_head.php +++ b/admin/views/dynamic_gets/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 9e183fdf9..6d6af0e0f 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,62 +163,6 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Main Source Selection - $this->main_sourceOptions = $this->getTheMain_sourceSelections(); - // We do some sanitation for Main Source filter - if (ComponentbuilderHelper::checkArray($this->main_sourceOptions) && - isset($this->main_sourceOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->main_sourceOptions[0]->value)) - { - unset($this->main_sourceOptions[0]); - } - // Only load Main Source filter if it has values - if (ComponentbuilderHelper::checkArray($this->main_sourceOptions)) - { - // Main Source Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN_SOURCE_LABEL').' -', - 'filter_main_source', - JHtml::_('select.options', $this->main_sourceOptions, 'value', 'text', $this->state->get('filter.main_source')) - ); - } - - // Set Gettype Selection - $this->gettypeOptions = $this->getTheGettypeSelections(); - // We do some sanitation for Gettype filter - if (ComponentbuilderHelper::checkArray($this->gettypeOptions) && - isset($this->gettypeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->gettypeOptions[0]->value)) - { - unset($this->gettypeOptions[0]); - } - // Only load Gettype filter if it has values - if (ComponentbuilderHelper::checkArray($this->gettypeOptions)) - { - // Gettype Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_GETTYPE_LABEL').' -', - 'filter_gettype', - JHtml::_('select.options', $this->gettypeOptions, 'value', 'text', $this->state->get('filter.gettype')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -238,6 +186,15 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy // Only load Main Source batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Main Source Selection + $this->main_sourceOptions = JFormHelper::loadFieldType('dynamicgetsfiltermainsource')->options; + // We do some sanitation for Main Source filter + if (ComponentbuilderHelper::checkArray($this->main_sourceOptions) && + isset($this->main_sourceOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->main_sourceOptions[0]->value)) + { + unset($this->main_sourceOptions[0]); + } // Main Source Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN_SOURCE_LABEL').' -', @@ -249,6 +206,15 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy // Only load Gettype batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Gettype Selection + $this->gettypeOptions = JFormHelper::loadFieldType('dynamicgetsfiltergettype')->options; + // We do some sanitation for Gettype filter + if (ComponentbuilderHelper::checkArray($this->gettypeOptions) && + isset($this->gettypeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->gettypeOptions[0]->value)) + { + unset($this->gettypeOptions[0]); + } // Gettype Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_GETTYPE_LABEL').' -', @@ -306,77 +272,5 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy 'a.gettype' => JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_GETTYPE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheMain_sourceSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('main_source')); - $query->from($db->quoteName('#__componentbuilder_dynamic_get')); - $query->order($db->quoteName('main_source') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $main_source) - { - // Translate the main_source selection - $text = $model->selectionTranslation($main_source,'main_source'); - // Now add the main_source and its text to the options array - $_filter[] = JHtml::_('select.option', $main_source, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheGettypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('gettype')); - $query->from($db->quoteName('#__componentbuilder_dynamic_get')); - $query->order($db->quoteName('gettype') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $gettype) - { - // Translate the gettype selection - $text = $model->selectionTranslation($gettype,'gettype'); - // Now add the gettype and its text to the options array - $_filter[] = JHtml::_('select.option', $gettype, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/fields/tmpl/default.php b/admin/views/fields/tmpl/default.php index 48137594f..4f406fd4d 100644 --- a/admin/views/fields/tmpl/default.php +++ b/admin/views/fields/tmpl/default.php @@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_FIELDS_CATEGORIES') . ' -')); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +24,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'fieldList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +33,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +59,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/fields/tmpl/default_head.php b/admin/views/fields/tmpl/default_head.php index 7deb734ca..16f3dd75b 100644 --- a/admin/views/fields/tmpl/default_head.php +++ b/admin/views/fields/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 411b5b195..409239037 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewFields extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,129 +163,6 @@ class ComponentbuilderViewFields extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Category Filter. - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_CATEGORY'), - 'filter_category_id', - JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.field'), 'value', 'text', $this->state->get('filter.category_id')) - ); - - // Set Fieldtype Name Selection - $this->fieldtypeNameOptions = JFormHelper::loadFieldType('Fieldtypes')->options; - // We do some sanitation for Fieldtype Name filter - if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions) && - isset($this->fieldtypeNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->fieldtypeNameOptions[0]->value)) - { - unset($this->fieldtypeNameOptions[0]); - } - // Only load Fieldtype Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions)) - { - // Fieldtype Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL') . ' -', - 'filter_fieldtype', - JHtml::_('select.options', $this->fieldtypeNameOptions, 'value', 'text', $this->state->get('filter.fieldtype')) - ); - } - - // Set Datatype Selection - $this->datatypeOptions = $this->getTheDatatypeSelections(); - // We do some sanitation for Datatype filter - if (ComponentbuilderHelper::checkArray($this->datatypeOptions) && - isset($this->datatypeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->datatypeOptions[0]->value)) - { - unset($this->datatypeOptions[0]); - } - // Only load Datatype filter if it has values - if (ComponentbuilderHelper::checkArray($this->datatypeOptions)) - { - // Datatype Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL').' -', - 'filter_datatype', - JHtml::_('select.options', $this->datatypeOptions, 'value', 'text', $this->state->get('filter.datatype')) - ); - } - - // Set Indexes Selection - $this->indexesOptions = $this->getTheIndexesSelections(); - // We do some sanitation for Indexes filter - if (ComponentbuilderHelper::checkArray($this->indexesOptions) && - isset($this->indexesOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->indexesOptions[0]->value)) - { - unset($this->indexesOptions[0]); - } - // Only load Indexes filter if it has values - if (ComponentbuilderHelper::checkArray($this->indexesOptions)) - { - // Indexes Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL').' -', - 'filter_indexes', - JHtml::_('select.options', $this->indexesOptions, 'value', 'text', $this->state->get('filter.indexes')) - ); - } - - // Set Null Switch Selection - $this->null_switchOptions = $this->getTheNull_switchSelections(); - // We do some sanitation for Null Switch filter - if (ComponentbuilderHelper::checkArray($this->null_switchOptions) && - isset($this->null_switchOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->null_switchOptions[0]->value)) - { - unset($this->null_switchOptions[0]); - } - // Only load Null Switch filter if it has values - if (ComponentbuilderHelper::checkArray($this->null_switchOptions)) - { - // Null Switch Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL').' -', - 'filter_null_switch', - JHtml::_('select.options', $this->null_switchOptions, 'value', 'text', $this->state->get('filter.null_switch')) - ); - } - - // Set Store Selection - $this->storeOptions = $this->getTheStoreSelections(); - // We do some sanitation for Store filter - if (ComponentbuilderHelper::checkArray($this->storeOptions) && - isset($this->storeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->storeOptions[0]->value)) - { - unset($this->storeOptions[0]); - } - // Only load Store filter if it has values - if (ComponentbuilderHelper::checkArray($this->storeOptions)) - { - // Store Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL').' -', - 'filter_store', - JHtml::_('select.options', $this->storeOptions, 'value', 'text', $this->state->get('filter.store')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -315,6 +196,15 @@ class ComponentbuilderViewFields extends JViewLegacy // Only load Fieldtype Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Fieldtype Name Selection + $this->fieldtypeNameOptions = JFormHelper::loadFieldType('Fieldtypes')->options; + // We do some sanitation for Fieldtype Name filter + if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions) && + isset($this->fieldtypeNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->fieldtypeNameOptions[0]->value)) + { + unset($this->fieldtypeNameOptions[0]); + } // Fieldtype Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL').' -', @@ -326,6 +216,15 @@ class ComponentbuilderViewFields extends JViewLegacy // Only load Datatype batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Datatype Selection + $this->datatypeOptions = JFormHelper::loadFieldType('fieldsfilterdatatype')->options; + // We do some sanitation for Datatype filter + if (ComponentbuilderHelper::checkArray($this->datatypeOptions) && + isset($this->datatypeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->datatypeOptions[0]->value)) + { + unset($this->datatypeOptions[0]); + } // Datatype Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL').' -', @@ -337,6 +236,15 @@ class ComponentbuilderViewFields extends JViewLegacy // Only load Indexes batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Indexes Selection + $this->indexesOptions = JFormHelper::loadFieldType('fieldsfilterindexes')->options; + // We do some sanitation for Indexes filter + if (ComponentbuilderHelper::checkArray($this->indexesOptions) && + isset($this->indexesOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->indexesOptions[0]->value)) + { + unset($this->indexesOptions[0]); + } // Indexes Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL').' -', @@ -348,6 +256,15 @@ class ComponentbuilderViewFields extends JViewLegacy // Only load Null Switch batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Null Switch Selection + $this->null_switchOptions = JFormHelper::loadFieldType('fieldsfilternullswitch')->options; + // We do some sanitation for Null Switch filter + if (ComponentbuilderHelper::checkArray($this->null_switchOptions) && + isset($this->null_switchOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->null_switchOptions[0]->value)) + { + unset($this->null_switchOptions[0]); + } // Null Switch Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL').' -', @@ -359,6 +276,15 @@ class ComponentbuilderViewFields extends JViewLegacy // Only load Store batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Store Selection + $this->storeOptions = JFormHelper::loadFieldType('fieldsfilterstore')->options; + // We do some sanitation for Store filter + if (ComponentbuilderHelper::checkArray($this->storeOptions) && + isset($this->storeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->storeOptions[0]->value)) + { + unset($this->storeOptions[0]); + } // Store Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL').' -', @@ -420,149 +346,5 @@ class ComponentbuilderViewFields extends JViewLegacy 'category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheDatatypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('datatype')); - $query->from($db->quoteName('#__componentbuilder_field')); - $query->order($db->quoteName('datatype') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $datatype) - { - // Translate the datatype selection - $text = $model->selectionTranslation($datatype,'datatype'); - // Now add the datatype and its text to the options array - $_filter[] = JHtml::_('select.option', $datatype, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheIndexesSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('indexes')); - $query->from($db->quoteName('#__componentbuilder_field')); - $query->order($db->quoteName('indexes') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $indexes) - { - // Translate the indexes selection - $text = $model->selectionTranslation($indexes,'indexes'); - // Now add the indexes and its text to the options array - $_filter[] = JHtml::_('select.option', $indexes, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheNull_switchSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('null_switch')); - $query->from($db->quoteName('#__componentbuilder_field')); - $query->order($db->quoteName('null_switch') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $null_switch) - { - // Translate the null_switch selection - $text = $model->selectionTranslation($null_switch,'null_switch'); - // Now add the null_switch and its text to the options array - $_filter[] = JHtml::_('select.option', $null_switch, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheStoreSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('store')); - $query->from($db->quoteName('#__componentbuilder_field')); - $query->order($db->quoteName('store') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $store) - { - // Translate the store selection - $text = $model->selectionTranslation($store,'store'); - // Now add the store and its text to the options array - $_filter[] = JHtml::_('select.option', $store, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/fieldtypes/tmpl/default.php b/admin/views/fieldtypes/tmpl/default.php index 4efe559a8..3fd54c55e 100644 --- a/admin/views/fieldtypes/tmpl/default.php +++ b/admin/views/fieldtypes/tmpl/default.php @@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_FIELDTYPES_CATEGORIES') . ' -')); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +24,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'fieldtypeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +33,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,29 +30,29 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -60,6 +60,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +59,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/fieldtypes/tmpl/default_head.php b/admin/views/fieldtypes/tmpl/default_head.php index 0328ceb50..3924a1b10 100644 --- a/admin/views/fieldtypes/tmpl/default_head.php +++ b/admin/views/fieldtypes/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index 84e74c90d..0e82d3893 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -154,29 +158,6 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Category Filter. - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_CATEGORY'), - 'filter_category_id', - JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fieldtype'), 'value', 'text', $this->state->get('filter.category_id')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php index 6542eb74d..3643e866f 100644 --- a/admin/views/help_documents/tmpl/default.php +++ b/admin/views/help_documents/tmpl/default.php @@ -22,23 +22,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'help_documentList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +31,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +57,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php index 9399acfc5..d037a443a 100644 --- a/admin/views/help_documents/tmpl/default_head.php +++ b/admin/views/help_documents/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 68f5a0212..d0f42796d 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -154,96 +158,6 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - // We do some sanitation for Type filter - if (ComponentbuilderHelper::checkArray($this->typeOptions) && - isset($this->typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) - { - unset($this->typeOptions[0]); - } - // Only load Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->typeOptions)) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) - ); - } - - // Set Location Selection - $this->locationOptions = $this->getTheLocationSelections(); - // We do some sanitation for Location filter - if (ComponentbuilderHelper::checkArray($this->locationOptions) && - isset($this->locationOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->locationOptions[0]->value)) - { - unset($this->locationOptions[0]); - } - // Only load Location filter if it has values - if (ComponentbuilderHelper::checkArray($this->locationOptions)) - { - // Location Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_LOCATION_LABEL').' -', - 'filter_location', - JHtml::_('select.options', $this->locationOptions, 'value', 'text', $this->state->get('filter.location')) - ); - } - - // Set Admin View Selection - $this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options; - // We do some sanitation for Admin View filter - if (ComponentbuilderHelper::checkArray($this->admin_viewOptions) && - isset($this->admin_viewOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->admin_viewOptions[0]->value)) - { - unset($this->admin_viewOptions[0]); - } - // Only load Admin View filter if it has values - if (ComponentbuilderHelper::checkArray($this->admin_viewOptions)) - { - // Admin View Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL') . ' -', - 'filter_admin_view', - JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text', $this->state->get('filter.admin_view')) - ); - } - - // Set Site View Selection - $this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options; - // We do some sanitation for Site View filter - if (ComponentbuilderHelper::checkArray($this->site_viewOptions) && - isset($this->site_viewOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->site_viewOptions[0]->value)) - { - unset($this->site_viewOptions[0]); - } - // Only load Site View filter if it has values - if (ComponentbuilderHelper::checkArray($this->site_viewOptions)) - { - // Site View Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL') . ' -', - 'filter_site_view', - JHtml::_('select.options', $this->site_viewOptions, 'value', 'text', $this->state->get('filter.site_view')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -257,6 +171,15 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Only load Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Type Selection + $this->typeOptions = JFormHelper::loadFieldType('helpdocumentsfiltertype')->options; + // We do some sanitation for Type filter + if (ComponentbuilderHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) + { + unset($this->typeOptions[0]); + } // Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL').' -', @@ -268,6 +191,15 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Only load Location batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Location Selection + $this->locationOptions = JFormHelper::loadFieldType('helpdocumentsfilterlocation')->options; + // We do some sanitation for Location filter + if (ComponentbuilderHelper::checkArray($this->locationOptions) && + isset($this->locationOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->locationOptions[0]->value)) + { + unset($this->locationOptions[0]); + } // Location Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_LOCATION_LABEL').' -', @@ -279,6 +211,15 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Only load Admin View batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Admin View Selection + $this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options; + // We do some sanitation for Admin View filter + if (ComponentbuilderHelper::checkArray($this->admin_viewOptions) && + isset($this->admin_viewOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->admin_viewOptions[0]->value)) + { + unset($this->admin_viewOptions[0]); + } // Admin View Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', @@ -290,6 +231,15 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Only load Site View batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Site View Selection + $this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options; + // We do some sanitation for Site View filter + if (ComponentbuilderHelper::checkArray($this->site_viewOptions) && + isset($this->site_viewOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->site_viewOptions[0]->value)) + { + unset($this->site_viewOptions[0]); + } // Site View Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', @@ -349,77 +299,5 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy 'h.' => JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheTypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('type')); - $query->from($db->quoteName('#__componentbuilder_help_document')); - $query->order($db->quoteName('type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $type) - { - // Translate the type selection - $text = $model->selectionTranslation($type,'type'); - // Now add the type and its text to the options array - $_filter[] = JHtml::_('select.option', $type, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheLocationSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('location')); - $query->from($db->quoteName('#__componentbuilder_help_document')); - $query->order($db->quoteName('location') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $location) - { - // Translate the location selection - $text = $model->selectionTranslation($location,'location'); - // Now add the location and its text to the options array - $_filter[] = JHtml::_('select.option', $location, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index 35bce31e1..290f70bc5 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_componentList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,26 +30,26 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -57,6 +57,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index 6df7428d6..6b0db19fa 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index ac94ffdbe..bb15d6fc2 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -184,62 +188,6 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Companyname Selection - $this->companynameOptions = $this->getTheCompanynameSelections(); - // We do some sanitation for Companyname filter - if (ComponentbuilderHelper::checkArray($this->companynameOptions) && - isset($this->companynameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->companynameOptions[0]->value)) - { - unset($this->companynameOptions[0]); - } - // Only load Companyname filter if it has values - if (ComponentbuilderHelper::checkArray($this->companynameOptions)) - { - // Companyname Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL').' -', - 'filter_companyname', - JHtml::_('select.options', $this->companynameOptions, 'value', 'text', $this->state->get('filter.companyname')) - ); - } - - // Set Author Selection - $this->authorOptions = $this->getTheAuthorSelections(); - // We do some sanitation for Author filter - if (ComponentbuilderHelper::checkArray($this->authorOptions) && - isset($this->authorOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->authorOptions[0]->value)) - { - unset($this->authorOptions[0]); - } - // Only load Author filter if it has values - if (ComponentbuilderHelper::checkArray($this->authorOptions)) - { - // Author Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL').' -', - 'filter_author', - JHtml::_('select.options', $this->authorOptions, 'value', 'text', $this->state->get('filter.author')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -263,6 +211,15 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy // Only load Companyname batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Companyname Selection + $this->companynameOptions = JFormHelper::loadFieldType('joomlacomponentsfiltercompanyname')->options; + // We do some sanitation for Companyname filter + if (ComponentbuilderHelper::checkArray($this->companynameOptions) && + isset($this->companynameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->companynameOptions[0]->value)) + { + unset($this->companynameOptions[0]); + } // Companyname Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL').' -', @@ -274,6 +231,15 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy // Only load Author batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Author Selection + $this->authorOptions = JFormHelper::loadFieldType('joomlacomponentsfilterauthor')->options; + // We do some sanitation for Author filter + if (ComponentbuilderHelper::checkArray($this->authorOptions) && + isset($this->authorOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->authorOptions[0]->value)) + { + unset($this->authorOptions[0]); + } // Author Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL').' -', @@ -332,69 +298,5 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy 'a.companyname' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheCompanynameSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('companyname')); - $query->from($db->quoteName('#__componentbuilder_joomla_component')); - $query->order($db->quoteName('companyname') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - $results = array_unique($results); - $_filter = array(); - foreach ($results as $companyname) - { - // Now add the companyname and its text to the options array - $_filter[] = JHtml::_('select.option', $companyname, $companyname); - } - return $_filter; - } - return false; - } - - protected function getTheAuthorSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('author')); - $query->from($db->quoteName('#__componentbuilder_joomla_component')); - $query->order($db->quoteName('author') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - $results = array_unique($results); - $_filter = array(); - foreach ($results as $author) - { - // Now add the author and its text to the options array - $_filter[] = JHtml::_('select.option', $author, $author); - } - return $_filter; - } - return false; } } diff --git a/admin/views/joomla_modules/tmpl/default.php b/admin/views/joomla_modules/tmpl/default.php index defbb8705..00c9a824c 100644 --- a/admin/views/joomla_modules/tmpl/default.php +++ b/admin/views/joomla_modules/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_moduleList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,20 +30,20 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_modules/tmpl/default_head.php b/admin/views/joomla_modules/tmpl/default_head.php index 342183575..e4daeebfa 100644 --- a/admin/views/joomla_modules/tmpl/default_head.php +++ b/admin/views/joomla_modules/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_modules/view.html.php b/admin/views/joomla_modules/view.html.php index dbf5f1756..9f1230d49 100644 --- a/admin/views/joomla_modules/view.html.php +++ b/admin/views/joomla_modules/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -154,42 +158,6 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Target Selection - $this->targetOptions = $this->getTheTargetSelections(); - // We do some sanitation for Target filter - if (ComponentbuilderHelper::checkArray($this->targetOptions) && - isset($this->targetOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->targetOptions[0]->value)) - { - unset($this->targetOptions[0]); - } - // Only load Target filter if it has values - if (ComponentbuilderHelper::checkArray($this->targetOptions)) - { - // Target Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL').' -', - 'filter_target', - JHtml::_('select.options', $this->targetOptions, 'value', 'text', $this->state->get('filter.target')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -213,6 +181,15 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy // Only load Target batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Target Selection + $this->targetOptions = JFormHelper::loadFieldType('joomlamodulesfiltertarget')->options; + // We do some sanitation for Target filter + if (ComponentbuilderHelper::checkArray($this->targetOptions) && + isset($this->targetOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->targetOptions[0]->value)) + { + unset($this->targetOptions[0]); + } // Target Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL').' -', @@ -269,41 +246,5 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy 'a.description' => JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheTargetSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('target')); - $query->from($db->quoteName('#__componentbuilder_joomla_module')); - $query->order($db->quoteName('target') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $target) - { - // Translate the target selection - $text = $model->selectionTranslation($target,'target'); - // Now add the target and its text to the options array - $_filter[] = JHtml::_('select.option', $target, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default.php index a2ce66fd3..a72c6ff61 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_module_files_folders_urlsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php index c222f6c1d..514e59d1c 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_modules_files_folders_urls/view.html.php b/admin/views/joomla_modules_files_folders_urls/view.html.php index 028d8b69a..a4c88c052 100644 --- a/admin/views/joomla_modules_files_folders_urls/view.html.php +++ b/admin/views/joomla_modules_files_folders_urls/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/joomla_modules_updates/tmpl/default.php b/admin/views/joomla_modules_updates/tmpl/default.php index 794d943fc..bd1993404 100644 --- a/admin/views/joomla_modules_updates/tmpl/default.php +++ b/admin/views/joomla_modules_updates/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_module_updatesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_modules_updates/tmpl/default_head.php b/admin/views/joomla_modules_updates/tmpl/default_head.php index 87a478d34..6fd993969 100644 --- a/admin/views/joomla_modules_updates/tmpl/default_head.php +++ b/admin/views/joomla_modules_updates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_modules_updates/view.html.php b/admin/views/joomla_modules_updates/view.html.php index 9caeee6ff..d30a364ea 100644 --- a/admin/views/joomla_modules_updates/view.html.php +++ b/admin/views/joomla_modules_updates/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewJoomla_modules_updates extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/joomla_plugin_groups/tmpl/default.php b/admin/views/joomla_plugin_groups/tmpl/default.php index 4e17a1b51..7a1953a62 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default.php +++ b/admin/views/joomla_plugin_groups/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_plugin_groupList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_plugin_groups/tmpl/default_head.php b/admin/views/joomla_plugin_groups/tmpl/default_head.php index 19f70d75e..d308ef0b0 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default_head.php +++ b/admin/views/joomla_plugin_groups/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_plugin_groups/view.html.php b/admin/views/joomla_plugin_groups/view.html.php index 3ef4e9056..2a177a261 100644 --- a/admin/views/joomla_plugin_groups/view.html.php +++ b/admin/views/joomla_plugin_groups/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,42 +148,6 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Class Extends Name Selection - $this->class_extendsNameOptions = JFormHelper::loadFieldType('Classextends')->options; - // We do some sanitation for Class Extends Name filter - if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions) && - isset($this->class_extendsNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->class_extendsNameOptions[0]->value)) - { - unset($this->class_extendsNameOptions[0]); - } - // Only load Class Extends Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions)) - { - // Class Extends Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL') . ' -', - 'filter_class_extends', - JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text', $this->state->get('filter.class_extends')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -203,6 +171,15 @@ class ComponentbuilderViewJoomla_plugin_groups extends JViewLegacy // Only load Class Extends Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Class Extends Name Selection + $this->class_extendsNameOptions = JFormHelper::loadFieldType('Classextends')->options; + // We do some sanitation for Class Extends Name filter + if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions) && + isset($this->class_extendsNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->class_extendsNameOptions[0]->value)) + { + unset($this->class_extendsNameOptions[0]); + } // Class Extends Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL').' -', diff --git a/admin/views/joomla_plugins/tmpl/default.php b/admin/views/joomla_plugins/tmpl/default.php index e84f947c2..fa8b1f174 100644 --- a/admin/views/joomla_plugins/tmpl/default.php +++ b/admin/views/joomla_plugins/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_pluginList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_plugins/tmpl/default_head.php b/admin/views/joomla_plugins/tmpl/default_head.php index 5841c34a5..963e8030f 100644 --- a/admin/views/joomla_plugins/tmpl/default_head.php +++ b/admin/views/joomla_plugins/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index 487170ec4..ecec23805 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -164,62 +168,6 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Class Extends Name Selection - $this->class_extendsNameOptions = JFormHelper::loadFieldType('Classextends')->options; - // We do some sanitation for Class Extends Name filter - if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions) && - isset($this->class_extendsNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->class_extendsNameOptions[0]->value)) - { - unset($this->class_extendsNameOptions[0]); - } - // Only load Class Extends Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions)) - { - // Class Extends Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL') . ' -', - 'filter_class_extends', - JHtml::_('select.options', $this->class_extendsNameOptions, 'value', 'text', $this->state->get('filter.class_extends')) - ); - } - - // Set Joomla Plugin Group Name Selection - $this->joomla_plugin_groupNameOptions = JFormHelper::loadFieldType('Joomlaplugingroups')->options; - // We do some sanitation for Joomla Plugin Group Name filter - if (ComponentbuilderHelper::checkArray($this->joomla_plugin_groupNameOptions) && - isset($this->joomla_plugin_groupNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->joomla_plugin_groupNameOptions[0]->value)) - { - unset($this->joomla_plugin_groupNameOptions[0]); - } - // Only load Joomla Plugin Group Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->joomla_plugin_groupNameOptions)) - { - // Joomla Plugin Group Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL') . ' -', - 'filter_joomla_plugin_group', - JHtml::_('select.options', $this->joomla_plugin_groupNameOptions, 'value', 'text', $this->state->get('filter.joomla_plugin_group')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -243,6 +191,15 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy // Only load Class Extends Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Class Extends Name Selection + $this->class_extendsNameOptions = JFormHelper::loadFieldType('Classextends')->options; + // We do some sanitation for Class Extends Name filter + if (ComponentbuilderHelper::checkArray($this->class_extendsNameOptions) && + isset($this->class_extendsNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->class_extendsNameOptions[0]->value)) + { + unset($this->class_extendsNameOptions[0]); + } // Class Extends Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL').' -', @@ -254,6 +211,15 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy // Only load Joomla Plugin Group Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Joomla Plugin Group Name Selection + $this->joomla_plugin_groupNameOptions = JFormHelper::loadFieldType('Joomlaplugingroups')->options; + // We do some sanitation for Joomla Plugin Group Name filter + if (ComponentbuilderHelper::checkArray($this->joomla_plugin_groupNameOptions) && + isset($this->joomla_plugin_groupNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->joomla_plugin_groupNameOptions[0]->value)) + { + unset($this->joomla_plugin_groupNameOptions[0]); + } // Joomla Plugin Group Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL').' -', diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php index 821fd6af6..74b584e22 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_plugin_files_folders_urlsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php index 912c93ff0..52e49a0a1 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_plugins_files_folders_urls/view.html.php b/admin/views/joomla_plugins_files_folders_urls/view.html.php index 7354eee9e..3e7f8198d 100644 --- a/admin/views/joomla_plugins_files_folders_urls/view.html.php +++ b/admin/views/joomla_plugins_files_folders_urls/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/joomla_plugins_updates/tmpl/default.php b/admin/views/joomla_plugins_updates/tmpl/default.php index 0ffb6d45b..4024e73da 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default.php +++ b/admin/views/joomla_plugins_updates/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'joomla_plugin_updatesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/joomla_plugins_updates/tmpl/default_head.php b/admin/views/joomla_plugins_updates/tmpl/default_head.php index 2b2815f2e..1df2d570e 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default_head.php +++ b/admin/views/joomla_plugins_updates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/joomla_plugins_updates/view.html.php b/admin/views/joomla_plugins_updates/view.html.php index 17870d572..c3616a9e1 100644 --- a/admin/views/joomla_plugins_updates/view.html.php +++ b/admin/views/joomla_plugins_updates/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewJoomla_plugins_updates extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/language_translations/tmpl/default.php b/admin/views/language_translations/tmpl/default.php index aea43b3e2..1391013ab 100644 --- a/admin/views/language_translations/tmpl/default.php +++ b/admin/views/language_translations/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'language_translationList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/language_translations/tmpl/default_head.php b/admin/views/language_translations/tmpl/default_head.php index c8c679102..144310a3b 100644 --- a/admin/views/language_translations/tmpl/default_head.php +++ b/admin/views/language_translations/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/language_translations/view.html.php b/admin/views/language_translations/view.html.php index 3c1681432..51c3f0934 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -154,22 +158,6 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/languages/tmpl/default.php b/admin/views/languages/tmpl/default.php index 53db95299..0af1a813e 100644 --- a/admin/views/languages/tmpl/default.php +++ b/admin/views/languages/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'languageList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,11 +30,11 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/languages/tmpl/default_head.php b/admin/views/languages/tmpl/default_head.php index 5b7548b8f..e5d46179b 100644 --- a/admin/views/languages/tmpl/default_head.php +++ b/admin/views/languages/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index a7c31cbea..fb17e4fd1 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewLanguages extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -159,22 +163,6 @@ class ComponentbuilderViewLanguages extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/layouts/tmpl/default.php b/admin/views/layouts/tmpl/default.php index c445ce46a..fa9ebdedd 100644 --- a/admin/views/layouts/tmpl/default.php +++ b/admin/views/layouts/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'layoutList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/layouts/tmpl/default_head.php b/admin/views/layouts/tmpl/default_head.php index f9b164085..573ed5b96 100644 --- a/admin/views/layouts/tmpl/default_head.php +++ b/admin/views/layouts/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 89db5a228..791cc662d 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewLayouts extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,62 +163,6 @@ class ComponentbuilderViewLayouts extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Dynamic Get Name Selection - $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; - // We do some sanitation for Dynamic Get Name filter - if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && - isset($this->dynamic_getNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) - { - unset($this->dynamic_getNameOptions[0]); - } - // Only load Dynamic Get Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions)) - { - // Dynamic Get Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL') . ' -', - 'filter_dynamic_get', - JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text', $this->state->get('filter.dynamic_get')) - ); - } - - // Set Add Php View Selection - $this->add_php_viewOptions = $this->getTheAdd_php_viewSelections(); - // We do some sanitation for Add Php View filter - if (ComponentbuilderHelper::checkArray($this->add_php_viewOptions) && - isset($this->add_php_viewOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_php_viewOptions[0]->value)) - { - unset($this->add_php_viewOptions[0]); - } - // Only load Add Php View filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_php_viewOptions)) - { - // Add Php View Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_LAYOUT_ADD_PHP_VIEW_LABEL').' -', - 'filter_add_php_view', - JHtml::_('select.options', $this->add_php_viewOptions, 'value', 'text', $this->state->get('filter.add_php_view')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -238,6 +186,15 @@ class ComponentbuilderViewLayouts extends JViewLegacy // Only load Dynamic Get Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Dynamic Get Name Selection + $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; + // We do some sanitation for Dynamic Get Name filter + if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && + isset($this->dynamic_getNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) + { + unset($this->dynamic_getNameOptions[0]); + } // Dynamic Get Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL').' -', @@ -249,6 +206,15 @@ class ComponentbuilderViewLayouts extends JViewLegacy // Only load Add Php View batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Php View Selection + $this->add_php_viewOptions = JFormHelper::loadFieldType('layoutsfilteraddphpview')->options; + // We do some sanitation for Add Php View filter + if (ComponentbuilderHelper::checkArray($this->add_php_viewOptions) && + isset($this->add_php_viewOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_php_viewOptions[0]->value)) + { + unset($this->add_php_viewOptions[0]); + } // Add Php View Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LAYOUT_ADD_PHP_VIEW_LABEL').' -', @@ -306,41 +272,5 @@ class ComponentbuilderViewLayouts extends JViewLegacy 'g.name' => JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheAdd_php_viewSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_php_view')); - $query->from($db->quoteName('#__componentbuilder_layout')); - $query->order($db->quoteName('add_php_view') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_php_view) - { - // Translate the add_php_view selection - $text = $model->selectionTranslation($add_php_view,'add_php_view'); - // Now add the add_php_view and its text to the options array - $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/libraries/tmpl/default.php b/admin/views/libraries/tmpl/default.php index cc03fab42..39839ef54 100644 --- a/admin/views/libraries/tmpl/default.php +++ b/admin/views/libraries/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'libraryList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/libraries/tmpl/default_head.php b/admin/views/libraries/tmpl/default_head.php index d6aad882e..d5de3f87a 100644 --- a/admin/views/libraries/tmpl/default_head.php +++ b/admin/views/libraries/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 271709900..5d5d8509f 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewLibraries extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -149,82 +153,6 @@ class ComponentbuilderViewLibraries extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Target Selection - $this->targetOptions = $this->getTheTargetSelections(); - // We do some sanitation for Target filter - if (ComponentbuilderHelper::checkArray($this->targetOptions) && - isset($this->targetOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->targetOptions[0]->value)) - { - unset($this->targetOptions[0]); - } - // Only load Target filter if it has values - if (ComponentbuilderHelper::checkArray($this->targetOptions)) - { - // Target Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL').' -', - 'filter_target', - JHtml::_('select.options', $this->targetOptions, 'value', 'text', $this->state->get('filter.target')) - ); - } - - // Set How Selection - $this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->options; - // We do some sanitation for How filter - if (ComponentbuilderHelper::checkArray($this->howOptions) && - isset($this->howOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->howOptions[0]->value)) - { - unset($this->howOptions[0]); - } - // Only load How filter if it has values - if (ComponentbuilderHelper::checkArray($this->howOptions)) - { - // How Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL') . ' -', - 'filter_how', - JHtml::_('select.options', $this->howOptions, 'value', 'text', $this->state->get('filter.how')) - ); - } - - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - // We do some sanitation for Type filter - if (ComponentbuilderHelper::checkArray($this->typeOptions) && - isset($this->typeOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) - { - unset($this->typeOptions[0]); - } - // Only load Type filter if it has values - if (ComponentbuilderHelper::checkArray($this->typeOptions)) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -248,6 +176,15 @@ class ComponentbuilderViewLibraries extends JViewLegacy // Only load Target batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Target Selection + $this->targetOptions = JFormHelper::loadFieldType('librariesfiltertarget')->options; + // We do some sanitation for Target filter + if (ComponentbuilderHelper::checkArray($this->targetOptions) && + isset($this->targetOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->targetOptions[0]->value)) + { + unset($this->targetOptions[0]); + } // Target Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL').' -', @@ -259,6 +196,15 @@ class ComponentbuilderViewLibraries extends JViewLegacy // Only load How batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set How Selection + $this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->options; + // We do some sanitation for How filter + if (ComponentbuilderHelper::checkArray($this->howOptions) && + isset($this->howOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->howOptions[0]->value)) + { + unset($this->howOptions[0]); + } // How Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL').' -', @@ -270,6 +216,15 @@ class ComponentbuilderViewLibraries extends JViewLegacy // Only load Type batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Type Selection + $this->typeOptions = JFormHelper::loadFieldType('librariesfiltertype')->options; + // We do some sanitation for Type filter + if (ComponentbuilderHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) + { + unset($this->typeOptions[0]); + } // Type Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL').' -', @@ -328,77 +283,5 @@ class ComponentbuilderViewLibraries extends JViewLegacy 'a.description' => JText::_('COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheTargetSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('target')); - $query->from($db->quoteName('#__componentbuilder_library')); - $query->order($db->quoteName('target') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $target) - { - // Translate the target selection - $text = $model->selectionTranslation($target,'target'); - // Now add the target and its text to the options array - $_filter[] = JHtml::_('select.option', $target, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheTypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('type')); - $query->from($db->quoteName('#__componentbuilder_library')); - $query->order($db->quoteName('type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $type) - { - // Translate the type selection - $text = $model->selectionTranslation($type,'type'); - // Now add the type and its text to the options array - $_filter[] = JHtml::_('select.option', $type, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/libraries_config/tmpl/default.php b/admin/views/libraries_config/tmpl/default.php index 2d258228c..ca6c6b6c4 100644 --- a/admin/views/libraries_config/tmpl/default.php +++ b/admin/views/libraries_config/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'library_configList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,23 +30,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/libraries_config/tmpl/default_head.php b/admin/views/libraries_config/tmpl/default_head.php index 933acb9ce..cb89a9464 100644 --- a/admin/views/libraries_config/tmpl/default_head.php +++ b/admin/views/libraries_config/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/libraries_config/view.html.php b/admin/views/libraries_config/view.html.php index 94fb45a50..16f1da1e4 100644 --- a/admin/views/libraries_config/view.html.php +++ b/admin/views/libraries_config/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/libraries_files_folders_urls/tmpl/default.php b/admin/views/libraries_files_folders_urls/tmpl/default.php index 51423a8e0..340fd74a8 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'library_files_folders_urlsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/libraries_files_folders_urls/tmpl/default_head.php b/admin/views/libraries_files_folders_urls/tmpl/default_head.php index 737f3ea36..a7ac240eb 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default_head.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/libraries_files_folders_urls/view.html.php b/admin/views/libraries_files_folders_urls/view.html.php index 089c4b28f..39a348267 100644 --- a/admin/views/libraries_files_folders_urls/view.html.php +++ b/admin/views/libraries_files_folders_urls/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/placeholders/tmpl/default.php b/admin/views/placeholders/tmpl/default.php index abb59264e..506c71d3b 100644 --- a/admin/views/placeholders/tmpl/default.php +++ b/admin/views/placeholders/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'placeholderList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -34,7 +34,7 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -42,6 +42,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/placeholders/tmpl/default_head.php b/admin/views/placeholders/tmpl/default_head.php index 3cb17175e..bbef1d4e3 100644 --- a/admin/views/placeholders/tmpl/default_head.php +++ b/admin/views/placeholders/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/placeholders/view.html.php b/admin/views/placeholders/view.html.php index fd097e807..4bc1d8ee0 100644 --- a/admin/views/placeholders/view.html.php +++ b/admin/views/placeholders/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewPlaceholders extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -154,22 +158,6 @@ class ComponentbuilderViewPlaceholders extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/servers/tmpl/default.php b/admin/views/servers/tmpl/default.php index a2c5b200d..81cb77a97 100644 --- a/admin/views/servers/tmpl/default.php +++ b/admin/views/servers/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'serverList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/servers/tmpl/default_head.php b/admin/views/servers/tmpl/default_head.php index a98a0a9d8..2d8a3351e 100644 --- a/admin/views/servers/tmpl/default_head.php +++ b/admin/views/servers/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/servers/view.html.php b/admin/views/servers/view.html.php index 3ccee9b76..f5444b664 100644 --- a/admin/views/servers/view.html.php +++ b/admin/views/servers/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewServers extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -154,62 +158,6 @@ class ComponentbuilderViewServers extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Name Selection - $this->nameOptions = $this->getTheNameSelections(); - // We do some sanitation for Name filter - if (ComponentbuilderHelper::checkArray($this->nameOptions) && - isset($this->nameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->nameOptions[0]->value)) - { - unset($this->nameOptions[0]); - } - // Only load Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->nameOptions)) - { - // Name Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL').' -', - 'filter_name', - JHtml::_('select.options', $this->nameOptions, 'value', 'text', $this->state->get('filter.name')) - ); - } - - // Set Protocol Selection - $this->protocolOptions = $this->getTheProtocolSelections(); - // We do some sanitation for Protocol filter - if (ComponentbuilderHelper::checkArray($this->protocolOptions) && - isset($this->protocolOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->protocolOptions[0]->value)) - { - unset($this->protocolOptions[0]); - } - // Only load Protocol filter if it has values - if (ComponentbuilderHelper::checkArray($this->protocolOptions)) - { - // Protocol Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL').' -', - 'filter_protocol', - JHtml::_('select.options', $this->protocolOptions, 'value', 'text', $this->state->get('filter.protocol')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -233,6 +181,15 @@ class ComponentbuilderViewServers extends JViewLegacy // Only load Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Name Selection + $this->nameOptions = JFormHelper::loadFieldType('serversfiltername')->options; + // We do some sanitation for Name filter + if (ComponentbuilderHelper::checkArray($this->nameOptions) && + isset($this->nameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->nameOptions[0]->value)) + { + unset($this->nameOptions[0]); + } // Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL').' -', @@ -244,6 +201,15 @@ class ComponentbuilderViewServers extends JViewLegacy // Only load Protocol batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Protocol Selection + $this->protocolOptions = JFormHelper::loadFieldType('serversfilterprotocol')->options; + // We do some sanitation for Protocol filter + if (ComponentbuilderHelper::checkArray($this->protocolOptions) && + isset($this->protocolOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->protocolOptions[0]->value)) + { + unset($this->protocolOptions[0]); + } // Protocol Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL').' -', @@ -300,73 +266,5 @@ class ComponentbuilderViewServers extends JViewLegacy 'a.protocol' => JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheNameSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('name')); - $query->from($db->quoteName('#__componentbuilder_server')); - $query->order($db->quoteName('name') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - $results = array_unique($results); - $_filter = array(); - foreach ($results as $name) - { - // Now add the name and its text to the options array - $_filter[] = JHtml::_('select.option', $name, $name); - } - return $_filter; - } - return false; - } - - protected function getTheProtocolSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('protocol')); - $query->from($db->quoteName('#__componentbuilder_server')); - $query->order($db->quoteName('protocol') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $protocol) - { - // Translate the protocol selection - $text = $model->selectionTranslation($protocol,'protocol'); - // Now add the protocol and its text to the options array - $_filter[] = JHtml::_('select.option', $protocol, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/site_views/tmpl/default.php b/admin/views/site_views/tmpl/default.php index ec038d586..526971e60 100644 --- a/admin/views/site_views/tmpl/default.php +++ b/admin/views/site_views/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'site_viewList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/site_views/tmpl/default_head.php b/admin/views/site_views/tmpl/default_head.php index a895af7fa..ce088bc50 100644 --- a/admin/views/site_views/tmpl/default_head.php +++ b/admin/views/site_views/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index c6aa5bd98..335d4b515 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewSite_views extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,82 +163,6 @@ class ComponentbuilderViewSite_views extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Main Get Name Selection - $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; - // We do some sanitation for Main Get Name filter - if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && - isset($this->main_getNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) - { - unset($this->main_getNameOptions[0]); - } - // Only load Main Get Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->main_getNameOptions)) - { - // Main Get Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL') . ' -', - 'filter_main_get', - JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get')) - ); - } - - // Set Add Php Ajax Selection - $this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections(); - // We do some sanitation for Add Php Ajax filter - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && - isset($this->add_php_ajaxOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) - { - unset($this->add_php_ajaxOptions[0]); - } - // Only load Add Php Ajax filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions)) - { - // Add Php Ajax Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_AJAX_LABEL').' -', - 'filter_add_php_ajax', - JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax')) - ); - } - - // Set Add Custom Button Selection - $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); - // We do some sanitation for Add Custom Button filter - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && - isset($this->add_custom_buttonOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) - { - unset($this->add_custom_buttonOptions[0]); - } - // Only load Add Custom Button filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions)) - { - // Add Custom Button Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', - 'filter_add_custom_button', - JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -258,6 +186,15 @@ class ComponentbuilderViewSite_views extends JViewLegacy // Only load Main Get Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Main Get Name Selection + $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; + // We do some sanitation for Main Get Name filter + if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && + isset($this->main_getNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) + { + unset($this->main_getNameOptions[0]); + } // Main Get Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL').' -', @@ -269,6 +206,15 @@ class ComponentbuilderViewSite_views extends JViewLegacy // Only load Add Php Ajax batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Php Ajax Selection + $this->add_php_ajaxOptions = JFormHelper::loadFieldType('siteviewsfilteraddphpajax')->options; + // We do some sanitation for Add Php Ajax filter + if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && + isset($this->add_php_ajaxOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) + { + unset($this->add_php_ajaxOptions[0]); + } // Add Php Ajax Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_AJAX_LABEL').' -', @@ -280,6 +226,15 @@ class ComponentbuilderViewSite_views extends JViewLegacy // Only load Add Custom Button batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Custom Button Selection + $this->add_custom_buttonOptions = JFormHelper::loadFieldType('siteviewsfilteraddcustombutton')->options; + // We do some sanitation for Add Custom Button filter + if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && + isset($this->add_custom_buttonOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) + { + unset($this->add_custom_buttonOptions[0]); + } // Add Custom Button Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', @@ -339,77 +294,5 @@ class ComponentbuilderViewSite_views extends JViewLegacy 'a.context' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_CONTEXT_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheAdd_php_ajaxSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_php_ajax')); - $query->from($db->quoteName('#__componentbuilder_site_view')); - $query->order($db->quoteName('add_php_ajax') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_php_ajax) - { - // Translate the add_php_ajax selection - $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); - // Now add the add_php_ajax and its text to the options array - $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheAdd_custom_buttonSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_custom_button')); - $query->from($db->quoteName('#__componentbuilder_site_view')); - $query->order($db->quoteName('add_custom_button') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_custom_button) - { - // Translate the add_custom_button selection - $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); - // Now add the add_custom_button and its text to the options array - $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/snippet_types/tmpl/default.php b/admin/views/snippet_types/tmpl/default.php index c9513a983..00001adcc 100644 --- a/admin/views/snippet_types/tmpl/default.php +++ b/admin/views/snippet_types/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'snippet_typeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,20 +30,20 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/snippet_types/tmpl/default_head.php b/admin/views/snippet_types/tmpl/default_head.php index 534996cdc..75b22fb43 100644 --- a/admin/views/snippet_types/tmpl/default_head.php +++ b/admin/views/snippet_types/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/snippet_types/view.html.php b/admin/views/snippet_types/view.html.php index e30b1cd30..9872b9c67 100644 --- a/admin/views/snippet_types/view.html.php +++ b/admin/views/snippet_types/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); @@ -144,22 +148,6 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/admin/views/snippets/tmpl/default.php b/admin/views/snippets/tmpl/default.php index b9f0eab8e..684e26960 100644 --- a/admin/views/snippets/tmpl/default.php +++ b/admin/views/snippets/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'snippetList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/snippets/tmpl/default_head.php b/admin/views/snippets/tmpl/default_head.php index 541e50e8c..169f2cdb3 100644 --- a/admin/views/snippets/tmpl/default_head.php +++ b/admin/views/snippets/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index 7bd398e1e..88fcaecb7 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewSnippets extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -164,62 +168,6 @@ class ComponentbuilderViewSnippets extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Type Name Selection - $this->typeNameOptions = JFormHelper::loadFieldType('Snippettype')->options; - // We do some sanitation for Type Name filter - if (ComponentbuilderHelper::checkArray($this->typeNameOptions) && - isset($this->typeNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->typeNameOptions[0]->value)) - { - unset($this->typeNameOptions[0]); - } - // Only load Type Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->typeNameOptions)) - { - // Type Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL') . ' -', - 'filter_type', - JHtml::_('select.options', $this->typeNameOptions, 'value', 'text', $this->state->get('filter.type')) - ); - } - - // Set Library Name Selection - $this->libraryNameOptions = JFormHelper::loadFieldType('Library')->options; - // We do some sanitation for Library Name filter - if (ComponentbuilderHelper::checkArray($this->libraryNameOptions) && - isset($this->libraryNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->libraryNameOptions[0]->value)) - { - unset($this->libraryNameOptions[0]); - } - // Only load Library Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->libraryNameOptions)) - { - // Library Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL') . ' -', - 'filter_library', - JHtml::_('select.options', $this->libraryNameOptions, 'value', 'text', $this->state->get('filter.library')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -243,6 +191,15 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Only load Type Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Type Name Selection + $this->typeNameOptions = JFormHelper::loadFieldType('Snippettype')->options; + // We do some sanitation for Type Name filter + if (ComponentbuilderHelper::checkArray($this->typeNameOptions) && + isset($this->typeNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeNameOptions[0]->value)) + { + unset($this->typeNameOptions[0]); + } // Type Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_LABEL').' -', @@ -254,6 +211,15 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Only load Library Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Library Name Selection + $this->libraryNameOptions = JFormHelper::loadFieldType('Library')->options; + // We do some sanitation for Library Name filter + if (ComponentbuilderHelper::checkArray($this->libraryNameOptions) && + isset($this->libraryNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->libraryNameOptions[0]->value)) + { + unset($this->libraryNameOptions[0]); + } // Library Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL').' -', diff --git a/admin/views/templates/tmpl/default.php b/admin/views/templates/tmpl/default.php index 14db4999a..ce8b84b48 100644 --- a/admin/views/templates/tmpl/default.php +++ b/admin/views/templates/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'templateList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,23 +30,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/templates/tmpl/default_head.php b/admin/views/templates/tmpl/default_head.php index 69ef13274..a80afaf10 100644 --- a/admin/views/templates/tmpl/default_head.php +++ b/admin/views/templates/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 8547f2dee..f1d2145ea 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewTemplates extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,62 +163,6 @@ class ComponentbuilderViewTemplates extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - // Set Dynamic Get Name Selection - $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; - // We do some sanitation for Dynamic Get Name filter - if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && - isset($this->dynamic_getNameOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) - { - unset($this->dynamic_getNameOptions[0]); - } - // Only load Dynamic Get Name filter if it has values - if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions)) - { - // Dynamic Get Name Filter - JHtmlSidebar::addFilter( - '- Select ' . JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL') . ' -', - 'filter_dynamic_get', - JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text', $this->state->get('filter.dynamic_get')) - ); - } - - // Set Add Php View Selection - $this->add_php_viewOptions = $this->getTheAdd_php_viewSelections(); - // We do some sanitation for Add Php View filter - if (ComponentbuilderHelper::checkArray($this->add_php_viewOptions) && - isset($this->add_php_viewOptions[0]->value) && - !ComponentbuilderHelper::checkString($this->add_php_viewOptions[0]->value)) - { - unset($this->add_php_viewOptions[0]); - } - // Only load Add Php View filter if it has values - if (ComponentbuilderHelper::checkArray($this->add_php_viewOptions)) - { - // Add Php View Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_ADD_PHP_VIEW_LABEL').' -', - 'filter_add_php_view', - JHtml::_('select.options', $this->add_php_viewOptions, 'value', 'text', $this->state->get('filter.add_php_view')) - ); - } - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { @@ -238,6 +186,15 @@ class ComponentbuilderViewTemplates extends JViewLegacy // Only load Dynamic Get Name batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Dynamic Get Name Selection + $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; + // We do some sanitation for Dynamic Get Name filter + if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && + isset($this->dynamic_getNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) + { + unset($this->dynamic_getNameOptions[0]); + } // Dynamic Get Name Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL').' -', @@ -249,6 +206,15 @@ class ComponentbuilderViewTemplates extends JViewLegacy // Only load Add Php View batch if create, edit, and batch is allowed if ($this->canBatch && $this->canCreate && $this->canEdit) { + // Set Add Php View Selection + $this->add_php_viewOptions = JFormHelper::loadFieldType('templatesfilteraddphpview')->options; + // We do some sanitation for Add Php View filter + if (ComponentbuilderHelper::checkArray($this->add_php_viewOptions) && + isset($this->add_php_viewOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_php_viewOptions[0]->value)) + { + unset($this->add_php_viewOptions[0]); + } // Add Php View Batch Selection JHtmlBatch_::addListSelection( '- Keep Original '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_ADD_PHP_VIEW_LABEL').' -', @@ -306,41 +272,5 @@ class ComponentbuilderViewTemplates extends JViewLegacy 'g.name' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheAdd_php_viewSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('add_php_view')); - $query->from($db->quoteName('#__componentbuilder_template')); - $query->order($db->quoteName('add_php_view') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $add_php_view) - { - // Translate the add_php_view selection - $text = $model->selectionTranslation($add_php_view,'add_php_view'); - // Now add the add_php_view and its text to the options array - $_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/validation_rules/tmpl/default.php b/admin/views/validation_rules/tmpl/default.php index 88825deab..23a3abfee 100644 --- a/admin/views/validation_rules/tmpl/default.php +++ b/admin/views/validation_rules/tmpl/default.php @@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { @@ -22,23 +23,6 @@ if ($this->saveOrder) JHtml::_('sortablelist.sortable', 'validation_ruleList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> -sidebar)): ?>
@@ -48,13 +32,15 @@ if ($this->saveOrder)
+ $this)); +?> items)): ?> - loadTemplate('toolbar');?>
- loadTemplate('toolbar');?>
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,17 +30,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -48,6 +48,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>
loadTemplate('head');?>loadTemplate('foot');?> @@ -72,8 +58,6 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - diff --git a/admin/views/validation_rules/tmpl/default_head.php b/admin/views/validation_rules/tmpl/default_head.php index a6b52d58b..9b9f8df60 100644 --- a/admin/views/validation_rules/tmpl/default_head.php +++ b/admin/views/validation_rules/tmpl/default_head.php @@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> canState): ?> \ No newline at end of file diff --git a/admin/views/validation_rules/view.html.php b/admin/views/validation_rules/view.html.php index 75101fbec..074a71c60 100644 --- a/admin/views/validation_rules/view.html.php +++ b/admin/views/validation_rules/view.html.php @@ -34,6 +34,10 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); @@ -159,22 +163,6 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy JToolBarHelper::preferences('com_componentbuilder'); } - // Only load publish filter if state change is allowed - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - // Only load published batch if state and batch is allowed if ($this->canState && $this->canBatch) { diff --git a/componentbuilder.xml b/componentbuilder.xml index 3b5b34c39..603a388a6 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -7,9 +7,9 @@ http://www.joomlacomponentbuilder.comCopyright (C) 2015 - 2020 Vast Development Method. All rights reserved.GNU General Public License version 2 or later; see LICENSE.txt - 2.11.7 + 2.12.1Component Builder (v.2.11.7) +

Component Builder (v.2.12.1)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 1007da153..64805c7bc 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -990,10 +990,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.11.7 + 2.12.1 http://www.joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.7/JCB_v2.11.7.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.12.1/JCB_v2.12.1.zip stable diff --git a/script.php b/script.php index a598be82c..d9d91b920 100644 --- a/script.php +++ b/script.php @@ -9213,7 +9213,7 @@ class com_componentbuilderInstallerScript echo ' -

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

'; +

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

'; // Set db if not set already. if (!isset($db))
- ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -30,14 +30,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -45,6 +45,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>