Browse Source

UI-1352: Adding allow_forward settings to groups in Monster

4.3
Jean-Roch Maitre 11 years ago
parent
commit
0f85a8b410
5 changed files with 97 additions and 4 deletions
  1. +9
    -1
      i18n/en-US.json
  2. +9
    -1
      i18n/fr-FR.json
  3. +7
    -1
      submodules/groups/groups.css
  4. +41
    -1
      submodules/groups/groups.js
  5. +31
    -0
      views/groups-feature-forward.html

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

@ -97,7 +97,15 @@
"users": "Users"
},
"__comment": "UI-819, v3.19_s1: Showing an error popup when group data is outdated.",
"outdatedGroupsError": "Your Group's data is outdated and can not be rendered. Please contact your administrator to update your data."
"outdatedGroupsError": "Your Group's data is outdated and can not be rendered. Please contact your administrator to update your data.",
"__comment": "UI-1352: Adding an option to enable/disable call forwarding on ring group",
"__version": "3.20",
"forward": {
"title": "Allow Call-Forward",
"headline": "Allow Call-Forward",
"description": "Enable this option if you want to allow this group's users to press their device \"Forward\" button to forward a call from this ring group. If this option is disabled, it will ignore the user's command."
}
},
"devices": {


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

@ -93,7 +93,15 @@
"users": "Utilisateurs"
},
"__comment": "UI-819, v3.19_s1: Showing an error popup when group data is outdated.",
"outdatedGroupsError": "Les données de vos Groupes sont obsolètes et ne peuvent être affichées. Veuillez contacter votre administrateur afin de mettre à jour vos données."
"outdatedGroupsError": "Les données de vos Groupes sont obsolètes et ne peuvent être affichées. Veuillez contacter votre administrateur afin de mettre à jour vos données.",
"__comment": "UI-1352: Adding an option to enable/disable call forwarding on ring group",
"__version": "3.20",
"forward": {
"title": "Redirection d'appel",
"headline": "Autoriser la Redirection d'Appels",
"description": "Si cette option est activée, les utilisateurs de ce group pourront presser le bouton \"Redirection\" de leur téléphone afin de rediriger un appel de ce groupe. Si cette option est desactivée, ce groupe ignorera les commandes de redirections."
}
},
"devices": {


+ 7
- 1
submodules/groups/groups.css View File

@ -442,7 +442,7 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 33.33%;
width: 25%;
height: 150px;
border: 1px solid #FFF;
text-align: center;
@ -552,4 +552,10 @@
.feature-popup-container[data-feature="next_action"] .next-action > *:not(:first-child) {
margin-left: 10px;
}
/* Next Action Feature */
.feature-popup-container[data-feature="forward"] .help-box {
margin: 5px 20px 20px
}

+ 41
- 1
submodules/groups/groups.js View File

@ -136,9 +136,14 @@ define(function(require){
title: self.i18n.active().groups.ringback.title
},
next_action: {
icon: 'icon-share-alt',
icon: 'icon-arrow-right',
iconColor: 'icon-green',
title: self.i18n.active().groups.nextAction.title
},
forward: {
icon: 'icon-mail-forward',
iconColor: 'icon-orange',
title: self.i18n.active().groups.forward.title
}
},
hasFeatures: false
@ -460,6 +465,10 @@ define(function(require){
template.find('.feature[data-feature="next_action"]').on('click', function() {
self.groupsRenderNextAction(data);
});
template.find('.feature[data-feature="forward"]').on('click', function() {
self.groupsRenderForward(data);
});
},
groupsRenderCallRecording: function(data) {
@ -775,6 +784,37 @@ define(function(require){
});
},
groupsRenderForward: function(data) {
var self = this,
featureTemplate = $(monster.template(self, 'groups-feature-forward', data)),
switchFeature = featureTemplate.find('.switch-state'),
popup;
featureTemplate.find('.cancel-link').on('click', function() {
popup.dialog('close').remove();
});
featureTemplate.find('.save').on('click', function() {
var enabled = switchFeature.prop('checked');
data.group.smartpbx = data.group.smartpbx || {};
data.group.smartpbx.forward = data.group.smartpbx.forward || {};
data.group.smartpbx.forward.enabled = enabled;
data.group.allow_forward = enabled;
self.groupsUpdate(data.group, function(updatedGroup) {
popup.dialog('close').remove();
self.groupsRender({ groupId: data.group.id });
});
});
popup = monster.ui.dialog(featureTemplate, {
title: data.group.extra.mapFeatures.forward.title,
position: ['center', 20]
});
},
groupsBindName: function(template, data) {
var self = this,
nameForm = template.find('#form-name');


+ 31
- 0
views/groups-feature-forward.html View File

@ -0,0 +1,31 @@
<div class="feature-popup-container" data-feature="forward">
<div class="feature-popup-title">
<div class="feature-icon-wrapper">
<i class="{{group.extra.mapFeatures.forward.icon}}"></i>
</div>
{{ i18n.groups.forward.headline }}
<div class="switch">
{{#monsterSwitch}}
<input class="switch-state" type="checkbox" data-on="{{i18n.enabled}}" data-off="{{i18n.disabled}}"{{#if group.extra.mapFeatures.forward.active}} checked="checked"{{/if}}></input>
{{/monsterSwitch}}
</div>
</div>
<div class="help-box gray-box">
<div class="wrapper-icon">
<i class="icon-info-sign2"></i></div>
<div class="text-wrapper">
<p>{{ i18n.groups.forward.description }}</p>
</div>
</div>
<!--
<div class="content{{#unless group.extra.mapFeatures.forward.active}} disabled{{/unless}}">
</div> -->
<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>

Loading…
Cancel
Save