made why permanent, made question optional

This commit is contained in:
alisolarflare 2017-06-15 17:33:36 -06:00
parent 0cb14f6f8e
commit 42ca406938
2 changed files with 24 additions and 13 deletions

View file

@ -14,13 +14,24 @@ window.onload = function(){
for(option of scenario.options){ for(option of scenario.options){
$options.append($("<li><input type=\"radio\" name=\"radio-"+scenario.name+"\">" + option + "</radio></li>")); $options.append($("<li><input type=\"radio\" name=\"radio-"+scenario.name+"\">" + option + "</radio></li>"));
} }
$question = $("<p>" + scenario.question + "</p>"); if (scenario.other){
$options.append("<li>Other... <input type=text></li>");
}
$textArea = $("<textArea placeholder=\"Enter response here\"></textArea>") $why = $("<p>Why would you choose this awnser?</p>");
$whyResponse = $("<textArea placeholder=\"Enter response here\"></textArea>")
$liElement.append($description); $liElement.append($description);
$liElement.append($options); $liElement.append($options);
$liElement.append($textArea); $liElement.append($why);
$liElement.append($whyResponse);
if(scenario.question){
$question = $("<p>" + scenario.question + "</p>");
$questionResponse = $("<textArea placeholder=\"Enter response here\"></textArea>")
$liElement.append($question);
$liElement.append($questionResponse);
}
$("#scenarios").append($liElement); $("#scenarios").append($liElement);
} }

View file

@ -8,11 +8,11 @@
"Try to find who stole the goods, and try to get it back", "Try to find who stole the goods, and try to get it back",
"Go to the moderators, and report what happened", "Go to the moderators, and report what happened",
"Ignore it all, and try to gather resources to recover", "Ignore it all, and try to gather resources to recover",
"Question yourself, has your base really been raided?", "Question yourself, has your base really been raided?"
"Other..."
], ],
"question": "Why would you choose this action?", "question": null,
"adult": false "adult": false,
"other": true
}, },
{ {
"name": "Rule 1", "name": "Rule 1",
@ -22,12 +22,12 @@
"Attempt to defuse the situation, listening to them", "Attempt to defuse the situation, listening to them",
"Go to the moderators, report what happened", "Go to the moderators, report what happened",
"See if there is some way to distract them from their issues", "See if there is some way to distract them from their issues",
"Ignore them with /ignore, and continue playing", "Ignore them with /ignore, and continue playing"
"Other..."
], ],
"question": "question":
"If you were a moderator, what would you choose instead?", "If you were a moderator, what would you choose instead?",
"adult": false "adult": false,
"other": true
}, },
{ {
"name": "Harrassment", "name": "Harrassment",
@ -37,12 +37,12 @@
"Try to listen to both sides, see what the other person has to say", "Try to listen to both sides, see what the other person has to say",
"Go to the moderators, and report what happened", "Go to the moderators, and report what happened",
"Try to cheer up your friend, diverting their attention to something else", "Try to cheer up your friend, diverting their attention to something else",
"Listen to your friend, and reccommend some advice", "Listen to your friend, and reccommend some advice"
"Other..."
], ],
"question": "question":
"If this situation were happening to you, what option would you choose?", "If this situation were happening to you, what option would you choose?",
"adult": true "adult": true,
"other": true
} }
] ]
} }