diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-02-05 14:08:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 14:08:37 +0100 |
commit | dbd0bd6b3f4be9daf79a5ceb824d6939a4ded21e (patch) | |
tree | 94c8f6610f98eadd116a3ed4b9ff83782604763b /apps | |
parent | 3d33703ed96bbdcfd18267ae0133d459a72578f0 (diff) | |
parent | 979cf79555ca06ac3a31cad027d76bc20424b36b (diff) | |
download | nextcloud-server-dbd0bd6b3f4be9daf79a5ceb824d6939a4ded21e.tar.gz nextcloud-server-dbd0bd6b3f4be9daf79a5ceb824d6939a4ded21e.zip |
Merge pull request #13954 from nextcloud/bugfix/noid/show-original-location-in-trashbin
Show original path in trashbin
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_trashbin/js/filelist.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js index 3159506fae9..07e041faefd 100644 --- a/apps/files_trashbin/js/filelist.js +++ b/apps/files_trashbin/js/filelist.js @@ -11,6 +11,7 @@ var DELETED_REGEXP = new RegExp(/^(.+)\.d[0-9]+$/); var FILENAME_PROP = '{http://nextcloud.org/ns}trashbin-filename'; var DELETION_TIME_PROP = '{http://nextcloud.org/ns}trashbin-deletion-time'; + var TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location'; /** * Convert a file name in the format filename.d12345 to the real file name. @@ -54,11 +55,13 @@ initialize: function() { this.client.addFileInfoParser(function(response, data) { var props = response.propStat[0].properties; + var path = props[TRASHBIN_ORIGINAL_LOCATION]; return { displayName: props[FILENAME_PROP], mtime: parseInt(props[DELETION_TIME_PROP], 10) * 1000, hasPreview: true, - path: data.path.substr(6), // remove leading /trash + path: path, + extraData: path } }); @@ -248,7 +251,7 @@ * Returns list of webdav properties to request */ _getWebdavProperties: function() { - return [FILENAME_PROP, DELETION_TIME_PROP].concat(this.filesClient.getPropfindProperties()); + return [FILENAME_PROP, DELETION_TIME_PROP, TRASHBIN_ORIGINAL_LOCATION].concat(this.filesClient.getPropfindProperties()); }, /** |