bkruse: branch bkruse/dahdi_integration r4010 - in /team/bkruse/dahdi_integra...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Oct 23 14:47:53 CDT 2008


Author: bkruse
Date: Thu Oct 23 14:47:52 2008
New Revision: 4010

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4010
Log:
Merging from branches/2.0 revisions 3997 - HEAD

Modified:
    team/bkruse/dahdi_integration/config/followme.html
    team/bkruse/dahdi_integration/config/js/tooltip.js
    team/bkruse/dahdi_integration/config/queues.html
    team/bkruse/dahdi_integration/config/welcome.html

Modified: team/bkruse/dahdi_integration/config/followme.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/followme.html?view=diff&rev=4010&r1=4009&r2=4010
==============================================================================
--- team/bkruse/dahdi_integration/config/followme.html (original)
+++ team/bkruse/dahdi_integration/config/followme.html Thu Oct 23 14:47:52 2008
@@ -415,6 +415,7 @@
 			}
 			var tmp_number = ASTGUI.getFieldValue('FMU_newNumber_External');
 		}
+		if( tmp_number.contains('-') ) tmp_number = tmp_number.withOut('-');
 		var tmp_dest = tmp_number + ',' + tmp_seconds;
 
 		if( _$('newFM_Order_radio_after').checked ){

Modified: team/bkruse/dahdi_integration/config/js/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/js/tooltip.js?view=diff&rev=4010&r1=4009&r2=4010
==============================================================================
--- team/bkruse/dahdi_integration/config/js/tooltip.js (original)
+++ team/bkruse/dahdi_integration/config/js/tooltip.js Thu Oct 23 14:47:52 2008
@@ -143,6 +143,7 @@
 	tooltips['queues'] .en[14] = "<B>Agent Login Extension:</B> Extension to be dialed for the Agents to Login to the Specific Queue. <br> This is an extension that all the Agents can Call to Login to their specified Queues. ";
 	tooltips['queues'] .en[15] = "<B>Agent Callback Login Extension:</B> Extension to be dialed for the Agents to Login to the Queues they are apart of.<br> Same as Agent Login Extension, except you do not have to remain on the line. ";
 	tooltips['queues'] .en[16] = "<B>Agent Logout</B>";
+	tooltips['queues'] .en[17] = "<B>KeyPress Events:</B> If a caller presses a key while waiting in the queue, this setting selects which voice menu should process the key press.";
 
 // Tooltips for SIP_General (sip_general)
 	tooltips['sip_general']= new Object;

Modified: team/bkruse/dahdi_integration/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/queues.html?view=diff&rev=4010&r1=4009&r2=4010
==============================================================================
--- team/bkruse/dahdi_integration/config/queues.html (original)
+++ team/bkruse/dahdi_integration/config/queues.html Thu Oct 23 14:47:52 2008
@@ -84,6 +84,7 @@
 	DOM_edit_joinempty = _$('edit_joinempty'); // chkbox
 	DOM_edit_leavewhenempty = _$('edit_leavewhenempty'); // chkbox
 	DOM_edit_reportholdtime = _$('edit_reportholdtime'); // chkbox
+	DOM_edit_voicemenuclass = _$('edit_voicemenuclass'); // select
 
 };
 
@@ -169,7 +170,7 @@
 var show_Queue_Form = function(){
 	if(isNewQueue == true){
 
-		ASTGUI.resetTheseFields([ DOM_Queue_Ext, DOM_edit_label ,DOM_edit_strategy , DOM_edit_musicclass , DOM_edit_timeout , DOM_edit_wrapuptime , DOM_edit_maxlen , DOM_edit_autofill , DOM_edit_autopause , DOM_edit_joinempty , DOM_edit_leavewhenempty , DOM_edit_reportholdtime ]); // reset all fields
+		ASTGUI.resetTheseFields([ DOM_Queue_Ext, DOM_edit_label ,DOM_edit_strategy , DOM_edit_musicclass , DOM_edit_timeout , DOM_edit_wrapuptime , DOM_edit_maxlen , DOM_edit_autofill , DOM_edit_autopause , DOM_edit_joinempty , DOM_edit_leavewhenempty , DOM_edit_reportholdtime, DOM_edit_voicemenuclass  ]); /* reset all fields */
 		ASTGUI.domActions.unCheckAll( ag_chkbxClass );
 		DOM_Queue_Ext.disabled = false;
 		var tmp_ql = parent.sessionData.pbxinfo.queues.getOwnProperties();
@@ -178,6 +179,7 @@
 		$(DOM_edit_QueueDiv).showWithBg();
 		ASTGUI.feedback({ msg:'Create New Queue!', showfor:2 });
 		ASTGUI.updateFieldToValue(DOM_edit_musicclass, 'default' );
+		ASTGUI.updateFieldToValue(DOM_edit_voicemenuclass, '' );
 		return;
 	}
 
@@ -196,6 +198,7 @@
 	ASTGUI.updateFieldToValue(DOM_edit_joinempty, QUEUES_CONF[EDIT_Queue].getProperty('joinempty') );
 	ASTGUI.updateFieldToValue(DOM_edit_leavewhenempty, QUEUES_CONF[EDIT_Queue].getProperty('leavewhenempty') );
 	ASTGUI.updateFieldToValue(DOM_edit_reportholdtime, QUEUES_CONF[EDIT_Queue].getProperty('reportholdtime') );
+	ASTGUI.updateFieldToValue(DOM_edit_voicemenuclass, QUEUES_CONF[EDIT_Queue].getProperty('context') );
 	ASTGUI.domActions.checkSelected( ag_chkbxClass, (QUEUES_CONF[EDIT_Queue].getProperty('member')) ? QUEUES_CONF[EDIT_Queue]['member'].split(',') :[] ) ;
 	ASTGUI.feedback({ msg:'Edit Queue !', showfor:2 });
 
@@ -250,6 +253,8 @@
 		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 s = ASTGUI.getFieldValue(DOM_edit_voicemenuclass); 
+		if (s != '') x.new_action('append', cat, 'context', s);
 
 	}else{
 		if( parent.sessionData.pbxinfo.queues[cat].hasOwnProperty('isOLDGUI') && parent.sessionData.pbxinfo.queues[cat].isOLDGUI == true ){
@@ -272,6 +277,9 @@
 		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 s = ASTGUI.getFieldValue(DOM_edit_voicemenuclass);
+		if (s != '') x.new_action('update', cat, 'context', s);
+		else x.new_action('delete', cat, 'context');
 	}
 
 	var ags = ASTGUI.domActions.get_checked(ag_chkbxClass) ;
@@ -340,7 +348,14 @@
 			ASTGUI.selectbox.append('edit_musicclass', this_class, this_class );
 		});
 		_$('edit_musicclass').selectedIndex = -1 ;
-
+/* Need to add list of voicemenus */
+		ASTGUI.selectbox.append('edit_voicemenuclass', 'None', '' );
+		var vmcls = parent.sessionData.pbxinfo.voicemenus.getOwnProperties();
+		vmcls.each(function(vmenu){
+			var vm_name = parent.sessionData.pbxinfo.voicemenus[vmenu].comment || vmenu ;
+			ASTGUI.selectbox.append('edit_voicemenuclass', 'VoiceMenu -- ' + vm_name, vmenu );
+		});
+/* end */
 	} )();
 
 	loadDOMElements();
@@ -543,6 +558,11 @@
 						</td>
 						<td><label for='edit_reportholdtime'>Report Hold Time</label></td>
 					</tr>
+					<tr>	<td colspan=2 align=right>KeyPress Events :</td>
+						<td colspan=2><select id="edit_voicemenuclass"></select>
+							<img src="images/tooltip_info.gif" tip="en,queues,17" class='tooltipinfo'>
+						</td>
+					</tr>
 					</table>
 				</fieldset>
 				</td>

Modified: team/bkruse/dahdi_integration/config/welcome.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/welcome.html?view=diff&rev=4010&r1=4009&r2=4010
==============================================================================
--- team/bkruse/dahdi_integration/config/welcome.html (original)
+++ team/bkruse/dahdi_integration/config/welcome.html Thu Oct 23 14:47:52 2008
@@ -78,6 +78,7 @@
 $(tmp_image).attr('border', '0');
 
 var managerEvents = {};
+var manager_timers = {};
 
  managerEvents.agentLogoutLink = function(agent){
 	var tmp_qlogout = document.createElement('div');
@@ -151,6 +152,11 @@
 				setTimeout( update_AgentsListing_Table , 1000 );
 			}else if( op_LC.contains('event: meetmeleave') ||  op_LC.contains('event: meetmejoin') ){
 				setTimeout( update_Conferences_Table , 1000 );
+			}else if( op_LC.contains('event: link') ||  op_LC.contains('event: unlink') ){
+
+				if(manager_timers.parkedCalls){ clearTimeout ( manager_timers.parkedCalls ) } ;
+				manager_timers.parkedCalls = setTimeout ( update_parkedCalls_Table , 2000 ) ;
+
 			} else if ( op_LC.contains('event: extensionstatus') ) {
 				var tmp_chunks = ASTGUI.miscFunctions.getChunksFromManagerOutput(op, 1) ;
 				tmp_chunks.each(function(this_chunk){
@@ -160,6 +166,10 @@
 						managerEvents.updateUserImage(tmp_user , new_status);
 					}
 				});
+
+				if(manager_timers.parkedCalls){ clearTimeout ( manager_timers.parkedCalls ) } ;
+				manager_timers.parkedCalls = setTimeout ( update_parkedCalls_Table , 2000 ) ;
+
 			}
 		}catch(err){}
 	})();
@@ -365,7 +375,7 @@
 	(function(){ // List all meetMe Extensions
 
 		update_Conferences_Table();
-
+		update_parkedCalls_Table();
 	})();
 
 	(function(){ // List all Queue Extensions
@@ -509,6 +519,29 @@
 		$('#ittnc').show();
 	}
 
+};
+
+var update_parkedCalls_Table = function(){
+	var addCell = ASTGUI.domActions.tr_addCell;
+	var TBL = _$('table_ParkedCalls_list');
+	ASTGUI.domActions.removeAllChilds(TBL);
+
+	$.get( ASTGUI.paths.rawman, { action: 'ParkedCalls' }, function(op){
+		var tmp_chunks = ASTGUI.miscFunctions.getChunksFromManagerOutput(op, 1);
+		tmp_chunks.each( function( this_chunk ){
+			if( !this_chunk.hasOwnProperty('Event') || !this_chunk.hasOwnProperty('Exten') ) return ;
+			newRow = TBL.insertRow(-1);
+			var newcell = newRow.insertCell( newRow.cells.length );
+			newcell.innerHTML =  this_chunk.CallerID + ' (' + this_chunk.Channel + ') is Parked on ' + this_chunk.Exten ; // this_chunk.Timeout
+		});
+
+		if( !TBL.rows.length ){
+			newRow = TBL.insertRow(-1);
+			var newcell = newRow.insertCell( newRow.cells.length );
+			newcell.align =  'center' ;
+			newcell.innerHTML =  'No Parked Calls' ;
+		}
+	});
 };
 
 var update_Conferences_Table = function(){
@@ -562,7 +595,12 @@
 		}
 	}}
 
-	if( TBL.rows.length ){ $('#table_Meetmes_list_container').show() ; }
+	if( !TBL.rows.length ){ 
+		newRow = TBL.insertRow(-1);
+		var newcell = newRow.insertCell( newRow.cells.length );
+		newcell.align =  'center' ;
+		newcell.innerHTML =  'No Conferences setup' ;
+	}
 };
 
 
@@ -672,19 +710,25 @@
 		
 	</div>
 
-	<div style='overflow:auto; width:95%; max-height: 500px;margin-top:10px; display:none;' id='table_Meetmes_list_container'>
-		
+	<div style='overflow:auto; width:95%; max-height: 500px;margin-top:10px;' id='table_Meetmes_list_container'>
 		<table cellpadding=1 cellspacing=2 border=0 align=center style="border-width: 1px ; border-spacing: 2px; border-style: solid; border-color: #6b79a5; border-collapse: separate; background-color: white;">
 			<tr>
 				<td valign='top' align=center><B>Conference Rooms</B> <span class='refresh_icon' onclick="update_Conferences_Table();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span></td>
+				<td width=150></td>
+				<td valign='top' align=center><B>Parked Calls</B> <span class='refresh_icon' onclick="update_parkedCalls_Table();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span></td>
+				<td width=50></td>
 			</tr>
 			<tr>
 				<td align=center>
 					<table id='table_Meetmes_list' cellpadding=0 cellspacing=0 border=0 align=center></table>
 				</td>
+				<td width=150></td>
+				<td align=center>
+					<table id='table_ParkedCalls_list' cellpadding=0 cellspacing=0 border=0 align=center></table>
+				</td>
+				<td width=50></td>
 			</tr>
 		</table>
-		
 	</div>
 
 	<div style='width:100%; text-align:center; margin-top:15px;'>




More information about the asterisk-gui-commits mailing list