CC-4180: Smart Playlist Builder: modifier select boxes do not change when criteria changes
-fixed
This commit is contained in:
parent
50f9582b95
commit
3a4a827f1f
|
@ -429,26 +429,27 @@ function sizeTextBoxes(ele, classToRemove, classToAdd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateModifierSelect(e) {
|
function populateModifierSelect(e) {
|
||||||
/*var criteria = $(e).val(),
|
|
||||||
criteria_type = criteriaTypes[criteria],*/
|
|
||||||
var criteria_type = getCriteriaOptionType(e),
|
var criteria_type = getCriteriaOptionType(e),
|
||||||
div = $(e).siblings('select[id^="sp_criteria_modifier"]');
|
index = getRowIndex($(e).parent()),
|
||||||
|
divs = $(e).parents().find('select[id^="sp_criteria_modifier_'+index+'"]');
|
||||||
|
|
||||||
div.children().remove();
|
$.each(divs, function(i, div){
|
||||||
|
$(div).children().remove();
|
||||||
if (criteria_type == 's') {
|
|
||||||
$.each(stringCriteriaOptions, function(key, value){
|
if (criteria_type == 's') {
|
||||||
div.append($('<option></option>')
|
$.each(stringCriteriaOptions, function(key, value){
|
||||||
.attr('value', key)
|
$(div).append($('<option></option>')
|
||||||
.text(value));
|
.attr('value', key)
|
||||||
});
|
.text(value));
|
||||||
} else {
|
});
|
||||||
$.each(numericCriteriaOptions, function(key, value){
|
} else {
|
||||||
div.append($('<option></option>')
|
$.each(numericCriteriaOptions, function(key, value){
|
||||||
.attr('value', key)
|
$(div).append($('<option></option>')
|
||||||
.text(value));
|
.attr('value', key)
|
||||||
});
|
.text(value));
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCriteriaOptionType(e) {
|
function getCriteriaOptionType(e) {
|
||||||
|
|
Loading…
Reference in New Issue