Skip to content

Commit

Permalink
Merge pull request #29020 from owncloud/filelist-scrollto-revert
Browse files Browse the repository at this point in the history
Revert "Highlight files after setFiles"
  • Loading branch information
Vincent Petry authored Sep 18, 2017
2 parents 71b9b0e + a40bd0a commit 8c03224
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@
*/
_filter: '',

/**
* File to be highlighted in view
* @type String
*/
_scrollTo: null,

/**
* @type Backbone.Model
*/
Expand Down Expand Up @@ -215,9 +209,7 @@
if (this.initialized) {
return;
}
if (options.scrollTo) {
this._scrollTo = options.scrollTo;
}

if (options.config) {
this._filesConfig = options.config;
} else if (!_.isUndefined(OCA.Files) && !_.isUndefined(OCA.Files.App)) {
Expand Down Expand Up @@ -339,6 +331,12 @@

this.$container.on('scroll', _.bind(this._onScroll, this));

if (options.scrollTo) {
this.$fileList.one('updated', function() {
self.scrollTo(options.scrollTo);
});
}

if (options.enableUpload) {
// TODO: auto-create this element
var $uploadEl = this.$el.find('#file_upload_start');
Expand Down Expand Up @@ -1029,13 +1027,6 @@
_.defer(function() {
self.$el.closest('#app-content').trigger(jQuery.Event('apprendered'));
});

if (this._scrollTo) {
this.$fileList.on('updated', function() {
self.scrollTo(self._scrollTo);
self._scrollTo = null;
});
}
},

/**
Expand Down

0 comments on commit 8c03224

Please sign in to comment.