Index: lams_central/web/includes/javascript/authoring/authoringProperty.js
===================================================================
diff -u -r82268377d31a6b2c88a736ffdf368156d92af866 -r1b80192b1c9e738b23b09ae2a9577fc10d74f7a4
--- lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision 82268377d31a6b2c88a736ffdf368156d92af866)
+++ lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision 1b80192b1c9e738b23b09ae2a9577fc10d74f7a4)
@@ -297,10 +297,10 @@
.on('input', changeFunction);
$('.propertiesContentFieldActivityCompletionBased', content)
- .attr('checked', activity.gateActivityCompletionBased ? 'checked' : null);
+ .prop('checked', activity.gateActivityCompletionBased);
$('.propertiesContentFieldStopAtPrecedingActivity', content)
- .attr('checked', activity.gateStopAtPrecedingActivity ? 'checked' : null);
+ .prop('checked', activity.gateStopAtPrecedingActivity);
$('.propertiesContentFieldPassword', content)
.val(activity.password);
@@ -312,7 +312,6 @@
if (activity.transitions.to.length == 0){
$('.propertiesContentFieldActivityCompletionBased', content)
- .attr('checked', null)
.prop('checked', false)
.attr('disabled', 'disabled');
@@ -406,9 +405,9 @@
$('.propertiesContentFieldTitle', content).val(activity.title);
$('.propertiesContentFieldGroupingType', content).val(activity.groupingType);
if (activity.groupDivide == 'learners') {
- $('.propertiesContentFieldLearnerCountEnable', content).attr('checked', 'checked');
+ $('.propertiesContentFieldLearnerCountEnable', content).prop('checked', true);
} else {
- $('.propertiesContentFieldGroupCountEnable', content).attr('checked', 'checked');
+ $('.propertiesContentFieldGroupCountEnable', content).prop('checked', true);
}
// create groups/learners spinners
@@ -422,8 +421,8 @@
}).attr('value', activity.learnerCount)
.on('input', changeFunction);
- $('.propertiesContentFieldEqualSizes', content).attr('checked', activity.equalSizes ? 'checked' : null);
- $('.propertiesContentFieldViewLearners', content).attr('checked', activity.viewLearners ? 'checked' : null);
+ $('.propertiesContentFieldEqualSizes', content).prop('checked', activity.equalSizes);
+ $('.propertiesContentFieldViewLearners', content).prop('checked', activity.viewLearners);
$('.propertiesContentFieldNameGroups', content).click(function(){
PropertyLib.openGroupNamingDialog(activity);
});
@@ -832,8 +831,7 @@
});
}
- $('.propertiesContentFieldDefault', content).attr('checked',
- transition.branch && transition.branch.defaultBranch ? 'checked' : null);
+ $('.propertiesContentFieldDefault', content).prop('checked', transition.branch && transition.branch.defaultBranch);
}
},
@@ -1109,7 +1107,7 @@
var dialog = layout.outputConditionsDialog,
activity = dialog.data('parentObject'),
outputSelect = $('#outputSelect', dialog),
- emptyOption = $('option[value="none"]', outputSelect).attr('selected', 'selected'),
+ emptyOption = $('option[value="none"]', outputSelect).prop('selected', true),
// conditions can have names like "output.name#6", but real output names do not have a suffix
outputName = activity.conditionsToBranches && activity.conditionsToBranches.length > 0
? activity.conditionsToBranches[0].condition.name.split('#')[0] : null;
@@ -1143,8 +1141,8 @@
.appendTo(outputSelect);
// select the output for which mappings were already defined
if (this.name == outputName) {
- option.attr('selected', 'selected');
- emptyOption.attr('selected', null);
+ option.prop('selected', true);
+ emptyOption.prop('selected', false);
}
});
}
@@ -1508,7 +1506,7 @@
*/
fillGroupingDropdown : function(activity, grouping) {
// find all groupings on canvas and fill dropdown menu with their titles
- var emptyOption = $('').attr('selected', 'selected'),
+ var emptyOption = $('').prop('selected', true),
groupingDropdown = $('.propertiesContentFieldGrouping', activity.propertiesContent).empty().append(emptyOption),
groupings = [];
@@ -1527,8 +1525,8 @@
// store reference to grouping object
.data('grouping', this);
if (this == grouping) {
- emptyOption.removeAttr('selected');
- option.attr('selected', 'selected');
+ emptyOption.prop('selected', false);
+ option.prop('selected', true);
}
});
},
@@ -1589,8 +1587,8 @@
// store reference to grouping object
.data('input', this);
if (this == input) {
- emptyOption.removeAttr('selected');
- option.attr('selected', 'selected');
+ emptyOption.prop('selected', false);
+ option.prop('selected', true);
}
});
},
@@ -1630,8 +1628,8 @@
// select the default output
if (activity.gradebookToolOutputDefinitionName == this.name) {
- option.attr('selected', 'selected');
- emptyOption.attr('selected', null);
+ option.prop('selected', true);
+ emptyOption.prop('selected', false);
}
});