diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-10 18:38:38 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-10 18:38:38 +0200 |
commit | 82abbed883fa8452fc8f66c1f60a9644ce45c9b2 (patch) | |
tree | 64a52e15abe2fb796b049d171b7248ff3372e948 /core | |
parent | f43fd1765e7d399e144615c172eacc24f8636a11 (diff) | |
parent | c11f6cc3f9121fbb337c248807b802c72b18087b (diff) | |
download | nextcloud-server-82abbed883fa8452fc8f66c1f60a9644ce45c9b2.tar.gz nextcloud-server-82abbed883fa8452fc8f66c1f60a9644ce45c9b2.zip |
Merge branch 'master' into oc_error
Diffstat (limited to 'core')
-rw-r--r-- | core/js/multiselect.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/js/multiselect.js b/core/js/multiselect.js index 541dddf0f70..5f339006d26 100644 --- a/core/js/multiselect.js +++ b/core/js/multiselect.js @@ -57,8 +57,11 @@ element=$(element); var item=element.val(); var id='ms'+multiSelectId+'-option-'+item; - var input=$('<input id="'+id+'" type="checkbox"/>'); - var label=$('<label for="'+id+'">'+item+'</label>'); + var input=$('<input type="checkbox"/>'); + input.attr('id',id); + var label=$('<label/>'); + label.attr('for',id); + label.text(item); if(settings.checked.indexOf(item)!=-1 || checked){ input.attr('checked',true); } @@ -130,7 +133,10 @@ li.text('+ '+settings.createText); li.before(createItem(this)); var select=button.parent().next(); - select.append($('<option selected="selected" value="'+$(this).val()+'">'+$(this).val()+'</option>')); + var option=$('<option selected="selected"/>'); + option.attr('value',$(this).val()); + option.text($(this).val()); + select.append(optione); li.prev().children('input').trigger('click'); button.parent().data('preventHide',false); if(settings.createCallback){ |