Commit 510e96da4fdecceca450c3c88d4cb7a960e67601

Authored by totoro
1 parent f22102f8

add support to link_id_action in view table

database/vtm/view_table_renderer.anubis
... ... @@ -144,8 +144,9 @@ define HTML_Row(HTML_Off_Form) make_line
144 144 {
145 145 text(string) then cell((HTML_Off_Form)text(string)),
146 146 // link(id, string) then cell((HTML_Off_Form)actioner(same,same, link(string), action_name, [("table_name", table_name),("id",id)])),
147   - link(id, string) then cell((HTML_Off_Form)literal(jq_dialog_open(string, dialog_id(action_name+"_dlg_ajax"), "'id="+id+"'"))),
148   - icon(icon_path) then cell((HTML_Off_Form)image([], icon_path, ""))
  147 + link(id, string) then cell((HTML_Off_Form)literal(jq_dialog_open(string, dialog_id(action_name+"_dlg_ajax"), "'id="+id+"'"))),
  148 + link_id_action(id, name, action) then cell((HTML_Off_Form)actioner(same,same, link(name), action, [("id",id)])),
  149 + icon(icon_path) then cell((HTML_Off_Form)image([], icon_path, ""))
149 150 },
150 151 make_line(table_name, action_name, t, [cell . so_far])
151 152 }.
... ... @@ -191,6 +192,7 @@ define HTML_Header_Row(HTML_Off_Form)
191 192 {
192 193 text(string) then header_cell((HTML_Off_Form)text(_T(string))),
193 194 link(id, string) then header_cell((HTML_Off_Form)actioner(same,same, link(string),"edit_table",[])), //TODO
  195 + link_id_action(id, text, action) then header_cell((HTML_Off_Form)actioner(same,same, link(text),action,[("id",id)])), //TODO
194 196 icon(icon_path) then header_cell((HTML_Off_Form)image([], icon_path, ""))
195 197 },
196 198 make_header(_T, t, [cell . so_far])
... ...
database/vtm/view_table_types.anubis
... ... @@ -40,6 +40,7 @@ public type VT_edit:
40 40 public type VT_view_entry:
41 41 text(String text),
42 42 link(String id, String text),
  43 + link_id_action(String id, String text, String link_id_action),
43 44 icon(String icon_path).
44 45  
45 46 public type VT_view_row_header:
... ...