mirror of
https://github.com/friendica/friendica
synced 2024-11-13 07:42:54 +00:00
e909beee04
- move checkboxes on first column - move select/deselect all as button group on panel footer - use existing jquery in mod_admin.js for select/deselect all functionality - add page content wrapper, without padding - fix user avatar size in "pending deletion" table
45 lines
974 B
JavaScript
45 lines
974 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;
|
|
}
|
|
|
|
|
|
});
|
|
|
|
// Users
|
|
function confirm_delete(msg, uname){
|
|
return confirm(msg.format(uname));
|
|
}
|
|
|
|
function details(uid) {
|
|
$("#user-"+uid+"-detail").toggleClass("hidden");
|
|
$("#user-"+uid).toggleClass("opened");
|
|
return false;
|
|
}
|