From ec0363fd36f84c51d9fa3492004425ded2b729bd Mon Sep 17 00:00:00 2001 From: shadlaws Date: Tue, 12 Feb 2013 17:19:28 +0100 Subject: Updated success callbacks for gallery.panel.js and gallery.dialog.js - no longer need to save xhr ahead of success. Tested and seems to work well, even with watermarks on Chrome (previously an issue). --- lib/gallery.panel.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'lib/gallery.panel.js') diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js index 0683c531..e5028f2a 100644 --- a/lib/gallery.panel.js +++ b/lib/gallery.panel.js @@ -34,21 +34,11 @@ $.ajax({ url: sHref, type: "GET", - beforeSend: function(xhr) { - // Until we convert to jquery 1.4, we need to save the - // XMLHttpRequest object - this.xhrData = xhr; - }, success: function(data, textStatus, xhr) { - // Pre jquery 1.4, get the saved XMLHttpRequest object - if (xhr == undefined) { - xhr = this.xhrData; - } var mimeType = /^(\w+\/\w+)\;?/.exec(xhr.getResponseHeader("Content-Type")); var content = ""; if (mimeType[1] == "application/json") { - data = JSON.parse(data); - content = data.html; + content = unescape(data.html); } else { content = data; } -- cgit v1.2.3