diff --git a/i18n/en-US.json b/i18n/en-US.json index 79679284..6d880651 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -432,6 +432,12 @@ "new": "New Softphone", "deviceName": "Device Name" }, + "teammate": { + "addTitle": "Adding a TeamMate Device", + "editTitle": "Editing TeamMate Device: {{name}}", + "new": "New TeamMate Device", + "deviceName": "Device Name" + }, "ata": { "addTitle": "Adding an ATA", "editTitle": "Editing ATA: {{name}}", @@ -459,6 +465,7 @@ "smartphone": "Smartphone", "mobile": "Business Mobile", "softphone": "Soft Phone", + "teammate": "TeamMate", "landline": "Landline", "fax": "Fax", "ata": "ATA", diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index dba20235..6a2aaeed 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -7,6 +7,12 @@ define(function(require) { return _.every([dest, src], _.isArray) ? src : undefined; }; + var showTeammateDevice = _ + .chain(monster.config) + .get('allowedExtraDeviceTypes', []) + .includes('teammate') + .value(); + var app = { requests: { @@ -32,23 +38,24 @@ define(function(require) { appFlags: { devices: { iconClassesByDeviceTypes: { - application: 'icon-telicon-apps', - ata: 'icon-telicon-ata', - cellphone: 'fa fa-phone', - fax: 'icon-telicon-fax', - landline: 'icon-telicon-home', - mobile: 'icon-telicon-sprint-phone', - sip_device: 'icon-telicon-voip-phone', - sip_uri: 'icon-telicon-voip-phone', - smartphone: 'icon-telicon-mobile-phone', - softphone: 'icon-telicon-soft-phone' + application: 'apps', + ata: 'device-ata', + cellphone: 'phone', + fax: 'device-fax', + landline: 'home', + mobile: 'device-sprint-phone', + sip_device: 'device-voip-phone', + sip_uri: 'device-voip-phone', + smartphone: 'device-mobile', + softphone: 'device-soft-phone', + teammate: 'device-mst' }, /** * Lists device types allowed to be added by devicesRenderAdd. * The order is important and controls the list rendered in DOM. * @type {Array} */ - addableDeviceTypes: [ + addableDeviceTypes: _.flatten([[ 'sip_device', 'cellphone', 'smartphone', @@ -57,12 +64,14 @@ define(function(require) { 'fax', 'ata', 'sip_uri' - ], + ], showTeammateDevice ? [ + 'teammate' + ] : []]), /** * Lists device types allowed to be edited by devicesRenderEdit. * @type {Array} */ - editableDeviceTypes: [ + editableDeviceTypes: _.flatten([[ 'ata', 'cellphone', 'fax', @@ -73,6 +82,9 @@ define(function(require) { 'smartphone', 'softphone' ], + showTeammateDevice ? [ + 'teammate' + ] : []]), provisionerConfigFlags: monster.config.whitelabel.provisioner } }, @@ -1218,7 +1230,19 @@ define(function(require) { ])) }, smartphone: _.merge({}, sipSettings, callForwardSettings), - softphone: _.merge({}, sipSettings) + softphone: _.merge({}, sipSettings), + teammate: _.merge({ + media: { + encryption: { + enforce_security: true, + webrtc: false, + methods: ['srtp'] + }, + audio: { + codecs: ['PCMU', 'PCMA'] + } + } + }, sipSettings) }; return _.get(defaultsPerType, type, {}); diff --git a/submodules/devices/devices.scss b/submodules/devices/devices.scss index 1020054f..14ff2595 100644 --- a/submodules/devices/devices.scss +++ b/submodules/devices/devices.scss @@ -182,8 +182,9 @@ line-height: 55px; } -#devices_container .devices-grid .grid-row .grid-cell.type .first-line > i { - font-size: 24px; +#devices_container .devices-grid .grid-row .grid-cell.type .first-line > svg { + width: 24px; + height: 24px; } #devices_container .devices-grid .grid-row .grid-cell.type .second-line { @@ -192,13 +193,13 @@ line-height: 20px; } -#devices_container .devices-grid .grid-row .grid-cell.registered i { +#devices_container .devices-grid .grid-row .grid-cell.registered svg { color: #44CC44; } -#devices_container .devices-grid .grid-row .grid-cell.unregistered i { +#devices_container .devices-grid .grid-row .grid-cell.unregistered svg { color: #EE1212; } -#devices_container .devices-grid .grid-row .grid-cell.disabled i { +#devices_container .devices-grid .grid-row .grid-cell.disabled svg { color: #333333; } @@ -276,6 +277,12 @@ vertical-align: middle; } +.voip-edit-device-popup .edit-device .title-bar .device-title .device-icon > svg { + height: 48px; + width: 48px; + vertical-align: middle; +} + .voip-edit-device-popup .edit-device .title-bar .device-title .device-image { border-radius: 2px; border: 1px solid #CCC; diff --git a/submodules/devices/views/devices-teammate.html b/submodules/devices/views/devices-teammate.html new file mode 100644 index 00000000..21eb642d --- /dev/null +++ b/submodules/devices/views/devices-teammate.html @@ -0,0 +1,182 @@ +
+
+
+
+ {{telicon "device-mst"}} +
+ + {{#if id}} +
{{name}}
+ {{else}} +
{{i18n.devices.teammate.new}}
+ {{/if}} +
+ + +
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ {{ extra.sip.realm }} +
+
+
+ +
+
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ {{#monsterSwitch}} + + {{/monsterSwitch}} +
+ +
+
+ {{/each}} +
+
+
+ {{#if extra.hasDisabledRestrictions}} + {{#monsterText 'info' 'disabled-restrictions-info'}} +

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+ {{/monsterText}} + {{/if}} +
+
+ + {{#if showEmergencyCallerId}} +
+
+ {{ i18n.devices.popupSettings.callerId.sectionTitle }} +
+ + {{#if extra.hasE911Numbers}} +
+ +
+
+
+ +
+

+
+
+ {{else}} + {{#monsterText 'error'}} + {{ i18n.devices.popupSettings.callerId.noE911Numbers }} + {{/monsterText}} + {{/if}} +
+ {{/if}} + +
+
+ {{ i18n.devices.popupSettings.miscellaneous.sectionTitle }} +
+ +
+ +
+ +
+
+
+ +
+ {{#if id}} + {{ i18n.devices.deleteDevice }} + {{/if}} + +
+ {{ i18n.cancel }} + +
+
+
\ No newline at end of file diff --git a/submodules/devices/views/layout.html b/submodules/devices/views/layout.html index 83b2c472..84898685 100644 --- a/submodules/devices/views/layout.html +++ b/submodules/devices/views/layout.html @@ -14,7 +14,9 @@ {{#each deviceTypesToAdd}}
  • - + + {{telicon icon}} + {{tryI18n @root.i18n.devices.types type}}
  • diff --git a/submodules/devices/views/row.html b/submodules/devices/views/row.html index 4fe37634..8b44129a 100644 --- a/submodules/devices/views/row.html +++ b/submodules/devices/views/row.html @@ -2,7 +2,7 @@
    - + {{telicon friendlyIconClass}}
    {{friendlyType}} diff --git a/submodules/myOffice/myOffice.js b/submodules/myOffice/myOffice.js index 84ac824f..5310a5d1 100644 --- a/submodules/myOffice/myOffice.js +++ b/submodules/myOffice/myOffice.js @@ -433,7 +433,8 @@ define(function(require) { 'landline', 'fax', 'ata', - 'application' + 'application', + 'teammate' ], userCountByServicePlanRole = _ .chain(data.users) diff --git a/submodules/users/users.js b/submodules/users/users.js index 7336341d..8b9ec4be 100644 --- a/submodules/users/users.js +++ b/submodules/users/users.js @@ -4,6 +4,12 @@ define(function(require) { monster = require('monster'), timezone = require('monster-timezone'); + var showTeammateDevice = _ + .chain(monster.config) + .get('allowedExtraDeviceTypes', []) + .includes('teammate') + .value(); + var app = { requests: { @@ -28,16 +34,17 @@ define(function(require) { }, deviceIcons: { - 'cellphone': 'fa fa-phone', - 'smartphone': 'icon-telicon-mobile-phone', - 'landline': 'icon-telicon-home', - 'mobile': 'icon-telicon-sprint-phone', - 'softphone': 'icon-telicon-soft-phone', - 'sip_device': 'icon-telicon-voip-phone', - 'sip_uri': 'icon-telicon-voip-phone', - 'fax': 'icon-telicon-fax', - 'ata': 'icon-telicon-ata', - 'application': 'icon-telicon-apps' + 'cellphone': 'phone', + 'smartphone': 'device-mobile', + 'landline': 'home', + 'mobile': 'device-sprint-phone', + 'softphone': 'device-soft-phone', + 'sip_device': 'device-voip-phone', + 'sip_uri': 'device-voip-phone', + 'fax': 'device-fax', + 'ata': 'device-ata', + 'application': 'apps', + 'teammate': 'device-mst' }, /* Users */ @@ -3692,7 +3699,9 @@ define(function(require) { template = $(self.getTemplate({ name: 'devices', - data: formattedResults, + data: _.merge({ + showTeammateDevice: showTeammateDevice + }, formattedResults), submodule: 'users' })); diff --git a/submodules/users/views/devices.html b/submodules/users/views/devices.html index c6890f07..014df558 100644 --- a/submodules/users/views/devices.html +++ b/submodules/users/views/devices.html @@ -30,6 +30,9 @@
  • {{ i18n.devices.types.fax }}
  • {{ i18n.devices.types.ata }}
  • {{ i18n.devices.types.sip_uri }}
  • + {{#if showTeammateDevice}} +
  • {{telicon "device-mst"}}{{ i18n.devices.types.teammate }}
  • + {{/if}}
    diff --git a/submodules/users/views/row.html b/submodules/users/views/row.html index cd7f3bf2..f11c2746 100644 --- a/submodules/users/views/row.html +++ b/submodules/users/views/row.html @@ -32,7 +32,9 @@
    {{#each extra.devices}} {{#compare @index "<" 2}} - + + {{telicon this.icon}} + {{/compare}} {{else}} {{ i18n.users.noUserDevices }}