mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
ui: remap manually instead of flushing for #1689
This commit is contained in:
parent
40f95a7a91
commit
4e80fa931d
@ -156,31 +156,22 @@ function updateServiceStatusUI(status) {
|
||||
/**
|
||||
* reformat all tokenizers on this document
|
||||
*/
|
||||
function formatTokenizersUI(){
|
||||
// remove old tokenizers (if any)
|
||||
$('div[class="tokenize Tokenize"]').each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$('select[class="tokenize"]').each(function(){
|
||||
function formatTokenizersUI() {
|
||||
$('select[class="tokenize"]').each(function () {
|
||||
if ($(this).prop("size")==0) {
|
||||
maxDropdownHeight=String(36*5)+"px"; // default number of items
|
||||
|
||||
} else {
|
||||
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");
|
||||
|
||||
$(this).tokenize({
|
||||
displayDropdownOnFocus: true,
|
||||
newElements: allownew,
|
||||
nbDropdownElements: nbDropdownElements,
|
||||
placeholder:hint
|
||||
});
|
||||
$tokenizer = $(this).tokenize();
|
||||
$tokenizer.resizeSearchInput();
|
||||
$tokenizer.remap(true);
|
||||
$tokenizer.updatePlaceholder();
|
||||
|
||||
$(this).parent().find('ul[class="TokensContainer"]').parent().css("width",width);
|
||||
$(this).parent().find('ul[class="Dropdown"]').css("max-height", maxDropdownHeight);
|
||||
if ( maxDropdownHeight != undefined ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user