Closed wubr closed 9 years ago
Sorry, I understood nothing.
Can you please say exactly what message you see, where, when. Versions of Rails and WiceGrid are also appreciated. Stacktraces are welcome
Apologies, I'll try to be clearer:
wice_grid 3.4.2 - and rails 4.2.0, Ruby 2.2.0.
When running in development, the linked code inserts into the rendered page a function assignment to window.onload which interferes with external pre-existing assignments of window.onload.
In my case, I'm using lazy_high_charts (1.5.4) on the same page I'm putting a wice_grid on, and because wice_grid's window.onload is present it is preventing the charts' window.onload from being run and the charts do not appear.
It's a helpful message when wice_grid isn't installed properly, but it would be nice if I could disable it once I don't need the reminder. If there's a different way to make the window.onloads play nicely together I'd probably be for that too.
You are right. This piece of code has been there since Rails 2 pre-jquery times (yes, WiceGrid is that old).
Thank you for you report, I will replace it by $(document).ready
check version 3.4.12 out
Looks good - thanks!
I'm running into an instance where the development environment 'wice_grid.js is not loaded...' message from wice_grid_view_helpers.rb:464-473 is overriding an otherwise completely separate window.onload function set earlier in the page.
A configuration option to withhold the message or other code change to allow other onloads to co-exist would be helpful.