Commit 2bdd3819 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

list of submaps is sorted alphabetically

parent 46e2d813
......@@ -6,6 +6,7 @@ minerva (15.0.0~alpha.0) stable; urgency=medium
overlays contain proper warning (#809)
* Small improvement: CellDesigner text area object can have "BorderColor"
property defined (#806)
* Small improvement: list of submaps is sorted alphabetically (#962)
* Bug fix: position of structural state is preserved on upload CellDesigner
file (#671)
* Bug fix: problematic notes doesn't crash CellDesigner upload (#968)
......
......@@ -24,9 +24,9 @@ var Functions = require('../../Functions');
* @extends Panel
*/
function SubmapPanel(params) {
params.panelName = "submap";
params.scrollable = true;
params.helpTip = "The Submaps tab summarizes all the submap networks uploaded together and linked to the main network of <b>'"
params["panelName"] = "submap";
params["scrollable"] = true;
params["helpTip"] = "The Submaps tab summarizes all the submap networks uploaded together and linked to the main network of <b>'"
+ params.parent.getMap().getProject().getName() + "'</b> project.";
Panel.call(this, params);
$(params.element).addClass("minerva-submap-panel");
......@@ -187,6 +187,15 @@ SubmapPanel.prototype.init = function () {
if (type === "UNKNOWN") {
tableName = ""
}
modelsByType[type].sort(function (modelA, modelB) {
if (modelA.getName() > modelB.getName()) {
return 1;
}
if (modelA.getName() < modelB.getName()) {
return -1;
}
return 0;
});
div.appendChild(self.createTable(modelsByType[type], tableName));
}
if (models.length <= 1) {
......
......@@ -985,7 +985,7 @@ MapModel.prototype.setCreationDate = function (creationDate) {
/**
*
* @returns {string|null}
* @returns {?null|string}
*/
MapModel.prototype.getDescription = function () {
return this._description;
......
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