From 42ca4069380a3ac22404dbb748750bd18340187c Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 15 Jun 2017 17:33:36 -0600 Subject: [PATCH] made why permanent, made question optional --- resources/questions/scenarios.js | 17 ++++++++++++++--- resources/questions/scenarios.json | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/resources/questions/scenarios.js b/resources/questions/scenarios.js index c5870bb..09ac6cf 100644 --- a/resources/questions/scenarios.js +++ b/resources/questions/scenarios.js @@ -14,13 +14,24 @@ window.onload = function(){ for(option of scenario.options){ $options.append($("
  • " + option + "
  • ")); } - $question = $("

    " + scenario.question + "

    "); + if (scenario.other){ + $options.append("
  • Other...
  • "); + } - $textArea = $("") + $why = $("

    Why would you choose this awnser?

    "); + $whyResponse = $("") $liElement.append($description); $liElement.append($options); - $liElement.append($textArea); + $liElement.append($why); + $liElement.append($whyResponse); + + if(scenario.question){ + $question = $("

    " + scenario.question + "

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