aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-06 09:06:24 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-06 11:42:18 +0100
commit5682d302c72ae42dfa16b068ad70fe312ed1ff9d (patch)
tree6ec25f56e0a085117a2fd685a55c3ed46d637cf6 /apps/files/js/filelist.js
parent54a30a4b81700570303eaae03810f6ef553d66a2 (diff)
downloadnextcloud-server-5682d302c72ae42dfa16b068ad70fe312ed1ff9d.tar.gz
nextcloud-server-5682d302c72ae42dfa16b068ad70fe312ed1ff9d.zip
Add grid toggle for every files view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
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);