Example #1
0
', 'name' : 'columns' } );
      aoData.push( { 'value': '<?php 
        echo htmlspecialchars($this->sql);
        ?>
', 'name' : 'base_sql' } );
    },
    "aaSorting": <?php 
        echo $this->sort;
        ?>
,
    "bLengthChange": false,
    "bFilter": false,
    "iDisplayLength" : 30,
    "bAutoWidth": true,
    <?php 
        echo column_widths($this->widths);
        ?>
    "bPaginate": true
  });
});

<?php 
        if ($api_delete_function) {
            ?>

function askConfirmation( id, name ) {
  if(confirm('Are you sure you want to delete ' + name + '? This can not be undone. ')) {
    deleteItem( id, name, true );
  }
}
Example #2
0
        "bPaginate": true
    });
	var oTableQualities = $('#datatable_implementationqualities').dataTable( {
		"bServerSide": true,
		"sAjaxSource": "api_query/table_feed",
		"sServerMethod": "POST",
		"bPaginate": false,
		"fnServerParams": function ( aoData ) {
		  <?php 
    echo array_to_parsed_string($this->dt_qualities, "aoData.push( { 'value': '[VALUE]', 'name' : '[KEY]' } );\n");
    ?>
		},
		"iDisplayLength" : 50,
		"bAutoWidth": false,
		<?php 
    echo column_widths($this->dt_qualities['column_widths']);
    ?>
    });
    /* Add event listener for opening and closing details
     * Note that the indicator for showing which row is open is not controlled by DataTables, rather it is done here
     */
    $('#datatable_main tbody td img').on('click', function () {
        var nTr = $(this).parents('tr')[0];
        if ( oTableRuns.fnIsOpen(nTr) )
        {
            // This row is already open - close it
            this.src = "img/datatables/details_open.png";
            oTableRuns.fnClose( nTr );
        }
        else
        {
Example #3
0
				"copy","print","csv", "pdf",
                {
                    "sExtends":    "text",
                    "sButtonText": "Show all/best results",
					"fnClick": function toggleResults(nButton,oConfig,oFlash) {
						oTableRunsShowAll = !oTableRunsShowAll;
						oTableRuns.fnDraw(true);
					}
                }
            ]
		},
		"aLengthMenu": [[10, 50, 100, 250], [10, 50, 100, 250]],
		"iDisplayLength" : 50,
		"bAutoWidth": false,
		<?php 
    echo column_widths($this->dt_main['column_widths']);
    ?>
        "bPaginate": true
    });

    /* Add event listener for opening and closing details
     * Note that the indicator for showing which row is open is not controlled by DataTables, rather it is done here
     */
    $('#datatable_main tbody td img').on('click', function () {
        var nTr = $(this).parents('tr')[0];
        if ( oTableRuns.fnIsOpen(nTr) )
        {
            // This row is already open - close it
            this.src = "img/datatables/details_open.png";
            oTableRuns.fnClose( nTr );
        }