Merge branch 'MDL-30658_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2011-12-08 19:23:35 +01:00
+4 -4
View File
@@ -237,7 +237,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
_dependency_notchecked : function(elements, value) {
var lock = false;
elements.each(function(){
if (this.getAttribute('type').toLowerCase()=='hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
if (this.getAttribute('type').toLowerCase()=='hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
return;
}
@@ -254,7 +254,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
_dependency_checked : function(elements, value) {
var lock = false;
elements.each(function(){
if (this.getAttribute('type').toLowerCase()=='hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
if (this.getAttribute('type').toLowerCase()=='hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
return;
}
@@ -284,7 +284,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
elements.each(function(){
if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
return;
} else if (this.getAttribute('type').toLowerCase() == 'hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
} else if (this.getAttribute('type').toLowerCase() == 'hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
hidden_val = (this.get('value') == value);
return;
@@ -321,7 +321,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
elements.each(function(){
if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
return;
} else if (this.getAttribute('type').toLowerCase() == 'hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
} else if (this.getAttribute('type').toLowerCase() == 'hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
hidden_val = (this.get('value') != value);
return;