mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 04:46:57 -04:00
remove the incomplete radiogroup
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
name: 'radiogroup',
|
||||
template: require('../../templates/components/radiogroup.tpl'),
|
||||
manipulator: require('../lib/manipulators').radiogroup,
|
||||
defaults: {
|
||||
label: '',
|
||||
options: []
|
||||
}
|
||||
};
|
||||
@@ -22,7 +22,6 @@ clayConfig.on(clayConfig.EVENTS.BEFORE_BUILD, function() {
|
||||
this.registerComponent(require('./components/color'));
|
||||
this.registerComponent(require('./components/select'));
|
||||
this.registerComponent(require('./components/toggle'));
|
||||
this.registerComponent(require('./components/radiogroup'));
|
||||
this.registerComponent(require('./components/submit'));
|
||||
});
|
||||
|
||||
|
||||
@@ -43,23 +43,5 @@ module.exports = {
|
||||
return this.$manipulatorTarget.set('disabled', false)
|
||||
.trigger('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.trigger('change');
|
||||
},
|
||||
disable: function() {
|
||||
return this.$manipulatorTarget.set('disabled', true)
|
||||
.trigger('change');
|
||||
},
|
||||
enable: function() {
|
||||
return this.$manipulatorTarget.set('disabled', false)
|
||||
.trigger('change');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<div class="">
|
||||
<span class="label">{{{label}}}</span>
|
||||
<div data-manipulator-target>
|
||||
{{each options}}
|
||||
<label class="item">
|
||||
<span class="label">{{{this.label}}}</span>
|
||||
<input
|
||||
type="radio"
|
||||
class="item-radio"
|
||||
name="{{this.index}}"
|
||||
value="{{this.value}}"
|
||||
/>
|
||||
</label>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user