vkaravir / bib-publication-list

Interactive publications lists with JavaScript + Bibtex
132 stars 63 forks source link

Is it possible to add column? #10

Closed teertinker closed 9 years ago

teertinker commented 9 years ago

Hello, this tool is really great. I wonder if its possible to ad a column to the table and insert some new data (by manipulating the code).

I would like to add the Keywords of my bibtexfile to another column.

I thought this might work by editing the code by adding the italic code, but it doesn't work.

bibentries.push([item.year, item.keywords, bib2html.labels[item.entryType], html]); .... var table = this.$pubTable.dataTable({ 'aaData': bibentries, 'aaSorting': this.options.sorting, 'aoColumns': [ { "sTitle": "Year"}, { "sTitle": "Keywords"}, { "sTitle": "Type", "sType": "type-sort", "asSorting": [ "desc", "asc" ]}, { "sTitle": "Publication", "bSortable": false }], 'bPaginate': false });

Is there a way I could achieve 4 columns?

vkaravir commented 9 years ago

That's how it should be work. Two possible reasons for it not working come to mind:

teertinker commented 9 years ago

Dear vkaravir, thanks a lot. The first hint did it. (I edited the bib-list.js directly).

vkaravir commented 9 years ago

Cool that it worked! I might add support for custom columns in the future, but it might take me a while to get to it :)