-
Notifications
You must be signed in to change notification settings - Fork 434
/
project.js
29 lines (29 loc) · 873 Bytes
/
project.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function renderProjectsTable(length) { // jshint ignore:line
length = length || 25;
var projects = mainProjects;
if (!$('#excludefilter').is(":checked"))
projects = projects.concat(exclProjects);
var projecturl = $("#projects-table-wrapper").data("url");
$("#projects-table").DataTable({
"data": projects,
"columns": [
{
"title": "Name",
"width": "60%",
"className": "text-word-break-all",
"render": function (obj, type, dataRow) {
var url = projecturl.replace(/REPLACEIT/, dataRow[0]);
return '<a href="' + url + '">' + dataRow[0] + '</a>';
}
},
{
"title": "Title",
"width": "40%",
"className": "text-nowrap"
}
],
"pageLength": length,
"stateSave": true,
"language": { "search": '', "searchPlaceholder": "Search..." }
});
}