-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Custom Checkbox column in listview (not showSelectCheckboxUA) #2653
Comments
Maybe I have not explained properly, let me try to rephrase my question. Hope this is possible, if not please answer me anyway. Thanks, appreciated. |
@nao-pon |
@ghigio2000 What you want is not to control file selection from other than checkbox? |
@nao-pon What I want is to have a checkbox for each file in the listview, that I can check or uncheck as I wish and have an event linked to this click. Nothing to do with the selection. I would like to be able to run a command on a file with just one click, and not with a click to select and then another click to run my command. |
@ghigio2000 You can add a check box with the following settings. However, since there are some problems with check box event handling, I will fix it. uiOptions : {
cwd : {
listView : {
columns : ['perm', 'date', 'size', 'kind', 'sel']
},
replacement : {
sel : function(f, fm) {
return '<input type="checkbox" class="elfinder-cwd-nonselect elfinder-cwd-list-sel" data-hash="'+f.hash+'"/>';
}
}
}
} |
@ghigio2000 I fixed a bug. Please try with nightly build with... bootCallback : function(fm, extraObj) {
fm.bind('init', function() {
fm.getUI('cwd').on('click', 'input.elfinder-cwd-list-chk', function() {
var chk = $(this);
fm.log([chk.data('hash'), chk.is(':checked')]);
});
});
},
uiOptions: {
cwd: {
listView : {
columns : ['url', 'date', 'size', 'kind', 'chk']
},
replacement : {
chk : function(f, fm) {
return '<input type="checkbox" class="elfinder-cwd-nonselect elfinder-cwd-list-chk" data-hash="'+f.hash+'"/>';
}
}
}
} |
Thanks it works but not completely.
|
|
@nao-pon I do not find any documentation/explanation of the sessionStorage you mention above. |
@ghigio2000 elFinder does not use sessionStorage. You need to handle sessionStorage using JavaScript. I'd suggest checking the sessionStorage with 'replacement' and adding the checked attribute as necessary. |
Hi, I almost completed my implementation of these checkbox but testing on mobile they are not showing the tick when checked (it looks like they are disabled, but in reality the bootCallback works). |
@ghigio2000 Yes, I was able to reproduce the problem. I will fix this. |
I would like to have a column of checkboxes in the listview.
I tried using "showSelectCheckboxUA" and it works, but I need to avoid "unselect all" on a filename selection in the listview.
I try to explain better my need.
When the user check the checkbox for a series of files I will display the files-content on a map. While on dblclick on one filename I will open the details of that particular file only.
So when dblclick on a file I do not want to uncheck all those checked.
Hope it is clear.
thanks for your help.
The text was updated successfully, but these errors were encountered: