diff --git a/web/jQuery/CXM_jquery_button.anubis b/web/jQuery/CXM_jquery_button.anubis index e6bbb33..65adbdd 100644 --- a/web/jQuery/CXM_jquery_button.anubis +++ b/web/jQuery/CXM_jquery_button.anubis @@ -9,6 +9,7 @@ transmit calexium_lib/web/CXM_making_a_web_site.anubis transmit calexium_lib/web/CXM_jquery.anubis transmit calexium_lib/web/jQuery/CXM_jquery_icons.anubis +transmit calexium_lib/web/widgets/button.anubis transmit calexium_lib/web/js_tools.anubis transmit tools/basis.anubis transmit system/string.anubis @@ -339,7 +340,33 @@ public define HTML_Partial_Content partial(jquery_button(jQuery_button(button, uid, button_name, button_label, actioner, jq_icon_none, jq_icon_none))) ])). - +public define HTML_Partial_Content + jq_button_confirm + ( + JQuery_img_button button, + String dlg_title, + String dlg_text, + String dlg_ok, + String dlg_cancel, + String url, + List((String, String)) extra_ops + )= + since button is jquery_img_button(img_url, button_label, button_name, actioner, orientation), + 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) + "};", + + button_name = uid, + actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " + to_js_string("/?a=" + url + format_extra_operands(extra_ops))+");"), + + partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([ + partial(jquery_button(jquery_img_button(img_url, button_label, button_name, actioner, orientation))) + ])). public define HTML_Partial_Content jq_button_confirm @@ -352,6 +379,18 @@ public define HTML_Partial_Content String url )= jq_button_confirm(button_label, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []). + +public define HTML_Partial_Content + jq_button_confirm + ( + JQuery_img_button button, + String dlg_title, + String dlg_text, + String dlg_ok, + String dlg_cancel, + String url + )= + jq_button_confirm(button, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []). public define HTML_Partial_Content img_submit_button @@ -359,4 +398,4 @@ public define HTML_Partial_Content String label, //translated label of the button String form_id // )= - jquery_button(jquery_img_button("icons/16x16/check.png", label, "", jQuery_actioner(same, jqform, form_id), left)). + jquery_button(jquery_img_button(icn16_check, label, "", jQuery_actioner(same, jqform, form_id), left)). diff --git a/web/widgets/button.anubis b/web/widgets/button.anubis index da894a2..0b9ed08 100644 --- a/web/widgets/button.anubis +++ b/web/widgets/button.anubis @@ -16,6 +16,9 @@ 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 String icn16_clock = "icons/16x16/clock.png". +public define String icn16_html = "icons/16x16/mimetypes/html.png". +public define String icn16_txt = "icons/16x16/mimetypes/txt.png". public define HTML_Partial_Content img_button_flink diff --git a/web/widgets/css_helper.anubis b/web/widgets/css_helper.anubis index e3a9532..4a8fca7 100644 --- a/web/widgets/css_helper.anubis +++ b/web/widgets/css_helper.anubis @@ -118,6 +118,14 @@ public type ChangeListItem: 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 ( @@ -127,8 +135,12 @@ define HTML_Row(HTML_Off_Form) if item is change_list_item(icon, label, value) then //with bg = (Cell_Option) else core_attrs([class()]), row([], - [ - cell([core_attrs([class("icon "+icon)])],text("")), + 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)) ] @@ -149,13 +161,14 @@ define List(HTML_Row(HTML_Off_Form)) make_changelist_rows(t, [ make_row(h, odd) . so_far], 1 - odd) }. -public define HTML_Off_Form - process_changelist +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))) + table([class("module"), attr("cellspacing","0")], make_changelist_rows(items, [], 1)))) . public define HTML_Off_Form diff --git a/web/widgets/dashboard.anubis b/web/widgets/dashboard.anubis index 7b616f2..30a4cf2 100644 --- a/web/widgets/dashboard.anubis +++ b/web/widgets/dashboard.anubis @@ -28,14 +28,14 @@ public define HTML_Off_Form if left is { none then literal(""), - content(list, title) then html_wave_box_wide(title, sequence([process_changelist(list)])) + content(list, title) then partial(html_wave_box_wide(title, changelist_table(list))) } ), cell([class("module_col right_col")], if right is { none then literal(""), - content(list, title) then html_wave_box_wide(title, sequence([process_changelist(list)])) + content(list, title) then partial(html_wave_box_wide(title, changelist_table(list))) } ) ]) -- libgit2 0.21.4