23 lines
772 B
JavaScript
23 lines
772 B
JavaScript
const checkAll = function(event) {
|
|
event.preventDefault();
|
|
const $input = $(event.target).closest('.shiny-input-a11ycheckboxgroup');
|
|
$input.find('input[type=\"checkbox\"]').prop('checked', true);
|
|
$input.trigger('change');
|
|
return false;
|
|
};
|
|
const clearAll = function(event) {
|
|
event.preventDefault();
|
|
const $input = $(event.target).closest('.shiny-input-a11ycheckboxgroup');
|
|
$input.find('input[type=\"checkbox\"]').prop('checked', false);
|
|
$input.trigger('change');
|
|
return false;
|
|
};
|
|
const fileInputClick = function(event) {
|
|
$('#' + $(event.target).data('target')).click();
|
|
}
|
|
const fileInputKeydown = function(event) {
|
|
if (event.key == "Enter" || event.key == " ") {
|
|
event.preventDefault();
|
|
$('#' + $(event.target).data('target')).click();
|
|
}
|
|
} |