Use existing functions

This commit is contained in:
Ruud
2012-04-16 07:57:40 +02:00
parent 7b95fd1a3c
commit 36cff1e1bb
+2 -11
View File
@@ -170,12 +170,7 @@ var CouchPotato = new Class({
'events': { 'events': {
'click': function(e){ 'click': function(e){
(e).preventDefault(); (e).preventDefault();
self.shutdown();
self.blockPage('You have shutdown. This is what suppose to happen ;)');
Api.request('app.shutdown', {
'onComplete': self.blockPage.bind(self)
});
self.checkAvailable(1000);
} }
} }
}, { }, {
@@ -201,11 +196,7 @@ var CouchPotato = new Class({
'events': { 'events': {
'click': function(e){ 'click': function(e){
(e).preventDefault(); (e).preventDefault();
self.restart(message, title);
self.blockPage(message || 'Restarting... please wait. If this takes to long, something must have gone wrong.', title);
Api.request('app.restart');
self.checkAvailable(1000);
} }
} }
}, { }, {