pari: branch 2.0 r4107 - /branches/2.0/config/queues.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Nov 14 16:34:10 CST 2008
Author: pari
Date: Fri Nov 14 16:34:10 2008
New Revision: 4107
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4107
Log:
Fix for : GUI adding duplicate queue members while editing queues
Modified:
branches/2.0/config/queues.html
Modified: branches/2.0/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/queues.html?view=diff&rev=4107&r1=4106&r2=4107
==============================================================================
--- branches/2.0/config/queues.html (original)
+++ branches/2.0/config/queues.html Fri Nov 14 16:34:10 2008
@@ -222,7 +222,7 @@
return;
}
- if( isNewQueue == true ){
+ if( isNewQueue == true ){ // new QUEUE
if(!ASTGUI.miscFunctions.isExtensionInRange( cat ,'qe_start','qe_end')){
ASTGUI.highlightField(DOM_Queue_Ext, 'Extension is not in preferred range');
parent.ASTGUI.dialog.hide();
@@ -255,8 +255,7 @@
x.new_action('append', cat, 'musicclass', ASTGUI.getFieldValue(DOM_edit_musicclass));
var s = ASTGUI.getFieldValue(DOM_edit_voicemenuclass);
if (s != '') x.new_action('append', cat, 'context', s);
-
- }else{
+ }else{ // Edit existing QUEUE
if( parent.sessionData.pbxinfo.queues[cat].hasOwnProperty('isOLDGUI') && parent.sessionData.pbxinfo.queues[cat].isOLDGUI == true ){
var u = new listOfSynActions('extensions.conf');
u.new_action( 'delete', 'default', 'exten', '' , parent.sessionData.pbxinfo.queues[cat].configLine );
@@ -286,7 +285,7 @@
ags.each( function(ag){
x.new_action('append', cat, 'member', ag );
});
-
+
var after = function(){
if( isNewQueue == true ){
parent.sessionData.pbxinfo.queues[cat] = new ASTGUI.customObject ;
@@ -296,7 +295,15 @@
ASTGUI.feedback({ msg:'Changes Saved !', showfor:2 , color:'green', bgcolor:'#FFFFFF' });
window.location.reload();
};
- x.callActions(after);
+
+ if( isNewQueue == true ){
+ x.callActions(after);
+ }else{
+ ASTGUI.miscFunctions.delete_LinesLike({ context_name : cat , beginsWithArr: ['member=Agent'] , filename: 'queues.conf', cb:function(){
+ x.callActions(after);
+ } });
+ }
+
};
More information about the asterisk-gui-commits
mailing list