From 91f6dcc3ab4c3d7ddab852cc7ec029427b1b2416 Mon Sep 17 00:00:00 2001 From: Jonathon Wilson Date: Wed, 4 Sep 2013 22:24:28 -0600 Subject: [PATCH] VRFS-552. Support multiple tracks for user on same client. --- app/assets/javascripts/session.js | 36 ++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/session.js b/app/assets/javascripts/session.js index 2cd3dcf70..080b2e5f1 100644 --- a/app/assets/javascripts/session.js +++ b/app/assets/javascripts/session.js @@ -135,7 +135,7 @@ .fail(function(xhr, textStatus, errorMessage) { if(xhr.status == 404) { // we tried to join the session, but it's already gone. kick user back to join session screen - window.location = "#/findSession" + context.window.location = "#/findSession"; app.notify( { title: "Unable to Join Session", text: "The session you attempted to join is over." @@ -144,14 +144,14 @@ }else { app.ajaxError(xhr, textStatus, errorMessage); } - }) + }); } function beforeHide(data) { // track that the screen is inactive, to disable body-level handlers screenActive = false; sessionModel.leaveCurrentSession() - .fail(app.ajaxError) + .fail(app.ajaxError); } function sessionChanged() { @@ -214,14 +214,16 @@ // TODO FIXME - This needs to support multiple tracks for an individual // client id and group. - function _mixerForClientId(clientId, groupIds) { + function _mixerForClientId(clientId, groupIds, usedMixers) { var foundMixer = null; $.each(mixers, function(index, mixer) { if (mixer.client_id === clientId) { for (var i=0; i