diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-19 15:20:44 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-30 10:06:29 +0200 |
commit | 60bcdc550e95fbf0104bbc9c8028777016d73663 (patch) | |
tree | d6ca8475d7ea4cb8aa7e034add8902926171e612 /apps/files/js/app.js | |
parent | 279ede33af09c43e03f97458c7fa673ff2b7982a (diff) | |
download | nextcloud-server-60bcdc550e95fbf0104bbc9c8028777016d73663.tar.gz nextcloud-server-60bcdc550e95fbf0104bbc9c8028777016d73663.zip |
Fixed file actions for sharing views
FileActions can now be clone to be use for separate file list views
without having the side-effect of affecting the main file list view.
Added "Open" action in sharing overview file lists to redirect to the
regular file list when clicking on a folder.
Diffstat (limited to 'apps/files/js/app.js')
-rw-r--r-- | apps/files/js/app.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/js/app.js b/apps/files/js/app.js index 9155fb38cdb..6d8a9788d97 100644 --- a/apps/files/js/app.js +++ b/apps/files/js/app.js @@ -25,7 +25,7 @@ this.navigation = new OCA.Files.Navigation($('#app-navigation')); // TODO: ideally these should be in a separate class / app (the embedded "all files" app) - this.fileActions = OCA.Files.FileActions; + this.fileActions = OCA.Files.FileActions.clone(); this.files = OCA.Files.Files; this.fileList = new OCA.Files.FileList( @@ -36,7 +36,7 @@ } ); this.files.initialize(); - this.fileActions.registerDefaultActions(this.fileList); + this.fileActions.registerDefaultActions(); this.fileList.setFileActions(this.fileActions); // for backward compatibility, the global FileList will @@ -58,6 +58,14 @@ }, /** + * Sets the currently active view + * @param viewId view id + */ + setActiveView: function(viewId, options) { + this.navigation.setActiveItem(viewId, options); + }, + + /** * Setup events based on URL changes */ _setupEvents: function() { |