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
'use strict'; | |
var Ember = require('ember'); | |
module.exports = function () { | |
var args = argsToArray(arguments); | |
var argsLength = args.length; | |
var funcIndex, keys, throttled; | |
if (typeof args[argsLength - 2] === 'function') { |
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
// Within writing in app generator | |
gulpTasks.forEach(function (task) { | |
this.invoke('emberate:gulp-task', { | |
args: [task] | |
}); | |
}, this); |
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
var DynamicView = Ember.ContainerView.extend(Ember._Metamorph, { | |
childViews: [], | |
viewChanged: function () { | |
var viewName = this.get('viewName'); | |
var view = this.get(viewName) || this.container.lookup('view:' + viewName); | |
if (view) { | |
this.clear(); | |
this.pushObject(view); |
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
'use strict'; | |
var DS = require('ember-data'); | |
var ajax = require('../helpers/ajax'); | |
var attr = DS.attr; | |
var UserModel = DS.Model.extend({ | |
email: attr('string'), | |
firstName: attr('string'), | |
lastName: attr('string'), |
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
queryParams: [ | |
{ | |
borough: { | |
refreshModel: true | |
} | |
}, { | |
neighborhoods: { | |
refreshModel: 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
var DynamicView = Ember.ContainerView.extend(Ember._Metamorph, { | |
childViews: [], | |
viewChanged: function () { | |
var viewName = this.get('viewName'); | |
var view = this.container.lookup('view:' + viewName); | |
if (view) { | |
this.clear(); | |
this.pushObject(view); |
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
{ | |
"user": { | |
"id": 44, | |
"profileType": "providerProfile", | |
"profile": 1 | |
}, | |
"profile": { | |
"id": 1, | |
"type": "providerProfile" |
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({ | |
classNames: ['info-window-container'], | |
attachTo: function ($el) { | |
this.$().detach().appendTo($el); | |
} | |
}); |
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
var pluginIds = Ember.keys(this.container.registry.dict).filter(function (item) { | |
return item && item.indexOf('plugin:') === 0; | |
}); | |
var containerView = Ember.ContainerView.create({ | |
}); | |
pluginIds.forEach(function (id) { | |
var factory = self.container.lookupFactory(id); | |
var view = factory.view.create(); |
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
// hack for GMAPS, since it doesn't provide an event object | |
// on didInsertElement | |
Ember.$(window).on('keydown', function (event) { | |
Ember.run(function () { | |
if (event.shiftKey) { | |
self.set('shiftDown', true); | |
} | |
Ember.$(window).one('keyup', function () { | |
Ember.run(function () { |