From 90596c64efef70bcfb3d8fe6b482d541d8c2d428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Gonz=C3=A1lez?= Date: Mon, 15 Jun 2020 07:53:11 -0600 Subject: [PATCH] [4.3] MSPB-108: Avaya customizations (#220) * Make device model uppercase in edit device form * Set default line keys per brand for edited device * Add german translation for new save option --- i18n/de-DE.json | 1 + i18n/en-US.json | 2 +- submodules/devices/devices.js | 10 ++++++++-- submodules/devices/devices.scss | 4 ++++ submodules/devices/views/devices-sip_device.html | 6 +++--- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/i18n/de-DE.json b/i18n/de-DE.json index dac01ff..aea792a 100644 --- a/i18n/de-DE.json +++ b/i18n/de-DE.json @@ -164,6 +164,7 @@ "basicTitle": "Allgemeine Einstellungen", "basicSectionTitle": "Allgemeine Einstellungen", "dragAndDrop": "Um einen Codec auszuwählen, ziehen Sie diesen aus dem Feld „Verfügbare Codecs“ in das Feld „Ausgewählte Codecs“.", + "saveAndApply": "Speichern und anwenden", "options": { "menuTitle": "Optionen" }, diff --git a/i18n/en-US.json b/i18n/en-US.json index d53004b..376a766 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -297,7 +297,7 @@ "keys": { "alert": { "message": "By default, this key will be used as a Line Key. It is strongly recommended that you not change it.", - "title": "Key 1 Default" + "title": "Key {{variable}} Default" }, "featureKeys": { "menuTitle": "Feature Keys", diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index 2cfc865..52dd56c 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -940,6 +940,11 @@ define(function(require) { ['brands', _.get(data.device, 'provision.endpoint_brand'), 'keyFunctions'], [] ), + defaultLineKeys = _.get( + self.appFlags.devices.provisionerConfigFlags, + ['brands', _.get(data.device, 'provision.endpoint_brand'), 'lineKeys'], + [1] + ), isClassifierDisabledByAccount = function isClassifierDisabledByAccount(classifier) { return _.get(data.accountLimits, ['call_restriction', classifier, 'action']) === 'deny'; }, @@ -1066,6 +1071,7 @@ define(function(require) { return _.merge({ id: type, type: camelCasedType, + lineKeys: defaultLineKeys, actions: _ .chain([ 'presence', @@ -1096,10 +1102,10 @@ define(function(require) { : a.label.localeCompare(b.label, monster.config.whitelabel.language); }) .value(), - data: _.map(entries, function(metadata) { + data: _.map(entries, function(metadata, idx) { var value = _.get(metadata, 'value', {}); - return _.merge({}, metadata, _.isPlainObject(value) + return _.merge({ keyNumber: idx + 1 }, metadata, _.isPlainObject(value) ? {} : { value: { diff --git a/submodules/devices/devices.scss b/submodules/devices/devices.scss index 1635346..0fc53bd 100644 --- a/submodules/devices/devices.scss +++ b/submodules/devices/devices.scss @@ -254,6 +254,10 @@ padding: 15px 0; } +.voip-edit-device-popup .edit-device .device-title .device-model { + text-transform: uppercase; +} + .voip-edit-device-popup .edit-device .title-bar .device-title > div { float: left; font-size: 18px; diff --git a/submodules/devices/views/devices-sip_device.html b/submodules/devices/views/devices-sip_device.html index 7b51393..1b72571 100644 --- a/submodules/devices/views/devices-sip_device.html +++ b/submodules/devices/views/devices-sip_device.html @@ -348,13 +348,13 @@
{{#each data}} -
+
{{#compare ../id '===' 'combo_keys'}} - {{#monsterPanelText @root.i18n.devices.popupSettings.keys.alert.title 'warning' 'fill-width'}} + {{#monsterPanelText (replaceVar @root.i18n.devices.popupSettings.keys.alert.title keyNumber) 'warning' 'fill-width'}} {{@root.i18n.devices.popupSettings.keys.alert.message}} {{/monsterPanelText}} {{/compare}}