This file contains 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.LinkComponent.extend({ | |
didReceiveAttrs() { | |
let params = this.params.slice(); | |
params[0] = this.parent + '.' + params[0]; | |
this.set('params', params); | |
This file contains 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 '@ember/component'; | |
import { computed } from '@ember/object'; | |
import { or } from '@ember/object/computed'; | |
import { inject as service } from '@ember/service'; | |
import { task } from 'ember-concurrency'; | |
import { Promise, all } from 'rsvp'; | |
import S3Uploader from 'ember-uploader/uploaders/s3'; | |
export default Component.extend({ | |
notify: service('satellite-notify'), |
This file contains 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 DS from 'ember-data'; | |
export default DS.JSONAPIAdapter.extend({ | |
deleteRecord(store, type, snapshot) { | |
let recordsForUnloading = []; | |
snapshot.eachRelationship((name, descriptor) => { | |
let { options, kind, key } = descriptor; | |
if (options.onDelete === 'unload' && kind === 'hasMany') { |
This file contains 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
# frozen_string_literal: true | |
require 'uri' | |
ALLOWED_IFRAME_TLDS = %w[ | |
facebook.com | |
google.com | |
twitter.com | |
vimeo.com | |
youtube.com | |
].freeze |
This file contains 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({ | |
on: false, | |
click(e) { | |
this.toggleProperty('on'); | |
return false; | |
} | |
}); |
This file contains 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
image: node:7.10 | |
cache: | |
paths: | |
- node_modules/ | |
- bower_components/ | |
before_script: | |
# Install Chrome | |
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - |
This file contains 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.Controller.extend({ | |
_counter: 1, | |
actions: { | |
modifyChildren() { | |
let parent = this.get('model'); | |
parent.get('children').then((children) => { |
This file contains 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
<?php | |
// Taken from the internet | |
// Slighly modified | |
function _n($single, $plural, $number) { | |
if ((int) $number == 1) { | |
return $single; | |
} else { | |
return $plural; | |
} | |
} |