From c02ef695217f42dff501e481a50f4669d1cb1f29 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 1 Dec 2014 16:17:28 +0100 Subject: Simple Plugin system for Javascript --- apps/files/js/filelist.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/files/js') 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); }, /** -- cgit v1.2.3