Skip to content
Snippets Groups Projects
Commit daa82206 authored by jaapjansma's avatar jaapjansma
Browse files

fixed #43 compare value

parent 265b29b2
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,7 @@
var field = cj('#field').val();
var field = field.replace(cj('#entity').val()+'_', "");
retrieveOptionsForEntityAndField(entity, field);
cj('#operator').trigger('change');
});
cj('#entity').change(function() {
......
......@@ -87,12 +87,12 @@
checked = 'checked="checked"';
selectedOptions[selectedOptions.length] = options[i].key;
}
if (value.key == currentSelectedOption) {
if (value.key == currentSelectedOption || (!currentSelectedOption && i == 0)) {
selected='selected="selected"';
selectedOption = options[i].key;
}
multi_select_options = multi_select_options + '<input type="checkbox" value="'+options[i].key+'" '+checked+'>'+options[i].value+'<br>';
select_options = select_options + '<option value="'+value.key+'" '+selected+'>'+options[i].value+'</option>';
select_options = select_options + '<option value="'+options[i].key+'" '+selected+'>'+options[i].value+'</option>';
}
cj('#value').val(selectedOption);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment