Commit 777d4ec341bde030f7624174edef2bf05df87414

Authored by totoro
1 parent 20d4ed20

change phone_field and remove mobile_phone.

Now phone_field has attribute for describing the phone number type like (cellphone, landline, fax, etc)

in JSON extractor check for "__HK_SHOW_STRING__" for returning the show string
1 library/ 1 library/
2 db_model_manager.sc 2 db_model_manager.sc
  3 +ds_files/types/generated/
  4 +labo/modal_interface_files/banner.jpg
  5 +labo/
calexium_lib @ 3c4d7fe5a3b
1 -Subproject commit b3254dcbe8651bb63cc91b71934155fd560bf621 1 +Subproject commit 3c4d7fe5a3ba86018c88dd912f464702088487e8
hayamiki_generator.aproj
@@ -128,6 +128,9 @@ @@ -128,6 +128,9 @@
128 <Compile Include="calexium_lib\web\widgets\icons_set.anubis" /> 128 <Compile Include="calexium_lib\web\widgets\icons_set.anubis" />
129 <Compile Include="hayamiki_lib\controller\hk_controller.anubis" /> 129 <Compile Include="hayamiki_lib\controller\hk_controller.anubis" />
130 <Compile Include="hayamiki_lib\controller\hk_delete.anubis" /> 130 <Compile Include="hayamiki_lib\controller\hk_delete.anubis" />
  131 + <Compile Include="hayamiki_lib\controller\hk_rows_import.anubis" />
  132 + <Compile Include="hayamiki_lib\controller\hk_sql_utils.anubis" />
  133 + <Compile Include="hayamiki_lib\controller\hk_trigger.anubis" />
131 <Compile Include="hayamiki_lib\ds_files\ds_types.anubis" /> 134 <Compile Include="hayamiki_lib\ds_files\ds_types.anubis" />
132 <Compile Include="hayamiki_lib\hk_generator.anubis" /> 135 <Compile Include="hayamiki_lib\hk_generator.anubis" />
133 <Compile Include="hayamiki_lib\model\app.anubis" /> 136 <Compile Include="hayamiki_lib\model\app.anubis" />
@@ -141,20 +144,19 @@ @@ -141,20 +144,19 @@
141 <Compile Include="hayamiki_lib\model\tables.anubis" /> 144 <Compile Include="hayamiki_lib\model\tables.anubis" />
142 <Compile Include="hayamiki_lib\model\types\hk_app.anubis" /> 145 <Compile Include="hayamiki_lib\model\types\hk_app.anubis" />
143 <Compile Include="hayamiki_lib\model\types\hk_app_name.anubis" /> 146 <Compile Include="hayamiki_lib\model\types\hk_app_name.anubis" />
  147 + <Compile Include="hayamiki_lib\model\types\hk_constraint.anubis" />
144 <Compile Include="hayamiki_lib\model\types\hk_database.anubis" /> 148 <Compile Include="hayamiki_lib\model\types\hk_database.anubis" />
145 <Compile Include="hayamiki_lib\model\types\hk_datetime_field_attr.anubis" /> 149 <Compile Include="hayamiki_lib\model\types\hk_datetime_field_attr.anubis" />
146 - <Compile Include="hayamiki_lib\model\types\hk_display.anubis" />  
147 - <Compile Include="hayamiki_lib\model\types\hk_edit_view.anubis" />  
148 - <Compile Include="hayamiki_lib\model\types\hk_fk_view.anubis" />  
149 <Compile Include="hayamiki_lib\model\types\hk_help_text.anubis" /> 150 <Compile Include="hayamiki_lib\model\types\hk_help_text.anubis" />
150 <Compile Include="hayamiki_lib\model\types\hk_icon.anubis" /> 151 <Compile Include="hayamiki_lib\model\types\hk_icon.anubis" />
151 <Compile Include="hayamiki_lib\model\types\hk_int_choice.anubis" /> 152 <Compile Include="hayamiki_lib\model\types\hk_int_choice.anubis" />
152 <Compile Include="hayamiki_lib\model\types\hk_int_choices.anubis" /> 153 <Compile Include="hayamiki_lib\model\types\hk_int_choices.anubis" />
153 - <Compile Include="hayamiki_lib\model\types\hk_list_view.anubis" />  
154 <Compile Include="hayamiki_lib\model\types\hk_model.anubis" /> 154 <Compile Include="hayamiki_lib\model\types\hk_model.anubis" />
155 <Compile Include="hayamiki_lib\model\types\hk_model_attr.anubis" /> 155 <Compile Include="hayamiki_lib\model\types\hk_model_attr.anubis" />
156 <Compile Include="hayamiki_lib\model\types\hk_model_column.anubis" /> 156 <Compile Include="hayamiki_lib\model\types\hk_model_column.anubis" />
157 <Compile Include="hayamiki_lib\model\types\hk_model_field.anubis" /> 157 <Compile Include="hayamiki_lib\model\types\hk_model_field.anubis" />
  158 + <Compile Include="hayamiki_lib\model\types\hk_on_conflict.anubis" />
  159 + <Compile Include="hayamiki_lib\model\types\hk_phone_field_attr.anubis" />
158 <Compile Include="hayamiki_lib\model\types\hk_table.anubis" /> 160 <Compile Include="hayamiki_lib\model\types\hk_table.anubis" />
159 <Compile Include="hayamiki_lib\model\types\hk_text_choice.anubis" /> 161 <Compile Include="hayamiki_lib\model\types\hk_text_choice.anubis" />
160 <Compile Include="hayamiki_lib\model\types\hk_text_choices.anubis" /> 162 <Compile Include="hayamiki_lib\model\types\hk_text_choices.anubis" />
@@ -163,10 +165,12 @@ @@ -163,10 +165,12 @@
163 <Compile Include="hayamiki_lib\view\hk_filter.anubis" /> 165 <Compile Include="hayamiki_lib\view\hk_filter.anubis" />
164 <Compile Include="hayamiki_lib\view\jqgrid.anubis" /> 166 <Compile Include="hayamiki_lib\view\jqgrid.anubis" />
165 <Compile Include="hayamiki_lib\view\view_apps_renderer.anubis" /> 167 <Compile Include="hayamiki_lib\view\view_apps_renderer.anubis" />
  168 + <Compile Include="hayamiki_lib\view\view_editor_renderer.anubis" />
  169 + <Compile Include="hayamiki_lib\view\view_rows_import.anubis" />
166 <Compile Include="hayamiki_lib\view\view_table_manager.anubis" /> 170 <Compile Include="hayamiki_lib\view\view_table_manager.anubis" />
167 <Compile Include="hayamiki_lib\view\view_table_manager_types.anubis" /> 171 <Compile Include="hayamiki_lib\view\view_table_manager_types.anubis" />
168 <Compile Include="hayamiki_lib\view\view_table_renderer.anubis" /> 172 <Compile Include="hayamiki_lib\view\view_table_renderer.anubis" />
169 - <Compile Include="hayamiki_lib\view\view_table_types.anubis" /> 173 + <Compile Include="hayamiki_lib\view\web_action.anubis" />
170 <Compile Include="library\a2a\C\formater.anubis" /> 174 <Compile Include="library\a2a\C\formater.anubis" />
171 <Compile Include="library\a2a\example.anubis" /> 175 <Compile Include="library\a2a\example.anubis" />
172 <Compile Include="library\a2a\generic\preformater.anubis" /> 176 <Compile Include="library\a2a\generic\preformater.anubis" />
hayamiki_lib @ 974c8566fd2
1 -Subproject commit c0af45f7cc7c251cbac2837e95cdb7bea2379d95 1 +Subproject commit 974c8566fd29876100e5d7ffcfa3031246273447
src/generation/columns.anubis
@@ -163,8 +163,7 @@ public define Maybe(String) @@ -163,8 +163,7 @@ public define Maybe(String)
163 password_field(_) then success(name), 163 password_field(_) then success(name),
164 text_field(_) then success(name), 164 text_field(_) then success(name),
165 color_field then success(name), 165 color_field then success(name),
166 - phone_field then success(name),  
167 - mobile_field then success(name), 166 + phone_field(attr) then success(name),
168 url_field then success(name), 167 url_field then success(name),
169 email_field then success(name) 168 email_field then success(name)
170 }. 169 }.
@@ -288,8 +287,8 @@ public define Maybe(String) @@ -288,8 +287,8 @@ public define Maybe(String)
288 password_field(min_size) then success("password(\""+to_upper(col_name)+"\", \""+col_name+"\", "+to_Anubis_source(help)+")") 287 password_field(min_size) then success("password(\""+to_upper(col_name)+"\", \""+col_name+"\", "+to_Anubis_source(help)+")")
289 text_field(txt_attr) then success("text_area(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(txt_attr)+", "+to_Anubis_source(help)+")"), 288 text_field(txt_attr) then success("text_area(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(txt_attr)+", "+to_Anubis_source(help)+")"),
290 color_field then success("color(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"), 289 color_field then success("color(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"),
291 - phone_field then success("phone(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"),  
292 - mobile_field then success("mobile_phone(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"), 290 + phone_field(ph_attr) then success("phone(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(ph_attr)+", "+to_Anubis_source(help)+")"),
  291 +// mobile_field then success("mobile_phone(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"),
293 url_field then success("url(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"), 292 url_field then success("url(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"),
294 email_field then success("email(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"), 293 email_field then success("email(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", "+to_Anubis_source(help)+")"),
295 }. 294 }.
@@ -342,8 +341,7 @@ public define String @@ -342,8 +341,7 @@ public define String
342 password_field(_) then current_type_name+"."+name, 341 password_field(_) then current_type_name+"."+name,
343 text_field(_) then current_type_name+"."+name, 342 text_field(_) then current_type_name+"."+name,
344 color_field then current_type_name+"."+name, 343 color_field then current_type_name+"."+name,
345 - phone_field then current_type_name+"."+name,  
346 - mobile_field then current_type_name+"."+name, 344 + phone_field(_) then current_type_name+"."+name,
347 url_field then current_type_name+"."+name, 345 url_field then current_type_name+"."+name,
348 email_field then current_type_name+"."+name 346 email_field then current_type_name+"."+name
349 }. 347 }.
src/generation/create_table.anubis
@@ -87,9 +87,10 @@ define String @@ -87,9 +87,10 @@ define String
87 )= 87 )=
88 since constraint is unique(_name, columns, _on_conflict), 88 since constraint is unique(_name, columns, _on_conflict),
89 with name = if _name = "" then "" else "CONSTRAINT "+_name+" ", 89 with name = if _name = "" then "" else "CONSTRAINT "+_name+" ",
90 - indent+name+"UNIQUE ("+ 90 + ",\n"+
  91 + indent+name+"UNIQUE (\n"+
91 indent+indent+join(",\n"+indent+indent, columns)+"\n"+ 92 indent+indent+join(",\n"+indent+indent, columns)+"\n"+
92 - indent+")"+ 93 + indent+")\n"+
93 indent+"ON CONFLICT "+to_String(_on_conflict) 94 indent+"ON CONFLICT "+to_String(_on_conflict)
94 . 95 .
95 96
src/generation/extractor.anubis
@@ -32,8 +32,8 @@ public define String @@ -32,8 +32,8 @@ public define String
32 password_field(_) then "text"+cursor_index, 32 password_field(_) then "text"+cursor_index,
33 text_field(_) then "text"+cursor_index, 33 text_field(_) then "text"+cursor_index,
34 color_field then "text"+cursor_index, 34 color_field then "text"+cursor_index,
35 - phone_field then "text"+cursor_index,  
36 - mobile_field then "text"+cursor_index, 35 + phone_field(_) then "text"+cursor_index,
  36 +// mobile_field then "text"+cursor_index,
37 url_field then "text"+cursor_index, 37 url_field then "text"+cursor_index,
38 email_field then "text"+cursor_index 38 email_field then "text"+cursor_index
39 }. 39 }.
@@ -160,6 +160,7 @@ public define String @@ -160,6 +160,7 @@ public define String
160 String indent 160 String indent
161 )= 161 )=
162 indent+join("\n"+indent+"else ", to_get_extractor_line_json_member(columns, cursor_name, [], 0))+ 162 indent+join("\n"+indent+"else ", to_get_extractor_line_json_member(columns, cursor_name, [], 0))+
  163 + "\n"+indent+"else if component_name =\"__HK_SHOW_STRING__\" then ((Int -> SQLite3Datum) cursor) |-> json_member(\"__HK_SHOW_STRING__\", json_string(get_"+constructor_name+"_show_string(db, db_id((Int)db_integer(cursor)(0)))))"+
163 "\n"+indent+"else ((Int -> SQLite3Datum) cursor) |-> json_member(component_name, json_null)". 164 "\n"+indent+"else ((Int -> SQLite3Datum) cursor) |-> json_member(component_name, json_null)".
164 165
165 166
src/generation/fields.anubis
@@ -37,8 +37,7 @@ public define String @@ -37,8 +37,7 @@ public define String
37 password_field(_) then "String", 37 password_field(_) then "String",
38 text_field(_) then "String", 38 text_field(_) then "String",
39 color_field then "String", 39 color_field then "String",
40 - phone_field then "String",  
41 - mobile_field then "String", 40 + phone_field(_) then "String",
42 url_field then "String", 41 url_field then "String",
43 email_field then "String" 42 email_field then "String"
44 }. 43 }.
@@ -64,8 +63,7 @@ public define String @@ -64,8 +63,7 @@ public define String
64 password_field(_) then "string", 63 password_field(_) then "string",
65 text_field(_) then "string", 64 text_field(_) then "string",
66 color_field then "string", 65 color_field then "string",
67 - phone_field then "string",  
68 - mobile_field then "String", 66 + phone_field(_) then "string",
69 url_field then "String", 67 url_field then "String",
70 email_field then "string" 68 email_field then "string"
71 }. 69 }.
@@ -98,8 +96,8 @@ public define String @@ -98,8 +96,8 @@ public define String
98 password_field(size) then fill("VARCHAR("+size+")", 15) + format_attributes(attributes), 96 password_field(size) then fill("VARCHAR("+size+")", 15) + format_attributes(attributes),
99 text_field(_) then fill("TEXT", 15) + format_attributes(attributes), 97 text_field(_) then fill("TEXT", 15) + format_attributes(attributes),
100 color_field then fill("VARCHAR(8)",15)+ format_attributes(attributes), 98 color_field then fill("VARCHAR(8)",15)+ format_attributes(attributes),
101 - phone_field then fill("VARCHAR(20)", 15) + format_attributes(attributes),  
102 - mobile_field then fill("VARCHAR(20)", 15) + format_attributes(attributes), 99 + phone_field(_) then fill("VARCHAR(20)", 15) + format_attributes(attributes),
  100 +// mobile_field then fill("VARCHAR(20)", 15) + format_attributes(attributes),
103 url_field then fill("VARCHAR(2048)", 15) + format_attributes(attributes), 101 url_field then fill("VARCHAR(2048)", 15) + format_attributes(attributes),
104 email_field then fill("VARCHAR(254)", 15) + format_attributes(attributes), 102 email_field then fill("VARCHAR(254)", 15) + format_attributes(attributes),
105 }. 103 }.
@@ -125,8 +123,8 @@ public define String @@ -125,8 +123,8 @@ public define String
125 password_field(min_size) then "\"\"", 123 password_field(min_size) then "\"\"",
126 text_field(_) then "\"\"", 124 text_field(_) then "\"\"",
127 color_field then "\"#DDD\"", 125 color_field then "\"#DDD\"",
128 - phone_field then "\"\"",  
129 - mobile_field then "\"\"", 126 + phone_field(_) then "\"\"",
  127 +// mobile_field then "\"\"",
130 url_field then "\"\"", 128 url_field then "\"\"",
131 email_field then "\"\"" 129 email_field then "\"\""
132 }. 130 }.
@@ -170,8 +168,8 @@ public define String @@ -170,8 +168,8 @@ public define String
170 password_field(_) then "bind_String(\":v_"+name+"\", "+type_name+"."+name+")", 168 password_field(_) then "bind_String(\":v_"+name+"\", "+type_name+"."+name+")",
171 text_field(_) then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", 169 text_field(_) then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",
172 color_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", 170 color_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",
173 - phone_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",  
174 - mobile_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", 171 + phone_field(_) then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",
  172 +// mobile_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",
175 url_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", 173 url_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",
176 email_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", 174 email_field then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")",
177 }. 175 }.
src/generation/html.anubis
@@ -107,8 +107,8 @@ public define String @@ -107,8 +107,8 @@ public define String
107 //to_HTML_cell_text(column, data_name, general_type_name), 107 //to_HTML_cell_text(column, data_name, general_type_name),
108 text_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), 108 text_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name),
109 color_field then to_HTML_cell_text(column, data_name, general_type_name), 109 color_field then to_HTML_cell_text(column, data_name, general_type_name),
110 - phone_field then to_HTML_cell_text(column, data_name, general_type_name),  
111 - mobile_field then to_HTML_cell_text(column, data_name, general_type_name), 110 + phone_field(_) then to_HTML_cell_text(column, data_name, general_type_name),
  111 +// mobile_field then to_HTML_cell_text(column, data_name, general_type_name),
112 url_field then to_HTML_cell_text(column, data_name, general_type_name), 112 url_field then to_HTML_cell_text(column, data_name, general_type_name),
113 email_field then to_HTML_cell_text(column, data_name, general_type_name) 113 email_field then to_HTML_cell_text(column, data_name, general_type_name)
114 } 114 }
src/generation/icons.anubis
@@ -35,8 +35,7 @@ public define String @@ -35,8 +35,7 @@ public define String
35 password_field(min_size) then icn16_question, 35 password_field(min_size) then icn16_question,
36 text_field(_) then icn16_question, 36 text_field(_) then icn16_question,
37 color_field then icn16_question, 37 color_field then icn16_question,
38 - phone_field then icn16_phone,  
39 - mobile_field then icn16_question, 38 + phone_field(_) then icn16_phone,
40 url_field then icn16_question, 39 url_field then icn16_question,
41 email_field then icn16_email 40 email_field then icn16_email
42 }. 41 }.
src/generation/json.anubis
@@ -35,8 +35,8 @@ public define String @@ -35,8 +35,8 @@ public define String
35 password_field(_) then "to_JSON_String("+current_type_name+"."+name+")", 35 password_field(_) then "to_JSON_String("+current_type_name+"."+name+")",
36 text_field(_) then "to_JSON_String("+current_type_name+"."+name+")", 36 text_field(_) then "to_JSON_String("+current_type_name+"."+name+")",
37 color_field then "to_JSON_String("+current_type_name+"."+name+")", 37 color_field then "to_JSON_String("+current_type_name+"."+name+")",
38 - phone_field then "to_JSON_String("+current_type_name+"."+name+")",  
39 - mobile_field then "to_JSON_String("+current_type_name+"."+name+")", 38 + phone_field(_) then "to_JSON_String("+current_type_name+"."+name+")",
  39 +// mobile_field then "to_JSON_String("+current_type_name+"."+name+")",
40 url_field then "to_JSON_String("+current_type_name+"."+name+")", 40 url_field then "to_JSON_String("+current_type_name+"."+name+")",
41 email_field then "to_JSON_String("+current_type_name+"."+name+")", 41 email_field then "to_JSON_String("+current_type_name+"."+name+")",
42 } 42 }
@@ -69,8 +69,8 @@ public define String @@ -69,8 +69,8 @@ public define String
69 password_field(_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", 69 password_field(_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
70 text_field(_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", 70 text_field(_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
71 color_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", 71 color_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
72 - phone_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",  
73 - mobile_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", 72 + phone_field(_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
  73 +// mobile_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
74 url_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", 74 url_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
75 email_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", 75 email_field then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))",
76 } 76 }
@@ -103,8 +103,8 @@ public define String @@ -103,8 +103,8 @@ public define String
103 password_field(_) then "json_member(\""+name+"\", json_string(\"******\"))", 103 password_field(_) then "json_member(\""+name+"\", json_string(\"******\"))",
104 text_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 104 text_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",
105 color_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 105 color_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",
106 - phone_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",  
107 - mobile_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 106 + phone_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",
  107 +// mobile_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",
108 url_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 108 url_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",
109 email_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))" 109 email_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))"
110 } 110 }
src/generation/vt_view.anubis
@@ -78,8 +78,8 @@ define String @@ -78,8 +78,8 @@ define String
78 password_field(min_size) then "password(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", 78 password_field(min_size) then "password(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",
79 text_field(txt_attr) then "text_area(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", 79 text_field(txt_attr) then "text_area(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",
80 color_field then "color(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", 80 color_field then "color(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",
81 - phone_field then "phone(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",  
82 - mobile_field then "mobile_phone(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", 81 + phone_field(_) then "phone(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",
  82 +// mobile_field then "mobile_phone(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",
83 url_field then "url(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", 83 url_field then "url(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")",
84 email_field then "email(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")" 84 email_field then "email(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")"
85 85
src/generation/web_args.anubis
@@ -33,8 +33,8 @@ public define String @@ -33,8 +33,8 @@ public define String
33 password_field(min_size) then "get_Password(lwa, __prefix__+\""+name+"_1\", __prefix__+\""+name+"_2\")", 33 password_field(min_size) then "get_Password(lwa, __prefix__+\""+name+"_1\", __prefix__+\""+name+"_2\")",
34 text_field(_) then "get_String(lwa, __prefix__+\""+name+"\")", 34 text_field(_) then "get_String(lwa, __prefix__+\""+name+"\")",
35 color_field then "get_String(lwa, __prefix__+\""+name+"\")", 35 color_field then "get_String(lwa, __prefix__+\""+name+"\")",
36 - phone_field then "get_String(lwa, __prefix__+\""+name+"\")",  
37 - mobile_field then "get_String(lwa, __prefix__+\""+name+"\")", 36 + phone_field(_) then "get_String(lwa, __prefix__+\""+name+"\")",
  37 +// mobile_field then "get_String(lwa, __prefix__+\""+name+"\")",
38 url_field then "get_String(lwa, __prefix__+\""+name+"\")", 38 url_field then "get_String(lwa, __prefix__+\""+name+"\")",
39 email_field then "get_String(lwa, __prefix__+\""+name+"\")" 39 email_field then "get_String(lwa, __prefix__+\""+name+"\")"
40 }. 40 }.
@@ -88,8 +88,8 @@ public define String @@ -88,8 +88,8 @@ public define String
88 password_field(min_size) then "if get_Password(lwa, __prefix__+\""+name+"_1\", __prefix__+\""+name+"_2\") is { failure then "+to_Anubis_default(col_type)+", success(pass) then pass},", 88 password_field(min_size) then "if get_Password(lwa, __prefix__+\""+name+"_1\", __prefix__+\""+name+"_2\") is { failure then "+to_Anubis_default(col_type)+", success(pass) then pass},",
89 text_field(_) then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", 89 text_field(_) then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),",
90 color_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", 90 color_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),",
91 - phone_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),",  
92 - mobile_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", 91 + phone_field(_) then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),",
  92 +// mobile_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),",
93 url_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", 93 url_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),",
94 email_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," 94 email_field then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),"
95 }. 95 }.
@@ -217,10 +217,10 @@ public define String @@ -217,10 +217,10 @@ public define String
217 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }", 217 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }",
218 color_field then 218 color_field then
219 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }" 219 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }"
220 - phone_field then  
221 - "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }"  
222 - mobile_field then 220 + phone_field(_) then
223 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }" 221 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }"
  222 +// mobile_field then
  223 +// "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }"
224 url_field then 224 url_field then
225 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }" 225 "if get_String(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_String(\":v_"+name+"\", "+name+"))] }"
226 email_field then 226 email_field then
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 * 3 *
4 * *Title* Interfacing, generating and controling a database with Anubis 4 * *Title* Interfacing, generating and controling a database with Anubis
5 * 5 *
6 - * *Copyright* Copyright © David René 2015-2016. 6 + * *Copyright* Copyright © David René 2015-2017.
7 * 7 *
8 * 8 *
9 * 9 *
src/model.3.0.0.anubis
@@ -99,6 +99,9 @@ public define HK_Table production_products_table = @@ -99,6 +99,9 @@ public define HK_Table production_products_table =
99 hk_column("last_modified", datetime_field(auto_now), []), 99 hk_column("last_modified", datetime_field(auto_now), []),
100 hk_column("comments", text_field, []) // whatever the user wants to keep 100 hk_column("comments", text_field, []) // whatever the user wants to keep
101 ], 101 ],
  102 + [
  103 + unique("", ["serial", "security_code"], ignore)
  104 + ],
102 "obj.serial" 105 "obj.serial"
103 ), 106 ),
104 hk_display( 107 hk_display(
@@ -246,19 +249,19 @@ public define HK_Table production_supplier_table = @@ -246,19 +249,19 @@ public define HK_Table production_supplier_table =
246 hk_column("contact_id", foreign_key(none, "address_book_contact", []), []), 249 hk_column("contact_id", foreign_key(none, "address_book_contact", []), []),
247 hk_column("address1", char_field(100), []), 250 hk_column("address1", char_field(100), []),
248 hk_column("address2", char_field(100), []), 251 hk_column("address2", char_field(100), []),
249 - hk_column("zipcode", char_field(10), []),  
250 - hk_column("city", char_field(50), []),  
251 - hk_column("country", char_field(50), []), 252 + hk_column("zipcode", char_field(10), []),
  253 + hk_column("city", char_field(50), []),
  254 + hk_column("country", char_field(50), []),
252 hk_column("email", email_field, []), 255 hk_column("email", email_field, []),
253 - hk_column("url", char_field(200), []),  
254 - hk_column("phone", phone_field, []),  
255 - hk_column("fax", char_field(20), []),  
256 - hk_column("mobile", phone_field, []),  
257 - hk_column("siret", char_field(50), []),  
258 - hk_column("tva_number", char_field(50), []), 256 + hk_column("url", url_field, []),
  257 + hk_column("phone", phone_field(generic), []),
  258 + hk_column("fax", char_field(20), []),
  259 + hk_column("mobile", phone_field(cellphone), []),
  260 + hk_column("siret", char_field(50), []),
  261 + hk_column("tva_number", char_field(50), []),
259 hk_column("date_created", datetime_field(auto_now_add), []), 262 hk_column("date_created", datetime_field(auto_now_add), []),
260 hk_column("last_modified", datetime_field(auto_now), []), 263 hk_column("last_modified", datetime_field(auto_now), []),
261 - hk_column("comments", text_field, []) // whatever the user wants to keep 264 + hk_column("comments", text_field, []) // whatever the user wants to keep
262 ], 265 ],
263 "obj.company" 266 "obj.company"
264 ), 267 ),
@@ -366,32 +369,32 @@ public define HK_Table address_book_contact_table = @@ -366,32 +369,32 @@ public define HK_Table address_book_contact_table =
366 hk_model( 369 hk_model(
367 [ 370 [
368 371
369 - hk_column("first_name", char_field(50), []),  
370 - hk_column("last_name", char_field(50), []), 372 + hk_column("first_name", char_field(50), []),
  373 + hk_column("last_name", char_field(50), []),
371 hk_column("company", char_field(100), []), 374 hk_column("company", char_field(100), []),
372 - hk_column("role", char_field(50), []), 375 + hk_column("role", char_field(50), []),
373 hk_column("address1", char_field(100), []), 376 hk_column("address1", char_field(100), []),
374 hk_column("address2", char_field(100), []), 377 hk_column("address2", char_field(100), []),
375 - hk_column("zipcode", char_field(10), []),  
376 - hk_column("city", char_field(50), []),  
377 - hk_column("country", char_field(50), []), 378 + hk_column("zipcode", char_field(10), []),
  379 + hk_column("city", char_field(50), []),
  380 + hk_column("country", char_field(50), []),
378 hk_column("email", email_field, []), 381 hk_column("email", email_field, []),
379 - hk_column("url", char_field(200), []),  
380 - hk_column("phone", phone_field, []),  
381 - hk_column("fax", char_field(20), []),  
382 - hk_column("mobile", phone_field, []),  
383 - hk_column("date_created", datetime_field(auto_now_add), []),  
384 - hk_column("last_modified", datetime_field(auto_now), []),  
385 - hk_column("comments", text_field, []) // whatever the user wants to keep 382 + hk_column("url", url_field, []),
  383 + hk_column("phone", phone_field(landline), []),
  384 + hk_column("fax", char_field(20), []),
  385 + hk_column("mobile", phone_field(cellphone), []),
  386 + hk_column("date_created", datetime_field(auto_now_add), []),
  387 + hk_column("last_modified", datetime_field(auto_now), []),
  388 + hk_column("comments", text_field, []) // whatever the user wants to keep
386 ], 389 ],
387 "obj.first_name +\" \"+obj.last_name " 390 "obj.first_name +\" \"+obj.last_name "
388 ), 391 ),
389 hk_display( 392 hk_display(
390 //list_view 393 //list_view
391 [ 394 [
392 - list_view("short", ["first_name", "last_name", "company"]),  
393 - list_view("default", ["first_name", "last_name", "company", "phone", "mobile", "email"]),  
394 - list_view("details", ["first_name", "last_name", "company", "url", "role", "phone", "mobile", "email", "address1", "address2", "zipcode", "city", "country"]) 395 + list_view("short", ["first_name", "last_name", "company"]),
  396 + list_view("default", ["first_name", "last_name", "company", "phone", "mobile", "email"]),
  397 + list_view("details", ["first_name", "last_name", "company", "url", "role", "phone", "mobile", "email", "address1", "address2", "zipcode", "city", "country"])
395 ], 398 ],
396 //list_edit 399 //list_edit
397 [ edit_view_list_form("default", ["first_name", "last_name", "company", "role", "address1", "address2", "zipcode", "city", "country", "email", "url", "phone", "fax", "mobile", "comments"])] 400 [ edit_view_list_form("default", ["first_name", "last_name", "company", "role", "address1", "address2", "zipcode", "city", "country", "email", "url", "phone", "fax", "mobile", "comments"])]