Modified:
trunk/src/suggest.js
Log:
CLI-3064: Search needs to gracefully handle failed blob requests
add error handler to blob ajax requests.
Modified: trunk/src/suggest.js
==============================================================================
--- trunk/src/suggest.js (original)
+++ trunk/src/suggest.js Thu Jun 5 18:10:28 2008
@@ -444,6 +444,7 @@
url: this.blurb_url(id),
data: this.options.blurb_param,
success: fb.delegate(this.receive_article, this),
+ error: fb.delegate(this.receive_article_error, this),
dataType: use_jsonp(this.options) ? "jsonp" : null,
cache: true
});
@@ -465,6 +466,9 @@
}
this.receive("article", o);
},
+ receive_article_error: function() {
+ this.receive("article", "Description could not be displayed");
+ },
load_image: function(id) {
if (id) {
var i = new Image();