1
1
Fork 0
friendica_2019-12_sharedHos.../view/theme/frio/js/mod_admin.js
2017-12-01 22:33:04 -05:00

32 lines
754 B
JavaScript

/**
* @brief Javascript for the admin module
*/
$(function() {
$('body').on('click', '.selectall', function() {
selectall($(this).data('selectAll'));
});
$('body').on('click', '.selectnone', function() {
selectnone($(this).data('selectNone'));
});
$('body').on('change', 'input[type=checkbox].select', function() {
$this = $(this);
if ($this.prop('checked')) {
selectall($this.data('selectClass'));
$this.attr('title', $this.data('selectNone'));
} else {
selectnone($this.data('selectClass'));
$this.attr('title', $this.data('selectAll'));
}
});
function selectall(cls) {
$('.' + cls).prop('checked', true);
return false;
}
function selectnone(cls) {
$('.' + cls).prop('checked', false);
return false;
}
});