From 3f000b9d54df60ef094d98d0f8cd9fe0f2d96581 Mon Sep 17 00:00:00 2001 From: ibuler Date: Sat, 28 Nov 2015 22:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9role=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/jperm/perm_role_add.html | 2 +- templates/jperm/perm_role_edit.html | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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]); +}