css_helper.anubis
5.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/*
* 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
html_wave_box
(
List(CoreAttrs) attrs,
String legend,
List(HTML) content
)=
div(attrs, [
text(class("frame_wave"), legend), //legend
div([class("frame_blk")], content)
])
.
public define HTML
html_wave_box
(
List(CoreAttrs) attrs,
String legend,
HTML content
)=
html_wave_box(attrs, legend, [content])
.
public define HTML
html_wave_box
(
String legend,
HTML content
)=
html_wave_box([class("frame")], legend, content)
.
public define HTML
html_wave_box_custom_size
(
Int size,
String legend,
List(HTML) content,
)=
div(style("width: "+abs_to_decimal(size)+"px"),
[
text(class("frame_wave"), legend), //legend
div(class("frame_blk"), content)
]).
public define HTML
html_wave_box_wide
(
String legend,
HTML content
)=
html_wave_box([class("frame wide")], legend, [content]).
public define HTML
html_wave_box_wide
(
String legend,
List(HTML) content
)=
html_wave_box([class("frame wide")], legend, content).
/**** CHANGELIST ****/
public type ChangeListItem:
change_list_item(
String icon,
String label,
HTML 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 value
)=
change_list_item("", label, value).
define HTML
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)
make_changelist_rows
(
List(ChangeListItem) items,
List(HTML) 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
changelist_table
(
List(ChangeListItem) items
)=
head_tags([css(css_file("xlib/css/changelists.css"))],
div(class("changelist"),
table([/*class("module"), */ attr("cellspacing","0")], make_changelist_rows(items, [], 1))))
.
public define HTML
html_tooltip
(
String title,
String keyword,
) =
literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_help\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"\"></a>").
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
html_tooltip
(
String title,
String keyword,
Int width,
) =
literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_help\" data-name=\""+title+"\" data-href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"&width="+width+"\"></a>").
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
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
html_tooltip_ext
(
String title,
String keyword,
String class_suffix,
List((String, String)) ext_args
) =
with extra_args = format_extra_operands(ext_args),
literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" data-name=\""+title+"\" data-href=\"/?a=ajax_show_tooltip&tooltip_ext="+keyword+extra_args+"\"></a>").
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)], []).
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'"> </a>").
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, []).