diff options
author | Sebastian Reichel <sre@ring0.de> | 2015-04-26 11:29:29 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2015-04-26 11:29:29 +0200 |
commit | 2dce2a49d5ca580d036b14b04612182411988572 (patch) | |
tree | bb13611abeb1a3c0d6b8844240dd5f7a78e59a78 /inventory/static/chosen/chosen.jquery_ready.js | |
parent | 57a827ee21921942df659f2e0f94473d8a731ac0 (diff) | |
parent | 1ed153fa3952a0f06dbf657c269ad92ab00cf8c7 (diff) | |
download | ktt-inventory-system-2dce2a49d5ca580d036b14b04612182411988572.tar.bz2 |
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'inventory/static/chosen/chosen.jquery_ready.js')
-rw-r--r-- | inventory/static/chosen/chosen.jquery_ready.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/inventory/static/chosen/chosen.jquery_ready.js b/inventory/static/chosen/chosen.jquery_ready.js new file mode 100644 index 0000000..65308b8 --- /dev/null +++ b/inventory/static/chosen/chosen.jquery_ready.js @@ -0,0 +1,24 @@ +(function ($) { + $(function () { + $(".chzn-select").each(function(i, select) { + var $select = $(select); + + // Set overflow:visible on parent .form-row for django admin + $select.parents('.form-row').css('overflow', 'visible'); + + if (typeof grappelli == 'object') { + // Set overflow:visible on grappelli fieldset.module .row + $select.parents('.row').filter(function(i) { + return $(this).parent('fieldset.module').length; + }).css('overflow', 'visible'); + // Set overflow:visible on grappelli tabular module + $select.parents('td').filter(function(i) { + return $(this).parent('.module.table').length; + }).css('overflow', 'visible'); + } + + // Initialize Chosen + $select.chosen(); + }); + }); +})((typeof window.django != 'undefined') ? django.jQuery : jQuery);
\ No newline at end of file |