pari: branch 2.0 r3961 - /branches/2.0/config/queues.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Oct 17 09:58:58 CDT 2008


Author: pari
Date: Fri Oct 17 09:58:57 2008
New Revision: 3961

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3961
Log:

Fix: GUI overwriting any custom queue settings in queues.conf ( reported by David Kerr )



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=3961&r1=3960&r2=3961
==============================================================================
--- branches/2.0/config/queues.html (original)
+++ branches/2.0/config/queues.html Fri Oct 17 09:58:57 2008
@@ -235,6 +235,22 @@
 		var u = new listOfSynActions('extensions.conf') ;
 		u.new_action('append', ASTGUI.contexts.QUEUES, 'exten', configLine );
 		u.callActions();
+
+		var x = new listOfActions('queues.conf');
+		x.new_action('delcat', cat, '', '');
+		x.new_action('newcat', cat, '', ''); // create new context
+		x.new_action('append', cat, 'fullname', ASTGUI.getFieldValue(DOM_edit_label));
+		x.new_action('append', cat, 'strategy', ASTGUI.getFieldValue(DOM_edit_strategy));
+		x.new_action('append', cat, 'timeout', ASTGUI.getFieldValue(DOM_edit_timeout));
+		x.new_action('append', cat, 'wrapuptime', ASTGUI.getFieldValue(DOM_edit_wrapuptime));
+		x.new_action('append', cat, 'autofill', ASTGUI.getFieldValue(DOM_edit_autofill));
+		x.new_action('append', cat, 'autopause', ASTGUI.getFieldValue(DOM_edit_autopause));
+		x.new_action('append', cat, 'joinempty', ASTGUI.getFieldValue(DOM_edit_joinempty));
+		x.new_action('append', cat, 'leavewhenempty', ASTGUI.getFieldValue(DOM_edit_leavewhenempty));
+		x.new_action('append', cat, 'reportholdtime', ASTGUI.getFieldValue(DOM_edit_reportholdtime));
+		x.new_action('append', cat, 'maxlen', ASTGUI.getFieldValue(DOM_edit_maxlen));
+		x.new_action('append', cat, 'musicclass', ASTGUI.getFieldValue(DOM_edit_musicclass));
+
 	}else{
 		if( parent.sessionData.pbxinfo.queues[cat].hasOwnProperty('isOLDGUI') && parent.sessionData.pbxinfo.queues[cat].isOLDGUI == true ){
 			var u = new listOfSynActions('extensions.conf');
@@ -243,22 +259,20 @@
 			u.callActions();
 			delete parent.sessionData.pbxinfo.queues[cat].isOLDGUI ;
 		}
-	}
-
-	var x = new listOfActions('queues.conf');
-	x.new_action('delcat', cat, '', '');
-	x.new_action('newcat', cat, '', ''); // create new context
-	x.new_action('append', cat, 'fullname', ASTGUI.getFieldValue(DOM_edit_label));
-	x.new_action('append', cat, 'strategy', ASTGUI.getFieldValue(DOM_edit_strategy));
-	x.new_action('append', cat, 'timeout', ASTGUI.getFieldValue(DOM_edit_timeout));
-	x.new_action('append', cat, 'wrapuptime', ASTGUI.getFieldValue(DOM_edit_wrapuptime));
-	x.new_action('append', cat, 'autofill', ASTGUI.getFieldValue(DOM_edit_autofill));
-	x.new_action('append', cat, 'autopause', ASTGUI.getFieldValue(DOM_edit_autopause));
-	x.new_action('append', cat, 'joinempty', ASTGUI.getFieldValue(DOM_edit_joinempty));
-	x.new_action('append', cat, 'leavewhenempty', ASTGUI.getFieldValue(DOM_edit_leavewhenempty));
-	x.new_action('append', cat, 'reportholdtime', ASTGUI.getFieldValue(DOM_edit_reportholdtime));
-	x.new_action('append', cat, 'maxlen', ASTGUI.getFieldValue(DOM_edit_maxlen));
-	x.new_action('append', cat, 'musicclass', ASTGUI.getFieldValue(DOM_edit_musicclass));
+
+		var x = new listOfActions('queues.conf');
+		x.new_action('update', cat, 'fullname', ASTGUI.getFieldValue(DOM_edit_label));
+		x.new_action('update', cat, 'strategy', ASTGUI.getFieldValue(DOM_edit_strategy));
+		x.new_action('update', cat, 'timeout', ASTGUI.getFieldValue(DOM_edit_timeout));
+		x.new_action('update', cat, 'wrapuptime', ASTGUI.getFieldValue(DOM_edit_wrapuptime));
+		x.new_action('update', cat, 'autofill', ASTGUI.getFieldValue(DOM_edit_autofill));
+		x.new_action('update', cat, 'autopause', ASTGUI.getFieldValue(DOM_edit_autopause));
+		x.new_action('update', cat, 'joinempty', ASTGUI.getFieldValue(DOM_edit_joinempty));
+		x.new_action('update', cat, 'leavewhenempty', ASTGUI.getFieldValue(DOM_edit_leavewhenempty));
+		x.new_action('update', cat, 'reportholdtime', ASTGUI.getFieldValue(DOM_edit_reportholdtime));
+		x.new_action('update', cat, 'maxlen', ASTGUI.getFieldValue(DOM_edit_maxlen));
+		x.new_action('update', cat, 'musicclass', ASTGUI.getFieldValue(DOM_edit_musicclass));
+	}
 
 	var ags = ASTGUI.domActions.get_checked(ag_chkbxClass) ;
 	ags.each( function(ag){




More information about the asterisk-gui-commits mailing list