Alphabetical order for workers

I had missed this completely. Workers are listed in alphabetical order in English. Now they are ordered in other languages too.

Alphabetical order for outfit
This commit is contained in:
Andrea Rendine
2015-05-18 19:39:12 +02:00
committed by Blake Grotewold
parent 7babe5d102
commit c4535c029a
2 changed files with 13 additions and 17 deletions
+6 -7
View File
@@ -174,6 +174,7 @@ var Path = {
}, Room.Craftables);
for(var k in carryable) {
var lk = _(k);
var store = carryable[k];
var have = $SM.get('stores["'+k+'"]');
var num = Path.outfit[k];
@@ -190,18 +191,16 @@ var Path = {
outfit.children().each(function(i) {
var child = $(this);
if(child.attr('id').indexOf('outfit_row_') === 0) {
var cName = child.attr('id').substring(11).replace('-', ' ');
if(cName < k && (curPrev == null || cName > curPrev)) {
curPrev = cName;
var cName = child.children('.row_key').text();
if(cName < lk) {
curPrev = child.attr('id');
}
}
});
if(curPrev == null) {
row.insertAfter(wRow);
}
else
{
row.insertAfter(outfit.find('#outfit_row_' + curPrev.replace(' ', '-')));
} else {
row.insertAfter(outfit.find('#' + curPrev));
}
} else {
$('div#' + row.attr('id') + ' > div.row_val > span', outfit).text(num);