From 70b0e59d1813e52bd627cbacd53d14cce9ea80a4 Mon Sep 17 00:00:00 2001 From: Marco Dickert Date: Thu, 16 Feb 2017 16:28:33 +0100 Subject: [PATCH] consider multiselect permission --- ifm.php | 10 ++++++---- src/ifm.js | 14 ++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ifm.php b/ifm.php index 5aad42c..9a3a8c1 100644 --- a/ifm.php +++ b/ifm.php @@ -559,16 +559,18 @@ function IFM() { } $("#filetable tbody").remove(); $("#filetable").append(newRows); - // bind multiselect handler - if(self.config.multiselect == 1) { - $("input[name=multisel]").on("change", function(){ ifm.handleMultiSelect(); }); + if( self.config.multiselect == 1 ) { + $('.clickable-row').click(function(event) { + if( event.ctrlKey ) { + $(this).toggleClass('active'); + } + }); } $('a[data-toggle="tooltip"]').tooltip({ animated: 'fade', placement: 'right', html: true }); - $('.clickable-row').click(function(event) { if( event.ctrlKey ) $(this).toggleClass('active'); }); }; this.changeDirectory = function( newdir, options={ absolute: false, pushState: true } ) { diff --git a/src/ifm.js b/src/ifm.js index 5a00222..f45948f 100644 --- a/src/ifm.js +++ b/src/ifm.js @@ -131,20 +131,18 @@ function IFM() { } $("#filetable tbody").remove(); $("#filetable").append(newRows); - // bind multiselect handler - if(self.config.multiselect == 1) { - $("input[name=multisel]").on("change", function(){ ifm.handleMultiSelect(); }); + if( self.config.multiselect == 1 ) { + $('.clickable-row').click(function(event) { + if( event.ctrlKey ) { + $(this).toggleClass('active'); + } + }); } $('a[data-toggle="tooltip"]').tooltip({ animated: 'fade', placement: 'right', html: true }); - $('.clickable-row').click(function(event) { - if( event.ctrlKey ) { - $(this).toggleClass('active'); - } - }); }; this.changeDirectory = function( newdir, options={ absolute: false, pushState: true } ) {