mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Automation and api fixes
This commit is contained in:
1 parent
97e955d382
commit
1ea7e600c2
13 files changed
+152
-54
No files matched your search
+20
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user