doi co che dong bo giua cac thiet bi

This commit is contained in:
dongpd 2020-12-25 11:10:35 +07:00
parent 86afa3a430
commit dc75b88bd8
2 changed files with 14 additions and 6 deletions

View File

@ -97,6 +97,13 @@
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center']
]
],
'pager' => [
'firstPageLabel' => "<i class='fa fa-backward'></i>",
'lastPageLabel' => "<i class='fa fa-forward'></i>",
'nextPageLabel' => "<i class='fa fa-chevron-right'></i>",
'prevPageLabel' => "<i class='fa fa-chevron-left'></i>",
'maxButtonCount' => 5
]
])}
</div>

View File

@ -363,12 +363,10 @@ function _sync() {
$("#progress-totals").html(lists.length);
$("#progress-form").removeClass("hidden");
totals = lists.length;
for (var i = 0; i < lists.length; i++) {
syncFeatureFromDevice(lists[i]);
}
syncFeatureFromDevice(lists[0], lists);
}
function syncFeatureFromDevice(id) {
function syncFeatureFromDevice(id, fullData) {
$.ajax({
url: $("input[name='sync_feature_from_device_url']").val(),
type: 'POST',
@ -377,6 +375,7 @@ function syncFeatureFromDevice(id) {
ip: $("input[name='SyncIP']").val()
},
success: function (data) {
console.log(data, progress);
progress++;
$("#progress-current").html(parseInt($("#progress-current").html()) + 1);
var percent = parseInt(progress / totals * 100);
@ -387,6 +386,8 @@ function syncFeatureFromDevice(id) {
common.modalBlock(false);
updateFeature();
progress = 0;
} else {
syncFeatureFromDevice(fullData[progress], fullData);
}
},
error: function (jqXHR, textStatus, errorThrown) {