From 36cff1e1bbc4f8e1c37598eb3ac98e51d58b9e73 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 16 Apr 2012 07:57:40 +0200 Subject: [PATCH] Use existing functions --- couchpotato/static/scripts/couchpotato.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index 9809cd67..0f8fcd99 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -170,12 +170,7 @@ var CouchPotato = new Class({ 'events': { 'click': function(e){ (e).preventDefault(); - - self.blockPage('You have shutdown. This is what suppose to happen ;)'); - Api.request('app.shutdown', { - 'onComplete': self.blockPage.bind(self) - }); - self.checkAvailable(1000); + self.shutdown(); } } }, { @@ -201,11 +196,7 @@ var CouchPotato = new Class({ 'events': { 'click': function(e){ (e).preventDefault(); - - self.blockPage(message || 'Restarting... please wait. If this takes to long, something must have gone wrong.', title); - Api.request('app.restart'); - self.checkAvailable(1000); - + self.restart(message, title); } } }, {