Commit 8bf8743ef98b0fada8bc776abbda3d7bff3933c3

Authored by totoro
1 parent 2993d53f

add column_label in HK_Editor_Table_Cell which show label from column

ds_files/ds_types.anubis
@@ -250,6 +250,9 @@ public define List(DS_Type_File) hayamiki_lib_types_description = @@ -250,6 +250,9 @@ public define List(DS_Type_File) hayamiki_lib_types_description =
250 alternative("column", [ 250 alternative("column", [
251 component(string, "column_name") 251 component(string, "column_name")
252 ]), 252 ]),
  253 + alternative("column_label", [
  254 + component(string, "column_name")
  255 + ]),
253 alternative("label", [ 256 alternative("label", [
254 component(string, "label"), 257 component(string, "label"),
255 ]), 258 ]),
view/types/hk_editor_table.anubis
1 /* 1 /*
2 * Created by 伝作 (Densaku). 2 * Created by 伝作 (Densaku).
3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ) 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4 - * Date: 2017-04-19  
5 - * Time: 16:17:58 4 + * Date: 2017-04-25
  5 + * Time: 19:28:19
6 * 6 *
7 */ 7 */
8 8
@@ -32,6 +32,9 @@ public type HK_Editor_Table_Cell: @@ -32,6 +32,9 @@ public type HK_Editor_Table_Cell:
32 column( 32 column(
33 String column_name 33 String column_name
34 ), 34 ),
  35 + column_label(
  36 + String column_name
  37 + ),
35 label( 38 label(
36 String label 39 String label
37 ), 40 ),
@@ -88,6 +91,12 @@ public define Message @@ -88,6 +91,12 @@ public define Message
88 // [type = String] column.column_name 91 // [type = String] column.column_name
89 forget(add_string(_hk_editor_table_cell_message, "column_name", _column_name)), 92 forget(add_string(_hk_editor_table_cell_message, "column_name", _column_name)),
90 93
  94 + //Alternative column_label
  95 + column_label(_column_name) then
  96 + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "column_label"));
  97 + // [type = String] column_label.column_name
  98 + forget(add_string(_hk_editor_table_cell_message, "column_name", _column_name)),
  99 +
91 //Alternative label 100 //Alternative label
92 label(_label) then 101 label(_label) then
93 forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "label")); 102 forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "label"));
@@ -122,6 +131,13 @@ public define Maybe(HK_Editor_Table_Cell) @@ -122,6 +131,13 @@ public define Maybe(HK_Editor_Table_Cell)
122 131
123 success(column(_column_name_)) 132 success(column(_column_name_))
124 } 133 }
  134 + else //Alternative column_label
  135 + if __type_alt__ = "column_label" then //Alternative column_label
  136 + // [type = String] column_label.column_name
  137 + if find_string(_hk_editor_table_cell_message, "column_name") is {failure then failure, success(_column_name_) then
  138 +
  139 + success(column_label(_column_name_))
  140 + }
125 else //Alternative label 141 else //Alternative label
126 if __type_alt__ = "label" then //Alternative label 142 if __type_alt__ = "label" then //Alternative label
127 // [type = String] label.label 143 // [type = String] label.label