diff options
Diffstat (limited to 'web/app/view/Device.js')
-rw-r--r-- | web/app/view/Device.js | 150 |
1 files changed, 86 insertions, 64 deletions
diff --git a/web/app/view/Device.js b/web/app/view/Device.js index 3feb008a2..cf7e3e473 100644 --- a/web/app/view/Device.js +++ b/web/app/view/Device.js @@ -13,85 +13,107 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.view.Device', { - extend: 'Ext.grid.Panel', - xtype: 'deviceView', +Ext.define('Traccar.view.Device', { + extend: 'Ext.grid.Panel', + xtype: 'deviceView', - requires: [ - 'Traccar.view.DeviceController' - ], + requires: [ + 'Traccar.view.DeviceController', + 'Traccar.view.BaseEditToolbar' + ], - controller: 'device', - store: 'Devices', + controller: 'device', + store: 'Devices', - title: Strings.deviceTitle, - selType: 'rowmodel', + title: Strings.deviceTitle, + selType: 'rowmodel', - tbar: [{ - handler: 'onAddClick', - reference: 'deviceAddButton', - glyph: 'xf067@FontAwesome', - tooltip: Strings.sharedAdd, - tooltipType: 'title' - }, { - disabled: true, - handler: 'onEditClick', - reference: 'deviceEditButton', - glyph: 'xf040@FontAwesome', - tooltip: Strings.sharedEdit, - tooltipType: 'title' - }, { + dockedItems: [{ + xtype : 'baseEditToolbar', + dock : "top", + items: [{ disabled: true, - handler: 'onRemoveClick', - reference: 'deviceRemoveButton', - glyph: 'xf00d@FontAwesome', - tooltip: Strings.sharedRemove, + handler: 'onCommandClick', + reference: 'deviceCommandButton', + glyph: 'xf093@FontAwesome', + tooltip: Strings.deviceCommand, tooltipType: 'title' - }, { + }] + }], + + //tbar: { + // xtype: 'baseEditToolbar', + /*items: [{ disabled: true, handler: 'onCommandClick', reference: 'deviceCommandButton', glyph: 'xf093@FontAwesome', tooltip: Strings.deviceCommand, tooltipType: 'title' - }, { - xtype: 'tbfill' - }, { - text: Strings.settingsTitle, - menu: [{ - text: Strings.settingsUser, - handler: 'onUserClick' - }, { - text: Strings.settingsServer, - hidden: true, - handler: 'onServerClick', - reference: 'settingsServerButton' - }, { - text: Strings.settingsUsers, - hidden: true, - handler: 'onUsersClick', - reference: 'settingsUsersButton' - }] - }, { - text: Strings.loginLogout, - handler: 'onLogoutClick' - }], - - listeners: { - selectionchange: 'onSelectionChange' - }, + }]*/ + //}, - columns: [{ - text: Strings.deviceName, - dataIndex: 'name', flex: 1 + /*tbar: [{ + handler: 'onAddClick', + reference: 'deviceAddButton', + glyph: 'xf067@FontAwesome', + tooltip: Strings.sharedAdd, + tooltipType: 'title' + }, { + disabled: true, + handler: 'onEditClick', + reference: 'deviceEditButton', + glyph: 'xf040@FontAwesome', + tooltip: Strings.sharedEdit, + tooltipType: 'title' + }, { + disabled: true, + handler: 'onRemoveClick', + reference: 'deviceRemoveButton', + glyph: 'xf00d@FontAwesome', + tooltip: Strings.sharedRemove, + tooltipType: 'title' + }, { + disabled: true, + handler: 'onCommandClick', + reference: 'deviceCommandButton', + glyph: 'xf093@FontAwesome', + tooltip: Strings.deviceCommand, + tooltipType: 'title' + }, { + xtype: 'tbfill' + }, { + text: Strings.settingsTitle, + menu: [{ + text: Strings.settingsUser, + handler: 'onUserClick' }, { - text: Strings.deviceIdentifier, - dataIndex: 'uniqueId', flex: 1 + text: Strings.settingsServer, + hidden: true, + handler: 'onServerClick', + reference: 'settingsServerButton' + }, { + text: Strings.settingsUsers, + hidden: true, + handler: 'onUsersClick', + reference: 'settingsUsersButton' }] + }, { + text: Strings.loginLogout, + handler: 'onLogoutClick' + }],*/ + + listeners: { + selectionchange: 'onSelectionChange' + }, - }); + columns: [{ + text: Strings.deviceName, + dataIndex: 'name', flex: 1 + }, { + text: Strings.deviceIdentifier, + dataIndex: 'uniqueId', flex: 1 + }] -})(); +}); |