Skip to content

Instantly share code, notes, and snippets.

View fpalluel's full-sized avatar

Palluel-Lafleur Frédéric fpalluel

  • Erlang Solutions
View GitHub Profile
@fpalluel
fpalluel / components.form-message.js
Last active August 17, 2016 17:12
changeset-bootstrap-test
import Ember from 'ember';
import {
validatePresence,
} from 'presence';
const messagesValidations = {
username: [
validatePresence(true),
validateLength({ min: 4 })
],
title: [
@fpalluel
fpalluel / controllers.application.js
Last active December 1, 2016 10:15
date-component-in-modal
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
showModal: true,
});
import Ember from 'ember';
export default Ember.Component.extend({
disabled: Ember.computed.reads('group.disabled'),
groupName: Ember.computed.reads('group.groupName'),
cancelClose: false,
calculatePosition(trigger, content) {
let { top, left, width, height } = trigger.getBoundingClientRect();
let { width: contentWidth,height: contentHeight } = content.getBoundingClientRect();
let style = {
import Ember from 'ember';
export default Ember.Component.extend({
});
@fpalluel
fpalluel / components.modal-test.js
Last active June 15, 2017 13:51
2 forms - beta.1
import Ember from 'ember';
export default Ember.Component.extend({
modelOne: {},
modelTwo: {},
actions: {
submitOne(m) {
this.set('formOneSubmitted', true);
},
submitTwo(m) {
this.set('formTwoSubmitted', true);
@fpalluel
fpalluel / components.modal-test.js
Created June 15, 2017 13:54
2 forms - alpha.12
import Ember from 'ember';
export default Ember.Component.extend({
modelOne: {},
modelTwo: {},
actions: {
submitOne(m) {
this.set('formOneSubmitted', true);
},
submitTwo(m) {
this.set('formTwoSubmitted', true);