diff --git a/smash/web/static/js/subject.js b/smash/web/static/js/subject.js index caa51b2a38e7f5774a21988afc8193be181d5284..8453f7e93f6e0db28e71aab6bb2fe08b9edbef9f 100644 --- a/smash/web/static/js/subject.js +++ b/smash/web/static/js/subject.js @@ -15,6 +15,7 @@ function createColumn(dataType, name, filter, visible, renderFunction) { function getColumns(type) { var result = []; + result.push(createColumn("id", "Id", null, false)); result.push(createColumn("nd_number", "ND", "string_filter", true)); result.push(createColumn("screening_number", "Screening", "string_filter", true)); result.push(createColumn("first_name", "First name", "string_filter", true)); @@ -26,7 +27,9 @@ function getColumns(type) { result.push(createColumn("postponed", "Postponed", "yes_no_filter", true)); result.push(createColumn("information_sent", "Info sent", "yes_no_filter", true)); result.push(createColumn("type", "Type", "type_filter", true)); - result.push(createColumn("id", "Id", null, false)); + result.push(createColumn("id", "Edit", null, true, function (data, type, row, meta) { + return '<a href="#" type="button" class="btn btn-block btn-default">Edit</a>'; + })); for (var i = 1; i <= 8; i++) { var renderFunction = (function () { var x = i; @@ -38,9 +41,6 @@ function getColumns(type) { result.push(createColumn("visit_" + i, "Visit " + i, "visit_filter", true, renderFunction)); } - result.push(createColumn("id", "Edit", null, true, function (data, type, row, meta) { - return '<a href="#" type="button" class="btn btn-block btn-default">Edit</a>'; - })); return result; }