mirror of
https://gitverse.ru/kpa39l/yaru.nixg.ru.git
synced 2026-09-29 09:55:06 +00:00
Initial commit: проект документации YARU
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
Friends.CheckboxLabel = new function() {
|
||||
this.prefix = 'CheckboxLabel-';
|
||||
this.createFromTag = function(element, params) {
|
||||
var checkbox = y5.Dom.getDescendant(element, '*', this.prefix + 'Checkbox');
|
||||
var text = y5.Dom.getDescendant(element, '*', this.prefix + 'Text');
|
||||
|
||||
function check(e) {
|
||||
checkbox.checked = (y5.Strings.trim(text.value).length > 0);
|
||||
}
|
||||
y5.Events.create('keyup', check, text, true);
|
||||
};
|
||||
}
|
||||
|
||||
y5.require(['Dom', 'Events', 'Strings'], function() {y5.loaded('{Friends}.CheckboxLabel')});
|
||||
Reference in New Issue
Block a user