Commit ac7be478d675e73fb54f8728dbd571f95952339e
1 parent
30bcc5df
make [+] button beside the selector aligned in same line
Showing
1 changed file
with
20 additions
and
4 deletions
Show diff stats
view/view_table_renderer.anubis
| @@ -974,11 +974,27 @@ public define List(CXM_Form_Field) | @@ -974,11 +974,27 @@ public define List(CXM_Form_Field) | ||
| 974 | ], | 974 | ], |
| 975 | 975 | ||
| 976 | foreign_text(s_name, c_name, value, foreign_table_name, select, help) then | 976 | foreign_text(s_name, c_name, value, foreign_table_name, select, help) then |
| 977 | - [selector_c([],no_label, html_Id(""), wan(c_name), 1, select.get(db, table_referer, fk_clause), success(init(to_String(value))), mandatory), help_line(help, _T)], | ||
| 978 | - | 977 | + //[selector_c([],no_label, html_Id(""), wan(c_name), 1, select.get(db, table_referer, fk_clause), success(init(to_String(value))), mandatory), help_line(help, _T)], |
| 978 | + with uid = generate_random_string(20)+"_", | ||
| 979 | + [ | ||
| 980 | + partial(jq_dialog_create(dialog_id(uid+foreign_table_name+"_dlg_ajax"), ajax(controller_action("hk_c", "ajax_edit_table&dialog_id="+uid+foreign_table_name+"_dlg_ajax&sub_dialog=true&table_name="+foreign_table_name)))), | ||
| 981 | + one_line_fields([ | ||
| 982 | + selector_c([],label(_T(s_name), no_help), html_Id(""), wan(c_name), 1, select.get(db, table_referer, fk_clause), success(init(to_String(value))), mandatory), help_line(help, _T), | ||
| 983 | + partial(img_button(icn16_add, [event(onclick, jq_dialog_open(dialog_id(uid+foreign_table_name+"_dlg_ajax")))], "", [])), | ||
| 984 | + ]) | ||
| 985 | + ], | ||
| 986 | + | ||
| 979 | foreign_text_search(s_name, c_name, select, foreign_table_name, s_fields, help) then | 987 | foreign_text_search(s_name, c_name, select, foreign_table_name, s_fields, help) then |
| 980 | - [raw_in_form(literal("<input class=\"in\" id=\"acb_"+c_name+"\" data-init_record=\""+select+"\" size=\"50\" type=\"text\">"))] | ||
| 981 | -// [raw_in_form(literal("<input class=\"in\" id=\"acb_"+c_name+"\" type=\"text\">"))], | 988 | + //[raw_in_form(literal("<input class=\"in\" id=\"acb_"+c_name+"\" data-init_record=\""+select+"\" size=\"50\" type=\"text\">"))] |
| 989 | + with uid = generate_random_string(20)+"_", | ||
| 990 | + [ | ||
| 991 | + partial(jq_dialog_create(dialog_id(uid+foreign_table_name+"_dlg_ajax"), ajax(controller_action("hk_c", "ajax_edit_table&dialog_id="+uid+foreign_table_name+"_dlg_ajax&sub_dialog=true&table_name="+foreign_table_name)))), | ||
| 992 | + one_line_fields([ | ||
| 993 | + message("<input class=\"in\" id=\"acb_"+c_name+"\" data-init_record=\""+select+"\" size=\"50\" type=\"text\">"), | ||
| 994 | + partial(img_button(icn16_add, [event(onclick, jq_dialog_open(dialog_id(uid+foreign_table_name+"_dlg_ajax")))], "", [])), | ||
| 995 | + ]), | ||
| 996 | + help_line(help, _T) | ||
| 997 | + ] | ||
| 982 | 998 | ||
| 983 | choices_text(s_name, c_name, value, select, help) then | 999 | choices_text(s_name, c_name, value, select, help) then |
| 984 | [selector_c([],no_label, html_Id(""), wan(c_name), 1, select.get(db, no_referer, ""), success(init(value)), mandatory), help_line(help, _T)], | 1000 | [selector_c([],no_label, html_Id(""), wan(c_name), 1, select.get(db, no_referer, ""), success(init(value)), mandatory), help_line(help, _T)], |