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

Ability to turn off "wice_grid.js not loaded" message #82

Closed
asgeo1 opened this issue Jan 14, 2013 · 3 comments
Closed

Ability to turn off "wice_grid.js not loaded" message #82

asgeo1 opened this issue Jan 14, 2013 · 3 comments
Assignees

Comments

@asgeo1
Copy link
Contributor

asgeo1 commented Jan 14, 2013

I like to load my JS assets at the bottom of my page, not in the head.

If I do that, then I get a JS error from the following code wicegrid inserts mid-way into the page:

//<![CDATA[
$(document).ready(function(){ 
  if (typeof(WiceGridProcessor) == "undefined"){
    alert("wice_grid.js not loaded, WiceGrid cannot proceed!\n" +
      "Make sure that you have loaded wice_grid.js.\n" +
      "Add line\n//= require wice_grid.js\n" +
      "to app/assets/javascripts/application.js")
    }
  }) 
//]]>

because "$ is undefined".

I know it only inserts this message in development, but it's still annoying.

Could you put a setting in somewhere so it can be turned off?

@ghost ghost assigned leikind Jan 15, 2013
@leikind
Copy link
Owner

leikind commented Jan 15, 2013

I think the correct solution would be to rewrite $(document).ready in plain javascript without jQuery

@leikind
Copy link
Owner

leikind commented Jan 21, 2013

Please verify if version 3.2.1.pre3 fixes the problem http://rubygems.org/gems/wice_grid/versions/3.2.1.pre3

@leikind leikind closed this as completed Jan 23, 2013
@webchi
Copy link

webchi commented Mar 15, 2016

Still have this error at 3.6.0.pre4

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

No branches or pull requests

3 participants