rbrindley: branch rbrindley/welcome_revamp r4229 - in /team/rbrindley/welcome...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Nov 26 14:17:27 CST 2008
Author: rbrindley
Date: Wed Nov 26 14:17:27 2008
New Revision: 4229
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4229
Log:
- added parking lot load javascript
- added parking lot html
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=4229&r1=4228&r2=4229
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/welcome2.js (original)
+++ team/rbrindley/welcome_revamp/config/js/welcome2.js Wed Nov 26 14:17:27 2008
@@ -32,7 +32,6 @@
forcePlaceholderSize: true,
handle: 'div.handle',
items: '> div.content',
- opacity: 0.7,
placeholder: 'placeholder'
});
@@ -339,7 +338,30 @@
};
var loadParkingLot = function() {
-
+ var plot_tbody = $("#parking_lot_list > tbody");
+ plot_tbody.empty();
+
+ $.get( ASTGUI.paths.rawman, { action: 'ParkedCalls' }, function(op){
+ var chunks = ASTGUI.miscFunctions.getChunksFromManagerOutput(op, 1);
+
+ chunks.each( function( chunk ){
+ if( !chunk.hasOwnProperty('Event') || !chunk.hasOwnProperty('Exten') ) {
+ return;
+ }
+
+ var new_row = $("<tr></tr>");
+ $("<td></td>").html(chunk.CallerID).appendTo(new_row);
+ $("<td></td>").html(chunk.Channel).appendTo(new_row);
+ $("<td></td>").html(chunk.Exten).appendTo(new_row);
+ new_row.appendTo(plot_tbody);
+ });
+
+ if( $("#parking_lot_list > tbody > tr").length < 1 ) {
+ var new_row = $("<tr></tr>");
+ $("<td></td>").attr("colspan","3").html("No Parked Calls").appendTo(new_row);
+ new_row.appendTo(plot_tbody);
+ }
+ });
};
jQuery.delegate = function(rules) {
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=4229&r1=4228&r2=4229
==============================================================================
--- team/rbrindley/welcome_revamp/config/welcome2.html (original)
+++ team/rbrindley/welcome_revamp/config/welcome2.html Wed Nov 26 14:17:27 2008
@@ -93,6 +93,7 @@
div.content {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
+ background-color: #ffffff;
margin: 4px;
margin-top: 10px;
margin-bottom: 10px;
@@ -389,7 +390,19 @@
Parking Lot
</div>
<div class="clear"></div>
- <div class="body">Parking Lot placeholder!</div>
+ <div class="body">
+ <table id="parking_lot_list" class="list">
+ <thead>
+ <tr class="list_titles">
+ <th>Caller ID</th>
+ <th>Channel</th>
+ <th>Extension</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
<div id="sysstat_botright_container" class="info_container">
More information about the asterisk-gui-commits
mailing list