mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-29 05:16:32 -04:00
WIP
This commit is contained in:
@@ -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