-
Notifications
You must be signed in to change notification settings - Fork 896
Description
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Is your feature request related to a problem? Please describe.
Many MVC pages make use of jQuery Bootgrid (by using the OPNsense specific UIBootgrid wrapper). Bootgrid allows the user to configure many things:
- Search filters
- Elements displayed per page
- Column visibility
- Selected page
Unfortunately these settings are lost as soon as the user leaves the page.
It would be a great feature to persist those settings on a per-user basis. When a user opens a settings page they've already modified before (e.g. changed visible columns, number of rows per page, etc.) the previous settings are restored. Settings could be stored in the local browser storage.
Describe the solution you like
The PR rstaib/jquery-bootgrid#392 could be incorporated into OPNsense's jQuery Bootstrap.
Note: this is a manual task as OPNsense's jQuery Bootgrid already diverged from its upstream.
Question: where is "the master-copy" of jQuery boostrap? In the opnsense/core or in opnsense/jquery-bootstrap repository?
Describe alternatives you considered
Implementation of a "workaround" into the UIBootgrid function
| $.fn.UIBootgrid = function (params) { |
to simulate restoring the settings, e.g. using
var rowCount = localStorage.getItem(grid_id+"_rowCount");
$(this_grid).find('.bootgrid-pagination-count ul.dropdown-menu li a[data-action=' + rowCount + ']').trigger('click');Not really nice and most likely time consuming for things like selecting columns.
To clarify/discuss
- Which settings to persist
- Design (implement in opnsense_bootgrid_plugin (UIBootgrid) or in jquery-bootgrid)
- How to uniquely identify a bootgrid (is the HTML ID sufficient or do we need to consider the browser URL as well?)