25 lines
542 B
JavaScript
25 lines
542 B
JavaScript
function initSelect2()
|
|
{
|
|
$(".select2").select2({
|
|
placeholder: "Select a value",
|
|
allowClear: true
|
|
});
|
|
}
|
|
|
|
|
|
function initChosen()
|
|
{
|
|
$(".chosen-select").chosen({ no_results_text: translate.getText.no_result });
|
|
$(".chosen-search").append('<i class="glyph-icon icon-search"></i>');
|
|
$(".chosen-single div").html('<i class="glyph-icon icon-caret-down"></i>');
|
|
$(".chosen-container-single").addClass('styled');
|
|
}
|
|
|
|
function resetChosen()
|
|
{
|
|
$('.chosen-select').each(function() {
|
|
$(this).val("").trigger("chosen:updated");
|
|
});
|
|
}
|
|
|