Commit 924b60ab2de6c97fc38c4ed08bf7b2c839b3bbd7

Authored by totoro
1 parent c0af45f7

remove the dependency to web_site_directory

Showing 1 changed file with 27 additions and 29 deletions   Show diff stats
view/view_table_renderer.anubis
@@ -463,7 +463,7 @@ public define HTML_Partial_Content @@ -463,7 +463,7 @@ public define HTML_Partial_Content
463 SQLite3DataBase db, 463 SQLite3DataBase db,
464 (String) -> String _T, 464 (String) -> String _T,
465 String lang, 465 String lang,
466 - String web_site_directory, 466 + //String web_site_directory,
467 String action_name, 467 String action_name,
468 VTM_view vtm_v, 468 VTM_view vtm_v,
469 String view_name, 469 String view_name,
@@ -504,7 +504,7 @@ public define HTML_Partial_Content @@ -504,7 +504,7 @@ public define HTML_Partial_Content
504 SQLite3DataBase db, 504 SQLite3DataBase db,
505 (String) -> String _T, 505 (String) -> String _T,
506 String lang, 506 String lang,
507 - String web_site_directory, 507 + //String web_site_directory,
508 String action_name, 508 String action_name,
509 VTM_view vtm_v, 509 VTM_view vtm_v,
510 String view_name, 510 String view_name,
@@ -536,7 +536,7 @@ public define Maybe(HTML_Partial_Content) @@ -536,7 +536,7 @@ public define Maybe(HTML_Partial_Content)
536 SQLite3DataBase db, 536 SQLite3DataBase db,
537 (String) -> String _T, 537 (String) -> String _T,
538 String lang, 538 String lang,
539 - String web_site_directory, 539 + //String web_site_directory,
540 String table_name, 540 String table_name,
541 String view_name, 541 String view_name,
542 String action_name, 542 String action_name,
@@ -550,7 +550,7 @@ public define Maybe(HTML_Partial_Content) @@ -550,7 +550,7 @@ public define Maybe(HTML_Partial_Content)
550 { 550 {
551 failure then failure, 551 failure then failure,
552 success(vtm_v) then 552 success(vtm_v) then
553 - success(view_table_page(db, _T, lang, web_site_directory, action_name, vtm_v, view_name, filter_name, f_clause, table_referer, fk_clause)) 553 + success(view_table_page(db, _T, lang, /*web_site_directory, */action_name, vtm_v, view_name, filter_name, f_clause, table_referer, fk_clause))
554 }. 554 }.
555 555
556 public define Maybe(HTML_Partial_Content) 556 public define Maybe(HTML_Partial_Content)
@@ -559,13 +559,13 @@ public define Maybe(HTML_Partial_Content) @@ -559,13 +559,13 @@ public define Maybe(HTML_Partial_Content)
559 SQLite3DataBase db, 559 SQLite3DataBase db,
560 (String) -> String _T, 560 (String) -> String _T,
561 String lang, 561 String lang,
562 - String web_site_directory, 562 + //String web_site_directory,
563 String table_name, 563 String table_name,
564 String view_name, 564 String view_name,
565 String action_name, 565 String action_name,
566 VTM vtm 566 VTM vtm
567 ) = 567 ) =
568 - view_table_content(db, _T, lang, web_site_directory, table_name, view_name, action_name, "", "", no_referer, "", vtm). 568 + view_table_content(db, _T, lang, /*web_site_directory,*/ table_name, view_name, action_name, "", "", no_referer, "", vtm).
569 569
570 public define Maybe(HTML_Partial_Content) 570 public define Maybe(HTML_Partial_Content)
571 table_in_list_view_only 571 table_in_list_view_only
@@ -573,7 +573,7 @@ public define Maybe(HTML_Partial_Content) @@ -573,7 +573,7 @@ public define Maybe(HTML_Partial_Content)
573 SQLite3DataBase db, 573 SQLite3DataBase db,
574 (String) -> String _T, 574 (String) -> String _T,
575 String lang, 575 String lang,
576 - String web_site_directory, 576 + //String web_site_directory,
577 String table, 577 String table,
578 String view_name, 578 String view_name,
579 String filter_name, 579 String filter_name,
@@ -587,7 +587,7 @@ public define Maybe(HTML_Partial_Content) @@ -587,7 +587,7 @@ public define Maybe(HTML_Partial_Content)
587 { 587 {
588 failure then failure, 588 failure then failure,
589 success(vtm_v) then 589 success(vtm_v) then
590 - success(table_in_list_view(db, _T, lang, web_site_directory, action_name, vtm_v, view_name, filter_name, f_clause, table_referer, fk_filter)) 590 + success(table_in_list_view(db, _T, lang, /*web_site_directory,*/ action_name, vtm_v, view_name, filter_name, f_clause, table_referer, fk_filter))
591 }. 591 }.
592 592
593 define CXM_Form_Field 593 define CXM_Form_Field
@@ -712,11 +712,11 @@ public define List(CXM_Form_Field) @@ -712,11 +712,11 @@ public define List(CXM_Form_Field)
712 choices_int(s_name, c_name, value, select, help) then 712 choices_int(s_name, c_name, value, select, help) then
713 [selector_c([],label(_T(s_name), no_help), html_Id(""), wan(c_name), 1, select.get(db, no_referer, ""), success(init(to_String(value))), mandatory), help_line(help, _T)], 713 [selector_c([],label(_T(s_name), no_help), html_Id(""), wan(c_name), 1, select.get(db, no_referer, ""), success(init(to_String(value))), mandatory), help_line(help, _T)],
714 date(s_name, c_name, value, help) then 714 date(s_name, c_name, value, help) then
715 - [input([class("datepicker")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(value), small, non_mandatory), help_line(help, _T)], 715 + [input([class("datepicker")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), small, non_mandatory), help_line(help, _T)],
716 time(s_name, c_name, value, help) then 716 time(s_name, c_name, value, help) then
717 - [input([class("timepicker")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(value), small, non_mandatory), help_line(help, _T)], 717 + [input([class("timepicker")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), small, non_mandatory), help_line(help, _T)],
718 datetime(s_name, c_name, value, help) then 718 datetime(s_name, c_name, value, help) then
719 - [input([class("datetimepicker")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(value), custom(18), mandatory), help_line(help, _T)], 719 + [input([class("datetimepicker")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), custom(18), mandatory), help_line(help, _T)],
720 color( s_name, c_name, value, help) then 720 color( s_name, c_name, value, help) then
721 [input([class("jscolor")], label(_T(s_name), no_help), wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)], 721 [input([class("jscolor")], label(_T(s_name), no_help), wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)],
722 phone( s_name, c_name, value, help) then 722 phone( s_name, c_name, value, help) then
@@ -736,16 +736,14 @@ public define HTML_Partial_Content @@ -736,16 +736,14 @@ public define HTML_Partial_Content
736 SQLite3DataBase db, 736 SQLite3DataBase db,
737 (String) -> String _T, 737 (String) -> String _T,
738 String lang, 738 String lang,
739 - String web_site_directory, 739 + //String web_site_directory,
740 String table_name, 740 String table_name,
741 - String view_name, 741 + //String view_name,
742 List(HK_Form_Entry) list_entries, 742 List(HK_Form_Entry) list_entries,
743 List(HK_Form_Tab) list_tabs, 743 List(HK_Form_Tab) list_tabs,
744 List(Web_arg) lwa, 744 List(Web_arg) lwa,
745 - //String dialog_id,  
746 - //HK_Form edit_form,  
747 VTM vtm, 745 VTM vtm,
748 - String clause, 746 + //String clause,
749 String fk_clause, 747 String fk_clause,
750 HK_Referer table_referer //from which table and row id that editor is called 748 HK_Referer table_referer //from which table and row id that editor is called
751 ) = 749 ) =
@@ -797,7 +795,7 @@ public define HTML_Partial_Content @@ -797,7 +795,7 @@ public define HTML_Partial_Content
797 |-> 795 |->
798 since tab is hk_form_tab(fk_table_name, fk_col_name, list_view_name), 796 since tab is hk_form_tab(fk_table_name, fk_col_name, list_view_name),
799 with referer = hk_referer(table_name, id, fk_table_name, fk_col_name), 797 with referer = hk_referer(table_name, id, fk_table_name, fk_col_name),
800 - if table_in_list_view_only(db, _T, lang, web_site_directory, fk_table_name, list_view_name, "", "edit", "", referer, fk_clause, vtm) is 798 + if table_in_list_view_only(db, _T, lang, /* web_site_directory, */ fk_table_name, list_view_name, "", "edit", "", referer, fk_clause, vtm) is
801 { 799 {
802 failure then empty, 800 failure then empty,
803 success(p_content) then partial(p_content) 801 success(p_content) then partial(p_content)
@@ -922,11 +920,11 @@ public define List(CXM_Form_Field) @@ -922,11 +920,11 @@ public define List(CXM_Form_Field)
922 choices_int(s_name, c_name, value, select, help) then 920 choices_int(s_name, c_name, value, select, help) then
923 [selector_c([],no_label, html_Id(""), wan(c_name), 1, select.get(db, no_referer, ""), success(init(to_String(value))), mandatory), help_line(help, _T)], 921 [selector_c([],no_label, html_Id(""), wan(c_name), 1, select.get(db, no_referer, ""), success(init(to_String(value))), mandatory), help_line(help, _T)],
924 date(s_name, c_name, value, help) then 922 date(s_name, c_name, value, help) then
925 - [input([class("datepicker")], no_label, html_Id(c_name), wan(c_name), init(value), small, non_mandatory), help_line(help, _T)], 923 + [input([class("datepicker")], no_label, html_Id(c_name), wan(c_name), init(not_null_String(value)), small, non_mandatory), help_line(help, _T)],
926 time(s_name, c_name, value, help) then 924 time(s_name, c_name, value, help) then
927 - [input([class("timepicker")], no_label, html_Id(c_name), wan(c_name), init(value), small, non_mandatory), help_line(help, _T)], 925 + [input([class("timepicker")], no_label, html_Id(c_name), wan(c_name), init(not_null_String(value)), small, non_mandatory), help_line(help, _T)],
928 datetime(s_name, c_name, value, help) then 926 datetime(s_name, c_name, value, help) then
929 - [input([class("datetimepicker")], no_label, html_Id(c_name), wan(c_name), init(value), custom(18), mandatory), help_line(help, _T)], 927 + [input([class("datetimepicker")], no_label, html_Id(c_name), wan(c_name), init(not_null_String(value)), custom(18), mandatory), help_line(help, _T)],
930 color( s_name, c_name, value, help) then 928 color( s_name, c_name, value, help) then
931 [input([class("jscolor")], no_label, wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)], 929 [input([class("jscolor")], no_label, wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)],
932 phone( s_name, c_name, value, help) then 930 phone( s_name, c_name, value, help) then
@@ -1000,13 +998,13 @@ public define HTML_Partial_Content @@ -1000,13 +998,13 @@ public define HTML_Partial_Content
1000 SQLite3DataBase db, 998 SQLite3DataBase db,
1001 (String) -> String _T, 999 (String) -> String _T,
1002 String lang, 1000 String lang,
1003 - String web_site_directory, 1001 + //String web_site_directory,
1004 String table_name, 1002 String table_name,
1005 - String view_name, 1003 + //String view_name,
1006 HK_Form_Table table_form, 1004 HK_Form_Table table_form,
1007 List(Web_arg) lwa, 1005 List(Web_arg) lwa,
1008 VTM vtm, 1006 VTM vtm,
1009 - String clause, 1007 + //String clause,
1010 String fk_clause, 1008 String fk_clause,
1011 HK_Referer table_referer //from which table and row id that editor is called 1009 HK_Referer table_referer //from which table and row id that editor is called
1012 ) = 1010 ) =
@@ -1066,14 +1064,14 @@ public define Maybe(HTML_Partial_Content) @@ -1066,14 +1064,14 @@ public define Maybe(HTML_Partial_Content)
1066 SQLite3DataBase db, 1064 SQLite3DataBase db,
1067 (String) -> String _T, 1065 (String) -> String _T,
1068 String lang, 1066 String lang,
1069 - String web_site_directory, 1067 + //String web_site_directory,
1070 List(Web_arg) lwa, 1068 List(Web_arg) lwa,
1071 String dialog_id, 1069 String dialog_id,
1072 String table, //table name 1070 String table, //table name
1073 String view_name, //view name to use 1071 String view_name, //view name to use
1074 HK_Form_action action, //new_entry or edit an existing record 1072 HK_Form_action action, //new_entry or edit an existing record
1075 VTM vtm, 1073 VTM vtm,
1076 - String clause, 1074 + //String clause,
1077 String fk_clause, 1075 String fk_clause,
1078 HK_Referer referer 1076 HK_Referer referer
1079 ) = 1077 ) =
@@ -1085,9 +1083,9 @@ public define Maybe(HTML_Partial_Content) @@ -1085,9 +1083,9 @@ public define Maybe(HTML_Partial_Content)
1085 if get_edit(db, action, view_name) is 1083 if get_edit(db, action, view_name) is
1086 { 1084 {
1087 hk_form_in_list(tb_name, v_name, list_form_entries, list_tabs) then 1085 hk_form_in_list(tb_name, v_name, list_form_entries, list_tabs) then
1088 - success(renderer_edit_list_form(db, _T, lang, web_site_directory, tb_name, v_name, list_form_entries, list_tabs, lwa, vtm, clause, fk_clause, referer)), 1086 + success(renderer_edit_list_form(db, _T, lang, /*web_site_directory,*/ tb_name, /*v_name,*/ list_form_entries, list_tabs, lwa, vtm, /*clause,*/ fk_clause, referer)),
1089 hk_form_in_table(tb_name, v_name, form_in_table) then 1087 hk_form_in_table(tb_name, v_name, form_in_table) then
1090 - success(renderer_edit_table_form(db, _T, lang, web_site_directory, tb_name, v_name, form_in_table, lwa, vtm, clause, fk_clause, referer)) 1088 + success(renderer_edit_table_form(db, _T, lang, /*web_site_directory,*/ tb_name, /*v_name,*/ form_in_table, lwa, vtm, /*clause,*/ fk_clause, referer))
1091 } 1089 }
1092 }. 1090 }.
1093 1091
@@ -1097,7 +1095,7 @@ public define Maybe(HTML_Partial_Content) @@ -1097,7 +1095,7 @@ public define Maybe(HTML_Partial_Content)
1097 SQLite3DataBase db, 1095 SQLite3DataBase db,
1098 (String) -> String _T, 1096 (String) -> String _T,
1099 String lang, 1097 String lang,
1100 - String web_site_directory, 1098 + //String web_site_directory,
1101 List(Web_arg) lwa, 1099 List(Web_arg) lwa,
1102 String dialog_id, 1100 String dialog_id,
1103 String table, //table name 1101 String table, //table name
@@ -1105,6 +1103,6 @@ public define Maybe(HTML_Partial_Content) @@ -1105,6 +1103,6 @@ public define Maybe(HTML_Partial_Content)
1105 HK_Form_action action, //new_entry or edit an existing record 1103 HK_Form_action action, //new_entry or edit an existing record
1106 VTM vtm 1104 VTM vtm
1107 ) = 1105 ) =
1108 - edit_table_content(db, _T, lang, web_site_directory, lwa, dialog_id, table, view_name, action, vtm, "", "", no_referer) 1106 + edit_table_content(db, _T, lang, /*web_site_directory,*/ lwa, dialog_id, table, view_name, action, vtm, "", /*"",*/ no_referer)
1109 . 1107 .
1110 1108