Serials: be less eager to offer season dropdown in holding code mini-wizard
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 16 Nov 2011 20:19:18 +0000 (15:19 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 7 Dec 2011 15:05:38 +0000 (10:05 -0500)
The recent commit (ebce79a288b in master) to make the holding code
mini-wizard offer a dropdown for season offers it too often, sometimes
in completely inappropriate cases.

This commit gets it right, and incidentally fixes two totally broken
links elsewhere in alternate serials control view interfaces.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>

Open-ILS/web/js/dojo/openils/widget/HoldingCode.js
Open-ILS/web/js/ui/default/serial/list_item.js
Open-ILS/web/js/ui/default/serial/list_stream.js

index 7d8aa09..b26cb2b 100644 (file)
@@ -55,7 +55,7 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
             var value = pattern_code[i + 1];
 
             if (_needed_fields.indexOf(subfield) != -1)
-                fields.push({"subfield": subfield, "caption": value});
+                fields.push({"subfield": subfield, "caption": value, "pattern_value": value});
         }
 
         if (!fields.length) {
@@ -71,9 +71,9 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
         dojo.create("td", {"innerHTML": field.caption}, tr);
 
         /* Any more special cases than this and we should switch to a dispatch
-         * table or somethingl. */
+         * table or something. */
         var input;
-        if (field.subfield == "j") {
+        if (field.pattern_value.match(/season/)) {
             input = new dijit.form.FilteringSelect(
                 {
                     "name": field.subfield,
index 8455c82..c4c7654 100644 (file)
@@ -28,7 +28,7 @@ function load_siss_display() {
                     var link = dojo.byId("siss_label_here");
                     link.onclick = function() {
                         location.href = oilsBasePath +
-                            "/eg/serial/subscription?id=" +
+                            "/serial/subscription?id=" +
                             r.subscription() + "&tab=issuances";
                     }
                     link.innerHTML = r.label();
index 403b317..79bf05d 100644 (file)
@@ -36,7 +36,7 @@ function load_sdist_display() {
                     var link = dojo.byId("sdist_label_here");
                     link.onclick = function() {
                         location.href = oilsBasePath +
-                            "/eg/serial/subscription?id=" +
+                            "/serial/subscription?id=" +
                             r.subscription() + "&tab=distributions";
                     }
                     link.innerHTML = r.label();