From 3140dcfb00412e4299c0ab5cf66946c224360f1d Mon Sep 17 00:00:00 2001 From: Maxime Roux Date: Fri, 30 Jan 2015 16:05:10 -0800 Subject: [PATCH] UI-1099: now saving the ringback on the ring_group module of the baseGroup callflow, instead of saving it on the last module of the userGroup callflow --- submodules/groups/groups.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/submodules/groups/groups.js b/submodules/groups/groups.js index cf4dfe6..b03f77f 100644 --- a/submodules/groups/groups.js +++ b/submodules/groups/groups.js @@ -543,7 +543,7 @@ define(function(require){ groupsRenderRingback: function(data) { var self = this, silenceMediaId = 'silence_stream://300000', - ringGroupNode = data.callflow.flow; + ringGroupNode = data.baseCallflow.flow; while(ringGroupNode.module !== 'ring_group' && '_' in ringGroupNode.children) { ringGroupNode = ringGroupNode.children['_']; @@ -668,7 +668,7 @@ define(function(require){ }; } - self.groupsUpdateCallflow(data.callflow, function() { + self.groupsUpdateCallflow(data.baseCallflow, function() { self.groupsUpdate(data.group, function(updatedGroup) { popup.dialog('close').remove(); self.groupsRender({ groupId: data.group.id }); @@ -680,7 +680,7 @@ define(function(require){ data.group.smartpbx.ringback.enabled = false; } - self.groupsUpdateCallflow(data.callflow, function() { + self.groupsUpdateCallflow(data.baseCallflow, function() { self.groupsUpdate(data.group, function(updatedGroup) { popup.dialog('close').remove(); self.groupsRender({ groupId: data.group.id }); @@ -1178,6 +1178,11 @@ define(function(require){ callback(null, data); }); }, + baseCallflow: function(callback) { + self.groupsGetBaseRingGroup(groupId, function(data) { + callback(null, data); + }); + }, voicemails: function(callback) { self.groupsListVMBoxes(function(data) { callback(null, data);