Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DataTable Config
- $("#table1").DataTable({
- columns: [
- {
- data: null,
- className: "table-view-pf-select",
- render: function(data, type, full, meta) {
- // Select row checkbox renderer
- var id = "select" + meta.row;
- return (
- '<label class="sr-only" for="' +
- id +
- '">Select row ' +
- meta.row +
- '</label><input type="checkbox" id="' +
- id +
- '" name="' +
- id +
- '">'
- );
- },
- sortable: false
- },
- {
- data: "customer",
- },
- {
- data: "type",
- },
- {
- data: "agenteversion",
- },
- {
- data: "ip",
- },
- {
- data: "hostname",
- },
- {
- data: "pc",
- },
- {
- data: "system",
- },
- {
- data: "hub",
- },
- {
- data: "status",
- },
- {
- data: null,
- className: "table-view-pf-actions",
- render: function(data, type, full, meta) {
- // Inline action button renderer
- return '<div class="table-view-pf-btn"><button class="btn btn-default" type="button">Actions</button></div>';
- }
- },
- {
- data: null,
- className: "table-view-pf-actions",
- render: function(data, type, full, meta) {
- // Inline action kebab renderer
- return (
- '<div class="dropdown dropdown-kebab-pf">' +
- '<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">' +
- '<span class="fa fa-ellipsis-v"></span></button>' +
- '<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownKebabRight">' +
- '<li class = "#deleteRows1"><a href="#">Delete Row</a></li>' +
- '<li role="separator" class="divider"></li>' +
- '<li><a href="#">Update Row</a></li></ul></div>'
- );
- }
- }
- ],
- data: dataSet,
- dom: "t",
- language: {
- zeroRecords: "No records found"
- },
- order: [[1, "asc"]],
- pfConfig: {
- emptyStateSelector: "#emptyState1",
- filterCaseInsensitive: true,
- filterCols: [
- null,
- {
- default: true,
- optionSelector: "#filter1",
- placeholder: "Filter By customer..."
- },
- {
- optionSelector: "#filter2",
- placeholder: "Filter By type..."
- },
- {
- optionSelector: "#filter3",
- placeholder: "Filter By agent version..."
- },
- {
- optionSelector: "#filter4",
- placeholder: "Filter By IP..."
- },
- {
- optionSelector: "#filter5",
- placeholder: "Filter By hostname..."
- }
- ,
- {
- optionSelector: "#filter6",
- placeholder: "Filter By PC..."
- }
- ,
- {
- optionSelector: "#filter7",
- placeholder: "Filter By Operation System..."
- }
- ,
- {
- optionSelector: "#filter8",
- placeholder: "Filter By HUB..."
- }
- ,
- {
- optionSelector: "#filter9",
- placeholder: "Filter By Status..."
- }
- ],
- paginationSelector: "#pagination1",
- toolbarSelector: "#toolbar1",
- selectAllSelector: 'th:first-child input[type="checkbox"]',
- colvisMenuSelector: ".table-view-pf-colvis-menu"
- },
- select: {
- selector: 'td:first-child input[type="checkbox"]',
- style: "multi"
- }
- });
- var id = "<?php echo ($rowSelect='meta.row')?>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement