Adding Button before oTableTools

Adding Button before oTableTools

xtremer360xtremer360 Posts: 84Questions: 2Answers: 0
edited February 2015 in Free community support

I'm trying to find out how I can add a button to right before the copy button that will always be a link to the create page of the resource. So if its on /users and in the list of buttons if a user clicks Add then it goes to /users/create. How would I do that with my code below. I also have a couple of errors and researched it and found out my errors might be due to the order in which my files are rendered. I have included the order below.


TypeError: jQuery[g3g][((((Y2 + Z3) + G4) + p1) + F9e)] is undefined ...((Y2+G4+d6g+Z3+G4+A1e+U2+y8g))):jQuery&&!jQuery[g3g][(Y2+Z3+G4+p1+F9e)][(y8+t5e+... dataTab...itor.js (line 475, col 170) TypeError: DataTable.Editor is undefined DataTable.Editor.defaults.display = "bootstrap"; editor....trap.js (line 8)
$('document').ready(function() {
    $('#myDatatable').dataTable({
        "pagingType": "full_numbers",
        "aoColumnDefs": [
            { 'bSortable': false, 'aTargets': [-1] },
            { 'sWidth': '30px', 'aTargets': ['idTH'] },
            { 'sWidth': '150px', 'aTargets': ['actionsTH', 'subTH'] }
        ],
        "iDisplayLength": 10,
        "aLengthMenu": [
            [5, 10, 25, 50, -1],
            [5, 10, 25, 50, "All"]
        ],
        dom: '<"dt-panelmenu clearfix"Tfr>t<"dt-panelfooter clearfix"ip>',
        "oTableTools": {
            "sSwfPath": "vendor/plugins/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf"
        }
    });
});
<script src="http://myapp.app/vendor/jquery/jquery-1.11.1.min.js">
<script src="http://myapp.app/vendor/jquery/jquery_ui/jquery-ui.min.js">
<script src="http://myapp.app/assets/js/bootstrap/bootstrap.min.js">
<script src="http://myapp.app/assets/js/utility/utility.js">
<script src="http://myapp.app/assets/js/main.js">
<script type="text/javascript">
<script src="http://myapp.app/vendor/plugins/datatables/media/js/jquery.dataTables.js">
<script src="http://myapp.app/vendor/plugins/datatables/media/js/dataTables.bootstrap.js">
<script src="http://myapp.app/vendor/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.min.js">
<script src="http://myapp.app/vendor/plugins/datatables/extensions/Editor/js/dataTables.editor.js">
<script src="http://myapp.app/vendor/plugins/datatables/media/js/dataTables.bootstrap.js">
<script src="http://myapp.app/vendor/plugins/datatables/extensions/Editor/js/editor.bootstrap.js">
<script src="http://myapp.app/assets/js/my-datatables.js">

Answers

This discussion has been closed.