Commit 64d20b26 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1289: Finalize initial version of item view

Task-Url: https://pm.winseda.de/issues/1289
parent 01197d81
......@@ -14,6 +14,10 @@ var ResultItem = function(options) {
}, options);
this.resize();
this.modelId = $("#modelId").val();
this.itemId = $("#itemId").val();
$('.venobox').venobox();
};
......@@ -32,4 +36,28 @@ ResultItem.prototype.resize = function() {
$("#carousel-item-images").css("width", innerWidth + "px");
$(".item-image").css("height", innerWidth + "px");
$(".item-image").css("width", innerWidth + "px");
};
\ No newline at end of file
};
ResultItem.prototype.loadOriginalData = function(button) {
this.loadData("original", "#item-detail-dataset-container", "#item-detail-dataset", button);
};
ResultItem.prototype.loadIntegratedData = function(button) {
this.loadData("integrations", "#item-detail-integrated-container", "#item-detail-integrated", button);
};
ResultItem.prototype.loadData = function(dataType, containerSelector, contentSelector, button) {
$.ajax({
url: __util.getBaseUrl() + "item/" + this.modelId + "/" + this.itemId + "/data?type=" + dataType,
type: "GET",
dataType: "html",
success: function(data, textStatus, jqXHR ) {
$(button).hide();
$(containerSelector).addClass("show");
$(contentSelector).html(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