diff --git a/database/vtm/view_table_renderer.anubis b/database/vtm/view_table_renderer.anubis index 5111dde..1a88378 100644 --- a/database/vtm/view_table_renderer.anubis +++ b/database/vtm/view_table_renderer.anubis @@ -20,6 +20,7 @@ read system/convert.anubis //read utils.anubis read locale/L3LanguageInfo.anubis read calexium_lib/web/CXM_common.anubis +read calexium_lib/web/CXM_web_arg_utils.anubis read calexium_lib/web/CXM_making_a_web_site.anubis read calexium_lib/web/CXM_multihost_http_server.anubis read calexium_lib/web/jQuery/CXM_jquery_datatable.anubis @@ -76,9 +77,9 @@ public define List(CXM_Form_Field) integer(s_name, c_name, value, help) then [input(_T(s_name), wan(c_name), init(abs_to_decimal(value)), small, mandatory), help_line(help, _T)], date(s_name, c_name, value, help) then - [input([class("datepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), narrow, non_mandatory), help_line(help, _T)], + [input([class("datepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), small, non_mandatory), help_line(help, _T)], datetime(s_name, c_name, value, help) then - [input([class("datetimepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), narrow, mandatory), help_line(help, _T)], + [input([class("datetimepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), small, mandatory), help_line(help, _T)], }, edit_form_lines(db, _T, t, reverse(line)+so_far) }. @@ -93,13 +94,14 @@ public define HTML_Partial_Content VT_edit vt_elist ) = //if tb is tool_box(lang, _T, _, _, db, _) then - with table_name = vt_elist.table_name, + with table_name = vt_elist.table_name, + with button_name = if get_String(lwa, "id","none") = "none" then _T("CREATE") else _T("UPDATE"), partial_content(jq_datetimepicker_init(lang), partial(html_wave_box( _T(to_upper(table_name)), cxm_form( table_name, htmlId(table_name), lwa, edit_form_lines(db, _T, vt_elist.list, [])+ - [ submit("create", failure, _T("CREATE"), [("table_name", table_name)]) ] + [ submit("create", failure, button_name, [("table_name", table_name)]) ] )))). public define Maybe(HTML_Partial_Content) @@ -129,14 +131,14 @@ define HTML_Row(HTML_Off_Form) make_line String table_name, String action_name, //default is "edit_table", but can be surcharged for own use List(VT_view_entry) entries, - List(HTML_Cell(HTML_Off_Form)) so_far, - Int odd_even + List(HTML_Cell(HTML_Off_Form)) so_far + //Int odd_even )= if entries is { [] then - with line = if odd_even = 0 then "tr_even" else "tr_odd", - row( [core_attrs([class(line)])], reverse(so_far)), + //with line = if odd_even = 0 then "tr_even" else "tr_odd", + row( [], reverse(so_far)), [h . t] then with cell = if h is { @@ -144,7 +146,7 @@ define HTML_Row(HTML_Off_Form) make_line link(id, string) then cell((HTML_Off_Form)actioner(same,same, link(string), action_name, [("table_name", table_name),("id",id)])), icon(icon_path) then cell((HTML_Off_Form)image([], icon_path, "")) }, - make_line(table_name, action_name, t, [cell . so_far], odd_even) + make_line(table_name, action_name, t, [cell . so_far]) }. define List(HTML_Row(HTML_Off_Form)) make_lines @@ -153,13 +155,13 @@ define List(HTML_Row(HTML_Off_Form)) make_lines String table_name, String action_name, List(VT_view_row) entries, - List(HTML_Row(HTML_Off_Form)) so_far, - Int odd_even + List(HTML_Row(HTML_Off_Form)) so_far +// Int odd_even )= if entries is { [] then reverse(so_far), - [h . t] then make_lines(table_name, action_name, t, [make_line(table_name, action_name, h.list, [], odd_even). so_far], 1 - odd_even ) + [h . t] then make_lines(table_name, action_name, t, [make_line(table_name, action_name, h.list, []). so_far] ) }. // View table part @@ -192,12 +194,12 @@ public define HTML_Partial_Content view_table_form VT_view rows )= //if tb is tool_box(_, _T, _, _, db, _) then - partial_content(div( [class("tableau")], + partial_content(div( [/*class("tableau")*/], sequence( [ actioner(same,same, link([class("my_button")],_T("NEW")),"edit_table",[("table_name", rows.table_name)]), - table([core_attrs([id("table_view"), class("display compact nowrap")])], + table([core_attrs([id("table_view"), class("tableau display compact nowrap")])], make_header(_T, rows.header.list, []), - make_lines(rows.table_name, action_name, rows.list, [], 0)) + make_lines(rows.table_name, action_name, rows.list, [])) ] ) )) -- libgit2 0.21.4