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

Comments the deform.load since it's documented that the HTML should call it #156

Closed
wants to merge 6 commits into from

Conversation

mvaled
Copy link

@mvaled mvaled commented Apr 15, 2013

Since the deform.js script needs to be loaded before the HTML, using $ here impedes
that we place the jquery script at the end of the page.

Furthermore is documented in http://docs.pylonsproject.org/projects/deform/en/latest/basics.html#serving-up-the-rendered-form that the HTML should call deform.load() at will and suggest doing it at the end of the page.

…all it.

Since this script needs to be loaded before the HTML, using `$` here impedes
that we place the jquery script at the end of the page.
@tseaver
Copy link
Member

tseaver commented May 6, 2013

While I don't know enough to say whether the substantive part of the change is correct (removing the deferred call to 'deform.load()', I do know that we should not check it in commented-out: either it stays or it goes.

@mvaled
Copy link
Author

mvaled commented May 6, 2013

@tseaver That's right. IMO it should go away. I will remove the comments so that discussion happens here.

@mcdonc
Copy link
Member

mcdonc commented Oct 4, 2013

I think the call to deform.load needs to stay in deform.js, and the docs need to be changed to say to not call it via the HTML.

@mvaled
Copy link
Author

mvaled commented Oct 7, 2013

@mcdonc I think leaving this call reduces your options as programmer. The documentation should be amended not only by removing the need to call deform.load(), but also adding that you must ensure jQuery is loaded before deform.js...

@mvaled
Copy link
Author

mvaled commented Nov 18, 2013

Hi,

Do you think is this going to be merged?

I find my self struggling with this three lines every time I update/deploy a system that happens to use the script tag to load jQuery tag at the bottom of the body... Usually I just remove the three lines by hand but this is tedious and I always forget to do it, until the error pops in my face...

I'm thinking if the right way would be to provide a switch/middleware to inject the deform.load() call automatically... Would this help to make this go into upstream?

@tisdall
Copy link
Contributor

tisdall commented Jul 15, 2014

Might I suggest a change like I mentioned in #215. It allows things to default to the current implementation, but provides a hook to allow people to load jquery at the end of a document.

@tisdall
Copy link
Contributor

tisdall commented Aug 8, 2014

@mvaled I'd appreciate some support on #229 to hopefully get things moving along on this issue. I find it quite annoying too.

@mvaled
Copy link
Author

mvaled commented Aug 8, 2014

I'm closing this PR in favor of pull request #229, which is nicer.

@mvaled mvaled closed this Aug 8, 2014
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

Successfully merging this pull request may close these issues.

4 participants