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
JQuery Turbolinks Issue using AdminLTE Theme #563
Comments
I am not sure what TurboLinks is. Could you please clarify. Also, those are the same
Thanks! |
I had an issue with the page height when I clicked on button with turbolinks enabled, the height of layout just shrinked. To solve it I just called $.AdminLTE.layout.activate(); from the CoffeeScript:
|
I have the same problem. When I use a sidebar-toggle it works when I reload the page but not when I visit a new page and turbolink loads it. The @billp 's code does not work. |
Yes you are right, the code above works in some cases only.
|
This code works in coffeescript :
And the equivalent in JavaScript :
Thanks @billp |
Cheers 🍻 |
Works like a charm. Thank you. |
Thanks this saved me! |
If you are using turbolinks 5, change above a little:
|
It works like a charm, thanks @billp |
You can remove for me work well, Hope work well for you. thanks! |
Just in case someone will came here from hours of stackoverflowing, here's solution var ready = function () {
return $(window).trigger('resize');
};
document.addEventListener('turbolinks:load', ready); Add this to your js file (which will be included into |
…e properly in portrait
Use rails 5.1, turbolinks 5 and admin lte v 2.4.2 |
Hi guys please help me out with this issue |
nice, this works for me. |
On adminlte.js u can also modify the code below:
to
|
In my case had problems with PushMenu and Turbolinks // javascript/packs/application.js
global.$.AdminLTE = require("admin-lte")
$(document).on('turbolinks:load', function () {
$.AdminLTE.Layout._jQueryInterface.call($('body'));
}); w/ AdminLTE 3.1.0 and Rails 6 for other plugins you should probably change Layout with IFrame, etc... and maybe there is a faster way, but this was enough for me ;) |
I am using AdminLTE theme in my Rails project and have enabled Turbolinks, Everything is working fine except there is one issue that when i click on left menu my content-wrapper doesn't load properly instead i have to reload the page to load it properly. This is a very common issue in Turbolinks and we normally resolved by using
$(function () { /* ... / }); instead of $(document).on('ready', function () { / ... */ });
$(document).on('click', 'button', function() { ... }) instead of $ (document).on('click', 'button', function() { ... })
and
So far i have tried in app.js to but no effect can you please guide me where do i need to change to load view properly .
Thanks
The text was updated successfully, but these errors were encountered: