aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/js/filesplugin.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-09-07 00:53:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-09-07 00:53:57 +0200
commitf2ca0f6677e6d0c796f2fd3053d0858ddbe77f83 (patch)
treecbf908311934c07f8525b931075d37aa8c113717 /apps/files_versions/js/filesplugin.js
parentc57595bcb4709fd2fc827bce09801eccdf7ab56a (diff)
parent310d79728447ecf69f18d0b61a527397bd961888 (diff)
downloadnextcloud-server-f2ca0f6677e6d0c796f2fd3053d0858ddbe77f83.tar.gz
nextcloud-server-f2ca0f6677e6d0c796f2fd3053d0858ddbe77f83.zip
Merge pull request #18748 from owncloud/files-versions-tab
Add versions tab to files sidebar
Diffstat (limited to 'apps/files_versions/js/filesplugin.js')
-rw-r--r--apps/files_versions/js/filesplugin.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/apps/files_versions/js/filesplugin.js b/apps/files_versions/js/filesplugin.js
new file mode 100644
index 00000000000..42075ce6462
--- /dev/null
+++ b/apps/files_versions/js/filesplugin.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2015
+ *
+ * This file is licensed under the Affero General Public License version 3
+ * or later.
+ *
+ * See the COPYING-README file.
+ *
+ */
+
+(function() {
+ OCA.Versions = OCA.Versions || {};
+
+ /**
+ * @namespace
+ */
+ OCA.Versions.Util = {
+ /**
+ * Initialize the versions plugin.
+ *
+ * @param {OCA.Files.FileList} fileList file list to be extended
+ */
+ attach: function(fileList) {
+ if (fileList.id === 'trashbin' || fileList.id === 'files.public') {
+ return;
+ }
+
+ fileList.registerTabView(new OCA.Versions.VersionsTabView('versionsTabView'));
+ }
+ };
+})();
+
+OC.Plugins.register('OCA.Files.FileList', OCA.Versions.Util);
+