Packages/lsd/Source/Action/Toggle.js in lsd_rails-0.1.2 vs Packages/lsd/Source/Action/Toggle.js in lsd_rails-0.1.3

- old
+ new

@@ -22,14 +22,18 @@ LSD.Action.Toggle = LSD.Action.build({ enable: function(target) { if (!target || target == this.invoker || target.element == this.invoker) return; + var widget = LSD.Module.DOM.find(target, true); + if (widget) target = widget; if (!target.checked) (target.check || target.click).apply(target, Array.prototype.slice.call(arguments, 1)); }, disable: function(target) { if (!target || target == this.invoker || target.element == this.invoker) return; + var widget = LSD.Module.DOM.find(target, true); + if (widget) target = widget; 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.invoker.checked : !state; \ No newline at end of file