rbrindley: branch rbrindley/welcome_revamp r4236 - /team/rbrindley/welcome_re...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Nov 28 21:34:28 CST 2008
Author: rbrindley
Date: Fri Nov 28 21:34:26 2008
New Revision: 4236
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4236
Log:
- added pushRow function to welcome2.js
- applied pushRow to parking lot load function
Modified:
team/rbrindley/welcome_revamp/config/js/welcome2.js
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=4236&r1=4235&r2=4236
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/welcome2.js (original)
+++ team/rbrindley/welcome_revamp/config/js/welcome2.js Fri Nov 28 21:34:26 2008
@@ -356,19 +356,26 @@
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);
+ pushRow( plot_tbody, array {
+ chunk.CallerID,
+ chunk.Channel,
+ chunk.Exten
+ });
});
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);
+ pushRow( plot_tbody, array {"No Parked Calls"});
}
});
+};
+
+var pushRow = function(tbody, cells) {
+ var new_row = $("<tr></tr>");
+ for (var i=0; i < cells.length; i++) {
+ $("<td></td>").html(cells[i]).appendTo(new_row);
+ }
+
+ new_row.appendTo(tbody);
};
jQuery.delegate = function(rules) {
More information about the asterisk-gui-commits
mailing list