<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<link href="https://nightly.datatables.net/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://nightly.datatables.net/js/jquery.dataTables.js"></script>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
<body>
<div class="container">
<table id="ndaTbl" class="table table-bordered table-hover dataTable table-striped" style="width:100%" data-order='[[0, "desc"]]' data-page-length="10">
<thead class="thead-light">
<tr>
<th>Counterparty</th>
<th class="not-mobile">Contract Title</th>
<th>Status</th>
<th class="not-mobile">Start Date</th>
<th class="not-mobile">Expiration Date</th>
<th class="not-mobile">Requester</th>
<th class="not-mobile">Created Date</th>
</tr>
</thead>
</table>
</div>
</body>
</html>
body {
font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
}
$(document).ready( function () {
var data = [{
"_1880_full_name": "Erin Crump",
"status": "Signed",
"date_created": "Jun 08 2020 11:48:07",
"_name": "Christopher Fraser",
"id": 1207,
"creator_login": "Erin.Crump@dell.org",
"contract_type": "NDA",
"contract_amount": "N/A",
"contract_end_date": "N/A",
"url": "/ui/eui2template/viewrecord.htm;page=cQZ0DzVNy7rH4wwlloiRf8Dzdlc10064.al;en;CSRF_NONCE=75A29FE18CF374D235B289C0A23ED4E4?recordID=1207&tablename=non_disclosure_agreement",
"created_by": "Erin Crump",
"contract_start_date": "",
"contract_title1": "Unified NDA"
}, {
"_1880_full_name": "Leah Jenkins",
"status": "Signed",
"date_created": "Jun 09 2020 14:51:30",
"_name": "Melizabeth Sauceda Abundis",
"id": 1218,
"creator_login": "leah.jenkins@dell.org",
"contract_type": "NDA",
"contract_amount": "N/A",
"contract_end_date": "N/A",
"url": "/ui/eui2template/viewrecord.htm;page=cQZ0DzVNy7rH4wwlloiRf8Dzdlc10064.al;en;CSRF_NONCE=75A29FE18CF374D235B289C0A23ED4E4?recordID=1218&tablename=non_disclosure_agreement",
"created_by": "Leah Jenkins",
"contract_start_date": "",
"contract_title1": "Unified NDA"
}, {
"_1880_full_name": "Leah Jenkins",
"status": "Signed",
"date_created": "Jun 10 2020 10:23:19",
"_name": "Jalen Moore",
"id": 1219,
"creator_login": "leah.jenkins@dell.org",
"contract_type": "NDA",
"contract_amount": "N/A",
"contract_end_date": "N/A",
"url": "/ui/eui2template/viewrecord.htm;page=cQZ0DzVNy7rH4wwlloiRf8Dzdlc10064.al;en;CSRF_NONCE=75A29FE18CF374D235B289C0A23ED4E4?recordID=1219&tablename=non_disclosure_agreement",
"created_by": "Leah Jenkins",
"contract_start_date": "",
"contract_title1": "Unified NDA"
}];
var options = {
"data": data,
"responsive": true,
"createdRow": function( row, data, dataIndex ) {
if(data.expiring) {
$(row).addClass("expiring");
}
},
"columns": [
null,
{data: "contract_title1"},
{data: "status"},
{data: "contract_start_date"},
{data: "contract_end_date"},
{data: "created_by"},
{data: "date_created"}
],
"columnDefs": [
{
"targets": 0,
"data": null,
"render": function ( data, type, row, meta ) {
return '<a href="' + data.url + '" target="_self">' + data._name + '</a>';
}
},
{
"targets": [3],
"render": function (data) {
if (data !== "")
return moment(data, 'MMM DD YYYY H:mm:ss').format("MMM DD, YYYY");
else
return data;
}
},
{
"targets": [4],
"render": function(data){
if(data !== "N/A")
return moment(data, 'MMM DD YYYY').format("MMM DD, YYYY");
else
return data;
}
},
{
"targets": [6],
"visible": false
}
],
"order": [[5, "desc"]]
};
var table = $('#ndaTbl').DataTable(options);
} );
This bin was created anonymously and its free preview time has expired. Get a free unrestricted account
Dismiss xShortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + [ | Indents selected lines |
ctrl + ] | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Clone Bin |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |