/* * Created by PyramIDE. * User: フランスのトトロ * Date: 06/05/2007 * Time: 09:39 * © David RENÉ */ read tools/basis.anubis read xlib/web/common.anubis read xlib/web/making_a_web_site.anubis /**** WAVE BOX ****/ public define HTML_Partial_Content html_wave_box ( List(CoreAttrs) attrs, String legend, List(HTML_Partial_Content) content )= partial_content( div(attrs, [ text([class("frame_wave")], legend), //legend div([class("frame_blk")], content) ])) . public define HTML_Partial_Content html_wave_box ( List(CoreAttrs) attrs, String legend, List(HTML_Off_Form) content )= partial_content( div(attrs, [ text([class("frame_wave")], legend), //legend div([class("frame_blk")], content) ])) . public define HTML_Off_Form html_wave_box ( List(CoreAttrs) attrs, String legend, List(HTML_Off_Form) content )= div(attrs, [ text([class("frame_wave")], legend), //legend div([class("frame_blk")], content) ]) . public define HTML_Off_Form html_wave_box ( List(CoreAttrs) attrs, String legend, HTML_Off_Form content )= html_wave_box(attrs, legend, [content]) . public define HTML_Off_Form html_wave_box ( String legend, HTML_Off_Form content )= html_wave_box([class("frame")], legend, content) . public define HTML_Partial_Content html_wave_box ( String legend, HTML_Partial_Content content )= html_wave_box([class("frame")], legend, [content]) . public define HTML_Partial_Content html_wave_box ( List(CoreAttrs) attrs, String legend, HTML_Partial_Content content )= html_wave_box([class("frame") . attrs] , legend, [content]) . public define HTML_Partial_Content html_wave_box ( String legend, HTML_Off_Form content )= html_wave_box([class("frame")], legend, [content]) . public define HTML_Off_Form html_wave_box_custom_size ( Int size, String legend, List(HTML_Off_Form) content, )= div([style("width: "+abs_to_decimal(size)+"px")], [ 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([class("frame wide")], legend, [content]). public define HTML_Partial_Content html_wave_box_wide ( String legend, HTML_Partial_Content content )= html_wave_box([class("frame wide")], legend, content, ). /**** CHANGELIST ****/ public type ChangeListItem: change_list_item( String icon, String label, HTML_Off_Form value). public define ChangeListItem change_list_item ( String icon, String label, String value )= change_list_item(icon, label, text(value)). public define ChangeListItem change_list_item ( String icon, String label, Int value )= change_list_item(icon, label, text(value)). public define ChangeListItem change_list_item ( String label, Int value )= change_list_item("", label, text(value)). public define ChangeListItem change_list_item ( String label, String value )= change_list_item("", label, text(value)). public define ChangeListItem change_list_item ( String label, HTML_Off_Form value )= change_list_item("", label, value). define HTML_Off_Form make_tr ( ChangeListItem item, Int odd, )= if item is change_list_item(icon, label, value) then //with bg = (Cell_Option) else core_attrs([class()]), tr([], if icon = "" then [ td(class("label"),text(label)), td(value) ] else [ td(class("icon "+icon),text("")), td(class("label"),text(label)), td(value) ] ) . define List(HTML_Off_Form) make_changelist_rows ( List(ChangeListItem) items, List(HTML_Off_Form) so_far, Int odd )= if items is { [] then reverse(so_far), [h . t] then make_changelist_rows(t, [ make_tr(h, odd) . so_far], 1 - odd) }. public define HTML_Partial_Content changelist_table ( List(ChangeListItem) items )= partial_content([css(css_file("xlib/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 ) = a([id("help_"+keyword), class("jTipu jTip_help"), data("name",title)], data("href",format_web_action_name(action_name("ajax_show_tooltip"), [("tooltip_id",keyword),("width",to_String(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, ) = a([id("help_"+keyword), class("jTipu jTip_help"), attr("name",title)], href(action_name("ajax_show_tooltip"), [("tooltip_id",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, []).