aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/js/filesplugin.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-09-01 19:29:55 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-03 16:47:24 +0200
commit310d79728447ecf69f18d0b61a527397bd961888 (patch)
tree805b2a0a40ed5ce7acb58afb90ad7c18e760e037 /apps/files_versions/js/filesplugin.js
parente9e42fff61a922f11a3b1014d810562537950b6a (diff)
downloadnextcloud-server-310d79728447ecf69f18d0b61a527397bd961888.tar.gz
nextcloud-server-310d79728447ecf69f18d0b61a527397bd961888.zip
Add versions tab to files sidebar
- move versions to a tab in the files sidebar - added mechanism to auto-update the row in the FileList whenever values are set to the FileInfoModel given to the sidebar - updated tags/favorite action to make use of that new mechanism
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);
+