Sha256: 404fde012161a0c7203c254880673ffa55375a4d72a9bce652920798cce2955d
Contents?: true
Size: 755 Bytes
Versions: 7
Compression:
Stored size: 755 Bytes
Contents
/* --- script: Set.js description: Changes or synchronizes values license: Public domain (http://unlicense.org). authors: Yaroslaff Fedin requires: - LSD.Action provides: - LSD.Action.Set ... */ LSD.Action.Set = LSD.Action.build({ enable: function(target, value) { var widget = LSD.Module.DOM.find(target, true); switch (LSD.toLowerCase(target.tagName)) { case 'input': case 'textarea': if (target.applyValue) target.applyValue(value); else target.value = value; break; default: if (widget && widget.findItemByValue) { var item = widget.findItemByValue(value); if (item) item.check(); } else if (!target.lsd) target.set('html', value); break; } } });
Version data entries
7 entries across 7 versions & 1 rubygems