diff --git a/view/jqgrid.anubis b/view/jqgrid.anubis index ba42209..28dfa92 100644 --- a/view/jqgrid.anubis +++ b/view/jqgrid.anubis @@ -66,7 +66,7 @@ public define String )= "colModel: [\n"+ join(",\n ", - [ "{name: 'myac', label: 'Action', width:60, fixed:true, sortable:false, resize:false, formatter:'actions', formatoptions:{keys:true}}" . + [ "{name: 'myac', label: 'Action', width:65, fixed:true, sortable:false, resize:false, formatter:'actions', formatoptions:{keys:true}}" . map((VT_view_model_entry col_model) |-> to_jqGrid_ColModel(db, col_model, _T), models) ] )+ diff --git a/view/view_table_renderer.anubis b/view/view_table_renderer.anubis index c9a3a73..ebf67ae 100644 --- a/view/view_table_renderer.anubis +++ b/view/view_table_renderer.anubis @@ -144,6 +144,7 @@ define String (String) -> String _T )= " + editurl: '?aws_controller=hk_c&aws_action=grid_action&table_name="+rows.table_name+"', iconSet: \"fontAwesome\", autowidth:true, shrinkToFit:true, @@ -153,9 +154,25 @@ define String cellurl: '?aws_controller=hk_c&aws_action=update_row&table_name="+rows.table_name+"', pager: '#"+uid+"_pager', caption:"+to_JSON_String(_T(to_upper(rows.table_name)))+", - ondblClickRow: function( rowid) {"+ - jq_dialog_open(dialog_id(uid+"edit_table_dlg_ajax"), "'id='+rowid")+ - "}" + actionsNavOptions: { + openicon: \"fa-folder-open-o\", + opentitle: \"Open (Enter)\", + isDisplayButtons: function (options, rowData) { + if (options.rowData.closed) { // or rowData.closed + return { post: { hidden: true }, del: { display: false } }; + } + }, + custom: [ + { action: \"open\", position: \"first\", + onClick: function (options) {"+ + jq_dialog_open(dialog_id(uid+"edit_table_dlg_ajax"), "'id='+options.rowid")+ +" + } + } + ] + }" +// ondblClickRow: function( rowid) {"+ +// jq_dialog_open(dialog_id(uid+"edit_table_dlg_ajax"), "'id='+rowid")+ . public define HTML_Partial_Content @@ -175,7 +192,7 @@ public define HTML_Partial_Content to_jqGrid_ColModel(db, _T, rows.view_model.list)+","+ // rows.json_data_string+ jqGrid_options(uid, rows, _T)+ - "})")), + "}).jqGrid(\"gridResize\");")), partial_content(jqgrid_init(lang) + [js], div([], diff --git a/view/web_action.anubis b/view/web_action.anubis index 6eecc3a..148ad46 100644 --- a/view/web_action.anubis +++ b/view/web_action.anubis @@ -12,6 +12,7 @@ read calexium_lib/web/CXM_making_a_web_site.anubis public define WEB_Action_Name hkc_edit_table = controller_action("hk_c", "edit_table"). public define WEB_Action_Name hkc_grid_view = controller_action("hk_c", "grid_view"). +public define WEB_Action_Name hkc_grid_action = controller_action("hk_c", "grid_action"). public define WEB_Action_Name hkc_view_table = controller_action("hk_c", "view_table"). public define WEB_Action_Name hkc_save_row = controller_action("hk_c", "save_row"). public define WEB_Action_Name hkc_save_row_and_new = controller_action("hk_c", "save_row_and_new"). -- libgit2 0.21.4