From c7e79877b49da5efbe7b29a35c00c0e6ede52894 Mon Sep 17 00:00:00 2001 From: Robert Axelsen Date: Wed, 25 Jan 2017 09:39:56 +0100 Subject: [PATCH] TT#9250 Ngcp-csc rename and consolid. calls module Rename the calls module to unified inbox to reflect newest changes/additions, and clean up/consolidate locales related to change. Change-Id: I88240e99d1f63f16cd22dfa45676584fcda19f04 --- app/locales.js | 233 +++++------------- app/store/NavigationTree.js | 4 +- .../view/common/gridfilters/GridFilters.js | 2 +- .../gridfilters/GridFiltersController.js | 5 + classic/src/view/pages/calls/Calls.js | 10 +- classic/src/view/pages/calls/CallsGrid.js | 2 +- .../src/view/pages/pbfconfig/seats/Seats.js | 2 +- .../pages/pbfconfig/seats/SeatsController.js | 5 +- .../view/pages/pbfconfig/seats/SeatsGrid.js | 2 +- classic/src/view/pages/summary/Summary.js | 12 +- .../view/pages/summary/SummaryController.js | 1 + 11 files changed, 88 insertions(+), 190 deletions(-) diff --git a/app/locales.js b/app/locales.js index 27888f6c..89ae332d 100644 --- a/app/locales.js +++ b/app/locales.js @@ -84,20 +84,6 @@ Ext.define('Ngcp.csc.locales', { fr: 'Welcome to your personal desktop.', sp: 'Welcome to your personal desktop.' }, - account_balance: { - en: 'ACCOUNT BALANCE', - it: 'ACCOUNT BALANCE', - de: 'ACCOUNT BALANCE', - fr: 'ACCOUNT BALANCE', - sp: 'ACCOUNT BALANCE' - }, - clients: { - en: 'CLIENTS', - it: 'CLIENTS', - de: 'CLIENTS', - fr: 'CLIENTS', - sp: 'CLIENTS' - }, clients_label: { en: 'client devices registered', it: 'client devices registered', @@ -119,19 +105,19 @@ Ext.define('Ngcp.csc.locales', { fr: 'CALL FORWARDS', sp: 'CALL FORWARDS' }, - all_voicemails: { - en: 'all voicemails', - it: 'all voicemails', - de: 'all voicemails', - fr: 'all voicemails', - sp: 'all voicemails' - }, - reminder: { - en: 'view settings', - it: 'view settings', - de: 'view settings', - fr: 'view settings', - sp: 'view settings' + seats: { + en: 'Seats', + it: 'Seats', + de: 'Seats', + fr: 'Seats', + sp: 'Seats' + }, + devices: { + en: 'Devices', + it: 'Devices', + de: 'Devices', + fr: 'Devices', + sp: 'Devices' } }, calls: { @@ -185,6 +171,13 @@ Ext.define('Ngcp.csc.locales', { de: 'all calls', fr: 'all calls', sp: 'all calls' + }, + pages: { + en: 'pages', + it: 'pages', + de: 'pages', + fr: 'pages', + sp: 'pages' } }, callbarring: { @@ -630,13 +623,6 @@ Ext.define('Ngcp.csc.locales', { fr: 'pbx image', sp: 'pbx image' }, - groups: { - en: 'groups', - it: 'groups', - de: 'groups', - fr: 'groups', - sp: 'groups' - }, mac: { en: 'mac address', it: 'mac address', @@ -694,78 +680,41 @@ Ext.define('Ngcp.csc.locales', { sp: 'disabled' } }, - voicemails: { + settings: { title: { - en: 'Your voicemail recordings.', - it: 'Your voicemail recordings.', - de: 'Your voicemail recordings.', - fr: 'Your voicemail recordings.', - sp: 'Your voicemail recordings.' - }, - subtitle: { - en: 'RECEIVED VOICEMAILS', - it: 'RECEIVED VOICEMAILS', - de: 'RECEIVED VOICEMAILS', - fr: 'RECEIVED VOICEMAILS', - sp: 'RECEIVED VOICEMAILS' - }, - user_label: { - en: 'Voicemails for ', - it: 'Voicemails for ', - de: 'Voicemails for ', - fr: 'Voicemails for ', - sp: 'Voicemails for' - }, - by_months: { - en: 'VOICEMAILS BY MONTH', - it: 'VOICEMAILS BY MONTH', - de: 'VOICEMAILS BY MONTH', - fr: 'VOICEMAILS BY MONTH', - sp: 'VOICEMAILS BY MONTH' - }, - settings: { - title: { - en: 'Settings', - it: 'Settings', - de: 'Settings', - fr: 'Settings', - sp: 'Settings' - }, - description: { - en: 'Send notification of new messages to the following e-mail adddress', - it: 'Send notification of new messages to the following e-mail adddress', - de: 'Send notification of new messages to the following e-mail adddress', - fr: 'Send notification of new messages to the following e-mail adddress', - sp: 'Send notification of new messages to the following e-mail adddress' - }, - attach_recording: { - en: 'attach recording', - it: 'attach recording', - de: 'attach recording', - fr: 'attach recording', - sp: 'attach recording' - }, - pin: { - en: 'PIN code', - it: 'PIN code', - de: 'PIN code', - fr: 'PIN code', - sp: 'PIN code' - }, - pin_instructions: { - en: 'With your 4-digit PIN you may query your voicebox from any telephone.', - it: 'With your 4-digit PIN you may query your voicebox from any telephone.', - de: 'With your 4-digit PIN you may query your voicebox from any telephone.', - fr: 'With your 4-digit PIN you may query your voicebox from any telephone.', - sp: 'With your 4-digit PIN you may query your voicebox from any telephone.' - }, - save: { - en: 'save settings', - it: 'save settings', - de: 'save settings', - fr: 'save settings', - sp: 'save settings' - } + en: 'Settings', + it: 'Settings', + de: 'Settings', + fr: 'Settings', + sp: 'Settings' + }, + description: { + en: 'Send notification of new messages to the following e-mail adddress', + it: 'Send notification of new messages to the following e-mail adddress', + de: 'Send notification of new messages to the following e-mail adddress', + fr: 'Send notification of new messages to the following e-mail adddress', + sp: 'Send notification of new messages to the following e-mail adddress' + }, + attach_recording: { + en: 'attach recording', + it: 'attach recording', + de: 'attach recording', + fr: 'attach recording', + sp: 'attach recording' + }, + pin: { + en: 'PIN code', + it: 'PIN code', + de: 'PIN code', + fr: 'PIN code', + sp: 'PIN code' + }, + pin_instructions: { + en: 'With your 4-digit PIN you may query your voicebox from any telephone.', + it: 'With your 4-digit PIN you may query your voicebox from any telephone.', + de: 'With your 4-digit PIN you may query your voicebox from any telephone.', + fr: 'With your 4-digit PIN you may query your voicebox from any telephone.', + sp: 'With your 4-digit PIN you may query your voicebox from any telephone.' } }, chat: { @@ -1058,73 +1007,6 @@ Ext.define('Ngcp.csc.locales', { sp: 'Webrtc' } }, - faxspool: { - title: { - en: 'Your faxes.', - it: 'Your faxes.', - de: 'Your faxes.', - fr: 'Your faxes.', - sp: 'Your faxes.' - }, - subtitle: { - en: 'FAX SPOOL', - it: 'FAX SPOOL', - de: 'FAX SPOOL', - fr: 'FAX SPOOL', - sp: 'FAX SPOOL' - }, - user_label: { - en: 'Faxes for ', - it: 'Faxes for ', - de: 'Faxes for ', - fr: 'Faxes for ', - sp: 'Faxes for ' - }, - columns: { - number: { - en: '#', - it: '#', - de: '#', - fr: '#', - sp: '#' - }, - timestamp: { - en: 'timestamp', - it: 'timestamp', - de: 'timestamp', - fr: 'timestamp', - sp: 'timestamp' - }, - status: { - en: 'status', - it: 'status', - de: 'status', - fr: 'status', - sp: 'status' - }, - direction: { - en: 'direction', - it: 'direction', - de: 'direction', - fr: 'direction', - sp: 'direction' - }, - callee: { - en: 'callee', - it: 'callee', - de: 'callee', - fr: 'callee', - sp: 'callee' - }, - pages: { - en: 'pages', - it: 'pages', - de: 'pages', - fr: 'pages', - sp: 'pages' - } - } - }, faxsend: { title: { en: 'Send a fax.', @@ -1703,6 +1585,13 @@ Ext.define('Ngcp.csc.locales', { de: 'done', fr: 'done', sp: 'done' + }, + groups: { + en: 'Groups', + it: 'Groups', + de: 'Groups', + fr: 'Groups', + sp: 'Groups' } } } diff --git a/app/store/NavigationTree.js b/app/store/NavigationTree.js index 78d9db6e..7aeededd 100644 --- a/app/store/NavigationTree.js +++ b/app/store/NavigationTree.js @@ -17,10 +17,10 @@ Ext.define('NgcpCsc.store.NavigationTree', { acl: ['administrator', 'restricted', 'host'], //TODO define real roles, which should be delivered along with user info after successfull login leaf: true }, { - text: 'Calls', + text: 'Unified inbox', iconCls: 'x-fa fa-phone', viewType: 'calls', - routeId: 'callist', + routeId: 'inbox', acl: ['administrator', 'restricted'], leaf: true }, { diff --git a/classic/src/view/common/gridfilters/GridFilters.js b/classic/src/view/common/gridfilters/GridFilters.js index 8b5fdabd..cb912631 100644 --- a/classic/src/view/common/gridfilters/GridFilters.js +++ b/classic/src/view/common/gridfilters/GridFilters.js @@ -113,7 +113,7 @@ Ext.define('NgcpCsc.view.common.gridfilters.GridFilters', { labelAlign: 'top', bind: '{filtergrid.groups}', hidden: !this._pbxconfigSeats, - fieldLabel: Ngcp.csc.locales.filters.groups[localStorage.getItem('languageSelected')] + renderer: 'renderGroupsFilterText' }, { xtype: 'textfield', labelAlign: 'top', diff --git a/classic/src/view/common/gridfilters/GridFiltersController.js b/classic/src/view/common/gridfilters/GridFiltersController.js index af0a07e0..ecc145b9 100644 --- a/classic/src/view/common/gridfilters/GridFiltersController.js +++ b/classic/src/view/common/gridfilters/GridFiltersController.js @@ -163,5 +163,10 @@ Ext.define('NgcpCsc.view.common.gridfilters.GridFiltersController', { vm.set('filtergrid.disabled', true); vm.set('filtergrid.device', ''); vm.set('filtergrid.mac', ''); + }, + + renderGroupsFilterText: function(value, metaData) { + return Ngcp.csc.locales.common.groups[localStorage.getItem('languageSelected')].toLowerCase(); } + }); diff --git a/classic/src/view/pages/calls/Calls.js b/classic/src/view/pages/calls/Calls.js index 9410f68c..fedbd76e 100644 --- a/classic/src/view/pages/calls/Calls.js +++ b/classic/src/view/pages/calls/Calls.js @@ -17,7 +17,7 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', { _linkedStoreId: 'Calls', _callFilters: true }), { - title: Ngcp.csc.locales.voicemails.settings.title[localStorage.getItem('languageSelected')], + title: Ngcp.csc.locales.settings.title[localStorage.getItem('languageSelected')], xtype: 'core-container', padding: 0, collapsible: true, @@ -32,11 +32,11 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', { xtype: 'textfield', labelAlign: 'top', bind: '{settings.email}', - fieldLabel: Ngcp.csc.locales.voicemails.settings.description[localStorage.getItem('languageSelected')] + fieldLabel: Ngcp.csc.locales.settings.description[localStorage.getItem('languageSelected')] }, { xtype: 'checkbox', bind: '{settings.attach_rec}', - boxLabel: Ngcp.csc.locales.voicemails.settings.attach_recording[localStorage.getItem('languageSelected')] + boxLabel: Ngcp.csc.locales.settings.attach_recording[localStorage.getItem('languageSelected')] }, { xtype: 'numberfield', labelAlign: 'left', @@ -44,9 +44,9 @@ Ext.define('NgcpCsc.view.pages.calls.Calls', { hideTrigger: true, maxValue: 9999, bind: '{settings.pin}', - fieldLabel: Ngcp.csc.locales.voicemails.settings.pin[localStorage.getItem('languageSelected')] + fieldLabel: Ngcp.csc.locales.settings.pin[localStorage.getItem('languageSelected')] }, { - html: Ngcp.csc.locales.voicemails.settings.pin_instructions[localStorage.getItem('languageSelected')] + html: Ngcp.csc.locales.settings.pin_instructions[localStorage.getItem('languageSelected')] }, { margin: '10 0 0 0', items: [{ diff --git a/classic/src/view/pages/calls/CallsGrid.js b/classic/src/view/pages/calls/CallsGrid.js index 50021a96..172ed64b 100644 --- a/classic/src/view/pages/calls/CallsGrid.js +++ b/classic/src/view/pages/calls/CallsGrid.js @@ -77,7 +77,7 @@ Ext.define('NgcpCsc.view.pages.calls.CallsGrid', { '', // fax tpl '
', '
' + Ngcp.csc.locales.common.duration[localStorage.getItem('languageSelected')] + ': {duration}
', - '
' + Ngcp.csc.locales.faxspool.columns.pages[localStorage.getItem('languageSelected')] + ': {pages}
', + '
' + Ngcp.csc.locales.calls.pages[localStorage.getItem('languageSelected')] + ': {pages}
', '
' + Ngcp.csc.locales.common.date[localStorage.getItem('languageSelected')] + ': {[ Ext.util.Format.date(values.start_time, "d.m.Y h:i:s")]}
', '
', '
', diff --git a/classic/src/view/pages/pbfconfig/seats/Seats.js b/classic/src/view/pages/pbfconfig/seats/Seats.js index d548939d..efab3b5e 100644 --- a/classic/src/view/pages/pbfconfig/seats/Seats.js +++ b/classic/src/view/pages/pbfconfig/seats/Seats.js @@ -43,7 +43,7 @@ Ext.define('NgcpCsc.view.pages.pbxconfig.seats.Seats', { xtype: 'textfield', labelAlign: 'top', bind: '{selection.groups}', - fieldLabel: Ngcp.csc.locales.filters.groups[localStorage.getItem('languageSelected')] + renderer: 'renderSeatsText' }, { xtype: 'textfield', labelAlign: 'top', diff --git a/classic/src/view/pages/pbfconfig/seats/SeatsController.js b/classic/src/view/pages/pbfconfig/seats/SeatsController.js index 348be4c8..626bc6b2 100644 --- a/classic/src/view/pages/pbfconfig/seats/SeatsController.js +++ b/classic/src/view/pages/pbfconfig/seats/SeatsController.js @@ -82,7 +82,10 @@ Ext.define('NgcpCsc.view.pages.pbxconfig.seats.SeatsController', { this.fireEvent('showmessage', true, Ngcp.csc.locales.common.save_success[localStorage.getItem('languageSelected')]); this.toggleNewSeatBtn(true); form.hide(); - } + }, + renderSeatsText: function(value, metaData) { + return Ngcp.csc.locales.common.groups[localStorage.getItem('languageSelected')].toLowerCase(); + } }); diff --git a/classic/src/view/pages/pbfconfig/seats/SeatsGrid.js b/classic/src/view/pages/pbfconfig/seats/SeatsGrid.js index d888ecc9..d2b89706 100644 --- a/classic/src/view/pages/pbfconfig/seats/SeatsGrid.js +++ b/classic/src/view/pages/pbfconfig/seats/SeatsGrid.js @@ -43,7 +43,7 @@ Ext.define('NgcpCsc.view.pages.seats.SeatsGrid', { rowBodyTpl: new Ext.XTemplate( '
', '
' + Ngcp.csc.locales.filters.extensions[localStorage.getItem('languageSelected')] + ': {extension}
', - '
' + Ngcp.csc.locales.filters.groups[localStorage.getItem('languageSelected')] + ': {groups}
', + '
' + Ngcp.csc.locales.common.groups[localStorage.getItem('languageSelected')].toLowerCase() + ': {groups}
', '
' + Ngcp.csc.locales.filters.numbers[localStorage.getItem('languageSelected')] + ': {numbers}
', '
' + Ngcp.csc.locales.filters.phone_devices[localStorage.getItem('languageSelected')] + ': {phone_devices}
', '
', diff --git a/classic/src/view/pages/summary/Summary.js b/classic/src/view/pages/summary/Summary.js index 3f9585d4..207aa255 100644 --- a/classic/src/view/pages/summary/Summary.js +++ b/classic/src/view/pages/summary/Summary.js @@ -22,9 +22,9 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', { }] }, items: [{ - title: 'Seats', + title: Ngcp.csc.locales.summary.seats[localStorage.getItem('languageSelected')], xtype: 'summary-pie', - name:'seats', + name: 'seats', store: { type: 'Chart', proxy: { @@ -37,9 +37,9 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', { } } }, { - title: 'Groups', + title: Ngcp.csc.locales.common.groups[localStorage.getItem('languageSelected')], xtype: 'summary-pie', - name:'groups', + name: 'groups', store: { type: 'Chart', proxy: { @@ -52,9 +52,9 @@ Ext.define('NgcpCsc.view.pages.summary.Summary', { } } }, { - title: 'Devices', + title: Ngcp.csc.locales.summary.devices[localStorage.getItem('languageSelected')], xtype: 'summary-pie', - name:'devices', + name: 'devices', store: { type: 'Chart', proxy: { diff --git a/classic/src/view/pages/summary/SummaryController.js b/classic/src/view/pages/summary/SummaryController.js index 098dc11b..a4020cf4 100644 --- a/classic/src/view/pages/summary/SummaryController.js +++ b/classic/src/view/pages/summary/SummaryController.js @@ -19,4 +19,5 @@ Ext.define('NgcpCsc.view.pages.summary.SummaryController', { var assignedSlots = store.findRecord("name", 'Assigned'); tooltip.setHtml(record.get('name') + ': ' + record.get('data') + ' of ' + (freeSlots.get('data') + assignedSlots.get('data'))); } + });