mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:50:11 +00:00
Improve page contacblock for frio theme
This commit is contained in:
parent
8826ece55e
commit
75181322ba
4 changed files with 44 additions and 16 deletions
31
view/theme/frio/js/mod_admin.js
Normal file
31
view/theme/frio/js/mod_admin.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* @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;
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue