Skip to content
Snippets Groups Projects
Commit 2e210941 authored by HongKee Moon's avatar HongKee Moon
Browse files

Fix #28: Fixed not showing protein tables when pubmed is null

As well as Evidence column is hidden
parent 0ca1f82e
No related branches found
No related tags found
No related merge requests found
......@@ -162,11 +162,15 @@
className: "text-nowrap",
fnCreatedCell: (nTd, sData, oData) => {
// console.log(sData)
let data = vm.pubmed[oData.uniprot_id];
if(data) {
// $(nTd).html(data.filter(a => a.startsWith('http')).join('\n'));
// $(nTd).html(data.map(i => vm.createLink(i)).join('<br/>'));
$(nTd).html(data.map(i => vm.createPubMedLink(i)).join(' '));
if(vm.pubmed) {
let data = vm.pubmed[oData.uniprot_id];
if(data) {
// $(nTd).html(data.filter(a => a.startsWith('http')).join('\n'));
// $(nTd).html(data.map(i => vm.createLink(i)).join('<br/>'));
$(nTd).html(data.map(i => vm.createPubMedLink(i)).join(' '));
} else {
$(nTd).html('')
}
} else {
$(nTd).html('')
}
......@@ -214,25 +218,25 @@
// <button class="copy-button" name="${oData.uniprot_id}" id="${oData.uniprot_id}" data-clipboard-text="${sData}"><i class="glyphicon glyphicon-copy"></i> </button>`);
// },
// }
{
title: 'Evidence Stars',
className: "text-nowrap",
data: 'uniprot_id',
render: function ( data, type, row, meta ) {
// console.log(_.flatMap(row.condensates, c => c.data_sources))
if(row.condensates) {
return getRatingValue(vm.map[row.uniprot_id]);
}
return '';
},
fnCreatedCell: (nTd, sData, oData) => {
// console.log(sData)
let data = vm.map[oData.uniprot_id];
if(data) {
$(nTd).html(getRating(data).join('\n'));
}
}
}
// {
// title: 'Evidence Stars',
// className: "text-nowrap",
// data: 'uniprot_id',
// render: function ( data, type, row, meta ) {
// // console.log(_.flatMap(row.condensates, c => c.data_sources))
// if(row.condensates) {
// return getRatingValue(vm.map[row.uniprot_id]);
// }
// return '';
// },
// fnCreatedCell: (nTd, sData, oData) => {
// // console.log(sData)
// let data = vm.map[oData.uniprot_id];
// if(data) {
// $(nTd).html(getRating(data).join('\n'));
// }
// }
// }
] :
[
{
......@@ -331,26 +335,26 @@
// <button class="copy-button" name="${oData.uniprot_id}" id="${oData.uniprot_id}" data-clipboard-text="${sData}"><i class="glyphicon glyphicon-copy"></i> </button>`);
// },
// }
{
title: 'Evidence Stars',
className: "text-nowrap",
data: 'uniprot_id',
render: function ( data, type, row, meta ) {
// console.log(_.flatMap(row.condensates, c => c.data_sources))
let dat = vm.map[data];
if(dat) {
// console.log(getRatingValue(vm.map[row.uniprot_id]))
return getRatingValue(vm.map[row.uniprot_id]);
}
return '';
},
fnCreatedCell: (nTd, sData, oData) => {
let data = vm.map[oData.uniprot_id];
if(data) {
$(nTd).html(getRating(data).join('\n'));
}
}
}
// {
// title: 'Evidence Stars',
// className: "text-nowrap",
// data: 'uniprot_id',
// render: function ( data, type, row, meta ) {
// // console.log(_.flatMap(row.condensates, c => c.data_sources))
// let dat = vm.map[data];
// if(dat) {
// // console.log(getRatingValue(vm.map[row.uniprot_id]))
// return getRatingValue(vm.map[row.uniprot_id]);
// }
// return '';
// },
// fnCreatedCell: (nTd, sData, oData) => {
// let data = vm.map[oData.uniprot_id];
// if(data) {
// $(nTd).html(getRating(data).join('\n'));
// }
// }
// }
];
const nTableOptions = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment