diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-20 18:32:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 18:32:51 +0200 |
commit | 0864f53675e00c6606f614c34bb0ccfc5e5409a4 (patch) | |
tree | 10d5f3138c84a0be982226e7582700f84779e4f6 /apps/files/js | |
parent | ed4ed7911a9329462fef02c2d50709b3f092538e (diff) | |
parent | 361f008c705009eee8d7435f46095760ac706456 (diff) | |
download | nextcloud-server-0864f53675e00c6606f614c34bb0ccfc5e5409a4.tar.gz nextcloud-server-0864f53675e00c6606f614c34bb0ccfc5e5409a4.zip |
Merge pull request #1796 from nextcloud/oc_fav-report
Make it possible to filter by tags with REPORT method
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/favoritesfilelist.js | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/files/js/favoritesfilelist.js b/apps/files/js/favoritesfilelist.js index e6532ab188c..380689be10b 100644 --- a/apps/files/js/favoritesfilelist.js +++ b/apps/files/js/favoritesfilelist.js @@ -75,24 +75,25 @@ $(document).ready(function() { // there is only root this._setCurrentDir('/', false); - this._reloadCall = $.ajax({ - url: OC.generateUrl('/apps/files/api/v1/tags/{tagName}/files', {tagName: tagName}), - type: 'GET', - dataType: 'json' - }); + this._reloadCall = this.filesClient.getFilteredFiles( + { + favorite: true + }, + { + properties: this._getWebdavProperties() + } + ); var callBack = this.reloadCallback.bind(this); return this._reloadCall.then(callBack, callBack); }, - reloadCallback: function(result) { - delete this._reloadCall; - this.hideMask(); - - if (result.files) { - this.setFiles(result.files.sort(this._sortComparator)); - return true; + reloadCallback: function(status, result) { + if (result) { + // prepend empty dir info because original handler + result.unshift({}); } - return false; + + return OCA.Files.FileList.prototype.reloadCallback.call(this, status, result); } }); |