Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableTools collection buttons do not function #16

Open
stevelippert opened this issue Feb 18, 2014 · 1 comment
Open

TableTools collection buttons do not function #16

stevelippert opened this issue Feb 18, 2014 · 1 comment

Comments

@stevelippert
Copy link

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.

@wunsjoshi
Copy link

Hello @stevelippert,

I have same issue. But one good thing is that after using your code I am able to properly display collection buttons for Export functionality.

Still issue stays that CSV, Excel, PDF are not working in Collection case.

Does anybody has solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants