diff options
-rw-r--r-- | index.html | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -85,8 +85,6 @@ group_carts.push(cart); } ); - - updateShowListing(); } function updateShowCartList(data, status, req) { @@ -94,13 +92,12 @@ var cartlist = $(data).find("logList"); var carts = cartlist.children(); carts.each(function() { - show_carts.push($(this).find('cartNumber').text()); + var number = $(this).find('cartNumber').text(); + if(number >= 100000) { // TODO: hardcoded value.... + show_carts.push(number); + } } ); - - group_carts = []; - data = { COMMAND: 6, LOGIN_NAME: username, PASSWORD: token, GROUP_NAME: current_show.group, INCLUDE_CUTS: 1 }; - $.post("/rd-bin/rdxport.cgi", data, updateGroupCartList, "xml"); } function showSelectedShow() { @@ -114,9 +111,22 @@ show_carts = []; data = { COMMAND: 22, LOGIN_NAME: username, PASSWORD: token, NAME: current_show.log }; - $.post("/rd-bin/rdxport.cgi", data, updateShowCartList, "xml"); + scd = $.post("/rd-bin/rdxport.cgi", data, updateShowCartList, "xml"); + + group_carts = []; + data = { COMMAND: 6, LOGIN_NAME: username, PASSWORD: token, GROUP_NAME: current_show.group, INCLUDE_CUTS: 1 }; + gcd = $.post("/rd-bin/rdxport.cgi", data, updateGroupCartList, "xml"); + + $.when(scd, gcd).done( + function(scres, gcres) { + if(scres[1] == 'success' && gcres[1] == 'success') { + updateShowListing(); + } + } + ); } + function updateShowsList(data, status, req) { shows_list = []; $('#show-selector').find('option').remove(); |