Converting custom buttons to use latest html stuff since flash is no more

Converting custom buttons to use latest html stuff since flash is no more

vsekvsek Posts: 30Questions: 17Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown: flash error
Description of problem: I inherited some screens from previous dev and they took datables and customized it and now they dont work because of flash issue
Figured its a longshot but...
Below is the custom code that builds these buttons. I see how its supposed to be done on this site. Problem is previous dev took the datatable and totally customized it which would requirement to totally redo these screens which I want to avoid if possible. Is there a way to convert this to not use flash by utilizing some options?

    _createCustomTableToolbarButtons : function() {
        // Extend TableTools.Buttons -- A framework for adding buttons to the DataTable


        TableTools.BUTTONS.new_entry = $.extend(true, TableTools.buttonBase, {
            "sNewLine" : "<br>",
            "sButtonText" : "Add " + this._getEditDialogName(),
            "sExtends" : "div",
            "dialogInstance" : this,

            "fnClick" : this._handleCreateRecordEvent,
            "fnInit": function ( nButton, oConfig ) {
                $(nButton).button();
            }}

        );
    },

    _defineOTableTools : function() {
        var tools;
        if (this.options.flagEnableTableToolbar) {
            this._createCustomTableToolbarButtons();
            var aButtons = ["copy", "csv",  "xls", "print"]; 
            if(isFullEditUser){
                aButtons = [{"sExtends" : "new_entry"}, "copy", "csv",  "xls", "print"];
            }
            tools = {
                    "sSwfPath": resourceContext+"/swf/copy_csv_xls_pdf.swf",
                    "aButtons": aButtons                            
                };
        }
        return tools;
    },

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    TableTools are old and are no longer supported. It would be worth updating and using Buttons instead.

    If still no joy, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

    Colin

This discussion has been closed.