버튼 활성화 수정

main
이범준 2 months ago
parent 38c19d0746
commit 1e44914895

@ -232,6 +232,8 @@
if (tabName == "계약서등록") {
$P.$findn("btnRemove").prop("disabled", !atLeastOne);
} else {
$P.$findn("btnRemove").prop("disabled", true);
}
Apply.toDataset.selection($P.ctrl.dataset, element, bool);
@ -312,11 +314,9 @@
$P.setButton = (tabName) => {
// tab
if (tabName == "대상") {
$P.$findn("btnCreate").prop("disabled", false);
$P.$findn("btnRemove").prop("disabled", true);
} else if (tabName == "계약서등록") {
$P.$findn("btnCreate").prop("disabled", true);
$P.$findn("btnRemove").prop("disabled", false);
} else {
$P.$findn("btnCreate").prop("disabled", true);
$P.$findn("btnRemove").prop("disabled", true);

@ -282,7 +282,10 @@
$P.$findn("btnCreate").prop("disabled", !atLeastOne);
} else if (tabName == "요청중") {
$P.$findn("btnRemove").prop("disabled", !atLeastOne);
}
} else {
$P.$findn("btnCreate").prop("disabled", true);
$P.$findn("btnRemove").prop("disabled", true);
}
Apply.toDataset.selection($P.ctrl.dataset, element, bool);
}

@ -66,14 +66,21 @@ function newRent02010Control(pageName, doctx="[data-doctx='rent02010']") {
// dataTables(그리드)에 페이지 표시 pagingInfo
ctrl.pagingSupport.setPagingInfo(obj);
let tabName = $(ctrl.find("[name='tabMain']")).find("button.active").text().trim();
if (tabName == "대상") {
$(ctrl.find("[name='btnCreate']")).prop("disabled", empty);
}
if(empty){
$(ctrl.find("[name='btnCreate']")).prop("disabled", true);
}
};
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
let tabName = $(ctrl.find("[name='tabMain']")).find("button.active").text().trim();
if (tabName == "대상") {
$(ctrl.find("[name='btnCreate']")).prop("disabled", (item == null));
} else {
$(ctrl.find("[name='btnCreate']")).prop("disabled", true);
}
Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']"));
};

Loading…
Cancel
Save