pari: branch 2.0 r4258 - /branches/2.0/config/gtalk.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Dec 2 11:41:29 CST 2008


Author: pari
Date: Tue Dec  2 11:41:29 2008
New Revision: 4258

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

 bug fix: deleting a gtalk peer does not delete the incoming call context for that peer

 some minor improvements



Modified:
    branches/2.0/config/gtalk.html

Modified: branches/2.0/config/gtalk.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/gtalk.html?view=diff&rev=4258&r1=4257&r2=4258
==============================================================================
--- branches/2.0/config/gtalk.html (original)
+++ branches/2.0/config/gtalk.html Tue Dec  2 11:41:29 2008
@@ -110,25 +110,29 @@
 		}
 	},
 
-	deleteBuddy : function(a){ // MANAGE_BUDDIES.deleteBuddy();
-		if(!confirm("Delete peer '"+ a + "' ?")) { return true; }
-		var u = new listOfSynActions('gtalk.conf') ;
+	deleteBuddy : function(a , silentmode){ // MANAGE_BUDDIES.deleteBuddy(); use silentmode to delete while editing buddy
+		if(!silentmode){
+			if( !confirm("Delete peer '"+ a + "' ?") ) return true;
+		}
+
+		var u = new listOfSynActions('gtalk.conf');
 			u.new_action('delcat', a, '', '');
 		u.callActions();
-		ASTGUI.feedback( { msg:"'deleted peer " + a , showfor: 3, color:'red', bgcolor:'#FFFFFF' } );
-		window.location.reload();
+
+		u.clearActions('extensions.conf');
+			u.new_action('delcat', GTALK_CNF[a].context , '', '');
+		u.callActions();
+
+		if(!silentmode){
+			ASTGUI.feedback( { msg:"deleted peer '" + a + "'" , showfor: 3, color:'red', bgcolor:'#FFFFFF' } );
+			window.location.reload();
+		}
 	},
 
 	addBuddy: function(){ // MANAGE_BUDDIES.addBuddy();
 
 		if ( EDIT_BUDDY ){
-			var u = new listOfSynActions('gtalk.conf') ;
-			u.new_action('delcat', EDIT_BUDDY , '', '');
-			u.callActions();
-
-			u.clearActions('extensions.conf') ;
-			u.new_action('delcat', GTALK_CNF[EDIT_BUDDY].context , '', '');
-			u.callActions();
+			this.deleteBuddy(EDIT_BUDDY , true);
 		}
 
 		var v = new listOfActions('gtalk.conf');
@@ -210,21 +214,20 @@
 		}
 	},
 
-	deleteAccount : function(a){ // MANAGE_ACCOUNTS.deleteAccount()
-		if(!confirm("Delete account '"+ a + "' ?")) { return true; }
+	deleteAccount : function(a, silentmode){ // MANAGE_ACCOUNTS.deleteAccount()
+		if(!silentmode && !confirm("Delete account '"+ a + "' ?")) { return true; }
 		var u = new listOfSynActions('jabber.conf') ;
-			u.new_action('delcat', a, '', '');
+		u.new_action('delcat', a, '', '');
 		u.callActions();
-		ASTGUI.feedback( { msg:"'Deleted jabber account " + a , showfor: 3, color:'red', bgcolor:'#FFFFFF' } );
-		window.location.reload();
-
+		if( !silentmode ){
+			ASTGUI.feedback({ msg:"Deleted jabber account '" + a + "'", showfor: 3, color:'red', bgcolor:'#FFFFFF' });
+			window.location.reload();
+		}
 	},
 
 	saveAccount : function(){ // MANAGE_ACCOUNTS.saveAccount()
 		if ( EDIT_ACCOUNT ){
-			var u = new listOfSynActions('jabber.conf') ;
-			u.new_action('delcat', EDIT_ACCOUNT , '', '');
-			u.callActions();
+			this.deleteAccount(EDIT_ACCOUNT, true);
 		}
 
 		var v = new listOfActions('jabber.conf');




More information about the asterisk-gui-commits mailing list