diff options
| author | 2013-07-24 17:42:43 +0200 | |
|---|---|---|
| committer | 2013-07-24 17:42:56 +0200 | |
| commit | f0bfb8a13b6b488c561084a4a33acc9b75984b03 (patch) | |
| tree | 22ef409a315a5afdb2bb93157dd751f2d61d8a71 /pyload/web/app/scripts/controller.js | |
| parent | DebridItaliaCom: two more hosters supported (diff) | |
| download | pyload-f0bfb8a13b6b488c561084a4a33acc9b75984b03.tar.xz | |
improved login mechanism
Diffstat (limited to 'pyload/web/app/scripts/controller.js')
| -rw-r--r-- | pyload/web/app/scripts/controller.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pyload/web/app/scripts/controller.js b/pyload/web/app/scripts/controller.js index 60f604e5b..683454522 100644 --- a/pyload/web/app/scripts/controller.js +++ b/pyload/web/app/scripts/controller.js @@ -1,6 +1,7 @@ define([ 'app', 'backbone', + 'jquery', 'underscore', // Views @@ -13,7 +14,7 @@ define([ 'views/settings/settingsView', 'views/accounts/accountListView' ], function( - App, Backbone, _, HeaderView, NotificationView, DashboardView, SelectionView, FilterView, LoginView, SettingsView, AccountListView) { + App, Backbone, $, _, HeaderView, NotificationView, DashboardView, SelectionView, FilterView, LoginView, SettingsView, AccountListView) { 'use strict'; // TODO some views does not need to be loaded instantly @@ -45,7 +46,13 @@ define([ }, logout: function() { - alert('Not implemented'); + $.ajax(App.apiRequest('logout', null, { + success: function() { + App.user.destroy(); + App.navigate('login'); + } + } + )); }, settings: function() { |
