summaryrefslogtreecommitdiffstats
path: root/apps/files/js/app.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-09-04 12:20:11 +0200
committerVincent Petry <pvince81@owncloud.com>2014-09-04 12:20:11 +0200
commit9ae000676c812f5c7f583594ff61462fdcebb2eb (patch)
tree959e177238621231dcfa4c6ec5c056f65b45ff12 /apps/files/js/app.js
parenta8861c70c8e5876a961f00e49db88843432bf7ba (diff)
downloadnextcloud-server-9ae000676c812f5c7f583594ff61462fdcebb2eb.tar.gz
nextcloud-server-9ae000676c812f5c7f583594ff61462fdcebb2eb.zip
Fixed scrollto for search results
Now passing the "scrollto" URL argument to the file list class which will also automatically scroll and highlight the matching element. This code is triggered by the search box when in a different folder and also by the activity app.
Diffstat (limited to 'apps/files/js/app.js')
-rw-r--r--apps/files/js/app.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/js/app.js b/apps/files/js/app.js
index 6f5206fcdb6..89098e3a8a3 100644
--- a/apps/files/js/app.js
+++ b/apps/files/js/app.js
@@ -24,6 +24,7 @@
initialize: function() {
this.navigation = new OCA.Files.Navigation($('#app-navigation'));
+ var urlParams = OC.Util.History.parseUrlQuery();
var fileActions = new OCA.Files.FileActions();
// default actions
fileActions.registerDefaultActions();
@@ -47,7 +48,8 @@
dragOptions: dragOptions,
folderDropOptions: folderDropOptions,
fileActions: fileActions,
- allowLegacyActions: true
+ allowLegacyActions: true,
+ scrollTo: urlParams.scrollto
}
);
this.files.initialize();
@@ -58,7 +60,7 @@
this._setupEvents();
// trigger URL change event handlers
- this._onPopState(OC.Util.History.parseUrlQuery());
+ this._onPopState(urlParams);
},
/**