update đồng bộ tất cả thiết bị

This commit is contained in:
2020-11-04 17:24:56 +07:00
parent 72dfa46c94
commit fa10b73a3d
3 changed files with 38 additions and 5 deletions

View File

@@ -266,6 +266,10 @@ var currentPage = 1;
var secondIncrement = 0;
async function _sync(e) {
var checkAll = $("#checkall-device:checked").length;
var all = false;
if (checkAll > 0)
all = true;
var lists = [];
$.each($("input[name='checkbox-device']:checked"), function () {
lists.push({
@@ -282,7 +286,8 @@ async function _sync(e) {
url: $(e).attr('data-href'),
type: 'POST',
data: {
lists: lists
lists: lists,
all: all
},
success: function (data) {
common.modalBlock(false);
@@ -401,6 +406,10 @@ function getDataSync(data) {
var progressLogs = 0;
var totalsLogs = 0;
function _getLogs(e) {
var checkAll = $("#checkall-device:checked").length;
var all = false;
if (checkAll > 0)
all = true;
var lists = [];
$.each($("input[name='checkbox-device']:checked"), function () {
lists.push($(this).val());
@@ -414,7 +423,8 @@ function _getLogs(e) {
url: $(e).attr('data-href'),
type: 'POST',
data: {
lists: lists
lists: lists,
all: all
},
success: function (data) {
common.modalBlock(false);