Commit 510e96da4fdecceca450c3c88d4cb7a960e67601
1 parent
f22102f8
add support to link_id_action in view table
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
database/vtm/view_table_renderer.anubis
| @@ -144,8 +144,9 @@ define HTML_Row(HTML_Off_Form) make_line | @@ -144,8 +144,9 @@ define HTML_Row(HTML_Off_Form) make_line | ||
| 144 | { | 144 | { |
| 145 | text(string) then cell((HTML_Off_Form)text(string)), | 145 | text(string) then cell((HTML_Off_Form)text(string)), |
| 146 | // link(id, string) then cell((HTML_Off_Form)actioner(same,same, link(string), action_name, [("table_name", table_name),("id",id)])), | 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 | make_line(table_name, action_name, t, [cell . so_far]) | 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,6 +192,7 @@ define HTML_Header_Row(HTML_Off_Form) | ||
| 191 | { | 192 | { |
| 192 | text(string) then header_cell((HTML_Off_Form)text(_T(string))), | 193 | text(string) then header_cell((HTML_Off_Form)text(_T(string))), |
| 193 | link(id, string) then header_cell((HTML_Off_Form)actioner(same,same, link(string),"edit_table",[])), //TODO | 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 | icon(icon_path) then header_cell((HTML_Off_Form)image([], icon_path, "")) | 196 | icon(icon_path) then header_cell((HTML_Off_Form)image([], icon_path, "")) |
| 195 | }, | 197 | }, |
| 196 | make_header(_T, t, [cell . so_far]) | 198 | make_header(_T, t, [cell . so_far]) |
database/vtm/view_table_types.anubis
| @@ -40,6 +40,7 @@ public type VT_edit: | @@ -40,6 +40,7 @@ public type VT_edit: | ||
| 40 | public type VT_view_entry: | 40 | public type VT_view_entry: |
| 41 | text(String text), | 41 | text(String text), |
| 42 | link(String id, String text), | 42 | link(String id, String text), |
| 43 | + link_id_action(String id, String text, String link_id_action), | ||
| 43 | icon(String icon_path). | 44 | icon(String icon_path). |
| 44 | 45 | ||
| 45 | public type VT_view_row_header: | 46 | public type VT_view_row_header: |