1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

User settings GUI, including some new components

This commit is contained in:
Toby Zerner
2015-03-28 11:33:18 +10:30
parent e710a2c93e
commit 6dcc14ef49
24 changed files with 472 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
import Ember from 'ember';
/**
A toggle switch.
*/
export default Ember.Component.extend({
layoutName: 'components/ui/switch-input',
classNames: ['checkbox', 'checkbox-switch'],
label: '',
toggleState: true,
didInsertElement: function() {
var component = this;
this.$('input').on('change', function() {
component.get('changed')($(this).prop('checked'), component);
});
}
});