rbrindley: branch rbrindley/welcome_revamp r4288 - in /team/rbrindley/welcome...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Dec 5 00:42:07 CST 2008
Author: rbrindley
Date: Fri Dec 5 00:42:06 2008
New Revision: 4288
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4288
Log:
- added Timeout column to Parking Lot
- added countdown class to timeout column cells
- implemented 'parkedcall' case in parseOutput's event switchcase
- added and implemented manager_events.parkedcall function to add a parked call to the parking lot display
Modified:
team/rbrindley/welcome_revamp/config/js/welcome2.js
team/rbrindley/welcome_revamp/config/welcome2.html
Modified: team/rbrindley/welcome_revamp/config/js/welcome2.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/welcome2.js?view=diff&rev=4288&r1=4287&r2=4288
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/welcome2.js (original)
+++ team/rbrindley/welcome_revamp/config/js/welcome2.js Fri Dec 5 00:42:06 2008
@@ -497,7 +497,8 @@
pushRow(plot_tbody, [
$("<td></td>").html(chunk.CallerID),
$("<td></td>").html(chunk.Channel),
- $("<td></td>").html(chunk.Exten)
+ $("<td></td>").html(chunk.Exten),
+ $("<td></td>").html(chunk.Timeout).addClass('countdown')
]);
});
@@ -579,6 +580,16 @@
var context = '';
var status = event[3].split(' ')[1]; /* State: Dialing */
this.updateExtension(exten.trim(),context,status);
+ break;
+ case 'event: parkedcall':
+ var exten = event[2].split(' ')[1]; /* Exten: <parkexten> */
+ var chan = event[3].split(' ')[1]; /* Channel: <channel> */
+ var from = event[4].split(' ')[1]; /* From: <from> */
+ var timeout = event[5].split(' ')[1]; /* Timeout: <timeout> */
+ var cid = event[6].split(' ')[1]; /* CallerID: <cid> */
+ this.parkedCall(exten, chan, from, timeout, cid);
+ break;
+ case 'event: unparkedcall':
break;
case 'event: queuememberstatus':
var agent = event[4].split(' ')[1].split('/')[1]; //MemberName: 6000
@@ -603,11 +614,9 @@
case 'event: messagewaiting':
case 'event: newcallerid':
case 'event: newexten':
- case 'event: parkedcall':
case 'event: rename':
case 'event: setcdruserfield':
case 'event: unlink':
- case 'event: unparkedcall':
case 'event: alarm':
case 'event: alarmclear':
case 'event: dndstate':
@@ -772,6 +781,24 @@
$('#extensions_list').trigger('update');
};
+manager_events.parkedCall = function(exten, chan, from, timeout, cid) {
+ var plot_tbody = $('#parking_lot_list > tbody');
+
+ if (plot_tbody.children('tr').length == 1 && plot_tbody.contents('tr > td:first').html().contains('No Parked Calls')) {
+ /* If plot_tbody only has 1 row and it contains 'No Parked Calls' then empty tbody */
+ plot_tbody.empty();
+ }
+
+ var new_row = $('<tr></tr>');
+
+ $('<td></td>').html(cid).appendTo(new_row);
+ $('<td></td>').html(chan).appendTo(new_row);
+ $('<td></td>').html(exten).appendTo(new_row);
+ $('<td></td>').html(timeout).addClass('countdown').appendTo(new_row);
+
+ plot_tbody.append(new_row);
+};
+
var pushRow = function(tbody, cells) {
var new_row = $("<tr></tr>");
for (var i=0; i < cells.length; i++) {
Modified: team/rbrindley/welcome_revamp/config/welcome2.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/welcome2.html?view=diff&rev=4288&r1=4287&r2=4288
==============================================================================
--- team/rbrindley/welcome_revamp/config/welcome2.html (original)
+++ team/rbrindley/welcome_revamp/config/welcome2.html Fri Dec 5 00:42:06 2008
@@ -587,6 +587,7 @@
<th>Caller ID</th>
<th>Channel</th>
<th>Extension</th>
+ <th>Timeout</th>
</tr>
</thead>
<tbody>
More information about the asterisk-gui-commits
mailing list