Fix some "null" instead of blank values in JSPac
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 3 Apr 2012 18:45:10 +0000 (14:45 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 2 May 2012 18:12:19 +0000 (14:12 -0400)
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/opac/skin/default/js/holds.js
Open-ILS/web/opac/skin/default/js/myopac.js

index bb643af..60487c2 100644 (file)
@@ -613,7 +613,7 @@ function __holdsDrawWindow() {
        }
 
 
-       $('holds_phone').value = holdArgs.recipient.day_phone();
+       $('holds_phone').value = (holdArgs.recipient.day_phone() ? holdArgs.recipient.day_phone() : '');
        var pref = holdArgs.recipient.prefs[PREF_DEF_PHONE];
        if(pref) $('holds_phone').value = pref;
        appendClear( $('holds_email'), text(holdArgs.recipient.email()));
index 7f006d2..7378106 100644 (file)
@@ -869,9 +869,11 @@ function _myOPACSummaryShowUer(r) {
         unHideMe($('myopac.expired.alert'));
     }
 
-       var iv1 = user.ident_value()+'';
-    if (iv1.length > 4 && iv1.match(/\d{4}/)) iv1 = iv1.substring(0,4) + '***********';
-
+       var iv1 = '';
+    if (user.ident_value()) {
+        iv1 = user.ident_value()+'';
+        if (iv1.length > 4 && iv1.match(/\d{4}/)) iv1 = iv1.substring(0,4) + '***********';
+    }
 
        appendClear($('myopac_summary_prefix'),text(user.prefix()));
        appendClear($('myopac_summary_first'),text(user.first_given_name()));