mirror of
https://github.com/friendica/friendica
synced 2025-04-25 19:10:11 +00:00
frio - some work on the admin users template to be more consistant with other setting pages
This commit is contained in:
parent
5dda815521
commit
5a82ee04bc
5 changed files with 376 additions and 276 deletions
|
@ -9,7 +9,9 @@ $(function() {
|
|||
selectnone($(this).data('selectNone'));
|
||||
});
|
||||
|
||||
$('body').on('change', 'input[type=checkbox].select', function() {
|
||||
// Toggle checkbox status to all or none for all checkboxes of a specific
|
||||
// css class.
|
||||
$('body').on('change', 'input[type=checkbox].selecttoggle', function() {
|
||||
$this = $(this);
|
||||
if ($this.prop('checked')) {
|
||||
selectall($this.data('selectClass'));
|
||||
|
@ -20,6 +22,26 @@ $(function() {
|
|||
}
|
||||
});
|
||||
|
||||
// Use AJAX calls to reorder the table (so we don't need to reload the page).
|
||||
$('body').on('click', '.table-order', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Get the parent table element.
|
||||
var table = $(this).parents('table');
|
||||
var orderUrl = this.getAttribute("data-order-url");
|
||||
table.fadeTo("fast", 0.33);
|
||||
|
||||
$("body").css("cursor", "wait");
|
||||
|
||||
$.get(orderUrl, function(data) {
|
||||
// Find the table element in the html we got.
|
||||
var result = $(data).find('#' + table[0].id);
|
||||
// And add the new table html to the parent.
|
||||
$(table).parent().html(result);
|
||||
|
||||
$("body").css("cursor", "auto");
|
||||
});
|
||||
});
|
||||
|
||||
function selectall(cls) {
|
||||
$('.' + cls).prop('checked', true);
|
||||
|
@ -39,7 +61,7 @@ function confirm_delete(msg, uname){
|
|||
}
|
||||
|
||||
function details(uid) {
|
||||
$("#user-"+uid+"-detail").toggleClass("hidden");
|
||||
$("#user-"+uid).toggleClass("opened");
|
||||
$("#user-" + uid + "-detail").toggleClass("hidden");
|
||||
$("#user-" + uid).toggleClass("opened");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue