Some settings fixes

About tab styling
This commit is contained in:
Ruud
2011-10-16 22:52:00 +02:00
parent e8ae2dced0
commit f248d5812b
7 changed files with 157 additions and 51 deletions
+5 -2
View File
@@ -39,7 +39,7 @@ class Updater(Plugin):
'repo_name': self.repo_name,
'last_check': self.last_check,
'update_version': self.update_version,
'version': self.getVersion(),
'version': self.getVersion()
})
def getVersion(self):
@@ -48,7 +48,10 @@ class Updater(Plugin):
try:
output = self.repo.getHead() # Yes, please
log.debug('Git version output: %s' % output.hash)
self.version = output.hash
self.version = {
'hash': output.hash[:8],
'date': output.getDate(),
}
except Exception, e:
log.error('Failed using GIT updater, running from source, you need to have GIT installed. %s' % e)
return 'No GIT'
@@ -1,4 +1,6 @@
var UpdaterBase = new Class({
Implements: [Events],
initialize: function(){
var self = this;
@@ -18,6 +20,9 @@ var UpdaterBase = new Class({
self.timer = setTimeout(function(){
Api.request('updater.info', {
'onComplete': function(json){
self.json = json;
self.fireEvent('loaded', [json]);
if(json.update_version){
self.createMessage(json);
}
@@ -30,6 +35,10 @@ var UpdaterBase = new Class({
}, (timeout || 0))
},
getInfo: function(){
return this.json;
},
createMessage: function(data){
var self = this;