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 = "",
edgeDefinitions = [{collection : "", from : "", to :""}],
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.removedECollList = [];
@ -510,7 +521,7 @@
false,
true,
1,
self.eCollList
self.eCollList.sort(sorter)
)
);
} else {
@ -525,7 +536,7 @@
true,
false,
1,
self.eCollList
self.eCollList.sort(sorter)
)
);
}
@ -540,7 +551,7 @@
false,
false,
10,
collList
collList.sort(sorter)
)
);
tableContent.push(
@ -554,7 +565,7 @@
false,
false,
10,
collList
collList.sort(sorter)
)
);
self.counter++;
@ -572,7 +583,7 @@
false,
false,
10,
collList
collList.sort(sorter)
)
);