mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 22:34:44 +08:00
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:
@ -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;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user