summaryrefslogtreecommitdiffstats
path: root/apps/comments/js/filesplugin.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-01-27 18:28:55 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-02 18:01:15 +0100
commitcca33942aa01542c7b9920c80c66e3becd3a0d9c (patch)
treeb1eea7483ea67a445815e579032dedfa23b2d3c5 /apps/comments/js/filesplugin.js
parent0e95b9f2d560f5fc177e672162e995341cfba025 (diff)
downloadnextcloud-server-cca33942aa01542c7b9920c80c66e3becd3a0d9c.tar.gz
nextcloud-server-cca33942aa01542c7b9920c80c66e3becd3a0d9c.zip
Comments GUI
Diffstat (limited to 'apps/comments/js/filesplugin.js')
-rw-r--r--apps/comments/js/filesplugin.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/comments/js/filesplugin.js b/apps/comments/js/filesplugin.js
new file mode 100644
index 00000000000..c8d91e0ede3
--- /dev/null
+++ b/apps/comments/js/filesplugin.js
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>
+ *
+ * This file is licensed under the Affero General Public License version 3
+ * or later.
+ *
+ * See the COPYING-README file.
+ *
+ */
+
+(function() {
+ OCA.Comments = _.extend({}, OCA.Comments);
+ if (!OCA.Comments) {
+ /**
+ * @namespace
+ */
+ OCA.Comments = {};
+ }
+
+ /**
+ * @namespace
+ */
+ OCA.Comments.FilesPlugin = {
+ allowedLists: [
+ 'files',
+ 'favorites'
+ ],
+
+ attach: function(fileList) {
+ if (this.allowedLists.indexOf(fileList.id) < 0) {
+ return;
+ }
+
+ fileList.registerTabView(new OCA.Comments.CommentsTabView('commentsTabView'));
+ }
+ };
+
+})();
+
+OC.Plugins.register('OCA.Files.FileList', OCA.Comments.FilesPlugin);
+