Added the new field changes for the new filter implementation. gh-378

This commit is contained in:
Llewellyn van der Merwe 2020-11-14 07:03:48 +02:00
parent d4997abd37
commit e7104d9c1c
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
11 changed files with 70 additions and 22 deletions

View File

@ -144,12 +144,12 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 6th November, 2020
+ *Last Build*: 14th November, 2020
+ *Version*: 2.11.7
+ *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*: **283847**
+ *Field count*: **1536**
+ *Line count*: **283896**
+ *Field count*: **1537**
+ *File count*: **1799**
+ *Folder count*: **304**

View File

@ -144,12 +144,12 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 6th November, 2020
+ *Last Build*: 14th November, 2020
+ *Version*: 2.11.7
+ *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*: **283847**
+ *Field count*: **1536**
+ *Line count*: **283896**
+ *Field count*: **1537**
+ *File count*: **1799**
+ *Folder count*: **304**

View File

@ -6420,7 +6420,6 @@ class Get
}
}
}
return false;
}

View File

@ -26453,14 +26453,14 @@ function vdm_dkim() {
$default = PHP_EOL . $module->default_header . PHP_EOL . '?>';
// add any css from the fields
$default .= $this->getCustomScriptBuilder(
'css_view', $key, PHP_EOL . '<style>' . PHP_EOL, '', true, null,
'css_views', $key, PHP_EOL . '<style>' . PHP_EOL, '', true, null,
PHP_EOL . '</style>' . PHP_EOL
);
// now add the body
$default .= PHP_EOL . $module->default . PHP_EOL;
// add any JavaScript from the fields
$default .= $this->getCustomScriptBuilder(
'view_footer', $key,
'views_footer', $key,
PHP_EOL . '<script type="text/javascript">' . PHP_EOL, '', true,
null, PHP_EOL . '</script>' . PHP_EOL
);

View File

@ -313,7 +313,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD="Field"
COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELDS="Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD_DESCRIPTION="Select a field"
COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD_LABEL="Field"
COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_DESCRIPTION="Select if the field is to be used as a filter in list view, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_DESCRIPTION="Should this field be used as a filter in list view, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_LABEL="Filter"
COM_COMPONENTBUILDER_ADMIN_FIELDS_FULL_WIDTH_IN_TAB="Full Width in Tab"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ID="Id"
@ -328,6 +328,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields was modified."
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NO="No"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE_DB="None DB"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, created, modified_by, modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)<br />For more help <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>please watch this tutorial</a>."
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views."
@ -409,6 +410,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_DESC="A count of the number of times this Admin Fields has been revised."
COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_ADMIN_FIELDS_VIEW="View"
COM_COMPONENTBUILDER_ADMIN_FIELDS_YES_MULTI="Yes (multi)"
COM_COMPONENTBUILDER_ADMIN_FIELDS_YES_SINGLE="Yes (single)"
COM_COMPONENTBUILDER_ADMIN_VIEW="Admin View"
COM_COMPONENTBUILDER_ADMIN_VIEWS="Admin Views"
COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access"
@ -2277,6 +2280,7 @@ COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNFEATURED_1="%s Component Updat
COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNPUBLISHED="%s Components Updates unpublished."
COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Component Updates unpublished."
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS="Component Admin Views"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ABOVE_NEW="Above (new)"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_DESCRIPTION="Select if this view<br />should use access."
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_LABEL="Add Access"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADD="Add"
@ -2382,6 +2386,8 @@ COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_MINUS="File Minus"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_REMOVE="File Remove"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_TWO="File 2"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER="Filter"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER_DESCRIPTION="Select the type of filter to use in this list view."
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER_LABEL="Filter Type"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FIRST="First"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLAG="Flag"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLAG_THREE="Flag 3"
@ -2499,6 +2505,7 @@ COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHARE="Share"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHARE_ALT="Share Alt"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHIELD="Shield"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHUFFLE="Shuffle"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SIDE_OLD="Side (old)"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SIGNUP="Signup"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY="Smiley"
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_NEUTRAL="Smiley Neutral"
@ -9057,6 +9064,7 @@ COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations"
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
COM_COMPONENTBUILDER_THE_BMULTI_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_MORE_THEN_ONE_VALUE_IN_THIS_FILTERFIELD_PLEASE_NOTE_THAT_THIS_OPTION_BONLY_WORKSB_WITH_THE_BNEWB_FILTERS_THAT_LOAD_ABOVE_THE_ADMIN_LIST_VIEW_YOU_CAN_SELECT_THE_NEW_FILTER_OPTION_WHENWHERE_YOU_ADD_THE_VIEW_TO_THE_COMPONENT="The <b>multi filter</b> selection option allows the user to select more then one value in this filter/field. Please note that this option <b>only works</b> with the <b>new</b> filters that load above the admin list view. You can select the new filter option when/where you add the view to the component."
COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE="The <b>None DB</b> option will remove this field from being saved in the database."
COM_COMPONENTBUILDER_THE_BONLY_IN_ADMIN_LIST_VIEWB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW_NOT_TO_ANY_LINKED_VIEWS="The <b>Only in Admin List View</b> option will only Add this field to the admin list view, not to any linked views."
COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW="The <b>Only in Linked List Views</b> option will only Add this field to the linked list view, if this view gets linked to other view, not to this admin list view."
@ -9066,6 +9074,7 @@ COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The <b>%s</b
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESPHPSECLIBVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>%s</b> library\class is not available! This library\class should have been added to your <b>libraries/phpseclib/vendor</b> folder. Please contact your system administrator for more info!"
COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The <b>%s</b> library can not be deleted, or things will break."
COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED="The <b>Show in All List Views</b> option will Add this field to all list views, admin &amp; linked."
COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD="The <b>single filter</b> selection option allows the user to select just one value in this filter/field."
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus"

View File

@ -196,16 +196,24 @@
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_DESCRIPTION"
class="inputbox"
/>
<!-- Filter Field. Type: Checkbox. (joomla) -->
<!-- Filter Field. Type: List. (joomla) -->
<field
type="checkbox"
type="list"
name="filter"
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_LABEL"
value="1"
default=""
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_DESCRIPTION"
class="inputbox"
/>
class="fieldSmall"
multiple="false"
default=""
onchange="explainFilterBehaviour(this)">
<!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_ADMIN_FIELDS_NO</option>
<option value="1">
COM_COMPONENTBUILDER_ADMIN_FIELDS_YES_SINGLE</option>
<option value="2">
COM_COMPONENTBUILDER_ADMIN_FIELDS_YES_MULTI</option>
</field>
<!-- Link Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"

View File

@ -106,7 +106,7 @@
layout="repeatablejcb"
multiple="true"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION"
default="[{&quot;submenu&quot;:&quot;1&quot;,&quot;checkin&quot;:&quot;1&quot;,&quot;history&quot;:&quot;1&quot;,&quot;access&quot;:&quot;1&quot;,&quot;port&quot;:&quot;1&quot;}]"
default="[{&quot;submenu&quot;:&quot;1&quot;,&quot;checkin&quot;:&quot;1&quot;,&quot;history&quot;:&quot;1&quot;,&quot;access&quot;:&quot;1&quot;,&quot;port&quot;:&quot;1&quot;,&quot;filter&quot;:&quot;1&quot;}]"
icon="list"
min="1">
<form hidden="true" name="list_addadmin_views_modal" repeat="true">
@ -653,13 +653,28 @@
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_PORT_DESCRIPTION"
class="inputbox"
/>
<!-- Filter Field. Type: List. (joomla) -->
<field
type="list"
name="filter"
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER_DESCRIPTION"
class="fieldMedium"
multiple="false"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SIDE_OLD</option>
<option value="2">
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ABOVE_NEW</option>
</field>
<!-- Edit_create_site_view Field. Type: List. (joomla) -->
<field
type="list"
name="edit_create_site_view"
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT_CREATE_SITE_VIEW_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT_CREATE_SITE_VIEW_DESCRIPTION"
class="list_class fieldMedium"
class="fieldMedium"
multiple="false">
<!-- Option Set. -->
<option value="">

File diff suppressed because one or more lines are too long

View File

@ -129,11 +129,11 @@ function checkAdminBehaviour(field) {
}
// do some house cleaning
jQuery('#'+subID+'__order_list').val(0).trigger('liszt:updated');
jQuery('#'+subID+'__filter').val('').trigger('liszt:updated');
jQuery('#'+subID+'__title').prop('checked', false).trigger('change');
jQuery('#'+subID+'__alias').prop('checked', false).trigger('change');
jQuery('#'+subID+'__sort').prop('checked', false).trigger('change');
jQuery('#'+subID+'__search').prop('checked', false).trigger('change');
jQuery('#'+subID+'__filter').prop('checked', false).trigger('change');
jQuery('#'+subID+'__link').prop('checked', false).trigger('change');
} else if (1 == value || 3 == value || 4 == value) {
// get number of items
@ -159,8 +159,8 @@ function checkAdminBehaviour(field) {
} else {
// do some house cleaning
jQuery('#'+subID+'__order_list').val(0).trigger('liszt:updated');
jQuery('#'+subID+'__filter').val('').trigger('liszt:updated');
jQuery('#'+subID+'__sort').prop('checked', false).trigger('change');
jQuery('#'+subID+'__filter').prop('checked', false).trigger('change');
jQuery('#'+subID+'__link').prop('checked', false).trigger('change');
}
}
@ -277,4 +277,19 @@ function checkAlias(field) {
}
}
}
// little script to check value and give notice
function explainFilterBehaviour(field) {
// get the ID
let id = jQuery(field).attr('id');
// get value
let value = jQuery('#'+id).val();
// set notice and do house cleaning
if (2 == value) {
// means multi option can be selected in the filter, this is just available with the new filters
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_THE_BMULTI_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_MORE_THEN_ONE_VALUE_IN_THIS_FILTERFIELD_PLEASE_NOTE_THAT_THIS_OPTION_BONLY_WORKSB_WITH_THE_BNEWB_FILTERS_THAT_LOAD_ABOVE_THE_ADMIN_LIST_VIEW_YOU_CAN_SELECT_THE_NEW_FILTER_OPTION_WHENWHERE_YOU_ADD_THE_VIEW_TO_THE_COMPONENT'), timeout: 10000, status: 'primary', pos: 'top-right'});
} else if (1 == value) {
// means single option can be selected in the filter
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD'), timeout: 5000, status: 'primary', pos: 'top-right'});
}
}
</script>

View File

@ -209,6 +209,8 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
JText::script('COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW');
JText::script('COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED');
JText::script('COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED');
JText::script('COM_COMPONENTBUILDER_THE_BMULTI_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_MORE_THEN_ONE_VALUE_IN_THIS_FILTERFIELD_PLEASE_NOTE_THAT_THIS_OPTION_BONLY_WORKSB_WITH_THE_BNEWB_FILTERS_THAT_LOAD_ABOVE_THE_ADMIN_LIST_VIEW_YOU_CAN_SELECT_THE_NEW_FILTER_OPTION_WHENWHERE_YOU_ADD_THE_VIEW_TO_THE_COMPONENT');
JText::script('COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD');
JText::script('view not acceptable. Error');
}
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>6th November, 2020</creationDate>
<creationDate>14th November, 2020</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>