Open ghost opened 7 years ago
I didn't heavily test. Which specific page and dropdown menu are you looking at? Are you able to see it working from the demo app I published? https://github.com/mwlang/gentelella-rails-demo
@buffalods any luck?
I encountered the same issue. I just did a fresh install of both projects and got up and running nicely. The dropdowns don't work. It seem like they're not getting setup after document load.
Calling
makes them work.
I had no warnings. This is using Safari 10.0 and also Chrome Version 56.0.2924.87 (64-bit)
Other things are broken too (like modal windows). I forked the projects and am going to see if I can address this issue. I'd like to give the Gentelella admin UI for both an OSS as well as work project so I'm quite keen to make this work well.
@jayjlawrence thanks for the detailed info. With that, I was able to quickly fix. I've pushed a new release 0.1.1 and the fix is on master branch as well.
I think that the bootstrap init javascript isn't loading late enough in the chain. Reopening this one to look into also fixing modal windows, etc.
I also encountered similar problems, how to solve it ?.
I found the root cause to this problem. Turns out I made a mistake including "bootstrap-sprockets" AND "bootstrap" in the gem's main coffee script file that pulls in all the various dependencies. Removing the "bootstrap-sprockets" line resolved dropdowns, modals, and other bootstrap JS dependent functionality.
Both this gem and the demo project are updated.
@mwlang it's back
gem version 0.1.11, confirmed that 'gentellela-custom' is the last piece of javascript to be loaded. When I copypaste the whole script into dev console functionality is restored. Looks like something is fishy with regards to how sprockets are bundling all this.
Also tried replacing document.ready(...
with document.on('turbolinks:load', ...
- still no luck. If you ever get around to looking at this issue please advice on what would be the best course of action to debug this.
The problem turned out to be, as usual, caused by turbolinks and no longer existing JS globals.
The simplest solution is to just wrap the whole damned thing in $(document).on('turbolinks:load', function() {...});
similar issue need help really stuck on this non working menu
@kirillseva and @hatens Sorry for my non-responsiveness on this. I've been under a heavy workload for a while. from the sounds of it, it does sound like a turbo-link issue. It may not be a document-load/ready issue, but a rather firing the correct event against turbo-links when menus are clicked. I cannot rightly recall exactly the turbo-link mechanism for this off the top of my head, but wanted to offer this quick suggestion as it may be some time before I can circle back to this and review in-depth.
Also, if one of you would put up a non-working example project that demonstrates the broken feature, I can review a bit quicker!
@mwlang this turbo link issue also affects the navigation? and what can be the measure to solve this temporarily before a solution is found?
var CURRENT_URL = window.location.href.split('#')[0].split('?')[0]
Why not: var CURRENT_URL = window.location.origin + window.location.pathname
?
I followed the instructions to the letter, but the dropdown menus don't work. Is there something I am missing?