nicolas-besnard/adminlte2-rails

app.js not compatible with turbolinks

esergion opened this issue · 9 comments

All of AdminLTE functions from app.js will work only on page refresh because off turbolinks gem.
It's possible to use jquery.turbolinks gem to fix that, but I think for future needs it should work out of box

I never had this issue before... I'll try to have a look this week :)

Hi @nicolas-besnard
This issue causes me a lot of headaches.
My problem was with the bootstrap dropdowns did not want to opened.
I had to remove TurboLink for all work well.

@calrrox That's really odd. I use this gem in 2 apps in production, I didn't have any issue (maybe I'm not using Bootstrap's dropdowns...)

Anyway, it's always good to remove Turbolink: I didn't like it.

I had to patch app.js to work with turbolinks, also Javascript import is to be moved to head
patch

When I moved the javascript to head, the navs (in cogs) stop working, So I decided to remove turbolinks too

@tachyons I'm thinking this is the issue that I'm having #13. Can you provide the steps that you did to correct your issue?

I'm having to refresh the page as well in order for the account drop-down to work. I removed the turbolinks gem but I'm still having the issue.

@mt-davis : Try my fork to check whether my approach is working for you https://github.com/tachyons/adminlte2-rails

I was just thinking I would try that. I'll give an update if that works. 

@tachyons I just wanted to give you an update to let you know that your solution worked. Thanks.