Skip to content

Instantly share code, notes, and snippets.

@stevelippert
Created February 18, 2014 21:03
Show Gist options
  • Select an option

  • Save stevelippert/9080027 to your computer and use it in GitHub Desktop.

Select an option

Save stevelippert/9080027 to your computer and use it in GitHub Desktop.
Broken Collection Buttons
var tableContainer = $(".dataTables");
tableContainer.dataTable({
"bPaginate" : false,
"bAutoWidth" : false,
"fnPreDrawCallback": function () {
if (!responsiveHelper) {
responsiveHelper = new ResponsiveDatatablesHelper(tableContainer, breakpointDefinition);
}
},
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
responsiveHelper.createExpandIcon(nRow);
},
"fnDrawCallback": function (oSettings) {
responsiveHelper.respond();
},
"sDom" : 'T<"clear"><"top"plf<"clear">>rt<"bottom"ipl<"clear">>',
"oLanguage" : {
"sEmptyTable" : "There are currently no students registered for this course.",
"sLengthMenu" : "Show: _MENU_",
"sSearch" : "Filter:",
"sZeroRecords" : "There are currently no students registered for this course."
},
"aoColumns" :[
{
"sType" :"title-string",
"sWidth" :"175px"
},
{ "sWidth" : "140px" },
{ "sWidth" : "75px" },
{ "sWidth" : "300px" },
{ "sWidth" : "100px" },
{ "sWidth" : "70px" },
{ "sWidth" : "200px" },
{ "sWidth" : "250px" },
{ "sWidth" : "175px" }
],
"aaSorting" : [ [0,"asc"] ],
"bAutoWidth" : false,
"oTableTools" : {
"aButtons" : [
{
"sExtends" : "collection",
"sButtonText": "Export Student List <span class='caret' />",
"sButtonClass": "btn btn-default",
"aButtons" : [
"csv",
"xls",
"pdf",
"print"
]
}
],
"sSwfPath" : "/codeExtra/datatables/1.9.4/copy_csv_xls_pdf.swf",
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment