Hi Olivier,
There's a hacky way to pull this off in 14.3 using the XML Metadata below.
If you copied this in and changed the queryName to the name of the list, it would generate a button for you called Delete All Rows and that button would do the same job.
<tables xmlns="
http://labkey.org/data/xml">
<table tableName="ListName" tableDbType="NOT_IN_DB">
<columns></columns>
<buttonBarOptions position="top" includeStandardButtons="true" >
<item text="Delete All Rows">
<onClick>Ext4.Msg.confirm('Confirm Deletion', 'Are you sure you wish to delete all rows? This action cannot be undone.', function(button){if (button == 'yes'){var waitMask = Ext4.Msg.wait('Deleting Rows...', 'Delete Rows'); Ext4.Ajax.request({ url : LABKEY.ActionURL.buildURL('query', 'truncateTable'), method : 'POST', success: function(response) {waitMask.close(); var data = Ext4.JSON.decode(response.responseText); Ext4.Msg.show({ title : 'Success', buttons : Ext4.MessageBox.OK, msg : data.deletedRows + ' rows deleted', fn: function(btn) { if(btn == 'ok') { window.location.reload(); } } })}, failure : function(response, opts) { waitMask.close(); Ext4.getBody().unmask(); LABKEY.Utils.displayAjaxErrorResponse(response, opts); }, jsonData : {schemaName : 'lists', queryName : 'INSERTLISTNAMEHERE'}, scope : this });}});</onClick>
</item>
</buttonBarOptions>
</table>
</tables>
Regards,
Jon