/*
* Created by PyramIDE.
* User: フランスのトトロ
* Date: 06/05/2007
* Time: 09:39
* © Calexium
*/
read tools/basis.anubis
read calexium_lib/web/CXM_common.anubis
read calexium_lib/web/CXM_making_a_web_site.anubis
/**** WAVE BOX ****/
public define HTML_Partial_Content
html_wave_box
(
String legend,
HTML_Partial_Content content,
String class_id
)=
partial_content([],
div([class(class_id)],
sequence(
[
text([class("frame_wave")], legend), //legend
div([class("frame_blk")], partial(content))
]))).
public define HTML_Partial_Content
html_wave_box
(
String legend,
HTML_Off_Form content,
String class_id
)=
partial_content([],
div([class(class_id)],
sequence(
[
text([class("frame_wave")], legend), //legend
div([class("frame_blk")], content)
]))).
public define HTML_Off_Form
html_wave_box
(
String legend,
HTML_Off_Form content,
String class_id
)=
div([class(class_id)],
sequence(
[
text([class("frame_wave")], legend), //legend
div([class("frame_blk")], content)
])).
public define HTML_Off_Form
html_wave_box
(
String legend,
HTML_Off_Form content
)=
html_wave_box(legend, content, "frame").
public define HTML_Partial_Content
html_wave_box
(
String legend,
HTML_Partial_Content content
)=
html_wave_box(legend, content, "frame").
public define HTML_Partial_Content
html_wave_box
(
String legend,
HTML_Off_Form content
)=
html_wave_box(legend, content, "frame").
public define HTML_Off_Form
html_wave_box_custom_size
(
Int size,
String legend,
HTML_Off_Form content,
)=
div([style("width: "+abs_to_decimal(size)+"px")],
sequence(
[
text([class("frame_wave")], legend), //legend
div([class("frame_blk")], content)
])).
public define HTML_Off_Form
html_wave_box_wide
(
String legend,
HTML_Off_Form content
)=
html_wave_box(legend, content, "frame wide").
public define HTML_Partial_Content
html_wave_box_wide
(
String legend,
HTML_Partial_Content content
)=
html_wave_box(legend, content, "frame wide").
/**** CHANGELIST ****/
public type ChangeListItem:
change_list_item(
String icon,
String label,
String value).
public define ChangeListItem
change_list_item
(
String label,
String value
)=
change_list_item("", label, value).
define HTML_Row(HTML_Off_Form)
make_row
(
ChangeListItem item,
Int odd,
)=
if item is change_list_item(icon, label, value) then
//with bg = (Cell_Option) else core_attrs([class()]),
row([],
if icon = "" then
[ cell([core_attrs([class("label")])],text(label)),
cell(text(value))
]
else
[ cell([core_attrs([class("icon "+icon)])],text("")),
cell([core_attrs([class("label")])],text(label)),
cell(text(value))
]
)
.
define List(HTML_Row(HTML_Off_Form))
make_changelist_rows
(
List(ChangeListItem) items,
List(HTML_Row(HTML_Off_Form)) so_far,
Int odd
)=
if items is
{
[] then reverse(so_far),
[h . t] then
make_changelist_rows(t, [ make_row(h, odd) . so_far], 1 - odd)
}.
public define HTML_Partial_Content
changelist_table
(
List(ChangeListItem) items
)=
partial_content([css(css_file("css/changelists.css"))],
div([class("changelist")],
table([class("module"), attr("cellspacing","0")], make_changelist_rows(items, [], 1))))
.
public define HTML_Off_Form
html_tooltip
(
String title,
String keyword,
) =
literal("").
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword)], []).
public define HTML_Off_Form
html_tooltip
(
String title,
String keyword,
Int width,
) =
literal("").
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword), ("width", to_decimal(width))], []).
public define HTML_In_Form
html_tooltip
(
String title,
String keyword,
) =
literal("").
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword)], []).
public define HTML_In_Form
html_tooltip
(
String title,
String keyword,
Int width,
) =
literal("").
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword), ("width", to_decimal(width))], []).
public define HTML_Off_Form
html_tooltip_ext
(
String title,
String keyword,
String class_suffix
) =
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)], []).
public define HTML_Off_Form
html_tooltip_ext
(
String title,
String keyword,
String class_suffix,
List((String, String)) ext_args
) =
with extra_args = format_extra_operands(ext_args),
literal("").
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)] + ext_args, []).
public define HTML_In_Form
html_tooltip_ext
(
String title,
String keyword,
String class_suffix
) =
actioner(same,same, link([id("help_" + keyword), class("jTipu jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)], []).
public define HTML_In_Form
html_tooltip_ext
(
String title,
String keyword,
String class_suffix,
List((String, String)) ext_args
) =
with extra_args = format_extra_operands(ext_args),
literal("").
href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"\" id=\"help_"+keyword+HELP_HMS_MODE" class="jTip jTip_help" target="_blank" name="Aide sur la fonctionnalité 'No Limit'"> ").
actioner(same,same, link([id("help_" + keyword), class("jTip jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)] + ext_args, []).