summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Wall <richard@largo>2011-06-20 00:16:32 +0100
committerRichard Wall <richard@largo>2011-06-20 00:16:32 +0100
commit320befb2d2b21994354a2cb5b26d632191f9b8f9 (patch)
tree7a0c7ae2b4edf27160259043404f69d0dd7376a6
parentadd20f9c9b223cb77dccd81a88be555c93e559de (diff)
get rid of dataFilter - move everything to successv11.06pre1
-rw-r--r--jarmon/jarmon.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js
index ac4211b..f163e50 100644
--- a/jarmon/jarmon.js
+++ b/jarmon/jarmon.js
@@ -110,7 +110,7 @@ jarmon.BinaryFile = function(strData, iDataOffset, iDataLength) {
throw new jarmon.InvalidBinaryFile(
"Unsupported type " + (typeof strData));
}
-
+
this.getRawData = function() {
return data;
};
@@ -248,21 +248,23 @@ jarmon.downloadBinary = function(url) {
this._nativeXhr = jQuery.ajaxSettings.xhr();
return this._nativeXhr;
},
- dataFilter: function(data, dataType) {
+ success: function(data, textStatus, jqXHR) {
// In IE we return the responseBody
if(typeof(this._nativeXhr.responseBody) != 'undefined') {
- return new jarmon.BinaryFile(
+ d.callback(
+ new jarmon.BinaryFile(
jarmon.GetIEByteArray_ByteStr(
- this._nativeXhr.responseBody));
+ this._nativeXhr.responseBody)));
} else {
- return new jarmon.BinaryFile(data);
+ d.callback(new jarmon.BinaryFile(data));
}
},
- success: function(data, textStatus, jqXHR) {
- d.callback(data);
- },
error: function(xhr, textStatus, errorThrown) {
d.errback(new Error(xhr.status));
+ },
+ complete: function(jqXHR, textStatus) {
+ this._nativeXhr = null;
+ delete this._nativeXhr;
}
});
return d;
@@ -1310,7 +1312,7 @@ jarmon.buildTabbedChartUi = function ($chartTemplate, chartRecipes,
/**
* Setup chart date range controls and all charts
**/
- var p = new jarmon.Parallimiter(1);
+ var p = new jarmon.Parallimiter(2);
function serialDownloader(url) {
return p.addCallable(jarmon.downloadBinary, [url]);
}