Skip to content

Commit

Permalink
Fixed #1955
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Dec 7, 2016
1 parent 6c774ce commit 0dbac9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -38,9 +38,11 @@ PrimeFaces.widget.OrderList = PrimeFaces.widget.BaseWidget.extend({

this.list.children('.ui-orderlist-item').each(function() {
var item = $(this),
itemValue = item.data('item-value');
itemValue = item.data('item-value'),
option = $('<option selected="selected"></option>');

$this.input.append('<option value="' + itemValue + '" selected="selected">' + itemValue + '</option>');
option.prop('value', itemValue).text(itemValue);
$this.input.append(option);
});
},

Expand Down
Expand Up @@ -344,9 +344,11 @@ PrimeFaces.widget.PickList = PrimeFaces.widget.BaseWidget.extend({
var item = $(this),
itemValue = PrimeFaces.escapeHTML(item.attr('data-item-value')),
itemLabel = item.attr('data-item-label'),
escapedItemLabel = (itemLabel) ? PrimeFaces.escapeHTML(itemLabel) : '';

input.append('<option value="' + itemValue + '" selected="selected">' + escapedItemLabel + '</option>');
escapedItemLabel = (itemLabel) ? PrimeFaces.escapeHTML(itemLabel) : '',
option = $('<option selected="selected"></option>');

option.prop('value', itemValue).text(escapedItemLabel);
input.append(option);
});
},

Expand Down

0 comments on commit 0dbac9a

Please sign in to comment.