From 7ccc169f46d9f48bb85bf7febe404cafdc78dc6f Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Tue, 12 Nov 2013 17:51:57 -0500 Subject: [PATCH] Physical Characteristics Wizard for the MARC Editor Right-click in an 007 field to find a new entry in the context menu that launches this wizard. The prompts and suggested values come from data already found in the database. Signed-off-by: Lebbeous Fogle-Weekley --- .../web/js/dojo/openils/widget/PhysCharWizard.js | 538 +++++++++++++++++++++ .../js/dojo/openils/widget/nls/PhysCharWizard.js | 15 + Open-ILS/web/opac/locale/en-US/lang.dtd | 2 + .../xul/staff_client/chrome/content/cat/opac.js | 3 +- .../staff_client/chrome/content/main/constants.js | 1 + .../xul/staff_client/chrome/content/main/menu.js | 15 +- Open-ILS/xul/staff_client/server/cat/marcedit.js | 50 +- Open-ILS/xul/staff_client/server/cat/marcedit.xul | 3 + 8 files changed, 623 insertions(+), 4 deletions(-) create mode 100644 Open-ILS/web/js/dojo/openils/widget/PhysCharWizard.js create mode 100644 Open-ILS/web/js/dojo/openils/widget/nls/PhysCharWizard.js diff --git a/Open-ILS/web/js/dojo/openils/widget/PhysCharWizard.js b/Open-ILS/web/js/dojo/openils/widget/PhysCharWizard.js new file mode 100644 index 0000000000..3de2015ceb --- /dev/null +++ b/Open-ILS/web/js/dojo/openils/widget/PhysCharWizard.js @@ -0,0 +1,538 @@ +if (!dojo._hasResource["openils.widget.PhysCharWizard"]) { + dojo._hasResource["openils.widget.PhysCharWizard"] = true; + + dojo.provide("openils.widget.PhysCharWizard"); + dojo.require("dojo.string"); + dojo.require("openils.User"); + dojo.require("openils.Util"); + dojo.require("openils.PermaCrud"); + dojo.requireLocalization("openils.widget", "PhysCharWizard"); + + (function() { /* Namespace protection so we can still make little helpers + within our own bubble */ + + var _xhtml_ns = "http://www.w3.org/1999/xhtml"; + var _dump = dump ? + function(s) { dump(s + "\n"); } : ( + console && console.log ? + function(s) { console.log(s) } : alert + ); + + function _show_button(n, yes) { /* yet another hide/reveal thing */ + /* This is a re-invented wheel, but I was having trouble + * getting my