not able to include jqueryui in web2py

56 views
Skip to first unread message

sarfaraz ahmed

unread,
May 27, 2014, 8:41:28 AM5/27/14
to web...@googlegroups.com
Hello All,

I am trying to override the web2py default theme and use customized jqueryui theme. Hence I downloaded the customized jqueryui js files and css files. Copied them to static folder of my test project. I created the jqueryui folder under static folder. I created the layout1.html file which I am using as extended layout. Mentioned below is first code in layout1.html
Part1 : 
 response.files.insert(0,URL('static','jqueryui/css/excite-bike/jquery-ui-1.10.4.custom.css'))
  response.files.insert(1,URL('static','jqueryui/js/jquery-1.10.2.js'))
  response.files.insert(2,URL('static','jqueryui/js/jquery-ui-1.10.4.custom.js'))
  response.files.insert(3,URL('static','css/web2py.css'))
  response.files.insert(4,URL('static','css/bootstrap.min.css'))
  response.files.insert(5,URL('static','css/bootstrap-responsive.min.css'))
  response.files.insert(6,URL('static','css/web2py_bootstrap.css'))

  }}
 
 {{include 'web2py_ajax.html'}}
<script>
$(function() {
$( "#accordion" ).accordion();
$( "#button" ).button();
)};
 </script>

====================================================
under default.index.html i wrote 
{{extend 'layout1.html'}}
<div id="accordion">
<h1>
<a href="#">Par1</a>
</h1>
<p>
This is new para
</p>
<h1>
<a href="#">Par1</a>
</h1>
<p>
This is new para
</p>

</div>
Now when I press F12 to check html page source I see all the files are properly included (I mean js and css files) However, I don't see accordion or button from jqueryui theme.

I read the one article posted by rami. I am newbie and fail to reach solution from that thread. Please post step by step help.
Regards,
Sarfaraz Ahmed

Message has been deleted

sarfaraz ahmed

unread,
May 29, 2014, 1:25:23 PM5/29/14
to web...@googlegroups.com
Thanks for the first reply in this group... This is my first question. I included this in my code with a small mistake. You got it fixed. The accordion started working as per custom  them but button are not appearing as required. 

I have 

<script>
$(function() {
$( "#accordion" ).accordion(); $( "#accordion" ).accordion();
});
</script>


On Wed, May 28, 2014 at 3:34 PM, Niphlod <nip...@gmail.com> wrote:
where is the javascript part that "turns on" the accordion effect ?

<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks with regards,
Sarfaraz Ahmed


sarfaraz ahmed

unread,
May 30, 2014, 3:19:39 PM5/30/14
to web...@googlegroups.com
Sir 

<script>
$(function() {
$( "#accordion" ).accordion();$( "#accordion" ).accordion();
});
</script>


On Wed, May 28, 2014 at 10:37 PM, sarfaraz ahmed <findsa...@gmail.com> wrote:
i am very sorry about my last message which went before i could complete. I have included the following code. Please help
Reply all
Reply to author
Forward
0 new messages