mirror of
https://github.com/friendica/friendica
synced 2025-02-16 08:54:01 +00:00
Merge pull request #14740 from MrPetovan/bug/14702-filer-callback
Fix itemFiler() callback
This commit is contained in:
commit
a730259d97
2 changed files with 48 additions and 37 deletions
|
@ -199,8 +199,7 @@ function enableOnUser(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function itemFiler(id) {
|
function itemFiler(id) {
|
||||||
|
const bordercolor = $("input").css("border-color");
|
||||||
var bordercolor = $("input").css("border-color");
|
|
||||||
|
|
||||||
$.get('filer/', function (data) {
|
$.get('filer/', function (data) {
|
||||||
$.colorbox({html: data});
|
$.colorbox({html: data});
|
||||||
|
@ -213,23 +212,29 @@ function enableOnUser(){
|
||||||
|
|
||||||
$("#filer_save").click(function (e) {
|
$("#filer_save").click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
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;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function jotClearLocation() {
|
function jotClearLocation() {
|
||||||
|
|
|
@ -296,7 +296,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function itemFiler(id) {
|
function itemFiler(id) {
|
||||||
var bordercolor = $("input").css("border-color");
|
const bordercolor = $("input").css("border-color");
|
||||||
|
|
||||||
$.get('filer/', function (data) {
|
$.get('filer/', function (data) {
|
||||||
$.colorbox({html: data});
|
$.colorbox({html: data});
|
||||||
|
@ -309,20 +309,26 @@
|
||||||
|
|
||||||
$("#filer_save").click(function (e) {
|
$("#filer_save").click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue