Skip to content
Snippets Groups Projects

Resolve "Sort submaps in left panel by name"

Merged Piotr Gawron requested to merge 962-sort-submaps-in-left-panel-by-name into master
3 files
+ 14
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -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) {
Loading