mirror of
https://github.com/pebble-dev/clay.git
synced 2026-10-28 07:29:59 -04:00
WIP
This commit is contained in:
1 parent
0aef0caf79
commit
d47db97bb6
6 files changed
+48
-7
No files matched your search
@@ -31,6 +31,10 @@ module.exports = {
|
||||
template: require('../../templates/components/toggle.mustache'),
|
||||
manipulator: manipulators.checked
|
||||
},
|
||||
radiogroup: {
|
||||
template: require('../../templates/components/radiogroup.mustache'),
|
||||
manipulator: manipulators.radiogroup
|
||||
},
|
||||
submit: {
|
||||
template: require('../../templates/components/submit.mustache'),
|
||||
manipulator: manipulators.val
|
||||
|
||||
@@ -43,5 +43,23 @@ module.exports = {
|
||||
return this.$manipulatorTarget.prop('disabled', false)
|
||||
.triggerHandler('change');
|
||||
}
|
||||
},
|
||||
radiogroup: {
|
||||
get: function() {
|
||||
return this.$manipulatorTarget.find('input:checked').val();
|
||||
},
|
||||
set: function(value) {
|
||||
this.$manipulatorTarget.find('[value="' + value + '"]')
|
||||
.prop('checked', true);
|
||||
return this.$manipulatorTarget.triggerHandler('change');
|
||||
},
|
||||
disable: function() {
|
||||
return this.$manipulatorTarget.prop('disabled', true)
|
||||
.triggerHandler('change');
|
||||
},
|
||||
enable: function() {
|
||||
return this.$manipulatorTarget.prop('disabled', false)
|
||||
.triggerHandler('change');
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user