Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
em
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ichikawa
em
Commits
7e13d958
Commit
7e13d958
authored
Jan 22, 2024
by
Kim Gyeongeun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#56952 設問設定機能追加(アンケート区分別、グレーアウトが効かない問題修正)
#56950 アンケートの設問コピー機能(条件付必須項目がコピーされない問題修正)
parent
18164fdf
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
485 additions
and
774 deletions
+485
-774
src/main/java/jp/agentec/sinaburocast/action/admin/enquete/EnqueteRegistAction.java
+1
-2
src/main/java/jp/agentec/sinaburocast/form/admin/enquete/EnqueteRegistForm.java
+13
-1
src/main/java/jp/agentec/sinaburocast/service/EnqueteService.java
+0
-3
src/main/java/jp/agentec/sinaburocast/service/MemberService.java
+1
-1
src/main/java/jp/agentec/sinaburocast/service/QuestionService.java
+28
-15
src/main/resources/application_ja.properties
+1
-0
src/main/webapp/WEB-INF/view/admin/enquete/questionEdit.html
+1
-1
src/main/webapp/WEB-INF/view/common/question_disable.vm
+193
-0
src/main/webapp/WEB-INF/view/common/question_disable_sp.vm
+228
-0
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete.html
+1
-58
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_pub.html
+1
-58
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_web_rec.html
+1
-58
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete.html
+1
-90
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_pub.html
+1
-90
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_web_rec.html
+1
-90
src/main/webapp/WEB-INF/view/user/enquete/enquete.html
+1
-191
src/main/webapp/WEB-INF/view/user/enquete/enquete_pub.html
+1
-58
src/main/webapp/WEB-INF/view/user/enquete/enquete_web_rec.html
+1
-58
src/main/webapp/WEB-INF/view/user/top/newUserRegist.html
+10
-0
No files found.
src/main/java/jp/agentec/sinaburocast/action/admin/enquete/EnqueteRegistAction.java
View file @
7e13d958
...
...
@@ -448,7 +448,6 @@ public class EnqueteRegistAction extends AbstractAction {
@Execute
(
validator
=
true
,
validate
=
"questionEditValidate"
,
input
=
"/admin/enquete/questionEdit.html"
)
public
String
questionEditConfirm
()
{
TokenProcessor
.
getInstance
().
saveToken
(
request
);
enqueteRegistForm
.
questionList
=
questionService
.
findAllOrderByEnqueteId
(
enqueteRegistForm
.
eid
);
if
(
enqueteRegistForm
.
questionList
.
size
()
>=
30
&&(
StringUtil
.
isBlank
(
enqueteRegistForm
.
qid
)
||
StringUtil
.
equals
(
"0"
,
enqueteRegistForm
.
qid
))){
//設問が30件以上の場合は追加登録できない。
addErrorMessage
(
"QuestionCountError"
,
"question.maxCoutError"
);
...
...
@@ -459,7 +458,7 @@ public class EnqueteRegistAction extends AbstractAction {
addErrorMessage
(
"isSendMailAddress"
,
"question.alreadyExistMailQuestion"
);
return
"/admin/enquete/questionEdit.html"
;
}
enqueteRegistForm
.
enquete
=
enqueteService
.
findById
(
Integer
.
parseInt
(
enqueteRegistForm
.
eid
));
String
condAnswerStr
=
""
;
...
...
src/main/java/jp/agentec/sinaburocast/form/admin/enquete/EnqueteRegistForm.java
View file @
7e13d958
...
...
@@ -245,11 +245,15 @@ public class EnqueteRegistForm {
errors
.
add
(
"radioAdminText"
+
j
,
new
ActionMessage
(
"labels.answer"
/*"回答文字列を入力してください。"*/
));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
condRequiredQuestionAnswerList
)
&&
StringUtil
.
isNotBlank
(
radioDefault
))
{
errors
.
add
(
"radioAdminText"
+(
radioAdminText
.
size
()-
1
),
new
ActionMessage
(
"question.check.default.condRequiredAnswer"
/*"条件付必須項目を設定した場合、デフォルト選択肢は選択できません。"*/
));
}
if
(
StringUtil
.
equals
(
radioFreeAnserUse
,
"1"
)
&&
Integer
.
parseInt
(
radioFreeNo
)
>
j
){
errors
.
add
(
"radioFreeNoError"
,
new
ActionMessage
(
"labels.freeMax"
,
"該当選択肢"
/*"最大選択数は選択肢の数以下にしてください。"*/
));
}
break
;
case
1
:
/**チェックボックス*/
...
...
@@ -294,6 +298,10 @@ public class EnqueteRegistForm {
errors
.
add
(
"checkAdminText"
+(
i
-
1
),
new
ActionMessage
(
"labels.textMaxLength1up"
,
"最大選択数"
,
"1以上選択"
/*"最大入力文字数を入力してください。"*/
));
}
if
(
CollectionUtils
.
isNotEmpty
(
condRequiredQuestionAnswerList
)
&&
checkDefault
.
contains
(
"1"
))
{
errors
.
add
(
"checkAdminText"
+(
i
-
1
),
new
ActionMessage
(
"question.check.default.condRequiredAnswer"
/*"条件付必須項目を設定した場合、デフォルト選択肢は選択できません。"*/
));
}
break
;
case
2
:
...
...
@@ -321,6 +329,10 @@ public class EnqueteRegistForm {
errors
.
add
(
"selectDefault"
,
new
ActionMessage
(
"labels.defaultSelect"
/*"デフォルト値が選択候補にありません。"*/
));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
condRequiredQuestionAnswerList
)
&&
StringUtil
.
isNotBlank
(
selectDefault
))
{
errors
.
add
(
"selectCand"
,
new
ActionMessage
(
"question.check.default.condRequiredAnswer"
/*"条件付必須項目を設定した場合、デフォルト選択肢は選択できません。"*/
));
}
break
;
case
3
:
...
...
src/main/java/jp/agentec/sinaburocast/service/EnqueteService.java
View file @
7e13d958
...
...
@@ -1324,6 +1324,4 @@ public class EnqueteService extends AbstractService<Enquete> {
}
return
result
;
}
}
\ No newline at end of file
src/main/java/jp/agentec/sinaburocast/service/MemberService.java
View file @
7e13d958
...
...
@@ -187,7 +187,7 @@ public class MemberService extends AbstractService<Member> {
passwordMailSendService
.
insertPasswordMailSend
(
passwordMailSend
,
"REGIST"
);
//メール送信
MailUtil
.
send
(
email
,
title
,
body
.
toString
());
//
MailUtil.send(email,title, body.toString());
}
return
retValue
;
...
...
src/main/java/jp/agentec/sinaburocast/service/QuestionService.java
View file @
7e13d958
...
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -323,37 +324,47 @@ public class QuestionService extends AbstractService<Question> {
* @return
*/
public
void
setQuestionDisable
(
List
<
Question
>
questionList
)
{
HashMap
<
Integer
,
Integer
>
requiredQuestionInfo
=
new
HashMap
<
Integer
,
Integer
>();
List
<
Integer
>
defaultAnswerIdList
=
new
ArrayList
<
Integer
>();
//初期表示情報セット
Map
<
Integer
,
Integer
>
requiredAnswerIdMap
=
new
HashMap
<
Integer
,
Integer
>();
Map
<
Integer
,
Integer
>
defaultAnswerIdMap
=
new
HashMap
<
Integer
,
Integer
>();
for
(
Question
question
:
questionList
)
{
if
(
question
.
controlId
.
equals
(
SinaburoConstant
.
ControlType
.
TEXTAREA
)
||
question
.
controlId
.
equals
(
SinaburoConstant
.
ControlType
.
TEXTFIELD
)
||
question
.
controlId
.
equals
(
SinaburoConstant
.
ControlType
.
HIDUKE
))
{
continue
;}
for
(
Answer
answer
:
question
.
answerList
)
{
if
(
question
.
condRequiredQuestionNo
!=
null
/*&& question.condRequiredQuestionNo == 0*/
&&
requiredQuestionInfo
.
get
(
answer
.
answerId
)
==
null
)
{
if
(
question
.
condRequiredQuestionNo
!=
null
&&
requiredAnswerIdMap
.
get
(
answer
.
answerId
)
==
null
)
{
if
(
answer
.
defaultFlg
==
0
&&
StringUtil
.
isBlank
(
answer
.
answerIdValue
))
{
continue
;}
//条件付回答設定の選択した値
if
(
answer
.
defaultFlg
==
0
&&
StringUtil
.
isNotBlank
(
answer
.
answerIdValue
))
{
requiredQuestionInfo
.
put
(
answer
.
answerId
,
1
);
if
((
question
.
controlId
.
equals
(
SinaburoConstant
.
ControlType
.
RADIO
)
||
question
.
controlId
.
equals
(
SinaburoConstant
.
ControlType
.
SELECTMENU
))
&&
answer
.
defaultFlg
==
0
&&
StringUtil
.
isNotBlank
(
answer
.
answerIdValue
))
{
requiredAnswerIdMap
.
put
(
answer
.
answerId
,
question
.
controlId
);
break
;
}
if
(
question
.
controlId
.
equals
(
SinaburoConstant
.
ControlType
.
CHECKBOX
)
&&
answer
.
defaultFlg
==
0
&&
StringUtil
.
isNotBlank
(
answer
.
answerIdValue
))
{
requiredAnswerIdMap
.
put
(
answer
.
answerId
,
question
.
controlId
);
}
//条件付回答設定のデフォルト値
if
(
answer
.
defaultFlg
==
1
)
{
defaultAnswerId
List
.
add
(
answer
.
answer
Id
);
defaultAnswerId
Map
.
put
(
answer
.
answerId
,
question
.
control
Id
);
}
}
}
}
//条件付回答設定IDがない場合、デフォルト値の回答IDをセット
if
(
requiredQuestionInfo
.
isEmpty
()
&&
CollectionUtils
.
isNotEmpty
(
defaultAnswerIdList
))
{
for
(
Integer
defaultAnswerId
:
defaultAnswerIdList
)
{
required
QuestionInfo
.
put
(
defaultAnswerId
,
1
);
for
(
Map
.
Entry
<
Integer
,
Integer
>
entry
:
defaultAnswerIdMap
.
entrySet
())
{
//デフォルト値は存在、選択値はなし
if
(!
requiredAnswerIdMap
.
containsValue
(
entry
.
getValue
())
)
{
required
AnswerIdMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
()
);
}
}
}
for
(
Question
question
:
questionList
)
{
//条件付必須チェック(初期画面表示・非表示セット)
if
(
question
.
condRequiredQuestionNo
!=
null
&&
question
.
condRequiredQuestionNo
!=
0
&&
StringUtils
.
isNotBlank
(
question
.
condRequiredAnswer
))
{
List
<
String
>
requiredAnswerIdList
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
question
.
condRequiredAnswer
.
split
(
","
)));
for
(
String
requiredAnswerId
:
requiredAnswerIdList
)
{
if
(
required
QuestionInfo
.
get
(
IntegerConversionUtil
.
toInteger
(
requiredAnswerId
))
==
null
)
{
if
(
required
AnswerIdMap
.
get
(
IntegerConversionUtil
.
toInteger
(
requiredAnswerId
))
==
null
)
{
question
.
questionInitDisable
=
SinaburoConstant
.
initDisable
.
YES
;
}
else
{
question
.
questionInitDisable
=
SinaburoConstant
.
initDisable
.
NO
;
...
...
@@ -366,8 +377,10 @@ public class QuestionService extends AbstractService<Question> {
for
(
Question
question
:
questionList
)
{
if
(
question
.
questionInitDisable
==
SinaburoConstant
.
initDisable
.
YES
)
{
for
(
Answer
answer
:
question
.
answerList
)
{
answer
.
answerIdValue
=
""
;
answer
.
answerValue
=
""
;
if
(
answer
.
defaultFlg
==
0
)
{
answer
.
answerIdValue
=
""
;
answer
.
answerValue
=
""
;
}
}
}
}
...
...
src/main/resources/application_ja.properties
View file @
7e13d958
...
...
@@ -263,6 +263,7 @@ withDrow.mail.body=\u9000\u4f1a\u624b\u7d9a\u304d\u304c\u5b8c\u4e86\u3057\u307e\
question.maxCoutError
=
\u
8a2d
\u
554f
\u6570\u
304c30
\u3092\u
8d85
\u3048\u3066\u3044\u
307e
\u3059\u3002
question.alreadyExistMailQuestion
=
\u3059\u3067\u
306b
\u9001\u
4fe1
\u7528\u
30e1
\u
30fc
\u
30eb
\u
30a2
\u
30c9
\u
30ec
\u
30b9
\u
306e
\u
8a2d
\u
554f
\u
304c
\u
767b
\u9332\u3055\u
308c
\u3066\u3044\u
307e
\u3059\u3002
question.check.default.condRequiredAnswer
=
\u6761\u
4ef6
\u
4ed8
\u
5fc5
\u9808\u9805\u
76ee
\u3092\u
8a2d
\u
5b9a
\u3057\u
305f
\u5834\u5408\u3001\u
30c7
\u
30d5
\u
30a9
\u
30eb
\u
30c8
\u9078\u
629e
\u
80a2
\u
306f
\u9078\u
629e
\u3067\u
304d
\u
307e
\u
305b
\u3093\u3002
adminRegist.repetLoginId
=
\u
65e2
\u
306b
\u
767b
\u9332\u
6e08
\u
307f
\u
306e
\u
30ed
\u
30b0
\u
30a4
\u
30f3ID
\u3067\u3059\u3002
...
...
src/main/webapp/WEB-INF/view/admin/enquete/questionEdit.html
View file @
7e13d958
...
...
@@ -539,7 +539,7 @@ window.scroll(500,500);
#if($tools.isNotEmpty($checkAsnwerIdList))
<input
type=
"hidden"
name=
"checkAsnwerIdList[$velocityCount]"
value=
"$list.get($checkAsnwerIdList,$velocityCount)"
/>
#end
<
/
BR>
$!tools.getMsg("checkAdminText$!{velocityCount}")
<BR>
$!tools.getMsg("checkAdminText$!{velocityCount}")
</div>
</div>
#end
...
...
src/main/webapp/WEB-INF/view/common/question_disable.vm
0 → 100644
View file @
7e13d958
<!------------------------------------------------------QUESTION DISABLE START -------------------------------------------------->
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script language="javascript" type="text/javascript" charset="utf-8">
<!--
function radioOrCheckboxEvent(id, isDisable) {
if (isDisable) {
$("#" + id).attr("checked", false);
$("#" + id).attr("disabled", true);
$("#" + id).trigger("click");
} else {
$("#" + id).attr("disabled", false);
}
}
function dateEvent(id, isDisable) {
if (isDisable) {
$("." + id).val("");
$("." + id).attr("disabled", true);
$("." + id).next().hide();
} else {
$("." + id).attr("disabled", false);
$("." + id).next().show();
}
}
function etcEvent(id, isDisable) {
if (isDisable) {
$("#" + id).val("");
$("#" + id).attr("disabled", true);
} else {
$("#" + id).attr("disabled", false);
}
}
$(function() {
//条件付必須チェック(セレクトメニュー)
$('select').change(function() {
var selectQuestionId = $(this).attr("id");
var selectAnswerId = $(this).val();
//表示、非表示対象
if (${question.condRequiredQuestionNo} && ${question.condRequiredQuestionNo} == selectQuestionId) {
//グレーアウト対象
if ("${question.condRequiredAnswer}".split(",").indexOf(selectAnswerId) < 0) {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
radioOrCheckboxEvent("${answer.answerId}", true);
} else if ( "${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" != "5") {
etcEvent("${question.questionId}", true);
} else {
dateEvent("${question.questionId}", true);
}
}
//グレーアウト解除
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
radioOrCheckboxEvent("${answer.answerId}", false);
} else if ("${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" != "5") {
etcEvent("${question.questionId}", false);
} else {
dateEvent("${question.questionId}", false);
}
}
}
}
});
//条件付必須チェック(ラジオボタン、チェックボックス)
$("input[type=radio], input[type=checkbox]").click(function () {
var thisQuestionId = $(this).attr("class");
var thisAnswerId = $(this).attr("id");
//表示、非表示対象
if (${question.condRequiredQuestionNo} && ${question.condRequiredQuestionNo} == thisQuestionId) {
//グレーアウト対象
if ("${question.condRequiredAnswer}".split(",").indexOf(thisAnswerId) < 0) {
if ($(this).attr("type") == "radio"
&& ("${question.controlId}" == "0" || "${question.controlId}" == "1")) {
if ($(this).is(":checked")) {
radioOrCheckboxEvent("${answer.answerId}", true);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
radioOrCheckboxEvent("${answer.answerId}", true);
}
}
} else if ( "${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
$("#${question.questionId}").val("").trigger("change");
}
if ($(this).attr("type") == "radio") {
if ($(this).is(":checked")) {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
if ("${question.controlId}" != "5") {
etcEvent("${question.questionId}", true);
} else {
dateEvent("${question.questionId}", true);
}
}
} else {
if ("${question.controlId}" != "5") {
etcEvent("${question.questionId}", false);
} else {
dateEvent("${question.questionId}", false);
}
}
}
}
//グレーアウト解除
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
if ($(this).is(":checked")) {
radioOrCheckboxEvent("${answer.answerId}", 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) {
radioOrCheckboxEvent("${answer.answerId}", true);
}
}
} else if ("${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
$("#${question.questionId}").val("").trigger("change");
}
if ($(this).is(":checked")) {
if ("${question.controlId}" != "5") {
etcEvent("${question.questionId}", false);
} else {
dateEvent("${question.questionId}", 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) {
if ("${question.controlId}" != "5") {
etcEvent("${question.questionId}", true);
} else {
dateEvent("${question.questionId}", true);
}
}
}
}
}
}
});
});
// -->
</script>
#end
#end
<!------------------------------------------------------QUESTION DISABLE END-------------------------------------------------->
\ No newline at end of file
src/main/webapp/WEB-INF/view/common/question_disable_sp.vm
0 → 100644
View file @
7e13d958
<!------------------------------------------------------QUESTION DISABLE START -------------------------------------------------->
<script language="javascript" type="text/javascript" charset="utf-8">
<!--
window.onload = function () {
$("input[type=text], input[type=date], textArea[type=text]").each(function(){
if ($(this).prop("disabled")) {
$(this).val("");
$(this).textinput().textinput("disable");
if ($(this).prop("type") == "date") {
$(this).next().hide();
}
}
});
}
// -->
</script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script language="javascript" type="text/javascript" charset="utf-8">
<!--
function radioOrCheckboxEvent(id, isDisable) {
if (isDisable) {
$("." + id).prop("checked", false);
$("." + id).checkboxradio('refresh').checkboxradio('disable');
$("." + id).trigger("click");
} else {
$("." + id).checkboxradio("enable").checkboxradio('refresh');
}
}
function dateEvent(id, isDisable) {
if (isDisable) {
$("." + id).val("");
$("." + id).textinput("disable");
$("." + id).next().hide();
} else {
$("." + id).textinput("enable");
$("." + id).next().show();
}
}
function selectEvent(id, isDisable) {
if (isDisable) {
$("." + id).selectmenu("refresh").selectmenu("disable");
$("." + id).val("").trigger("change");
} else {
$("." + id).selectmenu("enable");
}
}
function textEvent(id, isDisable) {
if (isDisable) {
$("." + id).val("");
$("." + id).textinput("disable");
} else {
$("." + id).textinput("enable");
}
}
$(function() {
//条件付必須チェック(セレクトメニュー)
$('select').change(function() {
var selectQuestionId = $(this).attr("class");
var selectAnswerId = $(this).val();
//表示、非表示対象
if (${question.condRequiredQuestionNo} && ${question.condRequiredQuestionNo} == selectQuestionId) {
//グレーアウト対象
if ("${question.condRequiredAnswer}".split(",").indexOf(selectAnswerId) < 0) {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
radioOrCheckboxEvent("${answer.answerId}", true);
} else if ( "${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
selectEvent("${question.questionId}", true);
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
textEvent("${question.questionId}", true);
} else if ("${question.controlId}" == "5") {
dateEvent("${question.questionId}", true);
}
}
//グレーアウト解除
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
radioOrCheckboxEvent("${answer.answerId}", false);
} else if ("${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
selectEvent("${question.questionId}", false);
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
textEvent("${question.questionId}", false);
} else if ("${question.controlId}" == "5") {
dateEvent("${question.questionId}", false);
}
}
}
}
});
//条件付必須チェック(ラジオボタン、チェックボックス)
$("input[type=radio], input[type=checkbox]").click(function () {
var thisQuestionId = $(this).attr("class").split(" ")[0];
var thisAnswerId = $(this).attr("class").split(" ")[1];
//表示、非表示対象
if (${question.condRequiredQuestionNo} && ${question.condRequiredQuestionNo} == thisQuestionId) {
//グレーアウト対象
if ("${question.condRequiredAnswer}".split(",").indexOf(thisAnswerId) < 0) {
if ($(this).attr("type") == "radio"
&& ("${question.controlId}" == "0" || "${question.controlId}" == "1")) {
if ($(this).is(":checked")) {
radioOrCheckboxEvent("${answer.answerId}", true);
} else {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
radioOrCheckboxEvent("${answer.answerId}", true);
}
}
} else if ( "${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
$("." + "${question.questionId}").val("").trigger("change");
}
if ($(this).attr("type") == "radio") {
if ($(this).is(":checked")) {
var array = "${question.condRequiredAnswer}".split(",");
var judgeDisable = true;
for (let i in array) {
if ($("#" + array[i]).is(":checked")) {
judgeDisable = false;
break;
}
}
if (judgeDisable) {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
selectEvent("${question.questionId}", true);
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
textEvent("${question.questionId}", true);
} else if ("${question.controlId}" == "5") {
dateEvent("${question.questionId}", true);
}
}
} else {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
selectEvent("${question.questionId}", false);
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
textEvent("${question.questionId}", false);
} else if ("${question.controlId}" == "5") {
dateEvent("${question.questionId}", false);
}
}
}
}
//グレーアウト解除
} else {
if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
if ($(this).is(":checked")) {
radioOrCheckboxEvent("${answer.answerId}", 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) {
radioOrCheckboxEvent("${answer.answerId}", true);
}
}
} else if ("${question.controlId}" == "2"
|| "${question.controlId}" == "3"
|| "${question.controlId}" == "4"
|| "${question.controlId}" == "5"
|| "${question.controlId}" == "6") {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
$("." + "${question.questionId}").val("").trigger("change");
}
if ($(this).is(":checked")) {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
selectEvent("${question.questionId}", false);
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
textEvent("${question.questionId}", false);
} else if ("${question.controlId}" == "5") {
dateEvent("${question.questionId}", 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) {
if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
selectEvent("${question.questionId}", true);
} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
textEvent("${question.questionId}", true);
} else if ("${question.controlId}" == "5") {
dateEvent("${question.questionId}", true);
}
}
}
}
}
}
});
});
// -->
</script>
#end
#end
<!------------------------------------------------------QUESTION DISABLE END-------------------------------------------------->
\ No newline at end of file
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete.html
View file @
7e13d958
#set($title = "アンケート")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
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"
)
{
$
(
".${question.questionId}"
).
val
(
""
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
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
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable.vm" )
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
...
...
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_pub.html
View file @
7e13d958
#set($title = "アンケート")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
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"
)
{
$
(
".${question.questionId}"
).
val
(
""
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
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
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable.vm" )
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
...
...
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_web_rec.html
View file @
7e13d958
#set($title = "アンケート")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
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"
)
{
$
(
".${question.questionId}"
).
val
(
""
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
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
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable.vm" )
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
...
...
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete.html
View file @
7e13d958
#set($title = "アンケート回答")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
window
.
onload
=
function
()
{
$
(
"input[type=text], input[type=date], textArea[type=text]"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"disabled"
))
{
$
(
this
).
val
(
""
);
$
(
this
).
textinput
().
textinput
(
"disable"
);
if
(
$
(
this
).
prop
(
"type"
)
==
"date"
)
{
$
(
this
).
next
().
hide
();
}
}
});
}
// -->
</script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
idArray
=
$
(
this
).
attr
(
"class"
).
split
(
" "
);
var
thisQuestionId
=
idArray
[
0
];
var
thisAnswerId
=
idArray
[
1
];
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
var
key
;
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
prop
(
"checked"
,
false
);
$
(
"."
+
key
).
checkboxradio
(
'refresh'
).
checkboxradio
(
'disable'
);
}
else
if
(
"${question.controlId}"
==
"2"
)
{
}
else
if
(
"${question.controlId}"
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
selectmenu
(
"refresh"
).
selectmenu
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
$
(
"."
+
key
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
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"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
$
(
"."
+
key
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable_sp.vm" )
<!-- preHeader -->
#set($ajaxdisable = "1")
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
...
...
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_pub.html
View file @
7e13d958
#set($title = "アンケート回答")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
window
.
onload
=
function
()
{
$
(
"input[type=text], input[type=date], textArea[type=text]"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"disabled"
))
{
$
(
this
).
val
(
""
);
$
(
this
).
textinput
().
textinput
(
"disable"
);
if
(
$
(
this
).
prop
(
"type"
)
==
"date"
)
{
$
(
this
).
next
().
hide
();
}
}
});
}
// -->
</script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
idArray
=
$
(
this
).
attr
(
"class"
).
split
(
" "
);
var
thisQuestionId
=
idArray
[
0
];
var
thisAnswerId
=
idArray
[
1
];
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
var
key
;
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
prop
(
"checked"
,
false
);
$
(
"."
+
key
).
checkboxradio
(
'refresh'
).
checkboxradio
(
'disable'
);
}
else
if
(
"${question.controlId}"
==
"2"
)
{
}
else
if
(
"${question.controlId}"
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
selectmenu
(
"refresh"
).
selectmenu
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
$
(
"."
+
key
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
checkboxradio
(
'enable'
);
}
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"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
$
(
"."
+
key
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable_sp.vm" )
<!-- preHeader -->
#set($ajaxdisable = "1")
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
...
...
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_web_rec.html
View file @
7e13d958
#set($title = "アンケート回答")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
window
.
onload
=
function
()
{
$
(
"input[type=text], input[type=date], textArea[type=text]"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"disabled"
))
{
$
(
this
).
val
(
""
);
$
(
this
).
textinput
().
textinput
(
"disable"
);
if
(
$
(
this
).
prop
(
"type"
)
==
"date"
)
{
$
(
this
).
next
().
hide
();
}
}
});
}
// -->
</script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
idArray
=
$
(
this
).
attr
(
"class"
).
split
(
" "
);
var
thisQuestionId
=
idArray
[
0
];
var
thisAnswerId
=
idArray
[
1
];
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
var
key
;
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
prop
(
"checked"
,
false
);
$
(
"."
+
key
).
checkboxradio
(
'refresh'
).
checkboxradio
(
'disable'
);
}
else
if
(
"${question.controlId}"
==
"2"
)
{
}
else
if
(
"${question.controlId}"
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
selectmenu
(
"refresh"
).
selectmenu
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
$
(
"."
+
key
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
checkboxradio
(
'enable'
);
}
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"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
$
(
"."
+
key
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable_sp.vm" )
<!-- preHeader -->
#set($ajaxdisable = "1")
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
...
...
src/main/webapp/WEB-INF/view/user/enquete/enquete.html
View file @
7e13d958
...
...
@@ -24,197 +24,7 @@ $(function() {
</script>
#end
#end
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
function
radioOrCheckboxEvent
(
id
,
isDisable
)
{
$
(
"#"
+
id
).
trigger
(
"click"
);
if
(
isDisable
)
{
$
(
"#"
+
id
).
attr
(
"checked"
,
false
);
$
(
"#"
+
id
).
attr
(
"disabled"
,
true
);
}
else
{
$
(
"#"
+
id
).
attr
(
"disabled"
,
false
);
}
}
function
dateEvent
(
id
,
isDisable
)
{
if
(
isDisable
)
{
$
(
"."
+
id
).
val
(
''
);
$
(
"."
+
id
).
attr
(
"disabled"
,
true
);
$
(
"."
+
id
).
next
().
hide
();
}
else
{
$
(
"."
+
id
).
attr
(
"disabled"
,
false
);
$
(
"."
+
id
).
next
().
show
();
}
}
function
etcEvent
(
id
,
isDisable
)
{
if
(
isDisable
)
{
$
(
"#"
+
id
).
val
(
''
);
$
(
"#"
+
id
).
attr
(
"disabled"
,
true
);
}
else
{
$
(
"#"
+
id
).
attr
(
"disabled"
,
false
);
}
}
$
(
function
()
{
//条件付必須チェック(セレクトメニュー)
$
(
'select'
).
change
(
function
()
{
var
selectQuestionId
=
$
(
this
).
attr
(
"id"
);
var
selectAnswerId
=
$
(
this
).
val
();
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
selectQuestionId
)
{
//グレーアウト対象
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
selectAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
radioOrCheckboxEvent
(
"${answer.answerId}"
,
true
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"5"
||
"${question.controlId}"
==
"6"
)
{
if
(
"${question.controlId}"
!=
"5"
)
{
etcEvent
(
"${question.questionId}"
,
true
);
}
else
{
dateEvent
(
"${question.questionId}"
,
true
);
}
}
//グレーアウト解除
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
radioOrCheckboxEvent
(
"${answer.answerId}"
,
false
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"5"
||
"${question.controlId}"
==
"6"
)
{
if
(
"${question.controlId}"
!=
"5"
)
{
etcEvent
(
"${question.questionId}"
,
false
);
}
else
{
dateEvent
(
"${question.questionId}"
,
false
);
}
}
}
}
});
//条件付必須チェック(ラジオボタン、チェックボックス)
$
(
"input[type=radio], input[type=checkbox]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
//グレーアウト対象
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
$
(
this
).
attr
(
"type"
)
==
"radio"
&&
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
))
{
if
(
$
(
this
).
is
(
":checked"
))
{
radioOrCheckboxEvent
(
"${answer.answerId}"
,
true
);
}
else
{
var
array
=
"${question.condRequiredAnswer}"
.
split
(
","
);
var
judgeDisable
=
true
;
for
(
let
i
in
array
)
{
if
(
$
(
"#"
+
array
[
i
]).
is
(
":checked"
))
{
judgeDisable
=
false
;
break
;
}
}
if
(
judgeDisable
)
{
radioOrCheckboxEvent
(
"${answer.answerId}"
,
true
);
}
}
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"5"
||
"${question.controlId}"
==
"6"
)
{
if
(
"${question.controlId}"
==
"2"
)
{
$
(
"#${question.questionId}"
).
trigger
(
"change"
);
}
if
(
$
(
this
).
attr
(
"type"
)
==
"radio"
)
{
if
(
$
(
this
).
is
(
":checked"
))
{
var
array
=
"${question.condRequiredAnswer}"
.
split
(
","
);
var
judgeDisable
=
true
;
for
(
let
i
in
array
)
{
if
(
$
(
"#"
+
array
[
i
]).
is
(
":checked"
))
{
judgeDisable
=
false
;
break
;
}
}
if
(
judgeDisable
)
{
if
(
"${question.controlId}"
!=
"5"
)
{
etcEvent
(
"${question.questionId}"
,
true
);
}
else
{
dateEvent
(
"${question.questionId}"
,
true
);
}
}
}
else
{
if
(
"${question.controlId}"
!=
"5"
)
{
etcEvent
(
"${question.questionId}"
,
false
);
}
else
{
dateEvent
(
"${question.questionId}"
,
false
);
}
}
}
}
//グレーアウト解除
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
if
(
$
(
this
).
is
(
":checked"
))
{
radioOrCheckboxEvent
(
"${answer.answerId}"
,
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
)
{
radioOrCheckboxEvent
(
"${answer.answerId}"
,
true
);
}
}
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"5"
||
"${question.controlId}"
==
"6"
)
{
if
(
"${question.controlId}"
==
"2"
)
{
$
(
"#${question.questionId}"
).
trigger
(
"change"
);
}
if
(
$
(
this
).
is
(
":checked"
))
{
if
(
"${question.controlId}"
!=
"5"
)
{
etcEvent
(
"${question.questionId}"
,
false
);
}
else
{
dateEvent
(
"${question.questionId}"
,
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
)
{
if
(
"${question.controlId}"
!=
"5"
)
{
etcEvent
(
"${question.questionId}"
,
true
);
}
else
{
dateEvent
(
"${question.questionId}"
,
true
);
}
}
}
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable.vm" )
<body
bgcolor=
"#B3C9E1"
leftmargin=
"0"
topmargin=
"0"
marginwidth=
"0"
marginheight=
"0"
>
<center>
...
...
src/main/webapp/WEB-INF/view/user/enquete/enquete_pub.html
View file @
7e13d958
...
...
@@ -27,65 +27,8 @@
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable.vm" )
</head>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
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"
)
{
$
(
".${question.questionId}"
).
val
(
''
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
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
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<body>
<div
id=
"wrapper"
>
<div
id=
"logo"
><img
src=
"/em/images/ichikawa_logo01.jpg"
width=
"190"
height=
"65"
/>
...
...
src/main/webapp/WEB-INF/view/user/enquete/enquete_web_rec.html
View file @
7e13d958
...
...
@@ -26,64 +26,7 @@
#end
#end
</head>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
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"
)
{
$
(
".${question.questionId}"
).
val
(
''
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
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
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
#parse( "/WEB-INF/view/common/question_disable.vm" )
<body>
<div
id=
"wrapper"
>
...
...
src/main/webapp/WEB-INF/view/user/top/newUserRegist.html
View file @
7e13d958
...
...
@@ -3,6 +3,16 @@
#parse( "/WEB-INF/view/common/preHeader.vm" )
##
<!-- JAVASCRIPTはここに記載 -->
<script
language=
"JavaScript"
>
<!--
sent
=
false
;
function
send_check
(){
document
.
mainForm
.
submit
();
return
false
;
}
// -->
</script>
<style
type=
"text/css"
>
<!
--
.style1
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment