removed sugar.js, port functionality to moment and underscore.js

bring in latest ace from local so we don't mess up with https
This commit is contained in:
Sam
2013-06-11 06:48:50 +10:00
parent eed5875505
commit fa8a84f20c
211 changed files with 1773 additions and 8914 deletions

View File

@ -20,7 +20,7 @@ Discourse.GithubCommit = Discourse.Model.extend({
}.property("sha"),
timeAgo: function() {
return Date.create(this.get('commit.committer.date')).relative();
return Discourse.Formatter.relativeAge(new Date(this.get('commit.committer.date'), {format: 'medium', leaveAgo: true}));
}.property("commit.committer.date")
});
@ -32,10 +32,10 @@ Discourse.GithubCommit.reopenClass({
type: 'get',
data: { per_page: 40 }
}).then(function (response) {
response.data.each(function(commit) {
_.each(response.data,function(commit) {
result.pushObject( Discourse.GithubCommit.create(commit) );
});
});
return result;
}
});
});