[open-ils-commits] [GIT] Evergreen ILS branch master updated. 21bc541d8439610093e756db563501875a7bc1d3

Evergreen Git git at git.evergreen-ils.org
Wed Aug 21 18:39:08 EDT 2013


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, master has been updated
       via  21bc541d8439610093e756db563501875a7bc1d3 (commit)
      from  e5a3ee75ff36d3ace32b6b432e4458432f9d578f (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 21bc541d8439610093e756db563501875a7bc1d3
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jan 23 18:44:00 2012 -0500

    Invoke skull-and-crossbones popup in batch receive for server-side errors
    
    And introduce a minor bumper rail to guide serials users who might try
    to hand-edit a holding code.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    
    Conflicts:
        Open-ILS/xul/staff_client/server/serial/batch_receive.js
    
    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 b26cb2b..0ee6892 100644
--- a/Open-ILS/web/js/dojo/openils/widget/HoldingCode.js
+++ b/Open-ILS/web/js/dojo/openils/widget/HoldingCode.js
@@ -119,7 +119,7 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
 
         new dijit.form.Button(
             {
-                "label": "Compile",
+                "label": "Create Holding Code",
                 "onClick": function() {
                     inputs.forEach(
                         function(input) {
@@ -200,9 +200,21 @@ if (!dojo._hasResource["openils.widget.HoldingCode"]) {
                     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();
             },
 
diff --git a/Open-ILS/xul/staff_client/server/serial/batch_receive.js b/Open-ILS/xul/staff_client/server/serial/batch_receive.js
index deee3c0..92d67d5 100644
--- a/Open-ILS/xul/staff_client/server/serial/batch_receive.js
+++ b/Open-ILS/xul/staff_client/server/serial/batch_receive.js
@@ -7,8 +7,18 @@ dojo.require("openils.CGI");
 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");
@@ -147,7 +157,8 @@ function BatchReceiver() {
                     "onresponse": function(r) {
                         if (r = openils.Util.readResponse(r))
                             issuances.push(r);
-                    }
+                    },
+                    "onmethoderror": _generic_onmethoderror
                 }
             );
         } catch (E) {
@@ -191,7 +202,8 @@ function BatchReceiver() {
                                 }
                             );
                         }
-                    }
+                    },
+                    "onmethoderror": _generic_onmethoderror
                 }
             );
             if (!mods.length) {
@@ -248,7 +260,8 @@ function BatchReceiver() {
                     "onresponse": function(r) {
                         if (locs = openils.Util.readResponse(r))
                             self._location_by_lib[lib] = locs;
-                    }
+                    },
+                    "onmethoderror": _generic_onmethoderror
                 }
             );
         }
@@ -341,7 +354,8 @@ function BatchReceiver() {
                             }
                         );
                     }
-                }
+                },
+                "onmethoderror": _generic_onmethoderror
             }
         );
 
@@ -568,7 +582,8 @@ function BatchReceiver() {
                             }, true /* wrap_in_browser */
                         );
                     }
-                }
+                },
+                "onmethoderror": _generic_onmethoderror
             }
         );
     };
@@ -628,7 +643,8 @@ function BatchReceiver() {
                             dojo.byId("bib_search_term").focus();
                         }
                     }
-                }
+                },
+                "onmethoderror": _generic_onmethoderror
             }
         );
     };
@@ -814,7 +830,8 @@ function BatchReceiver() {
                             else self.init();
                         }
                     }
-                }
+                },
+                "onmethoderror": _generic_onmethoderror
             }
         );
     };
@@ -1068,7 +1085,8 @@ function BatchReceiver() {
                     } catch(E) {
                         (dump ? dump : console.log)(E);
                     }
-                }
+                },
+                "onmethoderror": _generic_onmethoderror
             }
         );
     };
@@ -1108,7 +1126,8 @@ function BatchReceiver() {
                                         row._has_autogen_barcode = true;
                                     }
                                 }
-                            }
+                            },
+                            "onmethoderror": _generic_onmethoderror
                         }
                     );
                 } catch (E) {

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

Summary of changes:
 Open-ILS/web/js/dojo/openils/widget/HoldingCode.js |   16 +++++++-
 .../staff_client/server/serial/batch_receive.js    |   37 +++++++++++++++-----
 2 files changed, 42 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list