aboutsummaryrefslogtreecommitdiff
path: root/web/DeviceView.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/DeviceView.js')
-rw-r--r--web/DeviceView.js40
1 files changed, 21 insertions, 19 deletions
diff --git a/web/DeviceView.js b/web/DeviceView.js
index 09174467c..0e1312e5d 100644
--- a/web/DeviceView.js
+++ b/web/DeviceView.js
@@ -20,25 +20,27 @@ Ext.define('DeviceView', {
title: Strings.device_title,
-
- initComponent: function() {
-
- this.tbar = [{
- text:'Add'
- }, {
- text:'Edit'
- }, {
- text:'Remove'
- }, {
- xtype: 'tbfill'
- }, {
- text:'Settings'
- }, {
- text:'Logout'
- }];
-
- this.callParent();
- },
+ tbar: [{
+ text:'Add'
+ }, {
+ text:'Edit'
+ }, {
+ text:'Remove'
+ }, {
+ xtype: 'tbfill'
+ }, {
+ text:'Settings'
+ }, {
+ text:'Logout',
+ handler: function() {
+ Ext.Ajax.request({
+ url: '/api/logout',
+ success: function() {
+ window.location.reload();
+ }
+ });
+ }
+ }],
store: {
proxy: {