/*
* Created by PyramIDE.
* User: Jeremy
* Date: 04/09/2012
* Time: 16:19
*
*
*/
read xlib/web/making_a_web_site.anubis
read xlib/web/jquery.anubis
read xlib/web/common.anubis
read tools/basis.anubis
public type JQuery_tab:
jQuery_tab(String title, HTML_Partial_Content content)
.
// Helper to be compatible with the first version of JQuery_tab which
// take HTML_Off_Form as second argument instead of HTML_Partial_Content.
public define JQuery_tab
jQuery_tab
(
String title,
HTML_Off_Form content
)=
jQuery_tab(title, partial_content([], content)).
define HTML_Partial_Content
_jquery_tabs
(
String tabs_container_id,
List(JQuery_tab) tabs,
String tabs_titles,
List(HTML_Off_Form) tabs_contents,
List(HTML_Head_Tag) tabs_heads,
Int count
)
=
if tabs is
{
[ ] then
partial_content(
tabs_heads,
sequence([
ul(text(tabs_titles)),
sequence(reverse(tabs_contents))
])
),
[ h . t ] then
if h is jQuery_tab(title, p_content) then
if p_content is partial_content(tags, content) then
_jquery_tabs(
tabs_container_id,
t,
tabs_titles + "