them filters trong form dong bo
This commit is contained in:
@@ -411,6 +411,9 @@ function _syncFromServerForm(e) {
|
||||
success: function (data) {
|
||||
common.modalBlock(false);
|
||||
common.modalOpenFullScreen(data.form, data.title);
|
||||
$("#filter-from-server").select2({
|
||||
placeholder: "Tìm kiếm theo ID hoặc tên"
|
||||
});
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.modalBlock(false);
|
||||
@@ -512,6 +515,9 @@ function _syncToServerForm(e) {
|
||||
success: function (data) {
|
||||
common.modalBlock(false);
|
||||
common.modalOpenFullScreen(data.form, data.title);
|
||||
$("#filter-from-server").select2({
|
||||
placeholder: "Tìm kiếm theo ID hoặc tên"
|
||||
});
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.modalBlock(false);
|
||||
@@ -569,4 +575,26 @@ function syncFeatureToServer(id, fullData) {
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function filters(e) {
|
||||
var id = $(e).val();
|
||||
if (id === "") {
|
||||
$(".filters").removeClass("hidden");
|
||||
$(".btn-select").removeClass("hidden");
|
||||
checkAllSync(false);
|
||||
} else {
|
||||
$(".filters").addClass("hidden");
|
||||
$("#filters-" + id).removeClass("hidden");
|
||||
$(".btn-select").addClass("hidden");
|
||||
checkAllSync(false);
|
||||
choooseToSync($("#filters-" + id));
|
||||
}
|
||||
}
|
||||
|
||||
function removeFilters() {
|
||||
$(".filters").removeClass("hidden");
|
||||
$(".btn-select").removeClass("hidden");
|
||||
$("#filter-from-server").val('').trigger('change');
|
||||
checkAllSync(false);
|
||||
}
|
||||
Reference in New Issue
Block a user