diff --git a/templates/jperm/perm_role_add.html b/templates/jperm/perm_role_add.html index d62ab05b6..8579b6534 100644 --- a/templates/jperm/perm_role_add.html +++ b/templates/jperm/perm_role_add.html @@ -115,7 +115,7 @@ $('#roleForm').validator({ valid: function(form) { form.submit(); } -}) +}); var config = { '.chosen-select' : {}, diff --git a/templates/jperm/perm_role_edit.html b/templates/jperm/perm_role_edit.html index 2b1783b56..90bd59a87 100644 --- a/templates/jperm/perm_role_edit.html +++ b/templates/jperm/perm_role_edit.html @@ -107,7 +107,19 @@ $('#roleForm').validator({ valid: function(form) { form.submit(); } -}) +}); + +var config = { + '.chosen-select' : {}, + '.chosen-select-deselect' : {allow_single_deselect:true}, + '.chosen-select-no-single' : {disable_search_threshold:10}, + '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'}, + '.chosen-select-width' : {width:"95%"} + }; + +for (var selector in config) { + $(selector).chosen(config[selector]); +}