Skip to content

Commit

Permalink
SAM-3222: correct behavior of Question Layout Setting when Linear acc…
Browse files Browse the repository at this point in the history
…ess is selected
  • Loading branch information
dnhutchins authored and bjones86 committed Mar 20, 2018
1 parent 430179f commit ba10aa5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
33 changes: 33 additions & 0 deletions samigo/samigo-app/src/webapp/jsf/author/authorSettings.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,39 @@
// adjust the height of the iframe to accomodate the expansion from the accordion
$("body").height($("body").outerHeight() + 900);
checkNav = function() {
QuesFormatRadios = ["assessmentSettingsAction\\:assessmentFormat\\:0", "assessmentSettingsAction\\:assessmentFormat\\:1", "assessmentSettingsAction\\:assessmentFormat\\:2"];
if ($("#assessmentSettingsAction\\:itemNavigation\\:0:checked").val() != undefined) {
enabled=false;
} else {
enabled=true
}
if (enabled) {
QuesFormatRadios.forEach(function(v,i,a){
$('#assessmentSettingsAction\\:markForReview1').removeAttr("disabled");
$('#assessmentSettingsAction\\:markForReview1').parent().css("color", "#333");
$('label[for="'+v+'"]').css("color", "#333");
$('label[for="assessmentSettingsAction\\:assessmentFormat"]').css("color", "#333");
$("#"+v).removeAttr("disabled")
});
} else {
QuesFormatRadios.forEach(function(v,i,a){
$('#assessmentSettingsAction\\:markForReview1').attr("disabled", true);
$('#assessmentSettingsAction\\:markForReview1').attr("checked", false);
$('#assessmentSettingsAction\\:markForReview1').parent().css("color", "#aaa");
$('#assessmentSettingsAction\\:assessmentFormat\\:0').click();
$('label[for="'+v+'"]').css("color", "#aaa");
$("#"+v).attr("disabled", true)
});
}
}
$('#assessmentSettingsAction\\:itemNavigation\\:0').change(checkNav);
$('#assessmentSettingsAction\\:itemNavigation\\:1').change(checkNav);
checkNav();
// SAM-2323 jquery-UI datepicker
localDatePicker({
input: '#assessmentSettingsAction\\:startDate',
Expand Down
33 changes: 33 additions & 0 deletions samigo/samigo-app/src/webapp/jsf/author/publishedSettings.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,39 @@
// adjust the height of the iframe to accomodate the expansion from the accordion
$("body").height($("body").outerHeight() + 900);
checkNav = function() {
QuesFormatRadios = ["assessmentSettingsAction\\:assessmentFormat\\:0", "assessmentSettingsAction\\:assessmentFormat\\:1", "assessmentSettingsAction\\:assessmentFormat\\:2"];
if ($("#assessmentSettingsAction\\:itemNavigation\\:0:checked").val() != undefined) {
enabled=false;
} else {
enabled=true
}
if (enabled) {
QuesFormatRadios.forEach(function(v,i,a){
$('#assessmentSettingsAction\\:markForReview1').removeAttr("disabled");
$('#assessmentSettingsAction\\:markForReview1').parent().css("color", "#333");
$('label[for="'+v+'"]').css("color", "#333");
$('label[for="assessmentSettingsAction\\:assessmentFormat"]').css("color", "#333");
$("#"+v).removeAttr("disabled")
});
} else {
QuesFormatRadios.forEach(function(v,i,a){
$('#assessmentSettingsAction\\:markForReview1').attr("disabled", true);
$('#assessmentSettingsAction\\:markForReview1').attr("checked", false);
$('#assessmentSettingsAction\\:markForReview1').parent().css("color", "#aaa");
$('#assessmentSettingsAction\\:assessmentFormat\\:0').click();
$('label[for="'+v+'"]').css("color", "#aaa");
$("#"+v).attr("disabled", true)
});
}
}
$('#assessmentSettingsAction\\:itemNavigation\\:0').change(checkNav);
$('#assessmentSettingsAction\\:itemNavigation\\:1').change(checkNav);
checkNav();
// SAM-2323 jquery-UI datepicker
localDatePicker({
input: '#assessmentSettingsAction\\:startDate',
Expand Down

0 comments on commit ba10aa5

Please sign in to comment.