From 841d3b67bd911900911831e29b5d3365e8327e85 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 31 Dec 2012 20:22:59 +0000 Subject: [PATCH] If chosen is loaded, trigger update of contents. --- etemplate/js/etemplate.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etemplate/js/etemplate.js b/etemplate/js/etemplate.js index 6f52ea4b1b..d53cfaeb53 100644 --- a/etemplate/js/etemplate.js +++ b/etemplate/js/etemplate.js @@ -124,6 +124,11 @@ function selectbox_add_option(id,label,value,do_onchange) selectBox.options[selectBox.length] = new Option(label,value,false,true); } if (selectBox.onchange && do_onchange) selectBox.onchange(); + + // If chosen is loaded, trigger update + if(selectBox && $j().chosen) { + $j(selectBox).trigger("liszt:updated"); + } } /* toggles all checkboxes named name in form form, to be used as custom javascript in onclick of a button/image */