Commit 9485d874 by Kim Gyeongeun

#56952 設問設定機能追加(チェックボックス動作バグ修正)

parent e6414617
......@@ -15,7 +15,8 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("checked", false);
$("#${answer.answerId}").attr("disabled", true);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").val("");
$("#${question.questionId}").attr("disabled", true);
} else if ("${question.controlId}" == "5") {
......@@ -26,7 +27,24 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("disabled", false);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
$("#${question.questionId}").attr("disabled", false);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
}
}
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").attr("disabled", false);
} else if ("${question.controlId}" == "5") {
$(".${question.questionId}").attr("disabled", false);
......
......@@ -15,7 +15,8 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("checked", false);
$("#${answer.answerId}").attr("disabled", true);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").val("");
$("#${question.questionId}").attr("disabled", true);
} else if ("${question.controlId}" == "5") {
......@@ -26,7 +27,24 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("disabled", false);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
$("#${question.questionId}").attr("disabled", false);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
}
}
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").attr("disabled", false);
} else if ("${question.controlId}" == "5") {
$(".${question.questionId}").attr("disabled", false);
......
......@@ -15,7 +15,8 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("checked", false);
$("#${answer.answerId}").attr("disabled", true);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").val("");
$("#${question.questionId}").attr("disabled", true);
} else if ("${question.controlId}" == "5") {
......@@ -26,7 +27,24 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("disabled", false);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
$("#${question.questionId}").attr("disabled", false);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
}
}
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").attr("disabled", false);
} else if ("${question.controlId}" == "5") {
$(".${question.questionId}").attr("disabled", false);
......
......@@ -33,7 +33,8 @@ $(function() {
key = "${answer.answerId}";
$("." + key).prop("checked", false);
$("." + key).checkboxradio('refresh').checkboxradio('disable');
} else if ("${question.controlId}" == "2" || ${question.controlId} == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "6") {
key = "${question.questionId}";
$("." + key).val("");
$("." + key).selectmenu("refresh").selectmenu("disable");
......@@ -50,8 +51,27 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
key = "${answer.answerId}";
$("." + key).checkboxradio('enable');
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
$("." + key).checkboxradio("enable").checkboxradio('refresh');
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
key = "${question.questionId}";
$("." + key).selectmenu("enable");
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("." + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
key = "${question.questionId}";
$("." + key).val("");
$("." + key).selectmenu("refresh").selectmenu("disable");
}
}
} else if ("${question.controlId}" == "6") {
key = "${question.questionId}";
$("." + key).selectmenu("enable");
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
......
......@@ -33,7 +33,8 @@ $(function() {
key = "${answer.answerId}";
$("." + key).prop("checked", false);
$("." + key).checkboxradio('refresh').checkboxradio('disable');
} else if ("${question.controlId}" == "2" || ${question.controlId} == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "6") {
key = "${question.questionId}";
$("." + key).val("");
$("." + key).selectmenu("refresh").selectmenu("disable");
......@@ -51,7 +52,26 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
key = "${answer.answerId}";
$("." + key).checkboxradio('enable');
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
key = "${question.questionId}";
$("." + key).selectmenu("enable");
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("." + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
key = "${question.questionId}";
$("." + key).val("");
$("." + key).selectmenu("refresh").selectmenu("disable");
}
}
} else if ("${question.controlId}" == "6") {
key = "${question.questionId}";
$("." + key).selectmenu("enable");
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
......
......@@ -33,7 +33,8 @@ $(function() {
key = "${answer.answerId}";
$("." + key).prop("checked", false);
$("." + key).checkboxradio('refresh').checkboxradio('disable');
} else if ("${question.controlId}" == "2" || ${question.controlId} == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "6") {
key = "${question.questionId}";
$("." + key).val("");
$("." + key).selectmenu("refresh").selectmenu("disable");
......@@ -51,7 +52,26 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
key = "${answer.answerId}";
$("." + key).checkboxradio('enable');
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
key = "${question.questionId}";
$("." + key).selectmenu("enable");
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("." + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
key = "${question.questionId}";
$("." + key).val("");
$("." + key).selectmenu("refresh").selectmenu("disable");
}
}
} else if ("${question.controlId}" == "6") {
key = "${question.questionId}";
$("." + key).selectmenu("enable");
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
......
......@@ -39,7 +39,8 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("checked", false);
$("#${answer.answerId}").attr("disabled", true);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
} else if ("${question.controlId}" == "5") {
......@@ -50,7 +51,24 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("disabled", false);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
$("#${question.questionId}").attr("disabled", false);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
}
}
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").attr("disabled", false);
} else if ("${question.controlId}" == "5") {
$(".${question.questionId}").attr("disabled", false);
......
......@@ -43,7 +43,8 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("checked", false);
$("#${answer.answerId}").attr("disabled", true);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
} else if ("${question.controlId}" == "5") {
......@@ -54,7 +55,24 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("disabled", false);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
$("#${question.questionId}").attr("disabled", false);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
}
}
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").attr("disabled", false);
} else if ("${question.controlId}" == "5") {
$(".${question.questionId}").attr("disabled", false);
......
......@@ -41,7 +41,8 @@ $(function() {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("checked", false);
$("#${answer.answerId}").attr("disabled", true);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
} else if ("${question.controlId}" == "5") {
......@@ -52,7 +53,24 @@ $(function() {
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
$("#${answer.answerId}").attr("disabled", false);
} else if ("${question.controlId}" == "2" || "${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
} else if ("${question.controlId}" == "2") {
if ($(this).is(":checked")) {
$("#${question.questionId}").attr("disabled", false);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
$("#${question.questionId}").val('');
$("#${question.questionId}").attr("disabled", true);
}
}
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4" || "${question.controlId}" == "6") {
$("#${question.questionId}").attr("disabled", false);
} else if ("${question.controlId}" == "5") {
$(".${question.questionId}").attr("disabled", false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment