LP#1746824 - WebStaff egGrid styling user/gmcharlt/lp1746824_grid_css_styling
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 22 Feb 2018 22:01:39 +0000 (17:01 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 4 Sep 2018 21:14:21 +0000 (17:14 -0400)
commitffd637bd73adbcf026397b725947f1a9e62b042a
treec2c1aedb84487a29b6601f6ed43d5f1eebf946f6
parent4dbdd7bba989fe9826a2f28d07dfd5823c4e5e2d
LP#1746824 - WebStaff egGrid styling

This allows egGrid to receive CSS selector strings via egGridField
declarations in templates, or else auto-generates them based on the
path of the field. Also, sets the DOM id of the grid to its declared
persistKey, unless an id is explicitly given.

For example, due dates could be displayed in purple
as follows by adding the following CSS:

grid-due_date {
   color: purple;
}

The above example uses the autog-enerated class name. One could also
set an explicit one in the eg-grid-field element, e.g.,

<eg-grid-field label="[% l('Due Date') %]" path='due_date' css-selector="purple" ...

In this case, the grid-due_date class would /not/ be generated, and the
developer would be expected to supply CSS for the purple class. (But
with semantic class names :) )

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/share/t_autogrid.tt2
Open-ILS/web/js/ui/default/staff/services/grid.js