Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jQuery UI for search #1305

Conversation

jessedobbelaere
Copy link
Member

  • Remove jQuery UI in frontend.
  • Move the search functionality to the search module instead of the frontend.js file.
  • When the search module/widget is used on a page, typeahead.js & bloodhound is loaded and used to autocomplete the search results.

Warning: jQuery UI is used in the frontend for search autocomplete and datepicker fallback (from html5 datepickers). So there should be a solution for datepickers. Or just remove the jquery ui datepicker fallback from the frontend.js and leave only the html5 datepicker? Webdevelopers using forkcms should use pickadate.js or similar when creating datepickers.

Preview with typeahead.js:

No real changes noticeable. Wrote some css that's similar to the previous forkcms search autocomplete.

schermafbeelding 2015-10-04 om 01 48 33

Resolves #1303

@WouterSioen
Copy link
Member

Can't you use a minified version of typeahead.bundle.js?

I'd also add a if ($.isFunction($.fn.datepicker)) around the datepicker code in the frontend.
This way, frontenders can still add jquery ui (or another library if they want) on pages containing a datepicker.

@jessedobbelaere
Copy link
Member Author

@WouterSioen I added the minified version and datepicker check :-)

@WouterSioen
Copy link
Member

great 👍

@WouterSioen
Copy link
Member

I've tested this and it works great 👍

WouterSioen added a commit that referenced this pull request Dec 21, 2015
…I-autocomplete

Remove jQuery UI for search
@WouterSioen WouterSioen merged commit 330befa into forkcms:master Dec 21, 2015
@jessedobbelaere jessedobbelaere deleted the feature/Replace-jqueryUI-autocomplete branch July 19, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants