Commit f0b6829f authored by Jos Schellevis's avatar Jos Schellevis

mvc fix tokenizer

parent 44b610ab
...@@ -442,6 +442,7 @@ ...@@ -442,6 +442,7 @@
if($('option[value="' + value + '"]', this.select).length){ if($('option[value="' + value + '"]', this.select).length){
$('option[value="' + value + '"]', this.select).attr('selected', 'selected'); $('option[value="' + value + '"]', this.select).attr('selected', 'selected');
$('option[value="' + value + '"]', this.select).prop("selected", true);
} else if(this.options.newElements || (!this.options.newElements && $('li[data-value="' + value + '"]', this.dropdown).length > 0)) { } else if(this.options.newElements || (!this.options.newElements && $('li[data-value="' + value + '"]', this.dropdown).length > 0)) {
var option = $('<option />') var option = $('<option />')
.attr('selected', 'selected') .attr('selected', 'selected')
......
...@@ -25,9 +25,7 @@ function getFormData(parent) { ...@@ -25,9 +25,7 @@ function getFormData(parent) {
// selectbox, collect selected items // selectbox, collect selected items
var tmp_str = ""; var tmp_str = "";
$(this).children().each(function(index){ $(this).children().each(function(index){
// normally this should use prop, but this sometimes seem to return incorrect data.... if ($(this).prop("selected")){
// maybe replace this with a later version of jquery. tested with 1.11.2
if ($(this).attr("selected") != undefined){
if (tmp_str != "") tmp_str = tmp_str + ","; if (tmp_str != "") tmp_str = tmp_str + ",";
tmp_str = tmp_str + $(this).val(); tmp_str = tmp_str + $(this).val();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment