From 181f339e4d8fac7c66f08020a071da674bf2f1d6 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 23 Jun 2006 17:47:56 +0000 Subject: [PATCH] added hack for IE git-svn-id: svn://svn.open-ils.org/ILS/trunk@4749 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/added_content.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/opac/common/js/added_content.js b/Open-ILS/web/opac/common/js/added_content.js index aefa404f4b..97a66bb8cb 100644 --- a/Open-ILS/web/opac/common/js/added_content.js +++ b/Open-ILS/web/opac/common/js/added_content.js @@ -4,10 +4,11 @@ * The example below uses Amazon... *use at own risk* */ -function buildISBNSrc(isbn) { +function buildISBNSrc(isbn, size) { //return "http://images.amazon.com/images/P/" + isbn + ".01._SCMZZZZZZZ_.jpg"; //return '../../../../jackets/'+isbn; - return '../../../../extras/jacket/'+isbn; + size = (size) ? size : 'small'; + return '../../../../extras/jacket/'+size+'/'+isbn; } @@ -41,8 +42,20 @@ function acCollectItem(context, type) { req.onreadystatechange = function() { if( req.readyState == 4 ) { context.data[type] = { done : true } - if( req.status != 404 ) - context.data[type].html = req.responseText; + + if(IE) { + + /* Someone please explain why IE treats status 404 as status 200?? + On second thought, don't bother. + */ + if( ! req.responseText.match( + /The requested URL.*was not found on this server/) ) + context.data[type].html = req.responseText; + + } else { + if( req.status != 404 ) + context.data[type].html = req.responseText; + } acCheckDone(context); } } -- 2.11.0