1 // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
3 * Javascript for the admin module
7 $body.on('click', '.selectall', function() {
8 selectall($(this).data('selectAll'));
10 $body.on('click', '.selectnone', function() {
11 selectnone($(this).data('selectNone'));
14 // Toggle checkbox status to all or none for all checkboxes of a specific
16 $body.on('change', 'input[type=checkbox].selecttoggle', function() {
18 if ($this.prop('checked')) {
19 selectall($this.data('selectClass'));
20 $this.attr('title', $this.data('selectNone'));
22 selectnone($this.data('selectClass'));
23 $this.attr('title', $this.data('selectAll'));
27 function selectall(cls) {
28 $('.' + cls).prop('checked', true);
31 function selectnone(cls) {
32 $('.' + cls).prop('checked', false);
40 function confirm_delete(msg, uname){
41 return confirm(msg.format(uname));
44 function details(uid) {
45 $("#user-" + uid + "-detail").toggleClass("hidden");
46 $("#user-" + uid).toggleClass("opened");