diff --git a/js/gallery.dialog.js b/js/gallery.dialog.js index ec187186..0e5edcfd 100644 --- a/js/gallery.dialog.js +++ b/js/gallery.dialog.js @@ -137,28 +137,6 @@ this.xhrData = xhr; }, success: function(data) { - // Pre jquery 1.4, get the saved XMLHttpRequest object - xhr = this.xhrData; - if (xhr) { - var mimeType = /^(\w+\/\w+)\;?/.exec(xhr.getResponseHeader("Content-Type")); - - var content = ""; - if (mimeType[1] == "application/json") { - data = JSON.parse(data); - } else { - data = {"html": escape(data)}; - } - } else { - // Uploading files (eg: watermark) uses a fake xhr in jquery.form.js so - // all we have is in the data field, which should be some very simple JSON. - // Weirdly enough in Chrome the result gets wrapped in a
 element and
-             // looks like this:
-             //   
{"result":"success",
-             //   "location":"\/~bharat\/gallery3\/index.php\/admin\/watermarks"}
- // bizarre. Strip that off before parsing. - data = JSON.parse(data.match("({.*})")[0]); - } - if (data.html) { $("#g-dialog").html(unescape(data.html)); $("#g-dialog").dialog("option", "position", "center");