VRFS-633 bug fixes

This commit is contained in:
Brian Smith 2013-09-08 19:57:38 -04:00
parent 7620b635c3
commit 68b68872e1
1 changed files with 13 additions and 6 deletions

View File

@ -105,12 +105,11 @@
}
});
var $unusedMusicInputs = $('#audio-inputs-unused > option:selected');
// Track 1 Add
var $imgTrack1Add = $('#img-track1-input-add');
$imgTrack1Add.unbind("click");
$imgTrack1Add.click(function() {
var $unusedMusicInputs = $('#audio-inputs-unused > option:selected');
_handleTrackInputAdd($unusedMusicInputs, '#track1-input');
});
@ -118,6 +117,7 @@
var $imgTrack2Add = $('#img-track2-input-add');
$imgTrack2Add.unbind("click");
$imgTrack2Add.click(function() {
var $unusedMusicInputs = $('#audio-inputs-unused > option:selected');
_handleTrackInputAdd($unusedMusicInputs, '#track2-input');
});
@ -274,26 +274,33 @@
}
function voiceChatChanged() {
var voiceChatVal = $('#voice-chat-type').val();
if (voiceChatVal == VOICE_CHAT.NO_CHAT) {
_addSelectedVoiceInputsToMusicInputs();
$('#voice-inputs-unused').empty();
$('#voice-inputs-selection').empty();
}
else if (voiceChatVal == VOICE_CHAT.CHAT) {
$('#voice-inputs-unused').empty();
$('#voice-inputs-selection').empty();
context.JK.loadOptions($('#template-option').html(), $('#voice-inputs-unused'), chatOtherUnassignedList, "id", "name", -1);
context.JK.loadOptions($('#template-option').html(), $('#voice-inputs-selection'), chatOtherAssignedList, "id", "name", -1);
}
else if (voiceChatVal == VOICE_CHAT.SESSION) {
$('#voice-inputs-unused').empty();
$('#voice-inputs-selection').empty();
$('#audio-inputs-unused').each(function(key, value) {
if ($('#voice-inputs-unused > option[value="' + key + '"]').length === 0) {
$('#voice-inputs-unused').append($('<option>', { value: key, text: value }));
$('#voice-inputs-unused').append('<option value="' + key + '">' + value + '</option>');
}
});
}
else if (voiceChatVal == VOICE_CHAT.MIC) {
_addSelectedVoiceInputsToMusicInputs();
$('#voice-inputs-unused').empty();
$('#voice-inputs-selection').empty();
}
@ -307,7 +314,7 @@
// if this input is not in the available music inputs box and the current selection is not voice devices, add
// it to the unused music inputs box
if ($('#audio-inputs-unused > option[value="' + key + '"]').length === 0 && currentVoiceChat != VOICE_CHAT.CHAT) {
$('#audio-inputs-unused').append($('<option>', { value: key, text: value }));
$('#audio-inputs-unused').append('<option value="' + key + '">' + value + '</option>');
}
});
}
@ -420,7 +427,7 @@
if (chatOption == VOICE_CHAT.SESSION) {
$('#audio-inputs-unused').each(function(key, value) {
if ($('#voice-inputs-unused > option[value="' + key + '"]').length === 0) {
$('#voice-inputs-unused').append($('<option>', { value: key, text: value }));
$('#voice-inputs-unused').append('<option value="' + key + '">' + value + '</option>');
}
});
}