Add 'getDataTable' function from old template.

This commit is contained in:
Ivan Filippov 2016-04-26 18:51:06 -06:00
parent e7bc0a1d6e
commit 4164f34fa4

View File

@ -24,4 +24,22 @@ function applyChanges(data, url, showResult) {
}
});
}
function getTableData(table) {
var rData = []
// reformat - pretty format
var records = []
table.rows().every(function() {
var r = this.data();
var record = {}
record["record_name"] = r[0].trim();
record["record_type"] = r[1].trim();
record["record_status"] = r[2].trim();
record["record_ttl"] = r[3].trim();
record["record_data"] = r[4].trim();
records.push(record);
});
return records
}