zhoupan / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

JMesa uses $ in generated code, despite jQuery.noConflict #304

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow the AjaxTutorial to setup pagination
2. On the same page, include another library like MooTools and call 
jQuery.noConflict()

What is the expected output? What do you see instead?
When the page loads, the table will display fine, but FireBug will display the 
following error:
$(document)ready is not a function

What version of the product are you using? On what operating system?
JMesa 3.0.3 and JQuery 1.4.2. Windows XP, Firefox 3.6.13

Please provide any additional information below.
I did a view source on the page and noticed that some JMesa-generated 
javascript code uses the $ syntax for generated jquery code.  This should not 
be done since I'm doing jQuery.noConflict.  Is there a setting in the config 
file where I call tell JMesa to not use $ for the generated jquery code...?

Specifically, JMesa server-side generates the following jQuery code:

$(document).ready(function(){
    jQuery.jmesa.addTableFacade('myTable');
    jQuery.jmesa.setMaxRowsToLimit('myTable','15');
    ... (snipped) ...
});

Original issue reported on code.google.com by vd7341...@yahoo.com on 15 Feb 2011 at 3:42

GoogleCodeExporter commented 9 years ago
That is a bug!

What you can do is either turn off the document ready feature in your 
preferences file like this:

html.snippets.initJavascriptLimit.useDocumentReady=true

http://code.google.com/p/jmesa/wiki/Preferences

Or I can do a build for you. I have a few changes on the trunk that I needed 
for a project that I have yet to release.

If you want me to sent you a build I can get that out to you right away. Just 
send me an email at jeff.johnston.mn@gmail.com.

Original comment by jeff.johnston.mn@gmail.com on 15 Feb 2011 at 5:22

GoogleCodeExporter commented 9 years ago
This is fixed and on the trunk.

Original comment by jeff.johnston.mn@gmail.com on 9 Mar 2011 at 7:19