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,
|
rows,
|
||||||
new Zotero.CollectionTreeRow('group', groups[i]),
|
new Zotero.CollectionTreeRow('group', groups[i]),
|
||||||
1,
|
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;
|
return newRows;
|
||||||
})
|
})
|
||||||
|
|
|
@ -256,9 +256,6 @@ Zotero.Items = function() {
|
||||||
if (this.isPrimaryField(field)) {
|
if (this.isPrimaryField(field)) {
|
||||||
primaryFields.push(field);
|
primaryFields.push(field);
|
||||||
}
|
}
|
||||||
else if (field == 'itemType') {
|
|
||||||
primaryFields.push('itemTypeID');
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
fieldIDs.push(Zotero.ItemFields.getID(field));
|
fieldIDs.push(Zotero.ItemFields.getID(field));
|
||||||
if (Zotero.ItemFields.isBaseField(field)) {
|
if (Zotero.ItemFields.isBaseField(field)) {
|
||||||
|
@ -288,7 +285,7 @@ Zotero.Items = function() {
|
||||||
}
|
}
|
||||||
Zotero.debug(obj.itemID);
|
Zotero.debug(obj.itemID);
|
||||||
Zotero.debug(Object.keys(this._objectCache));
|
Zotero.debug(Object.keys(this._objectCache));
|
||||||
this._objectCache[obj.itemID].loadFromRow(rowObj);
|
this._objectCache[obj.itemID].loadFromRow(obj);
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -302,6 +302,10 @@ Zotero.ItemTreeView.prototype.refresh = Zotero.serial(Zotero.Promise.coroutine(f
|
||||||
case 'year':
|
case 'year':
|
||||||
field = 'date';
|
field = 'date';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'itemType':
|
||||||
|
field = 'itemTypeID';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (cacheFields.indexOf(field) == -1) {
|
if (cacheFields.indexOf(field) == -1) {
|
||||||
cacheFields = cacheFields.concat(field);
|
cacheFields = cacheFields.concat(field);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue