Skip to content
Permalink
Browse files

MDL-46414 Conditional availability: Dropdowns not set correctly when …

…editing in IE

In IE, you cannot set the value of a dropdown to an integer; it has to be a string.
This caused a bug in several parts of the conditional availability editing
interface.
  • Loading branch information...
sammarshallou committed Jul 29, 2014
1 parent 40f0ad2 commit 61f5302b8584a05719d2e608b9f6699cba0bd91c
Showing with 23 additions and 23 deletions.
  1. +2 −2 ...letion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-debug.js
  2. +1 −1 ...mpletion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-min.js
  3. +2 −2 ...n/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form.js
  4. +2 −2 availability/condition/completion/yui/src/form/js/form.js
  5. +1 −1 ...ity/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-debug.js
  6. +1 −1 ...ility/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-min.js
  7. +1 −1 availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form.js
  8. +1 −1 availability/condition/date/yui/src/form/js/form.js
  9. +1 −1 .../condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-debug.js
  10. +1 −1 ...ty/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-min.js
  11. +1 −1 ...bility/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form.js
  12. +1 −1 availability/condition/grade/yui/src/form/js/form.js
  13. +1 −1 .../condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-debug.js
  14. +1 −1 ...ty/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-min.js
  15. +1 −1 ...bility/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form.js
  16. +1 −1 availability/condition/group/yui/src/form/js/form.js
  17. +1 −1 ...n/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-debug.js
  18. +1 −1 ...ion/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-min.js
  19. +1 −1 ...ndition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form.js
  20. +1 −1 availability/condition/grouping/yui/src/form/js/form.js
@@ -47,10 +47,10 @@ M.availability_completion.form.getNode = function(json) {
// Set initial values.
if (json.cm !== undefined &&
node.one('select[name=cm] > option[value=' + json.cm + ']')) {
node.one('select[name=cm]').set('value', json.cm);
node.one('select[name=cm]').set('value', '' + json.cm);
}
if (json.e !== undefined) {
node.one('select[name=e]').set('value', json.e);
node.one('select[name=e]').set('value', '' + json.e);
}

// Add event handlers (first time only).

Some generated files are not rendered by default. Learn more.

@@ -47,10 +47,10 @@ M.availability_completion.form.getNode = function(json) {
// Set initial values.
if (json.cm !== undefined &&
node.one('select[name=cm] > option[value=' + json.cm + ']')) {
node.one('select[name=cm]').set('value', json.cm);
node.one('select[name=cm]').set('value', '' + json.cm);
}
if (json.e !== undefined) {
node.one('select[name=e]').set('value', json.e);
node.one('select[name=e]').set('value', '' + json.e);
}

// Add event handlers (first time only).
@@ -45,10 +45,10 @@ M.availability_completion.form.getNode = function(json) {
// Set initial values.
if (json.cm !== undefined &&
node.one('select[name=cm] > option[value=' + json.cm + ']')) {
node.one('select[name=cm]').set('value', json.cm);
node.one('select[name=cm]').set('value', '' + json.cm);
}
if (json.e !== undefined) {
node.one('select[name=e]').set('value', json.e);
node.one('select[name=e]').set('value', '' + json.e);
}

// Add event handlers (first time only).
@@ -53,7 +53,7 @@ M.availability_date.form.getNode = function(json) {
var fields = Y.JSON.parse(response.responseText);
for (var field in fields) {
var select = node.one('select[name=x\\[' + field + '\\]]');
select.set('value', fields[field]);
select.set('value', '' + fields[field]);
select.set('disabled', false);
}
},

Some generated files are not rendered by default. Learn more.

@@ -53,7 +53,7 @@ M.availability_date.form.getNode = function(json) {
var fields = Y.JSON.parse(response.responseText);
for (var field in fields) {
var select = node.one('select[name=x\\[' + field + '\\]]');
select.set('value', fields[field]);
select.set('value', '' + fields[field]);
select.set('disabled', false);
}
},
@@ -51,7 +51,7 @@ M.availability_date.form.getNode = function(json) {
var fields = Y.JSON.parse(response.responseText);
for (var field in fields) {
var select = node.one('select[name=x\\[' + field + '\\]]');
select.set('value', fields[field]);
select.set('value', '' + fields[field]);
select.set('disabled', false);
}
},
@@ -60,7 +60,7 @@ M.availability_grade.form.getNode = function(json) {
// Set initial values.
if (json.id !== undefined &&
node.one('select[name=id] > option[value=' + json.id + ']')) {
node.one('select[name=id]').set('value', json.id);
node.one('select[name=id]').set('value', '' + json.id);
}
if (json.min !== undefined) {
node.one('input[name=min]').set('checked', true);

Some generated files are not rendered by default. Learn more.

@@ -60,7 +60,7 @@ M.availability_grade.form.getNode = function(json) {
// Set initial values.
if (json.id !== undefined &&
node.one('select[name=id] > option[value=' + json.id + ']')) {
node.one('select[name=id]').set('value', json.id);
node.one('select[name=id]').set('value', '' + json.id);
}
if (json.min !== undefined) {
node.one('input[name=min]').set('checked', true);
@@ -58,7 +58,7 @@ M.availability_grade.form.getNode = function(json) {
// Set initial values.
if (json.id !== undefined &&
node.one('select[name=id] > option[value=' + json.id + ']')) {
node.one('select[name=id]').set('value', json.id);
node.one('select[name=id]').set('value', '' + json.id);
}
if (json.min !== undefined) {
node.one('input[name=min]').set('checked', true);
@@ -50,7 +50,7 @@ M.availability_group.form.getNode = function(json) {
if (json.creating === undefined) {
if (json.id !== undefined &&
node.one('select[name=id] > option[value=' + json.id + ']')) {
node.one('select[name=id]').set('value', json.id);
node.one('select[name=id]').set('value', '' + json.id);
} else if (json.id === undefined) {
node.one('select[name=id]').set('value', 'any');
}

0 comments on commit 61f5302

Please sign in to comment.
You can’t perform that action at this time.