Use existing functions
This commit is contained in:
@@ -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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user