Fix tags ordering in chrome

This commit is contained in:
Fabián Rodríguez 2013-04-28 20:41:08 -03:00
parent 3b03a7cdde
commit aed81c1b3b
3 changed files with 3 additions and 2 deletions

View file

@ -10,6 +10,7 @@
* Don't use Pathname early to circumvent some rare initialization errors [#3816](https://github.com/diaspora/diaspora/issues/3816)
* Don't error out in script/server if git is unavailable.
* Fix post preview from tag pages [#4157](https://github.com/diaspora/diaspora/issues/4157)
* Fix tags ordering in chrome [#4133](https://github.com/diaspora/diaspora/issues/4133)
## Features

View file

@ -3,7 +3,7 @@ app.collections.TagFollowings = Backbone.Collection.extend({
model: app.models.TagFollowing,
url : "/tag_followings",
comparator: function(first_tf, second_tf) {
return first_tf.get("name") < second_tf.get("name");
return -first_tf.get("name").localeCompare(second_tf.get("name"));
},
create : function(model) {

View file

@ -7,7 +7,7 @@ describe("app.collections.TagFollowings", function(){
it("should compare in reverse order", function() {
var a = new app.models.TagFollowing({name: "aaa"}),
b = new app.models.TagFollowing({name: "zzz"})
expect(this.collection.comparator(a, b)).toBe(true)
expect(this.collection.comparator(a, b)).toBeGreaterThan(0)
})
})