@@ -94,6 +94,7 @@ window.addEventListener('load', async (event) => {
9494 WidgetSDK . newItem ( 'compact' , false , 'Compact' , 'If checked, use a compact rendering.' , 'Display' ) ,
9595 WidgetSDK . newItem ( 'readonly' , false , 'Read only' , 'If checked, kanban is ready only.' , 'Display' ) ,
9696 WidgetSDK . newItem ( 'hideedit' , false , 'Hide editing form' , 'If checked, hide the editing form when click on a card.' , 'Display' ) ,
97+ WidgetSDK . newItem ( 'gristeditcard' , false , 'Use Grist Edit Card' , 'If checked, opens the grist record card on double click.' , 'Display' ) ,
9798 ] ,
9899 '#config-view' , // DOM element or ID where insert options interface
99100 '#main-view' , // DOM element or ID where the widget is encapsuled, used to hide it when option are shown
@@ -380,6 +381,11 @@ function creerCarteTodo(todo) {
380381 grist . setCursorPos ( { rowId : todo . id } ) ;
381382 if ( ! W . opt . hideedit ) togglePopupTodo ( todo ) ;
382383 } ) ;
384+
385+ carte . addEventListener ( 'dblclick' , ( ) => {
386+ grist . setCursorPos ( { rowId : todo . id } ) ;
387+ if ( W . opt . gristeditcard ) grist . commandApi . run ( 'viewAsCard' ) ;
388+ } ) ;
383389 return carte ;
384390}
385391
@@ -740,4 +746,4 @@ function formatDateForInput(dateStr) {
740746 window . fermerPopup = fermerPopup ;
741747 window . mettreAJourChamp = mettreAJourChamp ;
742748 window . creerNouvelleTache = creerNouvelleTache ;
743- window . supprimerTodo = supprimerTodo ;
749+ window . supprimerTodo = supprimerTodo ;
0 commit comments