]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/js/mod_admin.js
We now have a global page for all global entries from the network.
[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         function selectall(cls) {
24                 $('.' + cls).prop('checked', true);
25                 return false;
26         }
27         function selectnone(cls) {
28                 $('.' + cls).prop('checked', false);
29                 return false;
30         }
31 });