diff options
author | Abyss777 <abyss@fox5.ru> | 2018-06-26 12:00:15 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-06-26 13:55:11 +0500 |
commit | 17157262fef1c046d116b2270f4e1d335fe9da1b (patch) | |
tree | 751583dde65b666e4ab249b26010b7bec6f279b6 /web/app/view/permissions/Notifications.js | |
parent | d67213556dcc87453c0ad5cd6f9e8851c477a2f3 (diff) | |
download | trackermap-web-17157262fef1c046d116b2270f4e1d335fe9da1b.tar.gz trackermap-web-17157262fef1c046d116b2270f4e1d335fe9da1b.tar.bz2 trackermap-web-17157262fef1c046d116b2270f4e1d335fe9da1b.zip |
Implement refactored notifications
Diffstat (limited to 'web/app/view/permissions/Notifications.js')
-rw-r--r-- | web/app/view/permissions/Notifications.js | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/web/app/view/permissions/Notifications.js b/web/app/view/permissions/Notifications.js index e21d277f..a8570fea 100644 --- a/web/app/view/permissions/Notifications.js +++ b/web/app/view/permissions/Notifications.js @@ -42,26 +42,25 @@ Ext.define('Traccar.view.permissions.Notifications', { renderer: Traccar.AttributeFormatter.getFormatter('always'), filter: 'boolean' }, { - text: Strings.notificationWeb, - dataIndex: 'web', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - renderer: Traccar.AttributeFormatter.getFormatter('web'), - filter: 'boolean' - }, { - text: Strings.notificationMail, - dataIndex: 'mail', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - renderer: Traccar.AttributeFormatter.getFormatter('mail'), - filter: 'boolean' - }, { - text: Strings.notificationSms, - dataIndex: 'sms', - flex: 1, - minWidth: Traccar.Style.columnWidthNormal, - renderer: Traccar.AttributeFormatter.getFormatter('sms'), - filter: 'boolean' + text: Strings.notificationNotificators, + dataIndex: 'notificators', + flex: 2, + filter: { + type: 'arraylist', + idField: 'type', + labelField: 'name', + store: 'AllNotificators' + }, + renderer: function (value) { + var result = '', i, notificators; + if (value) { + notificators = value.split(/[ ,]+/).filter(Boolean); + for (i = 0; i < notificators.length; i++) { + result += Traccar.app.getNotificatorString(notificators[i]) + (i < notificators.length - 1 ? ', ' : ''); + } + } + return result; + } }, { text: Strings.sharedCalendar, dataIndex: 'calendarId', |