Sort by title after creator and date, if not primary sort

Addresses #275
This commit is contained in:
Dan Stillman 2013-03-19 05:16:31 -04:00
parent 8bd7536c2c
commit f0f6772b01

View file

@ -1433,6 +1433,13 @@ Zotero.ItemTreeView.prototype.sort = function(itemID)
}
}
if (columnField !== 'title') {
cmp = collation.compareString(1, b.getField('title', true), a.getField('title', true));
if (cmp !== 0) {
return cmp;
}
}
fieldA = a.getField('dateModified');
fieldB = b.getField('dateModified');
return (fieldA > fieldB) ? -1 : (fieldA < fieldB) ? 1 : 0;