Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomota committed Mar 21, 2019
1 parent c2ef0a7 commit 1056752
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/js/renderer/bwa/analyser.js
Expand Up @@ -33,12 +33,12 @@ function showTable() {
var header = {},
body = {};
header.columns = Object.keys(bwaFileContents.data[0]);
console.log(header.columns);
//console.log(header.columns);
body.records = bwaFileContents.data;

// Generate header column content
header.content = '<tr>\n';
for (column in header.columns) {
for (var column in header.columns) {
header.content += '\t<th><abbr title="{0}">{1}</abbr></th>\n'.format(header.columns[column], getInitials(header.columns[column]));
}
header.content += '</tr>';
Expand All @@ -48,27 +48,27 @@ function showTable() {

// Generate record fields
body.content = '';
for (record in body.records) {
for (var record in body.records) {
body.content += '<tr>\n';
//console.log(body.content);
//console.log(body.records[record]);

for (field in body.records[record]) {
for (var field in body.records[record]) {
body.content += '\t<td>{0}</td>\n'.format(body.records[record][field]);
}
body.content += '</tr>\n';
}
//console.log(body.content);
$('#bwaAnalyserTableTbody').html(body.content);
basetable = $('#bwaAnalyserTable').dataTable();
body.table = $('#bwaAnalyserTable').dataTable();
//$('#bwaAnalyserTable_paginate > a').addClass('button is-small')

$('#bwaFileinputconfirm').addClass('is-hidden');
$('#bwaAnalyser').removeClass('is-hidden');
}

function getInitials(string, threshold = 1) {
initials = string.match(/\b\w/g);
var initials = string.match(/\b\w/g);

(initials.length > threshold) ?
initials = initials.join("").toString() :
Expand Down
2 changes: 0 additions & 2 deletions app/js/renderer/bwa/fileinput.js
Expand Up @@ -6,8 +6,6 @@ var whois = require('../../common/whoiswrapper.js'),
dt = require('datatables')(),
bwaFileContents;



require('../../common/stringformat.js');

const {
Expand Down

0 comments on commit 1056752

Please sign in to comment.