update
This commit is contained in:
@@ -279,6 +279,22 @@ common.success = function (id) {
|
||||
$("#" + id).addClass("has-success").removeClass("has-error");
|
||||
$("#" + id).find(".help-block").addClass("hidden");
|
||||
};
|
||||
common.reset = function (e) {
|
||||
if (confirm("Bạn có chắc chắn muốn reset thiết bị về cấu hình mặc định không?")) {
|
||||
common.modalBlock(true);
|
||||
$.ajax({
|
||||
url: $(e).attr("href"),
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
window.location = data;
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.modalBlock(false);
|
||||
common.ajaxError();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* =========================
|
||||
*/
|
||||
|
||||
@@ -7,12 +7,23 @@ function saveStep1(e) {
|
||||
url: $(e).attr("data-href"),
|
||||
type: 'POST',
|
||||
data: {
|
||||
server: $("input[name='servermqtt']").val()
|
||||
servermqtt: $("input[name='servermqtt']").val(),
|
||||
url: $("input[name='url']").val()
|
||||
},
|
||||
success: function (data) {
|
||||
setTimeout(function () {
|
||||
window.location = data;
|
||||
}, 2000);
|
||||
setInterval(function () {
|
||||
$.ajax({
|
||||
url: data,
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
if (data.status)
|
||||
window.location = data.url;
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.ajaxError();
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.modalBlock(false);
|
||||
@@ -114,7 +125,8 @@ function saveStep2(e) {
|
||||
"show_video": parseInt($("#text-c61").html()),
|
||||
"full_screen": parseInt($("#text-c62").html()),
|
||||
"width": parseInt($("#text-c63").html()),
|
||||
"height": parseInt($("#text-c64").html())
|
||||
"height": parseInt($("#text-c64").html()),
|
||||
"banner": parseInt($("#text-c65").html())
|
||||
},
|
||||
"id_city": parseInt($("#text-c7").html()),
|
||||
"open_door": {
|
||||
|
||||
Reference in New Issue
Block a user