diff --git a/APPL/Localscripts/FcltJquery.js b/APPL/Localscripts/FcltJquery.js
index f2f12d0af8..1f41f805b6 100644
--- a/APPL/Localscripts/FcltJquery.js
+++ b/APPL/Localscripts/FcltJquery.js
@@ -289,6 +289,45 @@ jQuery.fn.filterByText = function(textbox, selectSingleMatch) {
});
};
+// Add a clickable sign after a select element that when clicked
+// toggles the multiple attribute on the select box
+(function($){
+
+ $( document ).on('click', '.multi_select_toggle', function(e){
+ var sel_id = $(e.target).attr("fcltfor");
+ var selector = $('select#' + sel_id);
+ if (selector.length && selector[0].className.match(/^ui-/))
+ return; // Afblijven van jQuery calendar jaar listboxje
+ var old = selector.attr('multiple');
+ selector.attr('multiple', !old);
+ selector.attr('size', old?1:Math.min(selector.find("option").length, 8));
+ $(e.target).html(old?' »':' «');
+ })
+
+ $.fn.extend({
+ multiSelectToggle : function(options){
+ //Settings list and the default values
+ var defaults = {
+ label: ' »'
+ };
+
+ var options = $.extend(defaults, options);
+ return this.each(function() {
+ var span = $('').html(options.label).addClass('multi_select_toggle');
+ var lbl = $("label[for=" + this.id + "]")
+ if (lbl.length)
+ $(lbl).after(span);
+ else
+ $(this).after(span);
+ });
+ }
+ });
+ $(function () {
+ $('select[fcltmulti=1]').multiSelectToggle();
+ });
+
+})(jQuery);
+
if (window.fcltfilters)
{
$(function ()
diff --git a/APPL/SCF/scaffolding_search.inc b/APPL/SCF/scaffolding_search.inc
index 8f17f5de5d..87edfdf5c2 100644
--- a/APPL/SCF/scaffolding_search.inc
+++ b/APPL/SCF/scaffolding_search.inc
@@ -67,32 +67,6 @@ function scaffolding_search(model, scf_params)
event.stopPropagation();
})
});
- // Add a clickable sign after a select element that when clicked
- // toggles the multiple attribute on the select box
- (function($){
- $.fn.extend({
- multiSelectToggle : function(options){
- //Settings list and the default values
- var defaults = {
- label: ' »'
- };
-
- var options = $.extend(defaults, options);
-
- $( document ).on('click', $('.multi_select_toggle'), function(e){
- var selector = $(e.target).prev('select');
- if (selector.length && selector[0].className.match(/^ui-/))
- return; // Afblijven van jQuery calendar jaar listboxje
- var old = selector.attr('multiple');
- selector.attr('multiple', !old);
- selector.attr('size', old?1:Math.min(selector.find("option").length, 8));
- $(selector).next().html(old?' »':' «');
- })
- var span = $('').html(options.label).addClass('multi_select_toggle');
- $(this).after(span);
- }
- });
- })(jQuery);
// where needed
$(function($){
diff --git a/APPL/Shared/selector.inc b/APPL/Shared/selector.inc
index 5c88236e30..17e751726a 100644
--- a/APPL/Shared/selector.inc
+++ b/APPL/Shared/selector.inc
@@ -95,8 +95,8 @@ function FCLTselector(fieldName, sql, params)
%>