Skip to content

Commit

Permalink
spaces to tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Jul 25, 2014
1 parent a313f92 commit 579f044
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 113 deletions.
4 changes: 2 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import loadInitializers from 'ember/load-initializers';
Ember.MODEL_FACTORY_INJECTIONS = true;

var App = Ember.Application.extend({
modulePrefix: 'myapp', // TODO: loaded via config
Resolver: Resolver
modulePrefix: 'myapp', // TODO: loaded via config
Resolver: Resolver
});

loadInitializers(App, 'myapp');
Expand Down
16 changes: 8 additions & 8 deletions app/controllers/post.js
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();
}
});
42 changes: 21 additions & 21 deletions app/index.html
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>
10 changes: 5 additions & 5 deletions app/router.js
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;
6 changes: 3 additions & 3 deletions app/routes/post.js
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);
}
});
6 changes: 3 additions & 3 deletions app/routes/posts.js
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');
}
});
2 changes: 1 addition & 1 deletion app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
html, body {
margin: 20px;
margin: 20px;
}
22 changes: 11 additions & 11 deletions app/templates/about.hbs
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>
18 changes: 9 additions & 9 deletions app/templates/application.hbs
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}}
10 changes: 5 additions & 5 deletions app/templates/post.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{#if isEditing}}
{{partial 'post-edit'}}
<button {{action 'doneEditing'}}>Done</button>
{{partial 'post-edit'}}
<button {{action 'doneEditing'}}>Done</button>
{{else}}
<button {{action 'edit'}}>Edit</button>
<button {{action 'edit'}}>Edit</button>
{{/if}}

<h1>{{title}}</h1>
Expand All @@ -11,9 +11,9 @@
<hr>

<div class='intro'>
{{format-markdown excerpt}}
{{format-markdown excerpt}}
</div>

<div class='below-the-fold'>
{{format-markdown body}}
{{format-markdown body}}
</div>
40 changes: 23 additions & 17 deletions app/templates/posts.hbs
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>
56 changes: 28 additions & 28 deletions config/environment.js
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;
};

0 comments on commit 579f044

Please sign in to comment.