new dijit.form.Button(
{
- "label": "Compile",
+ "label": "Create Holding Code",
"onClick": function() {
inputs.forEach(
function(input) {
dojo.create("span", null, dialog_div)
);
- this.code_text_box = new dijit.form.TextBox(
+ this.code_text_box = new dijit.form.ValidationTextBox(
{}, dojo.create("div", null, this.domNode)
);
+
+ /* This by no means will fully validate plausible holding codes,
+ * but it will perhaps help users who experiment with typing
+ * the holding code in here freehand (a little). */
+ this.code_text_box.validator = function(value) {
+ try {
+ return dojo.isArray(dojo.fromJson(value));
+ } catch(E) {
+ return false;
+ }
+ };
+
this.code_text_box.startup();
},
dojo.require("openils.XUL");
dojo.require("openils.PermaCrud");
+JSAN.use("util.error");
+var _error = new util.error();
var batch_receiver;
+function _generic_onmethoderror(r, stat, stat_text) {
+ _error.standard_unexpected_error_alert(
+ dojo.byId("commonStrings").getString("common.error"),
+ stat + ":" + stat_text
+ );
+ busy(false);
+}
+
function S(k) {
return dojo.byId("serialStrings").getString("batch_receive." + k).
replace("\\n", "\n");
"onresponse": function(r) {
if (r = openils.Util.readResponse(r))
issuances.push(r);
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
} catch (E) {
}
);
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
if (!mods.length) {
"onresponse": function(r) {
if (locs = openils.Util.readResponse(r))
self._location_by_lib[lib] = locs;
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
}
}
);
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
}, true /* wrap_in_browser */
);
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
};
dojo.byId("bib_search_term").focus();
}
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
};
else self.init();
}
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
};
} catch(E) {
(dump ? dump : console.log)(E);
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
};
row._has_autogen_barcode = true;
}
}
- }
+ },
+ "onmethoderror": _generic_onmethoderror
}
);
} catch (E) {