diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-12-01 16:17:28 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-12-01 16:20:44 +0100 |
commit | c02ef695217f42dff501e481a50f4669d1cb1f29 (patch) | |
tree | 98ef997af355d9fd050645a7ba5c827056c87392 /apps/files | |
parent | 8db4dd7585aa9daebb32a3f3305f4061b17c316d (diff) | |
download | nextcloud-server-c02ef695217f42dff501e481a50f4669d1cb1f29.tar.gz nextcloud-server-c02ef695217f42dff501e481a50f4669d1cb1f29.zip |
Simple Plugin system for Javascript
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index bec0155e90e..cd20dc71c29 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -166,6 +166,9 @@ } this.$el = $el; + if (options.id) { + this.id = options.id; + } this.$container = options.scrollContainer || $(window); this.$table = $el.find('table:first'); this.$fileList = $el.find('#fileList'); @@ -215,6 +218,8 @@ self.scrollTo(options.scrollTo); }); } + + OC.Plugins.attach('OCA.Files.FileList', this); }, /** @@ -224,6 +229,7 @@ // TODO: also unregister other event handlers this.fileActions.off('registerAction', this._onFileActionsUpdated); this.fileActions.off('setDefault', this._onFileActionsUpdated); + OC.Plugins.detach('OCA.Files.FileList', this); }, /** |