Fix javascript regression with quoting

This commit is contained in:
Robin Ward
2013-02-21 12:54:40 -05:00
parent c5393d93f3
commit f6263749d4
9 changed files with 46 additions and 4 deletions

View File

@ -1,17 +1,23 @@
(function() {
window.Discourse.VersionCheck = Discourse.Model.extend({});
window.Discourse.VersionCheck = Discourse.Model.extend({
hasInstalledSha: function() {
console.log( 'hello??' );
return( this.get('installed_sha') && this.get('installed_sha') != 'unknown' );
}.property('installed_sha')
});
Discourse.VersionCheck.reopenClass({
find: function() {
var _this = this;
return jQuery.ajax({
var promise = new RSVP.Promise()
jQuery.ajax({
url: '/admin/version_check',
dataType: 'json',
success: function(json) {
return Discourse.VersionCheck.create(json);
promise.resolve(Discourse.VersionCheck.create(json));
}
});
return promise;
}
});