mirror of
https://github.com/friendica/friendica
synced 2025-03-04 14:28:26 +00:00
Fix itemFiler() callback
- Remove page exit alert - Update filed post display on success - Reset cursor appearance always
This commit is contained in:
parent
9e3936b151
commit
1f8ea30735
2 changed files with 25 additions and 13 deletions
|
@ -215,16 +215,23 @@ function enableOnUser(){
|
||||||
const reply = $("#id_term").val();
|
const reply = $("#id_term").val();
|
||||||
if (reply && reply.length) {
|
if (reply && reply.length) {
|
||||||
commentBusy = true;
|
commentBusy = true;
|
||||||
|
formModified = true;
|
||||||
$('body').css('cursor', 'wait');
|
$('body').css('cursor', 'wait');
|
||||||
$.get('filer/' + id + '?term=' + reply, NavUpdate);
|
$.get('filer/' + id + '?term=' + reply)
|
||||||
// if(timer) clearTimeout(timer);
|
.done(function () {
|
||||||
// timer = setTimeout(NavUpdate,3000);
|
$.colorbox.close();
|
||||||
|
resetFormModifiedFlag();
|
||||||
|
})
|
||||||
|
.always(function () {
|
||||||
liking = 1;
|
liking = 1;
|
||||||
force_update = true;
|
force_update = true;
|
||||||
$.colorbox.close();
|
update_item = id;
|
||||||
|
NavUpdate();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#id_term").css("border-color", "#FF0000");
|
$("#id_term").css("border-color", "#FF0000");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -312,14 +312,19 @@
|
||||||
const reply = $("#id_term").val();
|
const reply = $("#id_term").val();
|
||||||
if (reply && reply.length) {
|
if (reply && reply.length) {
|
||||||
commentBusy = true;
|
commentBusy = true;
|
||||||
|
formModified = true;
|
||||||
$('body').css('cursor', 'wait');
|
$('body').css('cursor', 'wait');
|
||||||
$.get('filer/' + id + '?term=' + reply, NavUpdate);
|
$.get('filer/' + id + '?term=' + reply)
|
||||||
// if(timer) clearTimeout(timer);
|
.done(function () {
|
||||||
// timer = setTimeout(NavUpdate,3000);
|
$.colorbox.close();
|
||||||
|
resetFormModifiedFlag();
|
||||||
|
})
|
||||||
|
.always(function () {
|
||||||
liking = 1;
|
liking = 1;
|
||||||
force_update = true;
|
force_update = true;
|
||||||
$.colorbox.close();
|
update_item = id;
|
||||||
formModified = true; // Mark the form as modified
|
NavUpdate();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#id_term").css("border-color", "#FF0000");
|
$("#id_term").css("border-color", "#FF0000");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue