From fcb754818b07a4a99debf3fcfa82204015ff3935 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 27 Feb 2018 10:31:53 +0000 Subject: [PATCH] ui: it takes new settings, but doesn't redraw... sure #1689 --- src/opnsense/www/js/opnsense_ui.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/opnsense/www/js/opnsense_ui.js b/src/opnsense/www/js/opnsense_ui.js index 487bc4e9f..a9593a2a1 100644 --- a/src/opnsense/www/js/opnsense_ui.js +++ b/src/opnsense/www/js/opnsense_ui.js @@ -164,10 +164,18 @@ function formatTokenizersUI() { number_of_items = $(this).prop("size"); maxDropdownHeight=String(36*number_of_items)+"px"; } + hint=$(this).data("hint"); width=$(this).data("width"); + allownew=$(this).data("allownew"); + nbDropdownElements=$(this).data("nbdropdownelements"); maxTokenContainerHeight=$(this).data("maxheight"); - $tokenizer = $(this).tokenize(); + $tokenizer = $(this).tokenize({ + displayDropdownOnFocus: true, + newElements: allownew, + nbDropdownElements: nbDropdownElements, + placeholder:hint + }); $tokenizer.resizeSearchInput(); $tokenizer.remap(true); $tokenizer.updatePlaceholder();