Browse Source

UI-3111: Refactor caller id privacy feature with better description (#71)

* Refactor caller id privacy for the users submodule

* Refactor caller id privacy for the  devices submodule
4.3
Joris Tirado 8 years ago
committed by GitHub
parent
commit
950b8af38c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 103 additions and 46 deletions
  1. +9
    -0
      app.js
  2. +15
    -9
      i18n/en-US.json
  3. +6
    -0
      submodules/devices/devices.js
  4. +8
    -5
      submodules/users/users.css
  5. +7
    -1
      submodules/users/users.js
  6. +14
    -9
      views/devices-sip_device.html
  7. +14
    -9
      views/devices-softphone.html
  8. +30
    -13
      views/users-name.html

+ 9
- 0
app.js View File

@ -30,6 +30,15 @@ define(function(require) {
requests: {}, requests: {},
subscribe: {}, subscribe: {},
appFlags: { appFlags: {
common: {
outboundPrivacy: [
'default',
'none',
'number',
'name',
'full'
]
},
global: {} global: {}
}, },


+ 15
- 9
i18n/en-US.json View File

@ -18,6 +18,20 @@
"vmboxes": "Voicemail Boxes" "vmboxes": "Voicemail Boxes"
}, },
"commonMisc": {
"outboundPrivacy": {
"label": "Caller-ID privacy",
"tooltip": "Determines what appears as Caller-ID for offnet outbound calls.",
"values": {
"default": "- Default -",
"none": "Hide nothing",
"number": "Hide number only",
"name": "Hide name only",
"full": "Hide name and number"
}
}
},
"groups": { "groups": {
"addFromSpare": "Add from Spare Numbers", "addFromSpare": "Add from Spare Numbers",
"add": "Add Group", "add": "Add Group",
@ -507,15 +521,7 @@
"languageHelp": "This will change the language of the text displayed in the UI", "languageHelp": "This will change the language of the text displayed in the UI",
"timezoneHelp": "This will set the Timezone used for this User's devices and Voicemail Box", "timezoneHelp": "This will set the Timezone used for this User's devices and Voicemail Box",
"ringingHelp": "This will set the Ringing Timeout for this User and his Devices. For example, if you set it to 20, this user will be rung for 20 seconds before the system moves to his Voicemail Box", "ringingHelp": "This will set the Ringing Timeout for this User and his Devices. For example, if you set it to 20, this user will be rung for 20 seconds before the system moves to his Voicemail Box",
"mainExtensionHelp": "This will define the Caller-ID used for this User for calls inside the system, as well as setting his Presence ID to that number",
"outbound_privacy": {
"type": "Caller-ID privacy ",
"default": "Default",
"none": "None",
"number": "Number",
"name": "Name",
"full": "Full"
}
"mainExtensionHelp": "This will define the Caller-ID used for this User for calls inside the system, as well as setting his Presence ID to that number"
}, },
"delete": "Delete User", "delete": "Delete User",
"errorCallerId": "Before configuring the Caller-ID of this user, you need to assign them a number", "errorCallerId": "Before configuring the Caller-ID of this user, you need to assign them a number",


+ 6
- 0
submodules/devices/devices.js View File

@ -746,6 +746,12 @@ define(function(require) {
var self = this, var self = this,
defaults = { defaults = {
extra: { extra: {
outboundPrivacy: _.map(self.appFlags.common.outboundPrivacy, function(strategy) {
return {
key: strategy,
value: self.i18n.active().commonMisc.outboundPrivacy.values[strategy]
};
}),
hasE911Numbers: !_.isEmpty(data.e911Numbers), hasE911Numbers: !_.isEmpty(data.e911Numbers),
e911Numbers: data.e911Numbers, e911Numbers: data.e911Numbers,
restrictions: data.listClassifiers, restrictions: data.listClassifiers,


+ 8
- 5
submodules/users/users.css View File

@ -348,11 +348,6 @@
cursor: default !important; cursor: default !important;
} }
#users_container .detail-user .row-fields .presence-id-select {
margin-left: 10px;
width: 72px;
}
#users_container .detail-user .row-fields .timeout-edit { #users_container .detail-user .row-fields .timeout-edit {
margin-left: 50px; margin-left: 50px;
} }
@ -371,6 +366,14 @@
display: block; display: block;
} }
#users_container .detail-user .row-fields .inline-block {
display: inline-block;
}
#users_container .detail-user .row-fields .inline-block select {
margin: 0 7px;
}
#users_container .detail-user .email-border { #users_container .detail-user .email-border {
margin-bottom: 10px; margin-bottom: 10px;
border: 2px dotted transparent; border: 2px dotted transparent;


+ 7
- 1
submodules/users/users.js View File

@ -238,7 +238,13 @@ define(function(require) {
iconColor: 'monster-red', iconColor: 'monster-red',
title: self.i18n.active().users.do_not_disturb.title title: self.i18n.active().users.do_not_disturb.title
} }
}
},
outboundPrivacy: _.map(self.appFlags.common.outboundPrivacy, function(item) {
return {
key: item,
value: self.i18n.active().commonMisc.outboundPrivacy.values[item]
};
})
}; };
if (!('extra' in dataUser)) { if (!('extra' in dataUser)) {


+ 14
- 9
views/devices-sip_device.html View File

@ -223,16 +223,21 @@
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label checkbox">
<span>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.type }}</span>
<select class="input-small" name="caller_id_options.outbound_privacy">
<option value="default"{{#compare caller_id_options.outbound_privacy "===" "default"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.default }}</option>
<option value="none"{{#compare caller_id_options.outbound_privacy "===" "none"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.none }}</option>
<option value="number"{{#compare caller_id_options.outbound_privacy "===" "number"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.number }}</option>
<option value="name"{{#compare caller_id_options.outbound_privacy "===" "name"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.name }}</option>
<option value="full"{{#compare caller_id_options.outbound_privacy "===" "full"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.full }}</option>
</select>
<label for="outbound_privacy" class="control-label checkbox">
{{i18n.commonMisc.outboundPrivacy.label}}
<i class="fa fa-question-circle fa-lg" data-toggle="tooltip" title="{{i18n.commonMisc.outboundPrivacy.tooltip}}"></i>
</label> </label>
<div class="controls">
<select name="caller_id_options.outbound_privacy" id="outbound_privacy" class="input-medium">
{{#select caller_id_options.outbound_privacy}}
{{#each extra.outboundPrivacy}}
<option value="{{key}}">
{{value}}
</option>
{{/each}}
{{/select}}
</select>
</div>
</div> </div>
<div class="rtp-line clearfix"> <div class="rtp-line clearfix">


+ 14
- 9
views/devices-softphone.html View File

@ -180,16 +180,21 @@
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label checkbox">
<span>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.type }}</span>
<select class="input-small" name="caller_id_options.outbound_privacy">
<option value="default"{{#compare caller_id_options.outbound_privacy "===" "default"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.default }}</option>
<option value="none"{{#compare caller_id_options.outbound_privacy "===" "none"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.none }}</option>
<option value="number"{{#compare caller_id_options.outbound_privacy "===" "number"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.number }}</option>
<option value="name"{{#compare caller_id_options.outbound_privacy "===" "name"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.name }}</option>
<option value="full"{{#compare caller_id_options.outbound_privacy "===" "full"}} selected{{/compare}}>{{ i18n.devices.popupSettings.miscellaneous.outbound_privacy.full }}</option>
</select>
<label for="outbound_privacy" class="control-label checkbox">
{{i18n.commonMisc.outboundPrivacy.label}}
<i class="fa fa-question-circle fa-lg" data-toggle="tooltip" title="{{i18n.commonMisc.outboundPrivacy.tooltip}}"></i>
</label> </label>
<div class="controls">
<select name="caller_id_options.outbound_privacy" id="outbound_privacy" class="input-medium">
{{#select caller_id_options.outbound_privacy}}
{{#each extra.outboundPrivacy}}
<option value="{{key}}">
{{value}}
</option>
{{/each}}
{{/select}}
</select>
</div>
</div> </div>
<div class="control-group"> <div class="control-group">


+ 30
- 13
views/users-name.html View File

@ -107,26 +107,43 @@
</div> </div>
<div class="row-fields"> <div class="row-fields">
<div class="fa fa-wrapper" data-original-title="{{i18n.users.editionForm.mainExtensionHelp}}" data-placement="top" data-toggle="tooltip"><i class="icon-telicon-extensions"></i></div>
<label>{{ i18n.users.editionForm.presenceId }}</label>
<select name="presence_id" class="presence-id-select">
<div class="fa fa-wrapper" data-toggle="tooltip" title="{{i18n.users.editionForm.mainExtensionHelp}}" data-placement="top">
<i class="icon-telicon-extensions"></i>
</div>
<div class="inline-block">
<label for="presence_id">
{{ i18n.users.editionForm.presenceId }}
</label>
<select name="presence_id" id="presence_id" class="input-small">
{{#select presence_id}} {{#select presence_id}}
{{#each extra.presenceIdOptions}} {{#each extra.presenceIdOptions}}
<option value="{{ this.key }}">{{ this.value }}</option>
<option value="{{key}}">
{{value}}
</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select>
</select>
</div>
</div> </div>
<div class="row-fields"> <div class="row-fields">
<lavel class="fix-left">{{ i18n.users.editionForm.outbound_privacy.type }}</label>
<select id="privacy_type" name="caller_id_options.outbound_privacy">
<option value="default"{{#compare caller_id_options.outbound_privacy "===" "default"}} selected{{/compare}}>{{ i18n.users.editionForm.outbound_privacy.default }}</option>
<option value="none"{{#compare caller_id_options.outbound_privacy "===" "none"}} selected{{/compare}}>{{ i18n.users.editionForm.outbound_privacy.none }}</option>
<option value="number"{{#compare caller_id_options.outbound_privacy "===" "number"}} selected{{/compare}}>{{ i18n.users.editionForm.outbound_privacy.number }}</option>
<option value="name"{{#compare caller_id_options.outbound_privacy "===" "name"}} selected{{/compare}}>{{ i18n.users.editionForm.outbound_privacy.name }}</option>
<option value="full"{{#compare caller_id_options.outbound_privacy "===" "full"}} selected{{/compare}}>{{ i18n.users.editionForm.outbound_privacy.full }}</option>
</select>
<div class="fa fa-wrapper" data-toggle="tooltip" title="{{i18n.commonMisc.outboundPrivacy.tooltip}}" data-placement="top">
<i class="fa fa-user-secret"></i>
</div>
<div class="inline-block">
<label for="outbound_privacy">
{{ i18n.commonMisc.outboundPrivacy.label }}
</label>
<select name="caller_id_options.outbound_privacy" id="outbound_privacy" class="input-medium">
{{#select caller_id_options.outbound_privacy}}
{{#each extra.outboundPrivacy}}
<option value="{{key}}">
{{value}}
</option>
{{/each}}
{{/select}}
</select>
</div>
</div> </div>
</div> </div>
<!--<div class="advanced-fields content-centered span3"> <!--<div class="advanced-fields content-centered span3">


Loading…
Cancel
Save