update button add feature - control logs site
This commit is contained in:
@@ -8,4 +8,27 @@ function _search(e) {
|
||||
location = location + "&type=" + $("select[name='TypeSearch']").val();
|
||||
location = location + "&gender=" + $("select[name='GenderSearch']").val();
|
||||
window.location = location;
|
||||
}
|
||||
}
|
||||
|
||||
function _useFeature(e) {
|
||||
common.modalBlock(true);
|
||||
$.ajax({
|
||||
url: $(e).attr("data-href"),
|
||||
type: 'POST',
|
||||
data: {
|
||||
id: $(e).val()
|
||||
},
|
||||
success: function (data) {
|
||||
common.modalBlock(false);
|
||||
if (data.status) {
|
||||
alert("Đã thêm hình ảnh mẫu!");
|
||||
} else {
|
||||
alert(data.text);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.modalBlock(false);
|
||||
common.ajaxError();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ function _syncToServer() {
|
||||
syncFeatureToServer(lists[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var error = 0;
|
||||
function syncFeatureToServer(id) {
|
||||
$.ajax({
|
||||
url: $("input[name='sync_feature_to_server_url']").val(),
|
||||
@@ -534,6 +534,10 @@ function syncFeatureToServer(id) {
|
||||
id: id
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.status != 10000) {
|
||||
error++;
|
||||
console.log(error);
|
||||
}
|
||||
progressToServer++;
|
||||
$("#progress-current").html(parseInt($("#progress-current").html()) + 1);
|
||||
var percent = parseInt(progressToServer / totalsToServer * 100);
|
||||
|
||||
Reference in New Issue
Block a user