mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 02:30:12 +01:00
fix check expiration
This commit is contained in:
parent
0d28115d18
commit
b683c74efd
1 changed files with 9 additions and 9 deletions
|
|
@ -786,12 +786,16 @@ function default_ajax_options_for_submit(ajax_type, element_to_block) {
|
||||||
context: element_to_block,
|
context: element_to_block,
|
||||||
data: "_source_view=" + SOURCE_VIEW,
|
data: "_source_view=" + SOURCE_VIEW,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$(this).block({
|
if (this.context) {
|
||||||
|
$(this.context).block({
|
||||||
message: null
|
message: null
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
complete:function() {
|
complete:function() {
|
||||||
$(this).unblock();
|
if (this.context) {
|
||||||
|
$(this.context).unblock();
|
||||||
|
}
|
||||||
enable_rich_interaction();
|
enable_rich_interaction();
|
||||||
},
|
},
|
||||||
error: function(req, status) {
|
error: function(req, status) {
|
||||||
|
|
@ -855,11 +859,7 @@ function setup_periodic_check(url_for_check, interval_in_sec, method) {
|
||||||
ajaxMethod = (method ? method : "GET");
|
ajaxMethod = (method ? method : "GET");
|
||||||
|
|
||||||
function check_remote() {
|
function check_remote() {
|
||||||
$.ajax({
|
$.ajax(default_ajax_options_for_scripts(ajaxMethod, url_for_check, null));
|
||||||
type: ajaxMethod,
|
|
||||||
url: url_for_check,
|
|
||||||
dataType: 'script'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
setInterval(check_remote, interval_in_sec*1000);
|
setInterval(check_remote, interval_in_sec*1000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue