summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 9459a266ce9..b61b4ef8569 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -331,9 +331,10 @@
this.$el.find('thead th .columntitle').click(_.bind(this._onClickHeader, this));
- // Toggle for grid view
- this.$showGridView = $('input#showgridview');
+ // Toggle for grid view, only register once
+ this.$showGridView = $('input#showgridview:not(.registered)');
this.$showGridView.on('change', _.bind(this._onGridviewChange, this));
+ this.$showGridView.addClass('registered');
$('#view-toggle').tooltip({placement: 'bottom', trigger: 'hover'});
this._onResize = _.debounce(_.bind(this._onResize, this), 250);