Skip to content
Snippets Groups Projects

Resolve "Get drugs by target"

Merged Piotr Gawron requested to merge 163-get-drugs-by-target into master
10 files
+ 236
100
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -135,12 +135,8 @@ GuiUtils.prototype.createAnnotationLink = function(annotation, showType) {
};
GuiUtils.prototype.createAnnotations = function(label, value, options) {
var showType = true;
var inline = false;
if (options !== undefined) {
if (options.showType !== undefined) {
showType = options.showType;
}
if (options.inline !== undefined) {
inline = options.inline;
}
@@ -152,42 +148,59 @@ GuiUtils.prototype.createAnnotations = function(label, value, options) {
if (!inline) {
result.appendChild(self.createNewLine());
}
for (var i = 0; i < value.length; i++) {
var element = value[i];
var link = this.createAnnotationLink(element, showType);
if (inline) {
if (i > 0) {
var coma = document.createElement("span");
coma.innerHTML = ", ";
result.appendChild(coma);
}
result.appendChild(link);
} else {
result.appendChild(self.createAnnotationList(value, options));
}
return result;
};
GuiUtils.prototype.createAnnotationList = function(annotations, options) {
var showType = true;
var inline = false;
if (options !== undefined) {
if (options.showType !== undefined) {
showType = options.showType;
}
if (options.inline !== undefined) {
inline = options.inline;
}
}
var self = this;
var result = document.createElement("div");
for (var i = 0; i < annotations.length; i++) {
var element = annotations[i];
var link = this.createAnnotationLink(element, showType);
if (inline) {
if (i > 0) {
var coma = document.createElement("span");
coma.innerHTML = ", ";
result.appendChild(coma);
}
result.appendChild(link);
} else {
var row = document.createElement("div");
row.style.height = "26px";
if (i % 2 === 0) {
row.className = "annotationRowOdd";
} else {
row.className = "annotationRowEven";
}
var header = document.createElement("div");
header.style.width = "24px";
header.style.float = "left";
header.innerHTML = "[" + (i + 1) + "]";
row.appendChild(header);
var body = document.createElement("div");
body.style.float = "left";
body.appendChild(link);
row.appendChild(body);
result.appendChild(row);
var row = document.createElement("div");
row.style.height = "26px";
if (i % 2 === 0) {
row.className = "annotationRowOdd";
} else {
row.className = "annotationRowEven";
}
var header = document.createElement("div");
header.style.width = "24px";
header.style.float = "left";
header.innerHTML = "[" + (i + 1) + "]";
row.appendChild(header);
var body = document.createElement("div");
body.style.float = "left";
body.appendChild(link);
row.appendChild(body);
result.appendChild(row);
}
}
return result;
};
}
GuiUtils.prototype.createLabelText = function(value) {
var result = document.createElement("span");
if (value !== undefined) {
Loading