aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/detailsview.js17
-rw-r--r--apps/files/js/filelist.js1
2 files changed, 18 insertions, 0 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js
index feced7e34dd..c28de71ab7d 100644
--- a/apps/files/js/detailsview.js
+++ b/apps/files/js/detailsview.js
@@ -83,6 +83,8 @@
self.$el.addClass('disappear');
event.preventDefault();
});
+
+ this._addTestTabs();
},
/**
@@ -94,6 +96,21 @@
}
},
+ _addTestTabs: function() {
+ for (var j = 0; j < 2; j++) {
+ var testView = new OCA.Files.DetailTabView('testtab' + j);
+ testView.index = j;
+ testView.getLabel = function() { return 'Test tab ' + this.index; };
+ testView.render = function() {
+ this.$el.empty();
+ for (var i = 0; i < 100; i++) {
+ this.$el.append('<div>Test tab ' + this.index + ' row ' + i + '</div>');
+ }
+ };
+ this._tabViews.push(testView);
+ }
+ },
+
/**
* Renders this details view
*/
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 5c7fcb6b998..796b14199d8 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -302,6 +302,7 @@
this._detailsView.setFileInfo(_.extend({
path: this.getCurrentDirectory()
}, fileInfo));
+ this._detailsView.$el.scrollTop(0);
_.defer(function() {
self._detailsView.$el.removeClass('disappear hidden');
});