Commit d169d6079aaa2b2a29f999b0047feb3d057f84b1

Authored by David RENÉ
1 parent 29f8d658

add label and column name in primary_key alternative. This allows to see and edi…

…t the DB_id other than the first "id"
Showing 2 changed files with 7 additions and 2 deletions   Show diff stats
view/jqgrid.anubis
@@ -114,7 +114,12 @@ define String @@ -114,7 +114,12 @@ define String
114 with empty_referer = hk_referer("","","",""), 114 with empty_referer = hk_referer("","","",""),
115 with result = if model is 115 with result = if model is
116 { 116 {
117 - primary_key then "{ name: 'id', hidden:true }", 117 + primary_key(label,column_name) then
  118 + if column_name = "id" then
  119 + "{ name: 'id', label:'id', editable:false}"
  120 + else
  121 + "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", editable:true, autoResizable: true, template: 'integer' }"
  122 + ,
118 information(label,column_name,width,help) then "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", autoResizable: true, "+search_options(column_name)+"}", 123 information(label,column_name,width,help) then "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", autoResizable: true, "+search_options(column_name)+"}",
119 text(label,column_name,help) then "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", editable:true, autoResizable: true, "+search_options(column_name)+" }", 124 text(label,column_name,help) then "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", editable:true, autoResizable: true, "+search_options(column_name)+" }",
120 password(label,column_name,help) then "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", autoResizable: true }", 125 password(label,column_name,help) then "{ name: '"+column_name+"', label: "+to_JS_String(_T(label))+", autoResizable: true }",
view/types/hk_view.anubis
@@ -57,7 +57,7 @@ read hayamiki_lib/view/types/hk_form_tab.anubis @@ -57,7 +57,7 @@ read hayamiki_lib/view/types/hk_form_tab.anubis
57 57
58 public type VT_view_model_entry: 58 public type VT_view_model_entry:
59 //hidden (String name, String value), 59 //hidden (String name, String value),
60 - primary_key , 60 + primary_key (String label, String column_name),
61 information (String label, String column_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show 61 information (String label, String column_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show
62 text (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name 62 text (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name
63 password (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name 63 password (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name