[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 45ffbb48a522a21a37bfc3842015f5c6f1b54deb

Evergreen Git git at git.evergreen-ils.org
Tue Jun 28 11:38:43 EDT 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_1 has been updated
       via  45ffbb48a522a21a37bfc3842015f5c6f1b54deb (commit)
      from  13901607c6cad0b0b489de07286dc5c28d404f93 (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 45ffbb48a522a21a37bfc3842015f5c6f1b54deb
Author: Dan Scott <dan at coffeecode.net>
Date:   Fri Jun 24 10:44:43 2011 -0400

    Fix broken images for items without ISBNs in search results
    
    The search results code happily sets the src attribute of the cover
    image to an empty string (as returned by cleanISBN()) if currentISBN has
    not been defined (which is generally the case if an item doesn't have an
    ISBN, such as a DVD or a thesis or an old book).
    
    Protect against the empty string and set the src attribute to
    '/opac/images/blank.png' to avoid broken image indicators in search
    results.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js
index dfd5455..1d25381 100644
--- a/Open-ILS/web/opac/skin/default/js/result_common.js
+++ b/Open-ILS/web/opac/skin/default/js/result_common.js
@@ -494,8 +494,12 @@ function resultDisplayRecord(rec, pos, is_mr) {
 	} catch(e){ }
 */
 
-	var pic = $n(r, config.names.result.item_jacket);
-	pic.setAttribute("src", buildISBNSrc(currentISBN));
+    var pic = $n(r, config.names.result.item_jacket);
+    if (currentISBN) {
+        pic.setAttribute("src", buildISBNSrc(currentISBN));
+    } else {
+        pic.setAttribute("src", "/opac/images/blank.png");
+    }
 
 	var title_link = $n(r, config.names.result.item_title);
 	var author_link = $n(r, config.names.result.item_author);

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

Summary of changes:
 Open-ILS/web/opac/skin/default/js/result_common.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list