pari: branch 2.0 r4260 - /branches/2.0/config/skype.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Dec 2 14:44:13 CST 2008


Author: pari
Date: Tue Dec  2 14:44:13 2008
New Revision: 4260

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

 Option to choose "default skype account" for outbound calls on SFA



Modified:
    branches/2.0/config/skype.html

Modified: branches/2.0/config/skype.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/skype.html?view=diff&rev=4260&r1=4259&r2=4260
==============================================================================
--- branches/2.0/config/skype.html (original)
+++ branches/2.0/config/skype.html Tue Dec  2 14:44:13 2008
@@ -47,17 +47,31 @@
 var SKYPE_CNF, EXTENSIONS_CNF;
 var EDIT_ACCOUNT ;
 
+
+var set_as_default_account = function(a){
+	ASTGUI.updateaValue({ file: 'chan_skype.conf', context :'general', variable :'default_user', value : a });
+	ASTGUI.feedback( { msg: 'Updated default Skype Account !', showfor: 2 , color: 'blue', bgcolor: '#FFFFFF' } );
+	window.location.reload();
+};
+
+
 var MANAGE_ACCOUNTS = {
 	listAccounts : function(){
 		var addCell = ASTGUI.domActions.tr_addCell; // temporarily store the function
 		var TBL = _$('table_AccountsList');
 		ASTGUI.domActions.clear_table(TBL);
 
+		var DEFAULT_ACCOUNT = ( SKYPE_CNF.hasOwnProperty('general') && SKYPE_CNF['general'].default_user ) ? SKYPE_CNF['general'].default_user : '' ;
+
 		for( account in SKYPE_CNF ){
 			if( !SKYPE_CNF.hasOwnProperty(account) || account == 'general' ) continue;
 
 			var newRow = TBL.insertRow(-1);
 			newRow.className = ((TBL.rows.length)%2==1) ? 'odd':'even';
+
+			var img_name = ( DEFAULT_ACCOUNT == account ) ? 'images/edit.gif' : 'images/checkbox_blank.gif';
+			addCell( newRow , { html: "<A href='#' TITLE='Set this as the default skype account for placing calls through skype network'><img src=" + img_name + " border=0 onclick=\"set_as_default_account('" + account +"')\"></A>" } );
+
 			addCell( newRow , { html: account, align: 'left' });
 
 			var tmp_context = SKYPE_CNF[account].context || '' ;
@@ -76,6 +90,7 @@
 		}else{
 			var newRow = TBL.insertRow(0);
 			newRow.className = 'frow' ;
+			addCell( newRow , { html:'Default' } );
 			addCell( newRow , { html: 'Skype Account' , align: 'left' });
 			addCell( newRow , { html: 'Incoming calls go to', align: 'left' });
 			addCell( newRow , { html: '' });




More information about the asterisk-gui-commits mailing list