friendica/view/theme/frio/js/mod_admin.js
fabrixxm 20a2918bda Frio: admin/user template fixes
- small fixes to html
- move js and css to extern files
- move checkboxes to first column
2018-04-18 21:43:33 +02:00

46 lines
1 KiB
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;
}
// Users
function confirm_delete(uname){
return confirm( "{{$confirm_delete}}".format(uname));
}
function confirm_delete_multi(){
return confirm("{{$confirm_delete_multi}}");
}
function details(uid) {
$("#user-"+uid+"-detail").toggleClass("hidden");
$("#user-"+uid).toggleClass("opened");
return false;
}