1
0
Fork 0

sort list of collections when creating a graph

This commit is contained in:
Jan Steemann 2014-11-14 21:31:43 +01:00
parent 1303595594
commit 1fe0ce481e
1 changed files with 17 additions and 6 deletions

View File

@ -430,7 +430,18 @@
name = "", name = "",
edgeDefinitions = [{collection : "", from : "", to :""}], edgeDefinitions = [{collection : "", from : "", to :""}],
orphanCollections = "", orphanCollections = "",
title; title,
sorter = function(l, r) {
l = l.toLowerCase();
r = r.toLowerCase();
if (l < r) {
return -1;
}
if (l > r) {
return 1;
}
return 0;
};
this.eCollList = []; this.eCollList = [];
this.removedECollList = []; this.removedECollList = [];
@ -510,7 +521,7 @@
false, false,
true, true,
1, 1,
self.eCollList self.eCollList.sort(sorter)
) )
); );
} else { } else {
@ -525,7 +536,7 @@
true, true,
false, false,
1, 1,
self.eCollList self.eCollList.sort(sorter)
) )
); );
} }
@ -540,7 +551,7 @@
false, false,
false, false,
10, 10,
collList collList.sort(sorter)
) )
); );
tableContent.push( tableContent.push(
@ -554,7 +565,7 @@
false, false,
false, false,
10, 10,
collList collList.sort(sorter)
) )
); );
self.counter++; self.counter++;
@ -572,7 +583,7 @@
false, false,
false, false,
10, 10,
collList collList.sort(sorter)
) )
); );