From: Bill Erickson Date: Thu, 1 Dec 2011 21:00:10 +0000 (-0500) Subject: ACQ Vandelay : Ui refactor for standalone vl agent part deux X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e0a7a070745c33618f89cdf43f67a2292e5e0d6b;p=evergreen%2Fequinox.git ACQ Vandelay : Ui refactor for standalone vl agent part deux Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/acq/common/vlagent.tt2 b/Open-ILS/src/templates/acq/common/vlagent.tt2 new file mode 100644 index 0000000000..ce14f80d88 --- /dev/null +++ b/Open-ILS/src/templates/acq/common/vlagent.tt2 @@ -0,0 +1,40 @@ + + [% l('Record Match Set') %] +
+ + + [% l('Merge Profile') %] +
+ + + [% l('Import Non-Matching Records') %] + + + + [% l('Select a Record Source') %] +
+ + + [% l('Merge On Exact Match (901c)') %] + + + + [% l('Merge On Single Match') %] + + + + [% l('Merge On Best Match') %] + + + + [% l('Best/Single Match Minimum Quality Ratio') %] + + + [% l('New Record Quality / Quality of Best Match') %] + + + + [% l('Insufficient Quality Fall-Through Profile') %] +
+ + diff --git a/Open-ILS/web/js/ui/default/acq/common/vlagent.js b/Open-ILS/web/js/ui/default/acq/common/vlagent.js new file mode 100644 index 0000000000..bd305afbdc --- /dev/null +++ b/Open-ILS/web/js/ui/default/acq/common/vlagent.js @@ -0,0 +1,51 @@ +dojo.require('openils.widget.AutoFieldWidget'); + +function VLAgent(args) { + args = args || {}; + for (var key in args) { + this[key] = args[key]; + } + + this.widgets = [ + {key : 'import_no_match'}, + {key : 'auto_overlay_exact'}, + {key : 'auto_overlay_1match'}, + {key : 'auto_overlay_best_match'}, + {key : 'match_quality_ratio'}, + {key : 'match_set', cls : 'vms'}, + {key : 'bib_source', cls : 'cbs'}, + {key : 'merge_profile', cls : 'vmp'}, + {key : 'fall_through_merge_profile', cls : 'vmp'} + ]; + + this.init = function() { + var self = this; + + dojo.forEach(this.widgets, + function(widg) { + + if (widg.cls) { // selectors + new openils.widget.AutoFieldWidget({ + fmClass : widg.cls, + selfReference : true, + orgLimitPerms : [self.limitPerm || 'CREATE_PURCHASE_ORDER'], + parentNode : dojo.byId('acq_vl:' + widg.key) + }).build(function(w) { widg.dijit = w }); + + } else { // bools + widg.dijit = dijit.byId('acq_vl:' + widg.key); + } + } + ); + } + + this.values = function() { + var values = {}; + dojo.forEach(this.widgets, + function(widg) { + values[widg.key] = widg.dijit.attr('value'); + } + ); + return values; + } +}