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

1005: Visualize coherence within individual group

Task-Url: https://pm.winseda.de/issues/1005
parent 14f77f0a
...@@ -11,8 +11,15 @@ function GroupView() { ...@@ -11,8 +11,15 @@ function GroupView() {
var _this = this; var _this = this;
this.query("queryMembers", "#group-members-container", function(data) { this.query("queryMembers", "#group-members-container", function(data) {
_this.loadSignificantTerms(); $(".group-members-loading").hide();
_this.query("queryCandidates", "#group-candidates-container"); });
this.loadSignificantTerms(function(data) {
$(".significant-terms-loading").hide();
});
this.query("queryCandidates", "#group-candidates-container", function(data) {
$(".group-candidates-loading").hide();
}); });
}; };
...@@ -76,7 +83,7 @@ GroupView.prototype.setupCloud = function() { ...@@ -76,7 +83,7 @@ GroupView.prototype.setupCloud = function() {
}; };
}; };
GroupView.prototype.loadSignificantTerms = function() { GroupView.prototype.loadSignificantTerms = function(callback) {
var _this = this; var _this = this;
$.ajax({ $.ajax({
url: __util.composeUrl("groups/" + _this.groupId + "/significantTerms?size=" + _this.options.wordcloud.tagcount), url: __util.composeUrl("groups/" + _this.groupId + "/significantTerms?size=" + _this.options.wordcloud.tagcount),
...@@ -86,6 +93,9 @@ GroupView.prototype.loadSignificantTerms = function() { ...@@ -86,6 +93,9 @@ GroupView.prototype.loadSignificantTerms = function() {
if (data!=null && data!=undefined && data.length>0) { if (data!=null && data!=undefined && data.length>0) {
$("#significant-terms-cloud").show(); $("#significant-terms-cloud").show();
_this.fillSignificantTerms(data); _this.fillSignificantTerms(data);
if (callback!==undefined && callback!==null) {
callback(data);
}
} }
}, },
error: __util.processServerError error: __util.processServerError
......
Supports Markdown
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