Browse Source

Merge remote-tracking branch 'origin/master'

4.3
Jean-Roch Maitre 11 years ago
parent
commit
7986a09cf2
7 changed files with 118 additions and 81 deletions
  1. +4
    -1
      i18n/en-US.json
  2. +2
    -1
      i18n/fr-FR.json
  3. +18
    -20
      submodules/devices/devices.js
  4. +40
    -5
      submodules/strategy/strategy.js
  5. +8
    -2
      submodules/users/users.js
  6. +36
    -36
      views/devices-sip_device.html
  7. +10
    -16
      views/users-feature-faxing.html

+ 4
- 1
i18n/en-US.json View File

@ -706,7 +706,10 @@
"user": "Users", "user": "Users",
"device": "Devices", "device": "Devices",
"ring_group": "Groups", "ring_group": "Groups",
"voicemail": "Voicemail Boxes"
"voicemail": "Voicemail Boxes",
"__comment": "UI-1353: Add directory support for the virtual receptionist",
"__version": "v3.20_s4",
"directory": "Directory"
}, },
"confirmMessages": { "confirmMessages": {
"deleteHoliday": "This holiday will be permanently deleted. Continue?", "deleteHoliday": "This holiday will be permanently deleted. Continue?",


+ 2
- 1
i18n/fr-FR.json View File

@ -665,7 +665,8 @@
"user": "Utilisateurs", "user": "Utilisateurs",
"device": "Téléphones", "device": "Téléphones",
"ring_group": "Groupes", "ring_group": "Groupes",
"voicemail": "Répondeurs"
"voicemail": "Répondeurs",
"directory": "Annuaire"
}, },
"confirmMessages": { "confirmMessages": {
"deleteHoliday": "Ces vacances seront supprimées. Continuer?", "deleteHoliday": "Ces vacances seront supprimées. Continuer?",


+ 18
- 20
submodules/devices/devices.js View File

@ -157,20 +157,16 @@ define(function(require){
}; };
self.devicesGetEditData(data, function(dataDevice) { self.devicesGetEditData(data, function(dataDevice) {
var args = {
device: dataDevice
};
if (args.device.hasOwnProperty('provision')) {
self.devicesGetIterator(args.device.provision, function(template) {
if (dataDevice.hasOwnProperty('provision')) {
self.devicesGetIterator(dataDevice.provision, function(template) {
if (template.hasOwnProperty('feature_keys')) { if (template.hasOwnProperty('feature_keys')) {
if (!args.device.provision.hasOwnProperty('feature_keys')) {
args.device.provision.feature_keys = {};
if (!dataDevice.provision.hasOwnProperty('feature_keys')) {
dataDevice.provision.feature_keys = {};
} }
for (var i = 0, len = template.feature_keys.iterate - 1; i < len; i++) { for (var i = 0, len = template.feature_keys.iterate - 1; i < len; i++) {
if (!args.device.provision.feature_keys.hasOwnProperty(i)) {
args.device.provision.feature_keys[i] = { type: 'none' };
if (!dataDevice.provision.feature_keys.hasOwnProperty(i)) {
dataDevice.provision.feature_keys[i] = { type: 'none' };
} }
} }
@ -181,7 +177,8 @@ define(function(require){
}, },
success: function(data, status) { success: function(data, status) {
var keyTypes = [ 'none', 'presence', 'parking', 'personal_parking', 'speed_dial' ], var keyTypes = [ 'none', 'presence', 'parking', 'personal_parking', 'speed_dial' ],
parkingSpots = [];
parkingSpots = [],
extra;
data.data.sort(function(a, b) { data.data.sort(function(a, b) {
return a.last_name.toLowerCase() > b.last_name.toLowerCase() ? 1 : -1; return a.last_name.toLowerCase() > b.last_name.toLowerCase() ? 1 : -1;
@ -199,27 +196,29 @@ define(function(require){
} }
}); });
$.extend(true, args, {
extra = {
users: data.data, users: data.data,
featureKeys:{ featureKeys:{
parkingSpots: parkingSpots, parkingSpots: parkingSpots,
types: keyTypes types: keyTypes
} }
});
};
dataDevice.extra = dataDevice.hasOwnProperty(extra) ? $.extend(true, {}, dataDevice.extra, extra) : extra;
self.devicesRenderDevice(args, callbackSave, callbackDelete);
self.devicesRenderDevice(dataDevice, callbackSave, callbackDelete);
} }
}); });
} }
else { else {
self.devicesRenderDevice(args, callbackSave, callbackDelete);
self.devicesRenderDevice(dataDevice, callbackSave, callbackDelete);
} }
}, function() { }, function() {
self.devicesRenderDevice(args, callbackSave, callbackDelete);
self.devicesRenderDevice(dataDevice, callbackSave, callbackDelete);
}); });
} }
else { else {
self.devicesRenderDevice(args, callbackSave, callbackDelete);
self.devicesRenderDevice(dataDevice, callbackSave, callbackDelete);
} }
}); });
}, },
@ -262,13 +261,12 @@ define(function(require){
} }
}, },
devicesRenderDevice: function(args, callbackSave, callbackDelete) {
devicesRenderDevice: function(data, callbackSave, callbackDelete) {
var self = this, var self = this,
data = args.device,
mode = data.id ? 'edit' : 'add', mode = data.id ? 'edit' : 'add',
type = data.device_type, type = data.device_type,
popupTitle = mode === 'edit' ? monster.template(self, '!' + self.i18n.active().devices[type].editTitle, { name: data.name }) : self.i18n.active().devices[type].addTitle; popupTitle = mode === 'edit' ? monster.template(self, '!' + self.i18n.active().devices[type].editTitle, { name: data.name }) : self.i18n.active().devices[type].addTitle;
templateDevice = $(monster.template(self, 'devices-'+type, args)),
templateDevice = $(monster.template(self, 'devices-'+type, data)),
deviceForm = templateDevice.find('#form_device'); deviceForm = templateDevice.find('#form_device');
if (data.hasOwnProperty('provision') && data.provision.hasOwnProperty('feature_keys')) { if (data.hasOwnProperty('provision') && data.provision.hasOwnProperty('feature_keys')) {


+ 40
- 5
submodules/strategy/strategy.js View File

@ -68,6 +68,11 @@ define(function(require){
monster.pub('common.numbers.getListFeatures', function(features) { monster.pub('common.numbers.getListFeatures', function(features) {
callback(null, features); callback(null, features);
}); });
},
directories: function (callback) {
self.strategyListDirectories(function (directories) {
callback(null, directories);
});
} }
}, },
function(err, results) { function(err, results) {
@ -1256,7 +1261,7 @@ define(function(require){
popup = monster.ui.dialog(template, { title: self.i18n.active().strategy.popup.title+" - "+label}); popup = monster.ui.dialog(template, { title: self.i18n.active().strategy.popup.title+" - "+label});
var menuLineContainer = template.find('.menu-block .left .content'), var menuLineContainer = template.find('.menu-block .left .content'),
popupCallEntities = $.extend(true, {}, strategyData.callEntities, { voicemail: strategyData.voicemails });
popupCallEntities = $.extend(true, {}, strategyData.callEntities, { voicemail: strategyData.voicemails }, { directory: strategyData.directories });
_.each(strategyData.callflows[name].flow.children, function(val, key) { _.each(strategyData.callflows[name].flow.children, function(val, key) {
menuLineContainer.append(monster.template(self, 'strategy-menuLine', { menuLineContainer.append(monster.template(self, 'strategy-menuLine', {
@ -1417,7 +1422,7 @@ define(function(require){
container.find('.add-menu-line a').on('click', function(e) { container.find('.add-menu-line a').on('click', function(e) {
e.preventDefault(); e.preventDefault();
var popupCallEntities = $.extend(true, {}, strategyData.callEntities, { voicemail: strategyData.voicemails }),
var popupCallEntities = $.extend(true, {}, strategyData.callEntities, { voicemail: strategyData.voicemails }, { directory: strategyData.directories }),
menuLine = $(monster.template(self, 'strategy-menuLine', { callEntities: self.strategyGetCallEntitiesDropdownData(popupCallEntities) })), menuLine = $(monster.template(self, 'strategy-menuLine', { callEntities: self.strategyGetCallEntitiesDropdownData(popupCallEntities) })),
icon = menuLine.find('.target-select option:selected').parents('optgroup').data('icon'); icon = menuLine.find('.target-select option:selected').parents('optgroup').data('icon');
@ -1605,6 +1610,7 @@ define(function(require){
} }
switch(entityType) { switch(entityType) {
case 'directory':
case 'user': case 'user':
case 'device': case 'device':
case 'voicemail': case 'voicemail':
@ -1657,6 +1663,9 @@ define(function(require){
}; };
switch(group.groupType) { switch(group.groupType) {
case 'directory':
group.groupIcon = 'icon-book';
break;
case 'user': case 'user':
group.groupIcon = 'icon-user'; group.groupIcon = 'icon-user';
break; break;
@ -1672,9 +1681,18 @@ define(function(require){
} }
group.entities.sort(function(a,b) { return (a.name.toLowerCase() > b.name.toLowerCase()); }); group.entities.sort(function(a,b) { return (a.name.toLowerCase() > b.name.toLowerCase()); });
if(group.groupType === "user") {
results.splice(0, 0, group);
} else {
if(group.groupType === 'directory') {
results.unshift(group);
}
else if (group.groupType === 'user') {
if (results[0].groupType === 'directory') {
results.splice(1, 0, group);
}
else {
results.unshift(group);
}
}
else {
results.push(group); results.push(group);
} }
}); });
@ -2402,6 +2420,23 @@ define(function(require){
}); });
}, },
strategyListDirectories: function(callbackSuccess, callbackError) {
var self = this;
self.callApi({
resource: 'directory.list',
data: {
accountId: self.accountId
},
success: function(data, status) {
callbackSuccess && callbackSuccess(data.data);
},
error: function(data, status) {
callbackError && callbackError();
}
});
},
_strategyOnCurrentAccountUpdated: function(accountData) { _strategyOnCurrentAccountUpdated: function(accountData) {
var self = this; var self = this;
$('#strategy_custom_hours_timezone').text(timezone.formatTimezone(accountData.timezone)); $('#strategy_custom_hours_timezone').text(timezone.formatTimezone(accountData.timezone));


+ 8
- 2
submodules/users/users.js View File

@ -1585,6 +1585,12 @@ define(function(require){
monster.ui.alert('error', self.i18n.active().users.errorNumberFaxing); monster.ui.alert('error', self.i18n.active().users.errorNumberFaxing);
} }
monster.pub('common.numberSelector.render', {
container: featureTemplate.find('.number-select'),
inputName: 'caller_id',
number: data.hasOwnProperty('faxbox') ? data.faxbox.caller_id : undefined
});
featureTemplate.find('.cancel-link').on('click', function() { featureTemplate.find('.cancel-link').on('click', function() {
popup.dialog('close').remove(); popup.dialog('close').remove();
}); });
@ -1594,7 +1600,7 @@ define(function(require){
}); });
featureTemplate.find('.save').on('click', function() { featureTemplate.find('.save').on('click', function() {
var newNumber = featureTemplate.find('#caller_id').val(),
var newNumber = featureTemplate.find('input[name="caller_id"]').val(),
args = { args = {
openedTab: 'features', openedTab: 'features',
callback: function() { callback: function() {
@ -1602,7 +1608,7 @@ define(function(require){
} }
}; };
if ( switchFeature.prop('checked') ) {
if ( switchFeature.prop('checked') && newNumber ) {
self.usersUpdateFaxing(data, newNumber, function(results) { self.usersUpdateFaxing(data, newNumber, function(results) {
args.userId = results.callflow.owner_id; args.userId = results.callflow.owner_id;


+ 36
- 36
views/devices-sip_device.html View File

@ -1,16 +1,16 @@
<div class="edit-device" data-id="{{device.id}}">
<div class="edit-device" data-id="{{id}}">
<div class="title-bar clearfix"> <div class="title-bar clearfix">
<div class="device-title pull-left"> <div class="device-title pull-left">
{{#if device.provision}}
<div class="device-image model-image {{toLowerCase device.provision.endpoint_brand}}-{{toLowerCase device.provision.endpoint_family}}-{{toLowerCase device.provision.endpoint_model}}"></div>
<div class="device-model">{{device.provision.endpoint_brand}} - {{device.provision.endpoint_model}}</div>
{{#if provision}}
<div class="device-image model-image {{toLowerCase provision.endpoint_brand}}-{{toLowerCase provision.endpoint_family}}-{{toLowerCase provision.endpoint_model}}"></div>
<div class="device-model">{{provision.endpoint_brand}} - {{provision.endpoint_model}}</div>
{{else}} {{else}}
<div class="device-icon"> <div class="device-icon">
<i class="icon-telicon-voip-phone"></i> <i class="icon-telicon-voip-phone"></i>
</div> </div>
{{#if device.id}}
<div class="device-model">{{device.name}}</div>
{{#if id}}
<div class="device-model">{{name}}</div>
{{else}} {{else}}
<div class="device-model">{{i18n.devices.sip_device.new}}</div> <div class="device-model">{{i18n.devices.sip_device.new}}</div>
{{/if}} {{/if}}
@ -26,7 +26,7 @@
<b class="caret"></b> <b class="caret"></b>
</a> </a>
<ul class="dropdown-menu pull-right"> <ul class="dropdown-menu pull-right">
{{#if device.provision}}
{{#if provision}}
<li><a class="tabs-selector change-section" data-section="sip" href="javascript:void(0)"><i class="icon-user"></i>{{ i18n.devices.popupSettings.sip.menuTitle }}</a></li> <li><a class="tabs-selector change-section" data-section="sip" href="javascript:void(0)"><i class="icon-user"></i>{{ i18n.devices.popupSettings.sip.menuTitle }}</a></li>
{{/if}} {{/if}}
<li><a class="tabs-selector change-section" data-section="audio" href="javascript:void(0)"><i class="icon-music"></i>{{ i18n.devices.popupSettings.audio.menuTitle }}</a></li> <li><a class="tabs-selector change-section" data-section="audio" href="javascript:void(0)"><i class="icon-music"></i>{{ i18n.devices.popupSettings.audio.menuTitle }}</a></li>
@ -34,7 +34,7 @@
<li><a class="tabs-selector change-section" data-section="restrictions" href="javascript:void(0)"><i class="icon-ban-circle"></i>{{ i18n.devices.popupSettings.restrictions.menuTitle }}</a></li> <li><a class="tabs-selector change-section" data-section="restrictions" href="javascript:void(0)"><i class="icon-ban-circle"></i>{{ i18n.devices.popupSettings.restrictions.menuTitle }}</a></li>
<li><a class="tabs-selector change-section" data-section="callerId" href="javascript:void(0)"><i class="icon-ambulance"></i>{{ i18n.devices.popupSettings.callerId.menuTitle }}</a></li> <li><a class="tabs-selector change-section" data-section="callerId" href="javascript:void(0)"><i class="icon-ambulance"></i>{{ i18n.devices.popupSettings.callerId.menuTitle }}</a></li>
<li><a class="tabs-selector change-section" data-section="miscellaneous" href="javascript:void(0)"><i class="icon-cogs"></i>{{ i18n.devices.popupSettings.miscellaneous.menuTitle }}</a></li> <li><a class="tabs-selector change-section" data-section="miscellaneous" href="javascript:void(0)"><i class="icon-cogs"></i>{{ i18n.devices.popupSettings.miscellaneous.menuTitle }}</a></li>
{{#if device.provision.feature_keys}}
{{#if provision.feature_keys}}
<li><a class="tabs-selector change-section" data-section="featureKeys" href="javascript:void(0);"><i class="icon-lightbulb"></i>{{ i18n.devices.popupSettings.featureKeys.menuTitle }}</a></li> <li><a class="tabs-selector change-section" data-section="featureKeys" href="javascript:void(0);"><i class="icon-lightbulb"></i>{{ i18n.devices.popupSettings.featureKeys.menuTitle }}</a></li>
{{/if}} {{/if}}
</ul> </ul>
@ -48,41 +48,41 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="name">{{ i18n.devices.sip_device.deviceName }}</label> <label class="control-label" for="name">{{ i18n.devices.sip_device.deviceName }}</label>
<div class="controls"> <div class="controls">
<input type="text" id="name" name="name" value="{{device.name}}">
<input type="text" id="name" name="name" value="{{name}}">
</div> </div>
</div> </div>
{{#if device.provision}}
{{#if provision}}
<div class="control-group"> <div class="control-group">
<label class="control-label" for="mac_address">{{ i18n.devices.sip_device.macAddress }}</label> <label class="control-label" for="mac_address">{{ i18n.devices.sip_device.macAddress }}</label>
<div class="controls"> <div class="controls">
<input id="mac_address" type="text" name="mac_address" placeholder="{{ i18n.devices.sip_device.macAddressPlaceholder }}" value="{{device.mac_address}}">
<input id="mac_address" type="text" name="mac_address" placeholder="{{ i18n.devices.sip_device.macAddressPlaceholder }}" value="{{mac_address}}">
</div> </div>
</div> </div>
{{else}} {{else}}
<div class="control-group"> <div class="control-group">
<label class="control-label" for="sip_username">{{ i18n.devices.sip.username }}</label> <label class="control-label" for="sip_username">{{ i18n.devices.sip.username }}</label>
<div class="controls"> <div class="controls">
<input type="text" id="sip_username" name="sip.username" value="{{device.sip.username}}">
<input type="text" id="sip_username" name="sip.username" value="{{sip.username}}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="sip_password">{{ i18n.devices.sip.password }}</label> <label class="control-label" for="sip_password">{{ i18n.devices.sip.password }}</label>
<div class="controls"> <div class="controls">
<input type="password" id="sip_password" name="sip.password" value="{{device.sip.password}}">
<input type="password" id="sip_password" name="sip.password" value="{{sip.password}}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">{{ i18n.devices.sip.realm }}</label> <label class="control-label">{{ i18n.devices.sip.realm }}</label>
<div class="controls"> <div class="controls">
<span class="displayed-realm">{{ device.sip.realm }}</span>
<span class="displayed-realm">{{ sip.realm }}</span>
</div> </div>
</div> </div>
{{/if}} {{/if}}
</div> </div>
{{#if device.provision}}
{{#if provision}}
<div class="tabs-section clearfix" data-section="sip"> <div class="tabs-section clearfix" data-section="sip">
<div class="title"> <div class="title">
{{ i18n.devices.popupSettings.sip.sectionTitle }} {{ i18n.devices.popupSettings.sip.sectionTitle }}
@ -90,21 +90,21 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="sip_username">{{ i18n.devices.sip.username }}</label> <label class="control-label" for="sip_username">{{ i18n.devices.sip.username }}</label>
<div class="controls"> <div class="controls">
<input type="text" id="sip_username" name="sip.username" value="{{device.sip.username}}">
<input type="text" id="sip_username" name="sip.username" value="{{sip.username}}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="sip_password">{{ i18n.devices.sip.password }}</label> <label class="control-label" for="sip_password">{{ i18n.devices.sip.password }}</label>
<div class="controls"> <div class="controls">
<input type="password" id="sip_password" name="sip.password" value="{{device.sip.password}}">
<input type="password" id="sip_password" name="sip.password" value="{{sip.password}}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">{{ i18n.devices.sip.realm }}</label> <label class="control-label">{{ i18n.devices.sip.realm }}</label>
<div class="controls"> <div class="controls">
<span class="displayed-realm">{{ device.sip.realm }}</span>
<span class="displayed-realm">{{ sip.realm }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -144,7 +144,7 @@
{{ i18n.devices.popupSettings.restrictions.sectionTitle }} {{ i18n.devices.popupSettings.restrictions.sectionTitle }}
</div> </div>
<div class="restriction-list"> <div class="restriction-list">
{{#each device.extra.restrictions}}
{{#each extra.restrictions}}
<div class="control-group restriction-line{{#if this.disabled}} disabled{{/if}}" data-restriction="{{@key}}"> <div class="control-group restriction-line{{#if this.disabled}} disabled{{/if}}" data-restriction="{{@key}}">
<label class="control-label">{{this.friendly_name}} <label class="control-label">{{this.friendly_name}}
{{#if this.help}} {{#if this.help}}
@ -164,7 +164,7 @@
</div> </div>
<div class="restriction-message help-box"> <div class="restriction-message help-box">
</div> </div>
{{#if device.extra.hasDisabledRestrictions}}
{{#if extra.hasDisabledRestrictions}}
<div class="disabled-restrictions-info help-box gray-box"> <div class="disabled-restrictions-info help-box gray-box">
<div class="wrapper-icon"> <div class="wrapper-icon">
&nbsp;<i class="icon-info-sign2"></i>&nbsp; &nbsp;<i class="icon-info-sign2"></i>&nbsp;
@ -182,14 +182,14 @@
{{ i18n.devices.popupSettings.callerId.sectionTitle }} {{ i18n.devices.popupSettings.callerId.sectionTitle }}
</div> </div>
{{#if device.extra.hasE911Numbers}}
{{#if extra.hasE911Numbers}}
<div class="control-group"> <div class="control-group">
<label class="control-label">{{ i18n.devices.popupSettings.callerId.emergency }}</label> <label class="control-label">{{ i18n.devices.popupSettings.callerId.emergency }}</label>
<div class="controls"> <div class="controls">
<select name="caller_id.emergency.number" class="caller-id-select"> <select name="caller_id.emergency.number" class="caller-id-select">
<option value="">{{i18n.devices.popupSettings.callerId.notSet}}</option> <option value="">{{i18n.devices.popupSettings.callerId.notSet}}</option>
{{#each device.extra.e911Numbers}}
<option {{#compare ../device.caller_id.emergency.number "===" this}} selected{{/compare}} value="{{this}}">{{this}}</option>
{{#each extra.e911Numbers}}
<option {{#compare ../this.caller_id.emergency.number "===" this}} selected{{/compare}} value="{{this}}">{{this}}</option>
{{/each}} {{/each}}
</select> </select>
</div> </div>
@ -220,7 +220,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label checkbox"> <label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.label }} {{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.label }}
<input type="checkbox" name="ignore_completed_elsewhere" id="ignore_completed_elsewhere" {{#if device.ignore_completed_elsewhere }}checked{{/if}} />
<input type="checkbox" name="ignore_completed_elsewhere" id="ignore_completed_elsewhere" {{#if ignore_completed_elsewhere }}checked{{/if}} />
{{/monsterCheckbox}} {{/monsterCheckbox}}
<i class="help-popover icon-question-sign icon-large" data-original-title="{{i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.help}}" data-placement="top" data-toggle="tooltip"></i> <i class="help-popover icon-question-sign icon-large" data-original-title="{{i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.help}}" data-placement="top" data-toggle="tooltip"></i>
</label> </label>
@ -230,7 +230,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label checkbox"> <label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.rtp.enable }} {{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.rtp.enable }}
<input type="checkbox" id="secure_rtp" name="media.encryption.enforce_security"{{#if device.media.encryption.enforce_security}} checked="checked"{{/if}}></input>
<input type="checkbox" id="secure_rtp" name="media.encryption.enforce_security"{{#if media.encryption.enforce_security}} checked="checked"{{/if}}></input>
{{/monsterCheckbox}} {{/monsterCheckbox}}
</label> </label>
</div> </div>
@ -239,14 +239,14 @@
<span>{{ i18n.devices.popupSettings.miscellaneous.rtp.type }}</span> <span>{{ i18n.devices.popupSettings.miscellaneous.rtp.type }}</span>
<select class="input-small" name="extra.rtpMethod"> <select class="input-small" name="extra.rtpMethod">
<option value="srtp"{{#compare device.extra.rtpMethod "===" "srtp"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.rtp.srtp }}</option>
<option value="zrtp"{{#compare device.extra.rtpMethod "===" "zrtp"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.rtp.zrtp }}</option>
<option value="srtp"{{#compare extra.rtpMethod "===" "srtp"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.rtp.srtp }}</option>
<option value="zrtp"{{#compare extra.rtpMethod "===" "zrtp"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.rtp.zrtp }}</option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
{{#if device.provision.feature_keys}}
{{#if provision.feature_keys}}
<div class="tabs-section clearfix" data-section="featureKeys"> <div class="tabs-section clearfix" data-section="featureKeys">
<div class="title"> <div class="title">
{{ i18n.devices.popupSettings.featureKeys.menuTitle }} {{ i18n.devices.popupSettings.featureKeys.menuTitle }}
@ -254,12 +254,12 @@
<div class="type-info helper"> <div class="type-info helper">
<a href="javascript:void(0);" data-toggle="collapse" data-target="#info_content"><i class="icon-question-sign"></i><span class="text">{{ i18n.devices.popupSettings.featureKeys.info.link.showInfo }}</span></a> <a href="javascript:void(0);" data-toggle="collapse" data-target="#info_content"><i class="icon-question-sign"></i><span class="text">{{ i18n.devices.popupSettings.featureKeys.info.link.showInfo }}</span></a>
<div id="info_content" class="collapse"> <div id="info_content" class="collapse">
{{#each featureKeys.types}}
{{#each extra.featureKeys.types}}
<p>{{#if info}}<strong>{{text}}</strong>: {{info}}{{/if}}</p> <p>{{#if info}}<strong>{{text}}</strong>: {{info}}{{/if}}</p>
{{/each}} {{/each}}
</div> </div>
</div> </div>
{{#each device.provision.feature_keys}}
{{#each provision.feature_keys}}
<div class="control-group" data-id="{{@key}}"> <div class="control-group" data-id="{{@key}}">
<label for="provision.feature_keys[{{@key}}].type" class="control-label"> <label for="provision.feature_keys[{{@key}}].type" class="control-label">
{{ ../i18n.devices.popupSettings.featureKeys.description }} <span class="feature-key-index">{{@key}}</span> {{ ../i18n.devices.popupSettings.featureKeys.description }} <span class="feature-key-index">{{@key}}</span>
@ -267,7 +267,7 @@
<div class="controls"> <div class="controls">
<select name="provision.feature_keys[{{@key}}].type" class="feature-key-type span2"> <select name="provision.feature_keys[{{@key}}].type" class="feature-key-type span2">
{{#select type}} {{#select type}}
{{#each ../../featureKeys.types}}
{{#each ../../extra.featureKeys.types}}
<option value="{{id}}">{{text}}</option> <option value="{{id}}">{{text}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
@ -275,7 +275,7 @@
<div class="feature-key-value" data-type="presence"> <div class="feature-key-value" data-type="presence">
<label for="provision.feature_keys[{{@key}}].value">{{ ../i18n.devices.popupSettings.featureKeys.labels.user }}</label> <label for="provision.feature_keys[{{@key}}].value">{{ ../i18n.devices.popupSettings.featureKeys.labels.user }}</label>
<select name="provision.feature_keys[{{@key}}].value"> <select name="provision.feature_keys[{{@key}}].value">
{{#each ../../users}}
{{#each ../../extra.users}}
<option value="{{id}}">{{first_name}} {{last_name}}</option> <option value="{{id}}">{{first_name}} {{last_name}}</option>
{{/each}} {{/each}}
</select> </select>
@ -283,7 +283,7 @@
<div class="feature-key-value" data-type="parking"> <div class="feature-key-value" data-type="parking">
<label for="provision.feature_keys[{{@key}}].value">{{ ../i18n.devices.popupSettings.featureKeys.labels.parkingSpot }}</label> <label for="provision.feature_keys[{{@key}}].value">{{ ../i18n.devices.popupSettings.featureKeys.labels.parkingSpot }}</label>
<select class="span1" name="provision.feature_keys[{{@key}}].value"> <select class="span1" name="provision.feature_keys[{{@key}}].value">
{{#each ../../featureKeys.parkingSpots}}
{{#each ../../extra.featureKeys.parkingSpots}}
<option value="{{this}}">{{this}}</option> <option value="{{this}}">{{this}}</option>
{{/each}} {{/each}}
</select> </select>
@ -291,7 +291,7 @@
<div class="feature-key-value" data-type="personal_parking"> <div class="feature-key-value" data-type="personal_parking">
<label for="provision.feature_keys[{{@key}}].value">{{ ../i18n.devices.popupSettings.featureKeys.labels.user }}</label> <label for="provision.feature_keys[{{@key}}].value">{{ ../i18n.devices.popupSettings.featureKeys.labels.user }}</label>
<select name="provision.feature_keys[{{@key}}].value"> <select name="provision.feature_keys[{{@key}}].value">
{{#each ../../users}}
{{#each ../../extra.users}}
<option value="{{id}}">{{first_name}} {{last_name}}</option> <option value="{{id}}">{{first_name}} {{last_name}}</option>
{{/each}} {{/each}}
</select> </select>
@ -309,14 +309,14 @@
</div> </div>
<div class="actions clearfix"> <div class="actions clearfix">
{{#if device.id}}
{{#if id}}
<a id="delete_device" class="monster-link"><i class="icon-trash icon-red"></i>{{ i18n.devices.deleteDevice }}</a> <a id="delete_device" class="monster-link"><i class="icon-trash icon-red"></i>{{ i18n.devices.deleteDevice }}</a>
{{/if}} {{/if}}
<div class="pull-right"> <div class="pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a> <a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a>
<button type="button" class="btn btn-success save"> <button type="button" class="btn btn-success save">
{{#if device.id}}
{{#if id}}
{{ i18n.saveChanges }} {{ i18n.saveChanges }}
{{else}} {{else}}
{{ i18n.devices.createDevice }} {{ i18n.devices.createDevice }}


+ 10
- 16
views/users-feature-faxing.html View File

@ -1,9 +1,9 @@
<div class="feature-popup-container" data-feature="faxing"> <div class="feature-popup-container" data-feature="faxing">
<div class="feature-popup-title"> <div class="feature-popup-title">
<div class="feature-icon-wrapper">
<i class="{{user.extra.mapFeatures.faxing.icon}}"></i>
</div>
{{ i18n.users.faxing.headline }}
<div class="feature-icon-wrapper">
<i class="{{user.extra.mapFeatures.faxing.icon}}"></i>
</div>
{{ i18n.users.faxing.headline }}
<div class="switch"> <div class="switch">
{{#monsterSwitch}} {{#monsterSwitch}}
<input class="switch-state" type="checkbox" id="checkbox_caller_id" data-on="{{i18n.enabled}}" data-off="{{i18n.disabled}}"{{#if user.extra.mapFeatures.faxing.active}} checked="checked"{{/if}}></input> <input class="switch-state" type="checkbox" id="checkbox_caller_id" data-on="{{i18n.enabled}}" data-off="{{i18n.disabled}}"{{#if user.extra.mapFeatures.faxing.active}} checked="checked"{{/if}}></input>
@ -20,13 +20,7 @@
<form class="form-horizontal" id="faxbox_form"> <form class="form-horizontal" id="faxbox_form">
<div class="control-group"> <div class="control-group">
<label for="caller_id" class="control-label">{{ i18n.users.faxing.form.label.callerId }}</label> <label for="caller_id" class="control-label">{{ i18n.users.faxing.form.label.callerId }}</label>
<div class="controls">
<select name="caller_id" id="caller_id">
{{#each extra.listNumbers}}
<option value="{{@key}}"{{#compare @key '===' ../faxbox.caller_id }} selected="true"{{/compare}}>{{formatPhoneNumber @key}}</option>
{{/each}}
</select>
</div>
<div class="controls number-select"></div>
</div> </div>
{{#compare faxbox.cloud_state '===' 'registered'}} {{#compare faxbox.cloud_state '===' 'registered'}}
<div class="control-group"> <div class="control-group">
@ -56,9 +50,9 @@
</div> </div>
<div class="actions clearfix"> <div class="actions clearfix">
<div class="pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a>
<button type="button" class="btn btn-success save">{{ i18n.saveChanges }}</button>
</div>
</div>
<div class="pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a>
<button type="button" class="btn btn-success save">{{ i18n.saveChanges }}</button>
</div>
</div>
</div> </div>

Loading…
Cancel
Save