button.anubis
3.28 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
/*
* Created by PyramIDE.
* User: フランスのトトロ & Juju
* Date: 18/04/2015
* Time: 20:46
* © Calexium
*/
read calexium_lib/web/CXM_making_a_web_site.anubis
read calexium_lib/web/CXM_jquery.anubis
read calexium_lib/web/js_tools.anubis
read tools/basis.anubis
public define String icn16_cross = "icons/16x16/cross.png".
public define String icn16_edit = "icons/16x16/edit.png".
public define String icn16_check = "icons/16x16/check.png".
public define String icn16_phone = "icons/16x16/phone.png".
public define String icn16_locked = "icons/16x16/locked.png".
public define HTML_Partial_Content
img_button
(
String img_path,
String url,
List((String, String)) extra_ops
)=
partial_content(actioner(same, same, img_link(img_path, ""), url, extra_ops)).
public define HTML_Partial_Content
img_button
(
String img_path,
String url
)=
img_button(img_path, url, []).
public define HTML_Partial_Content
img_button_confirm
(
String img_path,
List(CoreAttrs) core_attrs,
String dlg_title,
String dlg_text,
String dlg_ok,
String dlg_cancel,
String url,
List((String, String)) extra_ops
)=
with uid = generate_random_string(20),
js_confirm_dialog_data_obj = "CalexiumToolBox.data.confirm_dialog[" + to_js_string(uid) + "]",
js_data = js_confirm_dialog_data_obj + " = {
title: " + to_js_string(dlg_title) + ",
text: " + to_js_string(dlg_text) + ",
ok : " + to_js_string(dlg_ok) + ",
cancel: " + to_js_string(dlg_cancel) + "};",
partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],
image(core_attrs + [id(uid), style("cursor: pointer"), event(onclick, "CalexiumToolBox.make_confirm_dialog(this, " + to_js_string("/?a=" + url + format_extra_operands(extra_ops))+");")], img_path, "")).
public define HTML_Partial_Content
img_button_confirm
(
String img_path,
String dlg_title,
String dlg_text,
String dlg_ok,
String dlg_cancel,
String url
)=
img_button_confirm(img_path, [], dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []).
public define HTML_Partial_Content
img_button_confirm
(
String img_path,
List(CoreAttrs) core_attrs,
String dlg_title,
String dlg_text,
String dlg_ok,
String dlg_cancel,
String url
)=
img_button_confirm(img_path, core_attrs, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []).
public define HTML_Partial_Content
img_button_confirm
(
String img_path,
String dlg_title,
String dlg_text,
String dlg_ok,
String dlg_cancel,
String url,
List((String, String)) extra_ops
)=
img_button_confirm(img_path, [], dlg_title, dlg_text, dlg_ok, dlg_cancel, url, extra_ops).