Skip to content

Instantly share code, notes, and snippets.

View cibernox's full-sized avatar
🏠
Working from home

Miguel Camba cibernox

🏠
Working from home
View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
options: [{name: 'one'}, {name: 'two'}, {name: 'three' }, {name: 'four' }],
selected: null,
searchThings() {
// perform search
},
preventDeletion(_, e) {
import Ember from 'ember';
const { isBlank } = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
names: ['one', 'two', 'three', 'four'],
actions: {
toggleSelect() {
let trigger = document.querySelector('.ember-power-select-trigger');
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
logEvent(e) {
console.log(e.type);
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
logEvent(e) {
console.log('---------------------');
console.log('e.type: ', e.type);
console.log('e.keyCode: ', e.keyCode);
console.log('e.target.value: ', e.target.value);
import Ember from 'ember';
const {get, set, Component} = Ember;
export default Component.extend({
tagName: "",
classNames: "",
actions: {
customAction(items) {
import Ember from 'ember';
import RSVP from 'rsvp';
const PromiseArrayProxy = Ember.ArrayProxy.extend(Ember.PromiseProxyMixin);
function generatePromise() {
return new RSVP.Promise((resolve) => {
setTimeout(() => resolve(['one', 'two', 'three']), 5000);
});
}
@cibernox
cibernox / controllers.application.js
Last active September 13, 2017 09:38
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
options: ['one', 'two', 'three', 'four', 'five'],
val: null,
actions: {
handleOpen(select, e) {
select.actions.search(this.get('val'));
@cibernox
cibernox / controllers.application.js
Last active February 13, 2018 12:51
New Twiddle
import Ember from 'ember';
const { isBlank } = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
options: ['one', 'two', 'three', 'four'],
actions: {
handleKeydown(select, e) {
@cibernox
cibernox / plan.md
Created August 24, 2017 22:18
Plan to allow to analyze and postprocess trees crossing types boundaries

Problem

Addon developers want to make optimizations in which the analysis of one tree (p.e, templates or js trees, or both) enables optimizations on other trees (p.e. styles or public).] Right now ember-cli exposes preprocessTree(type, tree) and postprocessTree(type, tree), but they don't work for this purpose because

  1. The preprocessTree receives the individual tree types (app, styles, templates, test-support, public...), but there is no single three that gives the developers access to all those types simultaneously to perform cross-type operations.
@cibernox
cibernox / controllers.application.js
Created August 17, 2017 18:09 — forked from billdami/controllers.application.js
ember-basic-dropdown animation issue
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});