Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions src/template/ACRHR_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@
/*
Users should not be able to vot before listening the audio clips until the end.
*/
function avoidAnsweringBeforeWatchingThrough(){
function avoidAnsweringBeforeWatchingThrough(){
var i;
// Training section
for (i = 0; i < config['trainingUrls'].length; i++) {
Expand All @@ -2071,7 +2071,19 @@
for (i = 0; i < config['questionUrls'].length; i++) {
$('input[name="q{0}"]'.f(i+1)).on('change', alertForbiddenChange);
}
}
}

function reportProblem(){
var desc = prompt('Please describe the problem you encountered:');
if(desc === null){
return;
}
var videoUrls = config['questionUrls'].join('\n');
var browserInfo = $('#browser_info').val();
var problems = problematic_urls.replace(/<li>/g,'').replace(/<\/li>/g,'\n');
var body = encodeURIComponent(desc + '\n\nVideo URLs:\n' + videoUrls + '\n\nBrowser Info:\n' + browserInfo + '\n\nProblematic URLs:\n' + problems);
window.location.href = 'mailto:' + config['emailAddress'] + '?subject=Problem Report&body=' + body;
}

//-------------------------------------------
</script>
Expand Down Expand Up @@ -2604,11 +2616,12 @@ <h3 class="panel-title">Ratings</h3>
<div class="tab-content" id="nav-tabContent-rating"> </div>
<div style="margin-top:0px;font-size:90%;text-align:center">Click <b>next</b> to answer all <b class="question_number">0</b> questions, then submit your response.</div>
<nav aria-label="..." id="navNextPre">
<ul class="pager">
<li class="previous" id="prev-rating" onclick="showPreviousQuestionInRatingSection();"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" onclick="showNextQuestionInRatingSection();" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<ul class="pager">
<li class="previous" id="prev-rating" onclick="showPreviousQuestionInRatingSection();"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" onclick="showNextQuestionInRatingSection();" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<button type="button" class="btn btn-warning" onclick="reportProblem();">Report Problem</button>

</div>
</div>
Expand Down
35 changes: 24 additions & 11 deletions src/template/ACR_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,7 @@
/*
Users should not be able to vot before listening the audio clips until the end.
*/
function avoidAnsweringBeforeWatchingThrough(){
function avoidAnsweringBeforeWatchingThrough(){
var i;
// Training section
for (i = 0; i < config['trainingUrls'].length; i++) {
Expand All @@ -2409,7 +2409,19 @@
for (i = 0; i < config['questionUrls'].length; i++) {
$('input[name="q{0}"]'.f(i+1)).on('change', alertForbiddenChange);
}
}
}

function reportProblem(){
var desc = prompt('Please describe the problem you encountered:');
if(desc === null){
return;
}
var videoUrls = config['questionUrls'].join('\n');
var browserInfo = $('#browser_info').val();
var problems = problematic_urls.replace(/<li>/g,'').replace(/<\/li>/g,'\n');
var body = encodeURIComponent(desc + '\n\nVideo URLs:\n' + videoUrls + '\n\nBrowser Info:\n' + browserInfo + '\n\nProblematic URLs:\n' + problems);
window.location.href = 'mailto:' + config['emailAddress'] + '?subject=Problem Report&body=' + body;
}

//-------------------------------------------
</script>
Expand Down Expand Up @@ -2957,15 +2969,16 @@ <h3 class="panel-title">Ratings</h3>
<div class="tab-content" id="nav-tabContent-rating"> </div>
<div style="margin-top:0px;font-size:90%;text-align:center">Click <b>next</b> to answer all <b class="question_number">0</b> questions, then submit your response.</div>
<nav aria-label="..." id="navNextPre">
<ul class="pager">
<li class="previous" id="prev-rating" onclick="showPreviousQuestionInRatingSection();"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" onclick="showNextQuestionInRatingSection();" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>

</div>
</div>
</section>
<ul class="pager">
<li class="previous" id="prev-rating" onclick="showPreviousQuestionInRatingSection();"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" onclick="showNextQuestionInRatingSection();" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<button type="button" class="btn btn-warning" onclick="reportProblem();">Report Problem</button>

</div>
</div>
</section>


<section class="container" id="thanks">
Expand Down
35 changes: 24 additions & 11 deletions src/template/DCR_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2642,7 +2642,7 @@
/*
Users should not be able to vot before listening the audio clips until the end.
*/
function avoidAnsweringBeforeWatchingThrough(){
function avoidAnsweringBeforeWatchingThrough(){
var i;
// Training section
for (i = 0; i < config['trainingUrls'].length; i++) {
Expand All @@ -2652,7 +2652,19 @@
for (i = 0; i < config['questionUrls'].length; i++) {
$('input[name="q{0}"]'.f(i+1)).on('change', alertForbiddenChange);
}
}
}

function reportProblem(){
var desc = prompt('Please describe the problem you encountered:');
if(desc === null){
return;
}
var videoUrls = config['questionUrls'].join('\n');
var browserInfo = $('#browser_info').val();
var problems = problematic_urls.replace(/<li>/g,'').replace(/<\/li>/g,'\n');
var body = encodeURIComponent(desc + '\n\nVideo URLs:\n' + videoUrls + '\n\nBrowser Info:\n' + browserInfo + '\n\nProblematic URLs:\n' + problems);
window.location.href = 'mailto:' + config['emailAddress'] + '?subject=Problem Report&body=' + body;
}

//-------------------------------------------
</script>
Expand Down Expand Up @@ -3205,15 +3217,16 @@ <h3 class="panel-title">Ratings</h3>
<div class="tab-content" id="nav-tabContent-rating"> </div>
<div style="margin-top:0px;font-size:90%;text-align:center">Click <b>next</b> to answer all <b class="question_number">0</b> questions, then submit your response.</div>
<nav aria-label="..." id="navNextPre">
<ul class="pager">
<li class="previous" id="prev-rating" onclick="showPreviousQuestionInRatingSection();"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" onclick="showNextQuestionInRatingSection();" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>

</div>
</div>
</section>
<ul class="pager">
<li class="previous" id="prev-rating" onclick="showPreviousQuestionInRatingSection();"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" onclick="showNextQuestionInRatingSection();" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<button type="button" class="btn btn-warning" onclick="reportProblem();">Report Problem</button>

</div>
</div>
</section>


<section class="container" id="thanks">
Expand Down
23 changes: 18 additions & 5 deletions src/template/avatar_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2970,6 +2970,18 @@
}
}

function reportProblem(){
var desc = prompt('Please describe the problem you encountered:');
if(desc === null){
return;
}
var videoUrls = config['questionUrls'].join('\n');
var browserInfo = $('#browser_info').val();
var problems = problematic_urls.replace(/<li>/g,'').replace(/<\/li>/g,'\n');
var body = encodeURIComponent(desc + '\n\nVideo URLs:\n' + videoUrls + '\n\nBrowser Info:\n' + browserInfo + '\n\nProblematic URLs:\n' + problems);
window.location.href = 'mailto:' + config['emailAddress'] + '?subject=Problem Report&body=' + body;
}

//-------------------------------------------
</script>

Expand Down Expand Up @@ -3547,11 +3559,12 @@ <h3 class="panel-title">Ratings</h3>
<div class="tab-content" id="nav-tabContent-rating"> </div>
<div style="margin-top:0px;font-size:90%;text-align:center">Click <b>next</b> to answer all <b class="question_number">0</b> questions, then submit your response.</div>
<nav aria-label="..." id="navNextPre">
<ul class="pager">
<li class="previous" id="prev-rating"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<ul class="pager">
<li class="previous" id="prev-rating"><a href="#navNextPre" class="page-link" role="button" ><span aria-hidden="true">&larr;</span>Previous</a></li>
<li class="next" id= "next-rating" ><a href="#navNextPre" class="page-link" role="button">Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<button type="button" class="btn btn-warning" onclick="reportProblem();">Report Problem</button>

</div>
</div>
Expand Down