Changes the state of a widget
LSD.Action.Check = LSD.Action.build({
enable: function(target) {
if (!target || target == this.caller || target.element == this.caller) return;
if (!target.checked) (target.check || target.click).apply(target, Array.prototype.slice.call(arguments, 1));
},
disable: function(target) {
if (!target || target == this.caller || target.element == this.caller) return;
if (target.checked) (target.uncheck || target.click).apply(target, Array.prototype.slice.call(arguments, 1));
},
getState: function(target, name, state) {
return (state !== true && state !== false) ? !this.caller.checked : state;
}
});