- Email: [email protected]
- Twitter: @jede
- Website or Blog: http://github.com/jede
- Company: Valtech Sweden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable node/no-extraneous-require */ | |
const babelParser = require('@babel/parser') | |
const _ = require('lodash') | |
const fs = require('fs') | |
const path = require('path') | |
const DIR = './app/models' | |
const files = fs.readdirSync(DIR).filter((f) => f.match(/\.js$/)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component' | |
import { action } from '@ember/object' | |
export default class CategoriesFilterSubComponentsComponent extends Component { | |
@action toggle(category) { | |
const sel = this.args.selected || [] | |
if (sel.includes(category)) { | |
this.args.changed(sel.without(category)) | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
watch: null, | |
updatedText: function(){ | |
console.log('we dont get here in firefox') | |
}.observes('watch') | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = | |
name: 'Test' | |
description: 'Yaay' | |
createdAt: 'omgomg' | |
constraints = | |
name: | |
presence: true | |
description: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( function () { | |
$( '[data-image]' ).each( function ( i, elem ) { | |
var $elem = $( elem ), | |
url = $elem.attr( 'data-image' ); | |
if ( url == null || url.length <= 0 ) { return; } | |
if ( !Modernizr.svg ) { | |
url = url.replace( /\.svg$/, '.png' ); | |
} |