Commit 5268228e974fac7214487a98d01879b491590c40

Authored by Julien Verneuil
2 parents 0f0689d5 8ac13faf

Merge remote-tracking branch 'origin/release/ANUBIS_1_14' into release/ANUBIS_1_14

Conflicts:
	web/jQuery/CXM_jquery_button.anubis
web/jQuery/CXM_jquery_button.anubis
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 transmit calexium_lib/web/CXM_making_a_web_site.anubis 9 transmit calexium_lib/web/CXM_making_a_web_site.anubis
10 transmit calexium_lib/web/CXM_jquery.anubis 10 transmit calexium_lib/web/CXM_jquery.anubis
11 transmit calexium_lib/web/jQuery/CXM_jquery_icons.anubis 11 transmit calexium_lib/web/jQuery/CXM_jquery_icons.anubis
  12 +transmit calexium_lib/web/widgets/button.anubis
12 transmit calexium_lib/web/js_tools.anubis 13 transmit calexium_lib/web/js_tools.anubis
13 transmit tools/basis.anubis 14 transmit tools/basis.anubis
14 transmit system/string.anubis 15 transmit system/string.anubis
@@ -286,9 +287,61 @@ public define HTML_Partial_Content @@ -286,9 +287,61 @@ public define HTML_Partial_Content
286 ])). 287 ])).
287 288
288 public define HTML_Partial_Content 289 public define HTML_Partial_Content
  290 + jq_button_confirm
  291 + (
  292 + JQuery_img_button button,
  293 + String dlg_title,
  294 + String dlg_text,
  295 + String dlg_ok,
  296 + String dlg_cancel,
  297 + String url,
  298 + List((String, String)) extra_ops
  299 + )=
  300 + since button is jquery_img_button(img_url, button_label, button_name, actioner, orientation),
  301 + with uid = generate_random_string(20),
  302 +
  303 + js_confirm_dialog_data_obj = "CalexiumToolBox.data.confirm_dialog[" + to_js_string(uid) + "]",
  304 + js_data = js_confirm_dialog_data_obj + " = {
  305 + title: " + to_js_string(dlg_title) + ",
  306 + text: " + to_js_string(dlg_text) + ",
  307 + ok : " + to_js_string(dlg_ok) + ",
  308 + cancel: " + to_js_string(dlg_cancel) + "};",
  309 +
  310 + button_name = uid,
  311 + actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " + to_js_string("/?a=" + url + format_extra_operands(extra_ops))+");"),
  312 +
  313 + partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([
  314 + partial(jquery_button(jquery_img_button(img_url, button_label, button_name, actioner, orientation)))
  315 + ])).
  316 +
  317 +public define HTML_Partial_Content
  318 + jq_button_confirm
  319 + (
  320 + String button_label,
  321 + String dlg_title,
  322 + String dlg_text,
  323 + String dlg_ok,
  324 + String dlg_cancel,
  325 + String url
  326 + )=
  327 + jq_button_confirm(button_label, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []).
  328 +
  329 +public define HTML_Partial_Content
  330 + jq_button_confirm
  331 + (
  332 + JQuery_img_button button,
  333 + String dlg_title,
  334 + String dlg_text,
  335 + String dlg_ok,
  336 + String dlg_cancel,
  337 + String url
  338 + )=
  339 + jq_button_confirm(button, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []).
  340 +
  341 +public define HTML_Partial_Content
289 img_submit_button 342 img_submit_button
290 ( 343 (
291 String label, //translated label of the button 344 String label, //translated label of the button
292 String form_id // 345 String form_id //
293 )= 346 )=
294 - jquery_button(jquery_img_button("icons/16x16/check.png", label, "", jQuery_actioner(same, jqform, form_id), left)). 347 + jquery_button(jquery_img_button(icn16_check, label, "", jQuery_actioner(same, jqform, form_id), left)).
web/widgets/button.anubis
@@ -16,6 +16,9 @@ public define String icn16_edit = "icons/16x16/edit.png". @@ -16,6 +16,9 @@ public define String icn16_edit = "icons/16x16/edit.png".
16 public define String icn16_check = "icons/16x16/check.png". 16 public define String icn16_check = "icons/16x16/check.png".
17 public define String icn16_phone = "icons/16x16/phone.png". 17 public define String icn16_phone = "icons/16x16/phone.png".
18 public define String icn16_locked = "icons/16x16/locked.png". 18 public define String icn16_locked = "icons/16x16/locked.png".
  19 +public define String icn16_clock = "icons/16x16/clock.png".
  20 +public define String icn16_html = "icons/16x16/mimetypes/html.png".
  21 +public define String icn16_txt = "icons/16x16/mimetypes/txt.png".
19 22
20 public define HTML_Partial_Content 23 public define HTML_Partial_Content
21 img_button_flink 24 img_button_flink
web/widgets/css_helper.anubis
@@ -118,6 +118,14 @@ public type ChangeListItem: @@ -118,6 +118,14 @@ public type ChangeListItem:
118 String label, 118 String label,
119 String value). 119 String value).
120 120
  121 +public define ChangeListItem
  122 + change_list_item
  123 + (
  124 + String label,
  125 + String value
  126 + )=
  127 + change_list_item("", label, value).
  128 +
121 define HTML_Row(HTML_Off_Form) 129 define HTML_Row(HTML_Off_Form)
122 make_row 130 make_row
123 ( 131 (
@@ -127,8 +135,12 @@ define HTML_Row(HTML_Off_Form) @@ -127,8 +135,12 @@ define HTML_Row(HTML_Off_Form)
127 if item is change_list_item(icon, label, value) then 135 if item is change_list_item(icon, label, value) then
128 //with bg = (Cell_Option) else core_attrs([class()]), 136 //with bg = (Cell_Option) else core_attrs([class()]),
129 row([], 137 row([],
130 - [  
131 - cell([core_attrs([class("icon "+icon)])],text("")), 138 + if icon = "" then
  139 + [ cell([core_attrs([class("label")])],text(label)),
  140 + cell(text(value))
  141 + ]
  142 + else
  143 + [ cell([core_attrs([class("icon "+icon)])],text("")),
132 cell([core_attrs([class("label")])],text(label)), 144 cell([core_attrs([class("label")])],text(label)),
133 cell(text(value)) 145 cell(text(value))
134 ] 146 ]
@@ -149,13 +161,14 @@ define List(HTML_Row(HTML_Off_Form)) @@ -149,13 +161,14 @@ define List(HTML_Row(HTML_Off_Form))
149 make_changelist_rows(t, [ make_row(h, odd) . so_far], 1 - odd) 161 make_changelist_rows(t, [ make_row(h, odd) . so_far], 1 - odd)
150 }. 162 }.
151 163
152 -public define HTML_Off_Form  
153 - process_changelist 164 +public define HTML_Partial_Content
  165 + changelist_table
154 ( 166 (
155 List(ChangeListItem) items 167 List(ChangeListItem) items
156 )= 168 )=
  169 + partial_content([css(css_file("css/changelists.css"))],
157 div([class("changelist")], 170 div([class("changelist")],
158 - table([class("module"), attr("cellspacing","0")], make_changelist_rows(items, [], 1))) 171 + table([class("module"), attr("cellspacing","0")], make_changelist_rows(items, [], 1))))
159 . 172 .
160 173
161 public define HTML_Off_Form 174 public define HTML_Off_Form
web/widgets/dashboard.anubis
@@ -28,14 +28,14 @@ public define HTML_Off_Form @@ -28,14 +28,14 @@ public define HTML_Off_Form
28 if left is 28 if left is
29 { 29 {
30 none then literal(""), 30 none then literal(""),
31 - content(list, title) then html_wave_box_wide(title, sequence([process_changelist(list)])) 31 + content(list, title) then partial(html_wave_box_wide(title, changelist_table(list)))
32 } 32 }
33 ), 33 ),
34 cell([class("module_col right_col")], 34 cell([class("module_col right_col")],
35 if right is 35 if right is
36 { 36 {
37 none then literal(""), 37 none then literal(""),
38 - content(list, title) then html_wave_box_wide(title, sequence([process_changelist(list)])) 38 + content(list, title) then partial(html_wave_box_wide(title, changelist_table(list)))
39 } 39 }
40 ) 40 )
41 ]) 41 ])