From: Thomas Berezansky Date: Tue, 3 Apr 2012 18:45:10 +0000 (-0400) Subject: Fix some "null" instead of blank values in JSPac X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=61cca819d8ee767a907bc1dbd54c3921beb226ee;p=evergreen%2Ftadl.git Fix some "null" instead of blank values in JSPac Signed-off-by: Thomas Berezansky Signed-off-by: Michael Peters Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js index bb643afba5..60487c26d0 100644 --- a/Open-ILS/web/opac/skin/default/js/holds.js +++ b/Open-ILS/web/opac/skin/default/js/holds.js @@ -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())); diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 7f006d2abd..7378106771 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -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()));