gioi han so mau cho 1 doi tuong

This commit is contained in:
2020-12-22 16:17:34 +07:00
parent 40df99acd9
commit fc0f2ccc0f
5 changed files with 51 additions and 30 deletions

View File

@@ -55,8 +55,13 @@ function _save(e) {
id: $("input[name='CaptureLogsID']").val()
},
success: function (data) {
alert("Đã thêm dữ liệu thành công!");
window.location.reload(true);
common.modalBlock(false);
if (data.status) {
alert("Đã thêm dữ liệu thành công!");
window.location.reload(true);
} else {
alert(data.text);
}
},
error: function (jqXHR, textStatus, errorThrown) {
common.modalBlock(false);

View File

@@ -60,6 +60,10 @@ function _formModified(e) {
},
success: function (data) {
common.modalBlock(false);
if (data.canUpload)
$("#upload-btn").removeClass("hidden");
else
$("#upload-btn").addClass("hidden");
$("select[name='Type']").val(data.type);
$("select[name='Code']").val(data.code);
$("input[name='Name']").val(data.name);
@@ -538,7 +542,7 @@ function syncFeatureToServer(id) {
$("#progress").html(percent + "%");
if (percent >= 100) {
common.modalBlock(false);
setTimeout(function () {
setTimeout(function () {
alert("Đồng bộ dữ liệu hoàn thành");
window.location.reload(true);
}, 2000)