diff options
author | Abyss777 <abyss@fox5.ru> | 2016-12-14 17:00:25 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-12-14 17:00:25 +0500 |
commit | eec9ffbf8213f1df69162131245cb3282c68ca0a (patch) | |
tree | b7314f43c0225ec0bfb04d7fda93df5c6f1e1934 /web/app/view/UsersController.js | |
parent | 36f645e0d3def24ea6228c0974b83f60503d9ea6 (diff) | |
download | etbsa-traccar-web-eec9ffbf8213f1df69162131245cb3282c68ca0a.tar.gz etbsa-traccar-web-eec9ffbf8213f1df69162131245cb3282c68ca0a.tar.bz2 etbsa-traccar-web-eec9ffbf8213f1df69162131245cb3282c68ca0a.zip |
Calendars implementation
Diffstat (limited to 'web/app/view/UsersController.js')
-rw-r--r-- | web/app/view/UsersController.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/web/app/view/UsersController.js b/web/app/view/UsersController.js index 9b7076e..af9d47b 100644 --- a/web/app/view/UsersController.js +++ b/web/app/view/UsersController.js @@ -1,5 +1,6 @@ /* - * Copyright 2015 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org) + * Copyright 2016 Andrey Kunitsyn (andrey@traccar.org) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +25,7 @@ Ext.define('Traccar.view.UsersController', { 'Traccar.view.UserDevices', 'Traccar.view.UserGroups', 'Traccar.view.UserGeofences', + 'Traccar.view.UserCalendars', 'Traccar.view.Notifications', 'Traccar.view.BaseWindow', 'Traccar.model.User' @@ -129,6 +131,22 @@ Ext.define('Traccar.view.UsersController', { }).show(); }, + onCalendarsClick: function () { + var user = this.getView().getSelectionModel().getSelection()[0]; + Ext.create('Traccar.view.BaseWindow', { + title: Strings.sharedCalendars, + items: { + xtype: 'userCalendarsView', + baseObjectName: 'userId', + linkObjectName: 'calendarId', + storeName: 'AllCalendars', + linkStoreName: 'Calendars', + urlApi: 'api/permissions/calendars', + baseObject: user.getId() + } + }).show(); + }, + onSelectionChange: function (selected) { var disabled = selected.length > 0; this.lookupReference('toolbarEditButton').setDisabled(disabled); @@ -137,5 +155,6 @@ Ext.define('Traccar.view.UsersController', { this.lookupReference('userGroupsButton').setDisabled(disabled); this.lookupReference('userGeofencesButton').setDisabled(disabled); this.lookupReference('userNotificationsButton').setDisabled(disabled); + this.lookupReference('userCalendarsButton').setDisabled(disabled); } }); |