Merge pull request #621 from aurimasv/api_syncing-bugfix
[API syncing] Minor bugfixes
This commit is contained in:
commit
66a6272adc
3 changed files with 7 additions and 6 deletions
|
@ -184,9 +184,9 @@ Zotero.CollectionTreeView.prototype.refresh = Zotero.Promise.coroutine(function*
|
|||
rows,
|
||||
new Zotero.CollectionTreeRow('group', groups[i]),
|
||||
1,
|
||||
beforeRow ? beforeRow + i + newRows : null
|
||||
beforeRow ? beforeRow + newRows : null
|
||||
);
|
||||
newRows += yield self._expandRow(rows, row);
|
||||
newRows += 1 + ( yield self._expandRow(rows, row) );
|
||||
}
|
||||
return newRows;
|
||||
})
|
||||
|
|
|
@ -256,9 +256,6 @@ Zotero.Items = function() {
|
|||
if (this.isPrimaryField(field)) {
|
||||
primaryFields.push(field);
|
||||
}
|
||||
else if (field == 'itemType') {
|
||||
primaryFields.push('itemTypeID');
|
||||
}
|
||||
else {
|
||||
fieldIDs.push(Zotero.ItemFields.getID(field));
|
||||
if (Zotero.ItemFields.isBaseField(field)) {
|
||||
|
@ -288,7 +285,7 @@ Zotero.Items = function() {
|
|||
}
|
||||
Zotero.debug(obj.itemID);
|
||||
Zotero.debug(Object.keys(this._objectCache));
|
||||
this._objectCache[obj.itemID].loadFromRow(rowObj);
|
||||
this._objectCache[obj.itemID].loadFromRow(obj);
|
||||
}.bind(this)
|
||||
}
|
||||
);
|
||||
|
|
|
@ -302,6 +302,10 @@ Zotero.ItemTreeView.prototype.refresh = Zotero.serial(Zotero.Promise.coroutine(f
|
|||
case 'year':
|
||||
field = 'date';
|
||||
break;
|
||||
|
||||
case 'itemType':
|
||||
field = 'itemTypeID';
|
||||
break;
|
||||
}
|
||||
if (cacheFields.indexOf(field) == -1) {
|
||||
cacheFields = cacheFields.concat(field);
|
||||
|
|
Loading…
Reference in a new issue