doi co che dong bo giua cac thiet bi
This commit is contained in:
parent
86afa3a430
commit
dc75b88bd8
|
@ -54,7 +54,7 @@
|
|||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['class' => 'text-center']
|
||||
],
|
||||
[
|
||||
[
|
||||
'attribute' => 'type',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['class' => 'text-center'],
|
||||
|
@ -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>
|
||||
|
|
|
@ -361,14 +361,12 @@ function _sync() {
|
|||
}
|
||||
common.modalBlock(true);
|
||||
$("#progress-totals").html(lists.length);
|
||||
$("#progress-form").removeClass("hidden");
|
||||
$("#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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user