this.route('plans', { path: '/plans' }, function () {
// index is for list of all plans
this.route('new');
});
this.route('plan', { path: '/plans/:plan_id' }, function () {
// index is for viewing the single record
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.Controller.extend({ | |
sortedModels: Ember.computed('model', function () { | |
var model = this.get('model'); | |
// filterBy, filter, sortBy, sort, or some manual work.. | |
return model.sortBy('isTasty', 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 blob = new Blob([typedArray], {type: 'application/octet-binary'}); | |
var url = URL.createObjectURL(blob); | |
var savelink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a'); | |
savelink.name = 'filename'; | |
savelink.href = url; | |
savelink.click(); |
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
{{#if lane}} | |
{{#ember-wormhole to=lane.id}} | |
{{lane.mode}} | |
{{/ember-wormhole}} | |
{{/if}} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="UTF-8"> | |
<title>Drawing Tools</title> | |
<script type="text/javascript" | |
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script> | |
<style type="text/css"> | |
#map, html, body { |
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
page.onResourceError = function(resourceError) { | |
page.reason = resourceError.errorString; | |
page.reasonUrl = resourceError.url; | |
}; | |
page.open(url, function (status) { | |
status = status.replace('phantom says: ', ''); | |
if (status !== 'success') { | |
page.close(); |
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 Router = Ember.Router.extend({ | |
location: config.locationType, | |
init: function () { | |
this._super.apply(this, arguments); | |
// Listen for the first transition, and trigger the `setupMapOnFirstLoad` action when it's complete. | |
this.one('willTransition', function (transition) { | |
transition.then(function () { | |
transition.send(false, 'setupMapOnFirstLoad'); |