error autocomplete field element in GM Viz

Hello,
Well the problem is still there on version 3.5.1

Because filter elements in google maps viz view seem not defined the same as list view ,
my element "#listform_1_com_fabrik_1 .table___fabrikelement" can't be found in GM Viz (document.getElement(element) can't find the autocompleted input element and log "autocomplete didn't find input element")


I found a solution:
in media/com_fabrik/js/autocomplete js files
in initialize function

i add after "element = element.replace('-auto-complete', '');"
this line "element = element.split(" ")[1];"



The id seems to be the problem. With split function i can get the element only with class param (name of the fabrik element) and now it's ok

Matthias
 
Fixing it like that potentially cause problems elsewhere. All those selectors need to be constrained to the "render context" for that block of filters, like listform_2_com_fabrik_2, or visualization_3_com_fabrik_3, etc., as you can have multiple filter blocks on the same page (modules, component, content plugins).

I've made some changes in the element and list models locally to correct that selector, so it uses the correct render context to pass into the autocomplete JS init.

I'll commit the changes when I've tested them for a while.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top