VRFS-705 fix issue with input disappearing
This commit is contained in:
parent
e0cfe9cb6e
commit
ecd247c1f7
|
|
@ -273,17 +273,17 @@
|
|||
}
|
||||
|
||||
function isChatInput(id) {
|
||||
// copy the arrays since $.grep modifies them
|
||||
// copy the arrays
|
||||
var chatOtherUnassignedListCopy = chatOtherUnassignedList;
|
||||
var chatOtherAssignedListCopy = chatOtherAssignedList;
|
||||
|
||||
// is this input in the unassigned list?
|
||||
$.grep(chatOtherUnassignedListCopy, function(n,i){
|
||||
chatOtherUnassignedListCopy = $.grep(chatOtherUnassignedListCopy, function(n,i){
|
||||
return n.chat && n.id === id;
|
||||
});
|
||||
|
||||
// is this input in the assigned list?
|
||||
$.grep(chatOtherAssignedListCopy, function(n,i){
|
||||
chatOtherAssignedListCopy = $.grep(chatOtherAssignedListCopy, function(n,i){
|
||||
return n.chat && n.id === id;
|
||||
});
|
||||
|
||||
|
|
@ -332,6 +332,7 @@
|
|||
// add each unused music input if it doesn't already exist
|
||||
$('#audio-inputs-unused > option').each(function() {
|
||||
if ($('#voice-inputs-unused > option[value="' + this.value + '"]').length === 0) {
|
||||
logger.debug("Appending " + this.value + " to the unused voice input box.");
|
||||
$('#voice-inputs-unused').append('<option value="' + this.value + '">' + this.text + '</option>');
|
||||
}
|
||||
});
|
||||
|
|
@ -343,6 +344,7 @@
|
|||
// if this input is not already in the available music inputs box and the selected input is not chat input, add
|
||||
// it to the unused music inputs box
|
||||
if ($('#audio-inputs-unused > option[value="' + this.value + '"]').length === 0 && !isChatInput(this.value)) {
|
||||
logger.debug("Appending " + this.value + " to the unused audio input box.");
|
||||
$('#audio-inputs-unused').append('<option value="' + this.value + '">' + this.text + '</option>');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue