モデル Contacts に JQuery-datatables を使用しており、このTableToolsを申請しています。データテーブル用のボタンをいくつか用意しましたが、すべてのテーブルを保存するのではなく、1 ページしか保存しません。私が調べた例では、すべてのテーブルを保存しても問題ないようです。
ここに私のcontacts.js.coffeeがあります:
jQuery ->
$.extend $.fn.dataTableExt.oStdClasses,
sSortAsc: "header headerSortDown"
sSortDesc: "header headerSortUp"
sSortable: "header"
$('#contacts').dataTable
sPaginationType: "bootstrap"
bJQueryUI: true
bProcessing: true
bServerSide: true
sAjaxSource: $('#contacts').data('source')
sDom: "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>"
oTableTools:
sSwfPath: "/swf/copy_csv_xls_pdf.swf"
aButtons: [
sExtends: "copy"
sButtonText: "Copy to clipboard",
sExtends: "csv"
sButtonText: "Save to CSV",
sExtends: "xls"
sButtonText: "Save for Excel"
]
私は何を間違っていますか?前もって感謝します!