summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorMichael Jobst <mjobst+github@tecratech.de>2016-11-21 15:03:45 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-12-23 16:56:55 +0100
commit969c19b2e926331e2686208507c2643107caf5a1 (patch)
treec0c03ac7bbcdc7760e97e35ddacef8919ed527e6 /apps/files/js/filelist.js
parent56c016946d0695a62e418839cf19786a223b4ae7 (diff)
downloadnextcloud-server-969c19b2e926331e2686208507c2643107caf5a1.tar.gz
nextcloud-server-969c19b2e926331e2686208507c2643107caf5a1.zip
Fixed size issues on main detail view and disappearing of share recipients (#26603)
* fixed size issues on main detail view and disappearing of share recipients * Changes due to code comments * Moved reloadProperties() to FileInfoModel * Solved Scrutinizer issues * Bugfix: undefined value used on error * check if options are set for FileInfoModel.initialize() Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index a8daeadfd26..cd0eb390ee3 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -442,7 +442,9 @@
// In the future the FileList should work with Backbone.Collection
// and contain existing models that can be used.
// This method would in the future simply retrieve the matching model from the collection.
- var model = new OCA.Files.FileInfoModel(this.elementToFile($tr));
+ var model = new OCA.Files.FileInfoModel(this.elementToFile($tr), {
+ filesClient: this.filesClient
+ });
if (!model.get('path')) {
model.set('path', this.getCurrentDirectory(), {silent: true});
}
@@ -891,11 +893,14 @@
mimetype: $el.attr('data-mime'),
mtime: parseInt($el.attr('data-mtime'), 10),
type: $el.attr('data-type'),
- size: parseInt($el.attr('data-size'), 10),
etag: $el.attr('data-etag'),
permissions: parseInt($el.attr('data-permissions'), 10),
hasPreview: $el.attr('data-has-preview') === 'true'
};
+ var size = $el.attr('data-size');
+ if (size) {
+ data.size = parseInt(size, 10);
+ }
var icon = $el.attr('data-icon');
if (icon) {
data.icon = icon;
@@ -1029,7 +1034,7 @@
* Returns whether the given file info must be hidden
*
* @param {OC.Files.FileInfo} fileInfo file info
- *
+ *
* @return {boolean} true if the file is a hidden file, false otherwise
*/
_isHiddenFile: function(file) {
@@ -2828,7 +2833,6 @@
});
uploader.on('fail', function(e, data) {
self._uploader.log('filelist handle fileuploadfail', e, data);
-
self._uploads = [];
//if user pressed cancel hide upload chrome