Commit a4b44de3 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1315: Download button for MWW instance (iframe based)

Task-Url: https://pm.winseda.de/issues/1315
parent e7bc3354
......@@ -109,5 +109,23 @@ ResultItem.prototype.loadData = function(dataType, containerSelector, contentSel
error: __util.processServerError
});
}
};
ResultItem.prototype.downloadData = function(format, model) {
var _this = this;
$.ajax({
url: window.location.href + "download?format=" + format + "&type=" + model,
type: "GET",
dataType: "json",
success: function(data) {
if ( window.location !== window.parent.location ) {
// The page is in an iframe
window.parent.postMessage(data, '*');
} else {
// The page is not in an iframe
console.log(data);
}
},
error: __util.processServerError
});
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment