From 150d6c32d475f5eb56a8a3f7ef8eae88a7bedfb1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 23 Dec 2016 01:36:07 -0500 Subject: [PATCH] LP#1117808: new egFmValueSelector directive This directive supplies a select widget that draws its values from a table specified by an IDL class code. It is meant to be used for tables containing a reasonably small number of rows (i.e., dozens at most, not hundreds or thousands). The following attributes are available: idl-class : Code of IDL class to draw from, e.g., "vmp". ng-model : Model to bind the current selected value to. filter : JSON query filter to apply conditions on the set of rows to be used. (optional) sticky-setting : Local storage key to persist the last value that was selected by the user. (optional) ou-setting : Name of library setting to use to set the default selected value. If sticky-setting is used, any previously-selected value will override the default specified by the OU setting. (optional) The list of values from the source table displayed in the select widget are those that meet all of the following conditions: - primary key is not null - filter conditions (if supplied) - logged-in user has PCRUD permissions to view the value The option value is taken from the column in the source table specified by the oils_persist:primary IDL attribute, while the displayed label is taken from the column that has the reporter:selector="name" IDL attribute. Example: Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- .../staff/share/t_fm_value_selector.tt2 | 5 + .../web/js/ui/default/staff/services/ui.js | 91 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 Open-ILS/src/templates/staff/share/t_fm_value_selector.tt2 diff --git a/Open-ILS/src/templates/staff/share/t_fm_value_selector.tt2 b/Open-ILS/src/templates/staff/share/t_fm_value_selector.tt2 new file mode 100644 index 0000000000..4306e5eccb --- /dev/null +++ b/Open-ILS/src/templates/staff/share/t_fm_value_selector.tt2 @@ -0,0 +1,5 @@ +