diff --git a/src/resources/assets/buttons.server-side.js b/src/resources/assets/buttons.server-side.js index 243881c..e96266a 100644 --- a/src/resources/assets/buttons.server-side.js +++ b/src/resources/assets/buttons.server-side.js @@ -137,6 +137,21 @@ } }; + DataTable.ext.buttons.postPdf = { + className: 'buttons-pdf', + + text: function (dt) { + return ' ' + dt.i18n('buttons.pdf', 'PDF'); + }, + + action: function (e, dt, button, config) { + var url = dt.ajax.url() || window.location.href; + var params = _buildParams(dt, 'pdf'); + + _downloadFromUrl(url, params); + } + }; + DataTable.ext.buttons.print = { className: 'buttons-print',