mirror of
https://github.com/zotero/zotero.git
synced 2026-09-17 23:51:18 +00:00
Embed group relations in Word documents
This commit is contained in:
parent
45b5421941
commit
7aa474e584
1 changed files with 11 additions and 0 deletions
|
|
@ -2054,6 +2054,17 @@ Zotero.Integration.URIMap.prototype.getURIsForItemID = function(id) {
|
|||
if(!this.itemIDURIs[id]) {
|
||||
this.itemIDURIs[id] = [Zotero.URI.getItemURI(Zotero.Items.get(id))];
|
||||
}
|
||||
|
||||
// Make sure that group relations are included
|
||||
var uris = this.itemIDURIs[id];
|
||||
for(var i=0; i<uris.length; i++) {
|
||||
var relations = Zotero.Relations.getByURIs(uris[i], Zotero.Item.linkedItemPredicate);
|
||||
for(var j=0, n=relations.length; j<n; j++) {
|
||||
var newUri = relations[j].object;
|
||||
if(uris.indexOf(newUri) === -1) uris.push(newUri);
|
||||
}
|
||||
}
|
||||
|
||||
return this.itemIDURIs[id];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue