-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to support persistent config/localStorage filters #119
Conversation
backend/settings/settings.php.dist
Outdated
@@ -15,6 +15,11 @@ $nfsen_config = [ | |||
'sources' => [ | |||
'source1', 'source2', | |||
], | |||
'filters' => [ | |||
'Filters', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move the "Filters" label to e.g.
updateDropdown('filters', ['Filters', ...stored_filters]); // if this works
Or is this not meant as label?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a simpler solution I didn't know which is using a disabled option + title="Filters" so it shows 1) when no filter is selected, and 2) when on hover:
<select id="filterFiltersSelect" class="form-control form-select" style="width:6em" title="Filter">
<option value="" disabled selected>Filter</option>
</select>
I've tried adding the above HTML to frontend/index.html, and removing the 'Filters' from the settings.php and checked it works as expected, I mean the "Filters" string is kept out of the list of applicable filters, and is just a presentation string in HTML that doesn't get into the JavaScript logic.
I'm rather new to PR reviews, if this suits, then feel free to make the edits.
nice, thanks. I only have one thing that needs to be addressed. the rest can be done after the merge. |
great, thanks! |
This attempts to address #4 to provide two types of filters: 1) filters defined in settings.php, and, also provide 2) localStorage filters.
Works as far as I've been using it, but probably could be reworked to be cleaner/prettier.