diff --git a/browser/images/lc_zoterobook.svg b/browser/images/lc_zoterobook.svg new file mode 100644 index 000000000..40370aba4 --- /dev/null +++ b/browser/images/lc_zoterobook.svg @@ -0,0 +1 @@ + diff --git a/browser/images/lc_zoterojournalArticle.svg b/browser/images/lc_zoterojournalArticle.svg new file mode 100644 index 000000000..d137aea75 --- /dev/null +++ b/browser/images/lc_zoterojournalArticle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/browser/images/lc_zoterothesis.svg b/browser/images/lc_zoterothesis.svg new file mode 100644 index 000000000..4114584df --- /dev/null +++ b/browser/images/lc_zoterothesis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/browser/src/control/Control.Zotero.js b/browser/src/control/Control.Zotero.js index 55f9d6029..acc4307fe 100644 --- a/browser/src/control/Control.Zotero.js +++ b/browser/src/control/Control.Zotero.js @@ -203,12 +203,18 @@ L.Control.Zotero = L.Control.extend({ // columns: Array of details which will be displayed in the dialog // entryData: Object containing extra details related to the entry - createEntry: function (index, columns, entryData) { - this.items.push(Object.assign({ 'columns': columns.map( + createEntry: function (index, columns, entryData, hasIcon) { + if (hasIcon) { + var icon = 'zotero' + entryData.itemType; + var firstColumn = [ { collapsed: icon, expanded: icon } ]; + } else { + firstColumn = []; + } + this.items.push(Object.assign({ 'columns': firstColumn.concat(columns.map( function (item) { return { text: item }; } - ), row: index, + )), row: index, }, entryData)); }, @@ -224,7 +230,8 @@ L.Control.Zotero = L.Control.extend({ var creatorString = creatorArray.join(', '); this.createEntry(iterator, [items[iterator].data.title, creatorString, items[iterator].data.date], - {citation: items[iterator].citation, bib: items[iterator].bib, type: 'item'} + {citation: items[iterator].citation, bib: items[iterator].bib, type: 'item', itemType: items[iterator].data.itemType}, + true ); } },