-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
119 additions
and
113 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import Ember from "ember"; | ||
export default Ember.ObjectController.extend({ | ||
isEditing: false, | ||
isEditing: false, | ||
|
||
edit: function() { | ||
this.set('isEditing', true); | ||
}, | ||
edit: function() { | ||
this.set('isEditing', true); | ||
}, | ||
|
||
doneEditing: function() { | ||
this.set('isEditing', false); | ||
// this.store.commit(); | ||
} | ||
doneEditing: function() { | ||
this.set('isEditing', false); | ||
// this.store.commit(); | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Myapp</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Myapp</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
{{BASE_TAG}} | ||
{{BASE_TAG}} | ||
|
||
<link rel="stylesheet" href="assets/vendor.css"> | ||
<link rel="stylesheet" href="assets/myapp.css"> | ||
</head> | ||
<body> | ||
<script> | ||
window.MyappENV = {{ENV}}; | ||
window.EmberENV = window.MyappENV.EmberENV; | ||
</script> | ||
<script src="assets/vendor.js"></script> | ||
<script src="assets/myapp.js"></script> | ||
<script> | ||
window.Myapp = require('myapp/app')['default'].create(MyappENV.APP); | ||
</script> | ||
</body> | ||
<link rel="stylesheet" href="assets/vendor.css"> | ||
<link rel="stylesheet" href="assets/myapp.css"> | ||
</head> | ||
<body> | ||
<script> | ||
window.MyappENV = {{ENV}}; | ||
window.EmberENV = window.MyappENV.EmberENV; | ||
</script> | ||
<script src="assets/vendor.js"></script> | ||
<script src="assets/myapp.js"></script> | ||
<script> | ||
window.Myapp = require('myapp/app')['default'].create(MyappENV.APP); | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import Ember from 'ember'; | ||
|
||
var Router = Ember.Router.extend({ | ||
location: MyappENV.locationType | ||
location: MyappENV.locationType | ||
}); | ||
|
||
Router.map(function() { | ||
this.resource('about'); | ||
this.resource('posts', function() { | ||
this.resource('post', { path: ':post_id' }); | ||
}); | ||
this.resource('about'); | ||
this.resource('posts', function() { | ||
this.resource('post', { path: ':post_id' }); | ||
}); | ||
}); | ||
|
||
export default Router; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Ember from "ember"; | ||
export default Ember.Route.extend({ | ||
model: function(params) { | ||
return this.store.find('post', params.post_id); | ||
} | ||
model: function(params) { | ||
return this.store.find('post', params.post_id); | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Ember from "ember"; | ||
export default Ember.Route.extend({ | ||
model: function() { | ||
return this.store.find('post'); | ||
} | ||
model: function() { | ||
return this.store.find('post'); | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
html, body { | ||
margin: 20px; | ||
margin: 20px; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<div class='about'> | ||
<p>Yehuda Katz is a member of the <a href="http://emberjs.com">Ember.js</a>, <a href="http://rubyonrails.org">Ruby on Rails</a> | ||
and <a href="http://www.jquery.com">jQuery</a> Core Teams; he spends his daytime hours at the startup he founded, | ||
<a href="http://www.tilde.io">Tilde Inc.</a>.</p> | ||
<p>Yehuda is co-author of best-selling <a href="http://affiliate.manning.com/idevaffiliate.php?id=485_176">jQuery in Action</a> and | ||
<a href="http://affiliate.manning.com/idevaffiliate.php?id=485_145">Rails 3 in Action</a>.</p> | ||
<p>He spends most of his time hacking on open source—his main projects, along with others, like <a href="https://github.com/wycats/thor">Thor</a>, | ||
<a href="http://www.handlebarsjs.com">Handlebars</a> and <a href="https://github.com/carlhuda/janus">Janus</a>—or traveling the world doing evangelism work.</p> | ||
<p>He can be found on Twitter as <a href="http://www.twitter.com/wycats">@wycats</a>.</p> | ||
<p>Yehuda Katz is a member of the <a href="http://emberjs.com">Ember.js</a>, <a href="http://rubyonrails.org">Ruby on Rails</a> | ||
and <a href="http://www.jquery.com">jQuery</a> Core Teams; he spends his daytime hours at the startup he founded, | ||
<a href="http://www.tilde.io">Tilde Inc.</a>.</p> | ||
<p>Yehuda is co-author of best-selling <a href="http://affiliate.manning.com/idevaffiliate.php?id=485_176">jQuery in Action</a> and | ||
<a href="http://affiliate.manning.com/idevaffiliate.php?id=485_145">Rails 3 in Action</a>.</p> | ||
<p>He spends most of his time hacking on open source—his main projects, along with others, like <a href="https://github.com/wycats/thor">Thor</a>, | ||
<a href="http://www.handlebarsjs.com">Handlebars</a> and <a href="https://github.com/carlhuda/janus">Janus</a>—or traveling the world doing evangelism work.</p> | ||
<p>He can be found on Twitter as <a href="http://www.twitter.com/wycats">@wycats</a>.</p> | ||
</div> | ||
|
||
<div class='about'> | ||
<p>My name is Tom Dale. I helped create <a href="http://www.emberjs.com/">Ember.js</a>, a JavaScript framework that brings sanity to the web.</p> | ||
<p>My name is Tom Dale. I helped create <a href="http://www.emberjs.com/">Ember.js</a>, a JavaScript framework that brings sanity to the web.</p> | ||
|
||
<p>In October of 2011, I co-founded <a href="http://www.tilde.io">Tilde</a> with Yehuda Katz, Leah Silber and Carl Lerche.</p> | ||
<p>In October of 2011, I co-founded <a href="http://www.tilde.io">Tilde</a> with Yehuda Katz, Leah Silber and Carl Lerche.</p> | ||
|
||
<p>In my spare time I run a cash-for-beer exchange program at many local San Francisco dive bars.</p> | ||
<p>In my spare time I run a cash-for-beer exchange program at many local San Francisco dive bars.</p> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<h1 id='title'>Welcome to Ember.js</h1> | ||
|
||
<div class="navbar navbar-default" role="navigation"> | ||
<div class="container-fluid"> | ||
<div class="navbar-inner"> | ||
<a class="navbar-brand" href="#">Bloggr</a> | ||
<ul class="nav navbar-nav"> | ||
<li>{{#link-to 'posts'}}Posts{{/link-to}}</li> | ||
<li>{{#link-to 'about'}}About{{/link-to}}</li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="container-fluid"> | ||
<div class="navbar-inner"> | ||
<a class="navbar-brand" href="#">Bloggr</a> | ||
<ul class="nav navbar-nav"> | ||
<li>{{#link-to 'posts'}}Posts{{/link-to}}</li> | ||
<li>{{#link-to 'about'}}About{{/link-to}}</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{{outlet}} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-xs-3"> | ||
<table class='table'> | ||
<thead> | ||
<tr><th>Recent Posts</th></tr> | ||
</thead> | ||
{{#each model}} | ||
<tr><td> | ||
{{#link-to 'post' this}}{{title}} <small class='muted'>by {{author}}</small>{{/link-to}} | ||
</td></tr> | ||
{{/each}} | ||
</table> | ||
</div> | ||
<div class="col-xs-9"> | ||
{{outlet}} | ||
</div> | ||
</div> | ||
<div class="row"> | ||
|
||
<!-- blog post listing --> | ||
<div class="col-xs-3"> | ||
<table class='table'> | ||
<thead> | ||
<tr><th>Recent Posts</th></tr> | ||
</thead> | ||
{{#each model}} | ||
<tr><td> | ||
{{#link-to 'post' this}} | ||
{{title}} <small class='muted'>by {{author}}</small> | ||
{{/link-to}} | ||
</td></tr> | ||
{{/each}} | ||
</table> | ||
</div> | ||
|
||
<!-- blog post content --> | ||
<div class="col-xs-9"> | ||
{{outlet}} | ||
</div> | ||
</div> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
/* jshint node: true */ | ||
|
||
module.exports = function(environment) { | ||
var ENV = { | ||
environment: environment, | ||
baseURL: '/', | ||
locationType: 'auto', | ||
EmberENV: { | ||
FEATURES: { | ||
// Here you can enable experimental features on an ember canary build | ||
// e.g. 'with-controller': true | ||
} | ||
}, | ||
var ENV = { | ||
environment: environment, | ||
baseURL: '/', | ||
locationType: 'auto', | ||
EmberENV: { | ||
FEATURES: { | ||
// Here you can enable experimental features on an ember canary build | ||
// e.g. 'with-controller': true | ||
} | ||
}, | ||
|
||
APP: { | ||
// Here you can pass flags/options to your application instance | ||
// when it is created | ||
} | ||
}; | ||
APP: { | ||
// Here you can pass flags/options to your application instance | ||
// when it is created | ||
} | ||
}; | ||
|
||
if (environment === 'development') { | ||
// LOG_MODULE_RESOLVER is needed for pre-1.6.0 | ||
ENV.LOG_MODULE_RESOLVER = true; | ||
if (environment === 'development') { | ||
// LOG_MODULE_RESOLVER is needed for pre-1.6.0 | ||
ENV.LOG_MODULE_RESOLVER = true; | ||
|
||
ENV.APP.LOG_RESOLVER = true; | ||
ENV.APP.LOG_ACTIVE_GENERATION = true; | ||
ENV.APP.LOG_MODULE_RESOLVER = true; | ||
// ENV.APP.LOG_TRANSITIONS = true; | ||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true; | ||
ENV.APP.LOG_VIEW_LOOKUPS = true; | ||
} | ||
ENV.APP.LOG_RESOLVER = true; | ||
ENV.APP.LOG_ACTIVE_GENERATION = true; | ||
ENV.APP.LOG_MODULE_RESOLVER = true; | ||
// ENV.APP.LOG_TRANSITIONS = true; | ||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true; | ||
ENV.APP.LOG_VIEW_LOOKUPS = true; | ||
} | ||
|
||
if (environment === 'production') { | ||
if (environment === 'production') { | ||
|
||
} | ||
} | ||
|
||
return ENV; | ||
return ENV; | ||
}; |