Button clear filters for all views using this functionality will clear/reset only filters of type list. All the rest are untouched. It makes problem when you want to use text,calendar,checkbox fields as filters what can be very handy. Also there is another issue related to this. When you try to use checkbox type filter there will be no label (it is not rendered).
calendar
with label Testing filters
Content/Articles
Testing filters
Clear button
to the right of search phrase input.It should clear/reset all filter fields (also those of types like text
etc)
It resets only select/list fields
It will happen on all browsers and all system setups. It is caused by select
selector in jQuery script called jquery.searchtools.js
or jquery.searchtools.min.js
Fix should be easy for text
,password
,date
,calendar
fields but there are also bugs in template. When you add input
selector in jquery.searchtools.js
in getFilterFields
, all fields of type text
get active
class what makes them green. This is a CSS bug in template (selector in template is to general - .active). So as you can see there are more problems in this and it affects few places. But it is required to fix it cause it blocks the building of advanced filters in components. Where radio
fields can be swapped for list
, calendar
fields can't be swapped for anything else without losing usability. Fixing this should not have any impact on performance.
This is a custom filters that are reset when searchtools.js is fixed. As you can see they are green.
Do you use Text type filters?
This kind of filters. I can enter text and choose all filters. Wiht a cklick on the button clear, they all are reset, including the text field
Searchword filter is not a custom text filter. All your custom filters are List type. I did specified how to reproduce.
you are right - sry - i had a confusion as I've a similiar problem.
I think you just need to use your own JavaScript there as it seems to be quite extension specific having such filters.
Yes I can use my own script in each component to fix the bug. But the functionality suggests it is universal. Why would you give the possibility to add filters in XML and then require your own reset JS functions? This is not developer friendly. The fix in jquery.searchtools.js
is pretty easy. You just need to add few more form fields selectors in getFilterFields
like for example input and textarea. But there are also administration template fixes that are required (just more specific CSS)
And yes. Those filters are all extension specific. This functionality is not for Joomla package extensions (but you should be able to use it in those too). This is for developers creating custom extensions. We want them to create more of them and as useful as it is possible. Right?
The fix in jquery.searchtools.js is pretty easy. You just need to add few more form fields selectors in getFilterFields like for example input and textarea.
Feel free to create a PR for those fixes and testing instructions. Then it can be tested, reviewed and merged.
See https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests for how to do it.
I know how to make create it, not my first PR for joomla :) I'll try to create it this weekend.
Thanks
@artur-stepien did you manage to make a PR for this?
Category | Administration Templates (admin) UI/UX | ⇒ | Administration Fields Templates (admin) UI/UX |
Have about 30% of this done. Got sick, give me few days.
@artur-stepien did you forget or are you still sick?
No, I'm like new but busy. Working on that one slowly. Ill try to finish it in a week.
Hi you created this issue sometime ago but have not yet provided any code for people to evaluate.I really dont want to just keep this open forever so I am closing this issue at this time. When you are ready to submit the Pull Request it will automatically create a new issue for you anyway.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-08 12:57:38 |
Closed_By | ⇒ | brianteeman |
I cannot reproduce this effect, all my filters are reset properly, but indeed I have no filters which use js as your calendar fields.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7856.