Requires

Provides

Check.js

Changes the state of a widget

License:
Public domain (http://unlicense.org).
Authors:
Yaroslaff Fedin
  1. 23
  2. 24
  3. 25
  4. 26
  5. 27
  6. 28
  7. 29
  8. 30
  9. 31
  10. 32
  11. 33
  12. 34
  13. 35
  14. 36
  15. 37
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; } });