Currently, the module always appends the fac-results to $(this).closest('form').

Depending on the design, this is not always ideal. I was thinking to make this a setting. That way, one could call the fastAutocomplete() function with this extra option.

I'm happy to post a patch but wanted to check with maintainers about this approach.

Comments

askibinski created an issue. See original summary.

askibinski’s picture

Status: Active » Needs review
StatusFileSize
new2.15 KB

Here is a patch which adds a setting for the jQuery selector. If left empty the default method (closest form) is used.

askibinski’s picture

(double post)

Status: Needs review » Needs work

The last submitted patch, 2: fac-setting-appendto-2715853-2.patch, failed testing.

askibinski’s picture

This patch needs a bit work because the onmousedown event for the SeeAllLinks button doesn't work anymore if you inject the results in a different spot. That's because the js looks for a closest form relative from the seeAlllink.

I would not like to add another setting for the search-form, since it kinda overlaps with the "Inputs to enable Fast Autocomplete on" settings. Problem is the latter can be multiple elements and also isn't available as an option yet.

Thoughts?

mbroere’s picture

StatusFileSize
new5.32 KB

Thanks for the patch askibinski. I adjusted it so the seeAllLink also keeps working when the result location is set. The input for the result location also checks if unwanted space or comma are used.

marty2081’s picture

Status: Needs work » Needs review

  • Marty2081 committed 1d47b41 on 7.x-1.x authored by mbroere
    Issue #2715853 by askibinski, mbroere: Setting for appendTo element
    

Status: Needs review » Needs work

The last submitted patch, 6: setting_for_appendto-2715853-6.patch, failed testing.

marty2081’s picture

Status: Needs work » Fixed

Committed to dev. Thanks for both patches and sorry for the late response.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

askibinski’s picture

StatusFileSize
new2.61 KB

Just posting this additional patch here for reference, making the form submit selector configurable.

(no need for further action)

ralphvdhoudt’s picture

Fix solution #7 for usage after applying #2

@Marty208: Should I open a new ticket for this?

joshahubbers’s picture

Modified the patch in #13 to work with the latest version of the module.

joshahubbers’s picture

StatusFileSize
new2.13 KB

Duh, posted the wrong patch. Excuse me!