Skip to content

Commit

Permalink
introduce quickSelect option - closing #455
Browse files Browse the repository at this point in the history
  • Loading branch information
simogeo committed Feb 22, 2016
1 parent e273311 commit fb27b08
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 70 deletions.
1 change: 1 addition & 0 deletions scripts/filemanager.config.js.default
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"searchBox": true,
"listFiles": true,
"fileSorting": "default",
"quickSelect": true,
"chars_only_latin": true,
"splitterWidth": 200,
"splitterMinWidth": 200,
Expand Down
12 changes: 10 additions & 2 deletions scripts/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,11 @@ var getFolderInfo = function(path) {
if($('#fileinfo').data('view') == 'grid') {
$('#fileinfo').find('#contents li').click(function(){
var path = $(this).find('img').attr('data-path');
getDetailView(path);
if(config.options.quickSelect && data[path]['File Type'] != 'dir' && $(this).hasClass('cap_select')) {
selectItem(data[path]);
} else {
getDetailView(path);
}
}).each(function() {
$(this).contextMenu(
{ menu: getContextMenuOptions($(this)) },
Expand All @@ -1500,7 +1504,11 @@ var getFolderInfo = function(path) {
} else {
$('#fileinfo tbody tr').click(function(){
var path = $('td:first-child', this).attr('data-path');
getDetailView(path);
if(config.options.quickSelect && data[path]['File Type'] != 'dir' && $(this).hasClass('cap_select')) {
selectItem(data[path]);
} else {
getDetailView(path);
}
}).each(function() {
$(this).contextMenu(
{ menu: getContextMenuOptions($(this)) },
Expand Down
Loading

0 comments on commit fb27b08

Please sign in to comment.