Use items-list sort order for report from collection or saved search
https://forums.zotero.org/discussion/99284/exporting-a-report-sorted-by-first-date Regression from HTML tree
This commit is contained in:
parent
aa50bf24aa
commit
a4f802806c
2 changed files with 6 additions and 2 deletions
|
@ -1807,6 +1807,11 @@ var ItemTree = class ItemTree extends LibraryTree {
|
||||||
return this._rows.map(row => asIDs ? row.ref.id : row.ref);
|
return this._rows.map(row => asIDs ? row.ref.id : row.ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current sort order of the items list
|
||||||
|
*
|
||||||
|
* @return {Number} - -1 for descending, 1 for ascending
|
||||||
|
*/
|
||||||
getSortDirection(sortFields) {
|
getSortDirection(sortFields) {
|
||||||
sortFields = sortFields || this.getSortFields();
|
sortFields = sortFields || this.getSortFields();
|
||||||
if (this.collectionTreeRow.isFeed()) {
|
if (this.collectionTreeRow.isFeed()) {
|
||||||
|
|
|
@ -30,9 +30,8 @@ var Zotero_Report_Interface = new function() {
|
||||||
*/
|
*/
|
||||||
this.loadCollectionReport = function () {
|
this.loadCollectionReport = function () {
|
||||||
var sortColumn = ZoteroPane_Local.getSortField();
|
var sortColumn = ZoteroPane_Local.getSortField();
|
||||||
var sortDirection = ZoteroPane_Local.getSortDirection();
|
|
||||||
var queryString = '?sort=' + sortColumn
|
var queryString = '?sort=' + sortColumn
|
||||||
+ '&direction=' + (sortDirection == 'ascending' ? 'asc' : 'desc');
|
+ '&direction=' + (ZoteroPane.getSortDirection() == 1 ? 'asc' : 'desc');
|
||||||
|
|
||||||
var url = 'zotero://report/';
|
var url = 'zotero://report/';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue