[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 8f6b118477f5ea745b374aa6904718c9001bd509

Evergreen Git git at git.evergreen-ils.org
Fri Nov 11 16:45:14 EST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_0 has been updated
       via  8f6b118477f5ea745b374aa6904718c9001bd509 (commit)
      from  cc90dc82cec13df46ba828b1e2727add17d28505 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8f6b118477f5ea745b374aa6904718c9001bd509
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Nov 10 17:22:22 2011 -0500

    Serials: allow freer input in holding code mini-wizard
    
    In the Subscription Details interface of the Alternate Serials Control
    View, under the Issuance tab, if you create a new issuance you can
    now enter things like "01/02" in (say) the month field to denote a combined
    January/February issue.  All those fields are now free-form, whereas some of
    them used to be numeric only.
    
    Also, avoid an occasional issue where an error message about
    dijit.form.DateTextBox not being a constructor would appear in the
    JavaScript console.  The problem was in a race condition among some
    co-dependent JavaScript files that were all being loaded at the same
    time.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/web/js/dojo/openils/widget/HoldingCode.js b/Open-ILS/web/js/dojo/openils/widget/HoldingCode.js
index f786460..e0522f2 100644
--- a/Open-ILS/web/js/dojo/openils/widget/HoldingCode.js
+++ b/Open-ILS/web/js/dojo/openils/widget/HoldingCode.js
@@ -3,7 +3,6 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
     dojo.require("dijit.layout.ContentPane");
     dojo.require("dijit.form.DropDownButton");
     dojo.require("dijit.form.TextBox");
-    dojo.require("dijit.form.NumberTextBox");
 
     var _needed_fields = "abcdefghijklm";
 
@@ -67,13 +66,8 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
                 }
 
                 dojo.create("td", {"innerHTML": field.caption}, tr);
-                var dij = field.subfield > "h" ?
-                    dijit.form.NumberTextBox : dijit.form.TextBox;
-                var input = new dij(
-                    {
-                        "name": field.subfield,
-                        "constraints": {"pattern": "####"}
-                    },
+                var input = new dijit.form.TextBox(
+                    {"name": field.subfield},
                     dojo.create("td", null, tr)
                 );
                 input.startup();
@@ -88,7 +82,7 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
                     inputs.forEach(
                         function(input) {
                             var value = input.input.attr("value");
-                            if (value === null || isNaN(value)) {
+                            if (value === null || value === "") {
                                 /* XXX i18n */
                                 alert("A valid holding code cannot be " +
                                     "produced with any blank fields.");
diff --git a/Open-ILS/web/js/ui/default/serial/subscription/issuance.js b/Open-ILS/web/js/ui/default/serial/subscription/issuance.js
index d715fb4..73eafbc 100644
--- a/Open-ILS/web/js/ui/default/serial/subscription/issuance.js
+++ b/Open-ILS/web/js/ui/default/serial/subscription/issuance.js
@@ -1,3 +1,5 @@
+dojo.require("dijit.form.DateTextBox");
+
 function fresh_scap_selector(grid) {
     /* this really needs to be sync, not async */
     pcrud.search(

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/dojo/openils/widget/HoldingCode.js |   12 +++---------
 .../js/ui/default/serial/subscription/issuance.js  |    2 ++
 2 files changed, 5 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list