| " + queue.getAttribute("format") + " | " +
+ "" + queue.getAttribute("collection") + " | " +
+ "" + queue.getAttribute("queue") + " | " +
+ "" + queue.getAttribute("playerCount") + " | " +
+ "" + formatPrice(queue.getAttribute("cost")) + " | " +
+ "
");
+
+ row.append(actionsField);
+
+ if (action == "add") {
+ $("table.queues", this.tablesDiv)
+ .append(row);
+ } else if (action == "update") {
+ $(".queue" + id, this.tablesDiv).replaceWith(row);
+ }
+ } else if (action == "remove") {
+ $(".queue" + id, this.tablesDiv).remove();
+ }
}
var tables = root.getElementsByTagName("table");
for (var i = 0; i < tables.length; i++) {
var table = tables[i];
var id = table.getAttribute("id");
- var gameId = table.getAttribute("gameId");
- var status = table.getAttribute("status");
- var watchable = table.getAttribute("watchable");
- var playersAttr = table.getAttribute("players");
- var formatName = table.getAttribute("format");
- var tournamentName = table.getAttribute("tournament");
- var players = new Array();
- if (playersAttr.length > 0)
- players = playersAttr.split(",");
- var winner = table.getAttribute("winner");
+ var action = table.getAttribute("action");
+ if (action == "add" || action == "update") {
+ var status = table.getAttribute("status");
- var tableDiv = this.appendTable(tablesTable, id, gameId, watchable, status, formatName, tournamentName, players, waiting, winner);
+ var gameId = table.getAttribute("gameId");
+ var statusDescription = table.getAttribute("statusDescription");
+ var watchable = table.getAttribute("watchable");
+ var playersAttr = table.getAttribute("players");
+ var formatName = table.getAttribute("format");
+ var tournamentName = table.getAttribute("tournament");
+ var players = new Array();
+ if (playersAttr.length > 0)
+ players = playersAttr.split(",");
+ var winner = table.getAttribute("winner");
+
+ var row = $("