Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add column? #10

Closed
teertinker opened this issue Mar 18, 2015 · 3 comments
Closed

Is it possible to add column? #10

teertinker opened this issue Mar 18, 2015 · 3 comments

Comments

@teertinker
Copy link

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
Copy link
Owner

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

  • Do all the items have keywords? If not, you might want to replace item.keywords with item.keywords || "".
  • Did you build the code again after editing? Or did you edit directly the build/biblist.js (or the min version)?

@teertinker
Copy link
Author

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

@vkaravir
Copy link
Owner

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants