Commit 656bd882 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Pathway uses different type name. Moreover when parent of element is a pathway...

Pathway uses different type name. Moreover when parent of element is a pathway it's name is pathway (not a hardcoded compartment type)
parent cf7d4aaa
minerva (12.2.0~beta.2) unstable; urgency=medium
* Bug fix: parent compartment/pathway use proper type name in left panel
(#324)
* Bug fix: editing/removing project requires Map Management privilege (#681)
* Bug fix: when removeAllListeners is called list of registered listeners is
cleaned (#687)
......
......@@ -815,7 +815,7 @@ GuiUtils.prototype.createAliasElement = function (params) {
modelId: alias.getModelId()
}), true).then(function (compartment) {
div.appendChild(self.createParamLine({
label: "Compartment: ", value: compartment.getName(),
label: compartment.getType() + ": ", value: compartment.getName(),
className: self._configurationOptionToClassName(ConfigurationType.SHOW_ELEMENT_COMPARTMENT)
}));
})
......@@ -1149,7 +1149,7 @@ GuiUtils.prototype.removeTab = function (abstractGuiElement, panel) {
var panelId = getPanelId(panel);
var liElement = $("li:has(a[href='#" + panelId + "'])", $(abstractGuiElement.getElement()))[0];
var contentElement = $("#" + panelId, $(abstractGuiElement.getElement()))[0];
if (liElement !== undefined && contentElement !==undefined) {
if (liElement !== undefined && contentElement !== undefined) {
liElement.parentElement.removeChild(liElement);
contentElement.parentElement.removeChild(contentElement);
} else {
......
......@@ -166,11 +166,15 @@ describe('GuiUtils', function () {
var guiUtils = createGuiUtils(map);
var alias = helper.createAlias(map);
var compartment = helper.createAlias(map);
compartment.setName("compartment_name");
compartment.setType("XYZ");
alias.setCompartmentId(compartment.getId());
compartment.setName("compartment_name");
return guiUtils.createAliasElement({alias: alias}).then(function (div) {
assert.ok(div.innerHTML.indexOf("compartment_name") >= 0);
console.log(div.innerHTML);
assert.ok(div.innerHTML.indexOf(compartment.getName()) >= 0);
assert.ok(div.innerHTML.indexOf(compartment.getType()) >= 0);
});
});
......
......@@ -60,4 +60,8 @@ public class PathwayCompartment extends Compartment {
}
}
@Override
public String getStringType() {
return "Pathway";
}
}
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