{key : 'auto_overlay_1match'},
{key : 'auto_overlay_best_match'},
{key : 'match_quality_ratio'},
+ {key : 'tmp_queue'},
{key : 'match_set', cls : 'vms'},
{key : 'bib_source', cls : 'cbs'},
{key : 'merge_profile', cls : 'vmp'},
- {key : 'fall_through_merge_profile', cls : 'vmp'}
+ {key : 'fall_through_merge_profile', cls : 'vmp'},
+ {key : 'named_queue', cls : 'vbq'}
];
this.init = function() {
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 });
+ }).build(function(dijit) { self._widgetPostBuild(widg, dijit) });
} else { // bools
widg.dijit = dijit.byId('acq_vl:' + widg.key);
);
}
+ this._widgetPostBuild = function(widg, dijit) {
+ var self = this;
+ widg.dijit = dijit;
+
+ // don't allow selecting a named queue if temp queue is selected
+ if (widg.cls == 'vbq') {
+ dijit.attr('disabled', true);
+ var tmpd = self.widgets.filter(function(item){return (item.key == 'tmp_queue')})[0].dijit;
+ tmpd.attr('checked', true);
+ dojo.connect(
+ tmpd, 'onChange',
+ function(val) { dijit.attr('disabled', val) }
+ );
+ }
+ }
+
+
this.values = function() {
var values = {};
dojo.forEach(this.widgets,