hide = false;
checkfunction = '_dependency_'+condition;
if (Y.Lang.isFunction(this[checkfunction])) {
- result = this[checkfunction].apply(this, [this._depElements[dependon], value]);
+ result = this[checkfunction].apply(this, [this._depElements[dependon], value, e]);
} else {
- result = this._dependency_default(this._depElements[dependon], value);
+ result = this._dependency_default(this._depElements[dependon], value, e);
}
lock = result.lock || false;
hide = result.hide || false;
_dependency_notchecked : function(elements, value) {
var lock = false;
elements.each(function(){
- lock = lock || !this.get('checked');
+ if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
+ return;
+ }
+ lock = lock || !Y.Node.getDOMNode(this).checked;
});
return {
lock : lock,
_dependency_checked : function(elements, value) {
var lock = false;
elements.each(function(){
- lock = lock || this.get('checked');
+ if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
+ return;
+ }
+ lock = lock || Y.Node.getDOMNode(this).checked;
});
return {
lock : lock,
_dependency_eq : function(elements, value) {
var lock = false;
elements.each(function(){
+ if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
+ return;
+ }
lock = lock || this.get('value') == value;
});
return {
hide : true
}
},
- _dependency_default : function(elements, value) {
+ _dependency_default : function(elements, value, ev) {
var lock = false;
elements.each(function(){
+ if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
+ return;
+ }
lock = lock || this.get('value') != value;
});
return {