Automation and api fixes

This commit is contained in:
jonatanrek committed 2019-08-24 13:07:07 +02:00
1 parent 97e955d382
commit 1ea7e600c2
13 files changed
+152 -54

No files matched your search

+20 -1
View File
@@ -1,3 +1,22 @@
function ajaxPostSimple(path, params, reload = false) {
navigator.vibrate([200]);
$.ajax({
url: path,
type: 'POST',
data: params,
success: function(msg){
console.log(msg);
if (reload){
location.reload();
}
},
error: function (request, status, error) {
console.log('0');
}
});
return false;
}
function ajaxPost(path, params, self, reload = false) {
navigator.vibrate([200]);
$.ajax({
@@ -14,7 +33,7 @@ function ajaxPost(path, params, self, reload = false) {
}
console.log(msg);
if (reload){
location.reload();
//location.reload();
}
},
error: function (request, status, error) {