]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/js/mod_admin.js
Merge pull request #4891 from annando/private-forum-redux
[friendica.git] / view / theme / frio / js / mod_admin.js
1 /**
2  * @brief Javascript for the admin module
3  */
4 $(function() {
5         $('body').on('click', '.selectall', function() {
6                 selectall($(this).data('selectAll'));
7         });
8         $('body').on('click', '.selectnone', function() {
9                 selectnone($(this).data('selectNone'));
10         });
11
12         $('body').on('change', 'input[type=checkbox].select', function() {
13                 $this = $(this);
14                 if ($this.prop('checked')) {
15                         selectall($this.data('selectClass'));
16                         $this.attr('title', $this.data('selectNone'));
17                 } else {
18                         selectnone($this.data('selectClass'));
19                         $this.attr('title', $this.data('selectAll'));
20                 }
21         });
22
23
24         function selectall(cls) {
25                 $('.' + cls).prop('checked', true);
26                 return false;
27         }
28         function selectnone(cls) {
29                 $('.' + cls).prop('checked', false);
30                 return false;
31         }
32
33
34 });
35
36 // Users
37 function confirm_delete(msg, uname){
38         return confirm(msg.format(uname));
39 }
40
41 function details(uid) {
42         $("#user-"+uid+"-detail").toggleClass("hidden");
43         $("#user-"+uid).toggleClass("opened");
44         return false;
45 }