Skip to content

TableTools collection buttons do not function #16

@stevelippert

Description

@stevelippert

Given the following DataTables init I'm unable to click all of the options in the collection.

    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",
        }
        });

2014-02-18 15_01_10-student list

Hovering over "CSV" activates "PDF" (as shown above), and will produce a PDF file. Attempting to use Excel and PDF do not work at all. Hovering over Print, it does not go active. Also the warning modal for print does not appear as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions