MDL-47494 ddimageortext: NOBUG fixed disabling of select options when the background image is not loaded

This commit is contained in:
Jamie Pratt
2011-10-31 17:38:28 +07:00
parent eab829f388
commit 6aad8ee353
+10 -3
View File
@@ -130,9 +130,14 @@ YUI.add('moodle-qtype_ddimageortext-form', function(Y) {
+' input[type="checkbox"]';
var cbel = Y.one(cbselector);
var infinite = cbel.get('checked');
if ((!infinite) &&
(this.doc.drag_items_cloned_from(value - 1).size() !== 0)) {
optionnode.set('disabled', true);
if (!infinite) {
Y.all('fieldset#dropzoneheader select').some(function (selector) {
if (+selector.get('value') == value){
optionnode.set('disabled', true);
return true; // stop looping
}
return false;
}, this);
}
}
}
@@ -181,6 +186,8 @@ YUI.add('moodle-qtype_ddimageortext-form', function(Y) {
this.doc.drag_items().remove(true);
this.draw_dd_area();
}, this);
Y.all('fieldset#draggableitemheader_'+i+' input[type="text"]')
.on('blur', this.set_options_for_drag_item_selectors, this);
//change to infinite checkbox
Y.all('fieldset#draggableitemheader_'+i+' input[type="checkbox"]')
.on('change', this.set_options_for_drag_item_selectors, this);