Browse Source

UI-2664: added chosen to next action dropdown, also added devices as an option

4.3
Jean-Roch Maitre 9 years ago
parent
commit
57d8dd922f
4 changed files with 38 additions and 1 deletions
  1. +4
    -1
      i18n/en-US.json
  2. +4
    -0
      submodules/groups/groups.css
  3. +25
    -0
      submodules/groups/groups.js
  4. +5
    -0
      views/groups-feature-next_action.html

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

@ -94,7 +94,10 @@
"menu": "Menu", "menu": "Menu",
"mainMenu": "Main Menu (Open hours)", "mainMenu": "Main Menu (Open hours)",
"voicemails": "Voicemail Boxes", "voicemails": "Voicemail Boxes",
"users": "Users"
"users": "Users",
"__comment": "UI-2664: Adding devices as next action",
"__version": "4.1",
"devices": "Devices"
}, },
"__comment": "UI-819, v3.19_s1: Showing an error popup when group data is outdated.", "__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.",


+ 4
- 0
submodules/groups/groups.css View File

@ -544,6 +544,10 @@
margin-left: 10px; margin-left: 10px;
} }
/* Had to add this hack so the chosen dialog shows up correctly */
.next-action-group-dialog .ui-dialog-content {
overflow: visible;
}
/* Allow Call Forward Feature */ /* Allow Call Forward Feature */
.monster-feature-popup-container[data-feature="forward"] .help-box { .monster-feature-popup-container[data-feature="forward"] .help-box {


+ 25
- 0
submodules/groups/groups.js View File

@ -790,6 +790,8 @@ define(function(require){
switchFeature = featureTemplate.find('.switch-state'), switchFeature = featureTemplate.find('.switch-state'),
popup; popup;
featureTemplate.find('.next-action-select').chosen({ search_contains: true, width: '220px' });
featureTemplate.find('.cancel-link').on('click', function() { featureTemplate.find('.cancel-link').on('click', function() {
popup.dialog('close').remove(); popup.dialog('close').remove();
}); });
@ -847,6 +849,7 @@ define(function(require){
}); });
popup = monster.ui.dialog(featureTemplate, { popup = monster.ui.dialog(featureTemplate, {
dialogClass: 'next-action-group-dialog',
title: data.group.extra.mapFeatures.next_action.title, title: data.group.extra.mapFeatures.next_action.title,
position: ['center', 20] position: ['center', 20]
}); });
@ -1334,10 +1337,32 @@ define(function(require){
}); });
}, },
groupsListDevices: function(callback) {
var self = this;
self.callApi({
resource: 'device.list',
data: {
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
callback && callback(data.data);
}
});
},
groupsGetFeaturesData: function(groupId, callback) { groupsGetFeaturesData: function(groupId, callback) {
var self = this; var self = this;
monster.parallel({ monster.parallel({
devices: function(callback) {
self.groupsListDevices(function(data) {
callback(null, data);
});
},
group: function(callback) { group: function(callback) {
self.groupsGetGroup(groupId, function(data) { self.groupsGetGroup(groupId, function(data) {
callback(null, data); callback(null, data);


+ 5
- 0
views/groups-feature-next_action.html View File

@ -31,6 +31,11 @@
<option value="{{id}}" data-module="callflow" {{#compare ../selectedEntity '===' id}}selected{{/compare}}>{{userName}}</option> <option value="{{id}}" data-module="callflow" {{#compare ../selectedEntity '===' id}}selected{{/compare}}>{{userName}}</option>
{{/each}} {{/each}}
</optgroup> </optgroup>
<optgroup label="{{ i18n.groups.nextAction.devices }}">
{{#each devices}}
<option value="{{id}}" data-module="device" {{#compare ../selectedEntity '===' id}}selected{{/compare}}>{{name}}</option>
{{/each}}
</optgroup>
</select> </select>
</div> </div>
</div> </div>


Loading…
Cancel
Save