I saw in some post that Massimo said that we should not touch the
web2py_ajax.html.
I will try it out and see if I can get it working, but was just
wandering about that comment on a post.
I tried understanding all those response.files.insert APIs, but they
are given just a general description under core. How am I supposed to
know what each parameter means and how to use it properly if I am
given just a general description? Am I supposed to know these already
before trying web2py? Is there a more detailed documentation on it?
What does "[position integer]" mean in this case?
Thank you much for your time and help!!
1) Yes, I tried adding the plugin that way. Followed the steps under
adding LayoutPlugin in Chapter 13 and it does not work.
I have a layout.html inside my plugin folder under the view and I
included this
{{
response.files.insert(0,URL('static','plugin_jQueryUi/css/
custom-theme/jquery-ui-1.8.11.custom.css'))
response.files.insert(1,URL('static','plugin_jQueryUi/js/
jquery-1.5.2.min.js'))
response.files.insert(2,URL('static','plugin_JQueryUi/js/
jquery-ui-1.8.11.custom.min.js'))
}}
and it does not work. (This layout.html file is just a simple html
file that tries a few of the widgets that comes with jqueryui)
3)
Since I am so new with ajax and JqueryUi and web2Py, I do not
understand what happens in the web_ajax.js and so I I might just not
wanna use all that web2py already gives.
Can I just start from scratch with a simple layout that I have, use
the JQueryUI widgets however I want and then use Ajax later?
What would be your suggestion on this one?
Oh my bad,
// Accordion
$("#accordion").accordion({ header: "h3" });
$('#tabs').tabs();
I included the semicolon in my code but just for some dumb reason not
on my post. Sorry to confuse you :(
Any other reasons why this does not work??
can I do =form(_class="Dialog-form")? (Dialog-form is the id of
the example)
Thanks it worked, but can it change the submit_button='' too?
is there a way to change it to
<button id="create-user">Create new user</button>
I think response.files should work with external URLs as well -- try it (it just takes a list of URLs of files).AnthonyOn Mon, Sep 19, 2011 at 2:01 PM, Beatris Rusu <beatr...@gmail.com> wrote:
Also, if I want to change the css theme the way pbreit suggested, I do this
<link rel="stylesheet" href="http://http://ajax.googleapis.com/ajax/> libs/jqueryui/1.8.5/themes/swanky-purse/jquery-ui.css" type="text/> css">instead of
{{response.files.append(URL('static','jQueryUI/css/custom-theme/jquery-
ui-1.8.11.custom.css'))}}
and I looked at page source and it does include the link but before including any of the javascript files and so it does not apply the theme from google APIS. So I am wandering if the order matters?I still have my JQueuryUI included with the files.append insde my layout.Also, is there like a reponse.append sort of method where I can append an external link like the theme from google APIS so it would add it correctly inside the URL list that file appends handles?
Thank you!(Too many questions, I know, I do not wanna overwhelm you! )On Mon, Sep 19, 2011 at 10:42 AM, Beatris Rusu <beatr...@gmail.com> wrote:
I am sorry, I am just a bit new with this blog thing. I did a just [Reply] to the last post so everybody could see the below message. I am a bit frustrated bc I wish I could get an email each time somebody a general reply to the post that I created. Wouldn't it be nice for me just to send you an email from my gmail and then the blog to be updated to a new reply on the post?Thank you so much for all your help and cooperation. This helps a lot and makes me continue wanna use web2py! I really appreciate your patience and help!This is what I replied to your last message:
"Very interesting behavior. I checked in the page source, and even though my custom jQueryUI files append lines are commented, for some reason they are still included. I think it has to do with that files.append...I think that once those files are appended, they do not automatically get removed if I just comment those lines out inside my layout before including the webajax.html. If I use files.insert inside webajax.html this behavior does not happen. So, I guess I don't like this files.append thing because it does not offer me the possibility to quickly remove files appended by commenting out code.What do you think about this?
"On Mon, Sep 19, 2011 at 9:56 AM, Anthony Bastardi <abas...@gmail.com> wrote:
On Mon, Sep 19, 2011 at 12:47 PM, Beatris Rusu <beatr...@gmail.com> wrote:
I think you might be right. I just get this really weird behavior happening, like I comment my custom jquery ui file appends in layout, but i leave my view untouched to still include the accordion and the tabs, and for some reason when I open my index my accordion and tabs still show up correctly like my custome jquery ui are included. I do not understand this behavior. That is why at some point I thought that oh maybe web2py comes with accordion. Do you know of web2py having this behavior?
Have you looked at the HTML source rendered in the browser to confirm that the files are no longer included in the head? Use the browser tools to see if they are actually being loaded.
[ALso, not sure why these emails are not posted on the blog anymore, but just my personal email - I guess is because i chose to click on "Reply to Author, button"]Yes, that only replies directly to the author, not the whole list.Anthony