Fix broken images for items without ISBNs in search results user/dbs/fix-broken-images-2_0
authorDan Scott <dan@coffeecode.net>
Fri, 24 Jun 2011 14:44:43 +0000 (10:44 -0400)
committerDan Scott <dan@coffeecode.net>
Fri, 24 Jun 2011 14:59:08 +0000 (10:59 -0400)
commit4f6fc8bd1f99df11f59fac7afc5c103423812257
tree5ce5ba1772cd88fee3cdcd8a1854979ef8f8fa52
parent13ac1f4007b2cbec96ebf094ee6541f5f4505541
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@laurentian.ca>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/web/opac/skin/default/js/result_common.js