Move check for updates to more menu

This commit is contained in:
Ruud
2012-03-05 21:12:39 +01:00
parent 59373b0793
commit 70783d3b60
3 changed files with 22 additions and 15 deletions
+16
View File
@@ -67,6 +67,13 @@ var CouchPotato = new Class({
self.block.footer = new Block.Footer(self, {})
);
self.block.more.addLink(new Element('a', {
'text': 'Check for updates',
'events': {
'click': self.checkForUpdate.bind(self)
}
}))
new ScrollSpy({
min: 10,
onLeave: function(){
@@ -147,6 +154,15 @@ var CouchPotato = new Class({
self.checkAvailable(1000);
},
checkForUpdate: function(func){
var self = this;
Updater.check(func)
self.blockPage('Please wait. If this takes to long, something must have gone wrong.', 'Checking for updates');
self.checkAvailable(3000);
},
checkAvailable: function(delay){
var self = this;