Skip to content

Commit 7882a4e

Browse files
committed
update ember-app
1 parent 4a590c3 commit 7882a4e

23 files changed

+86
-131
lines changed

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ indent_style = space
1818
indent_size = 2
1919

2020
[*.hbs]
21+
insert_final_newline = false
2122
indent_style = space
2223
indent_size = 2
2324

@@ -29,5 +30,5 @@ indent_size = 2
2930
indent_style = space
3031
indent_size = 2
3132

32-
[*.md]
33+
[*.{diff,md}]
3334
trim_trailing_whitespace = false

.jshintrc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{
2-
"predef": {
3-
"document": true,
4-
"window": true,
5-
"-Promise": true,
6-
"moment": true,
7-
"google": true
8-
},
9-
"browser" : true,
10-
"boss" : true,
2+
"predef": [
3+
"document",
4+
"window",
5+
"-Promise"
6+
],
7+
"browser": true,
8+
"boss": true,
119
"curly": true,
1210
"debug": false,
1311
"devel": true,

app/controllers/crate/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Ember from 'ember';
22
import DS from 'ember-data';
33
import ajax from 'ic-ajax';
4+
import moment from 'moment';
45

56
var NUM_VERSIONS = 5;
67

@@ -194,17 +195,17 @@ export default Ember.ObjectController.extend({
194195
} else {
195196
Ember.$('.graph').show();
196197
}
197-
var myData = google.visualization.arrayToDataTable(data);
198+
var myData = window.google.visualization.arrayToDataTable(data);
198199

199-
var fmt = new google.visualization.DateFormat({
200+
var fmt = new window.google.visualization.DateFormat({
200201
pattern: 'LLL d, yyyy',
201202
});
202203
fmt.format(myData, 0);
203204
var el = document.getElementById('graph-data');
204205
if (!el) {
205206
return;
206207
}
207-
var chart = new google.visualization.AreaChart(el);
208+
var chart = new window.google.visualization.AreaChart(el);
208209
chart.draw(myData, {
209210
chartArea: {'width': '80%', 'height': '80%'},
210211
hAxis: {

app/helpers/date-long.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Ember from 'ember';
2+
import moment from 'moment';
23

34
function dateLong(value) {
45
return moment(value).format('LL');

app/helpers/date-small.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Ember from 'ember';
2+
import moment from 'moment';
23

34
function dateSmall(value) {
45
return moment(value).format('ll');

app/helpers/from-now.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Ember from 'ember';
2+
import moment from 'moment';
23

34
function fromNow(value) {
45
return moment(value).fromNow();

app/index.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="description" content="">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

10-
{{BASE_TAG}}
10+
{{content-for 'head'}}
1111

1212
<script>
1313
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -21,25 +21,22 @@
2121

2222
<link rel="stylesheet" href="assets/vendor.css">
2323
<link rel="stylesheet" href="assets/cargo.css">
24+
{{content-for 'head-footer'}}
2425
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
2526
<link rel="icon" href="/favicon.ico" type="image/x-icon">
2627
<link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Cargo">
2728
</head>
2829
<body>
30+
{{content-for 'body'}}
2931
<noscript>
3032
<div id="main">
3133
<div class='noscript'>
3234
This site requires that JavaScript to be enabled.
3335
</div>
3436
</div>
3537
</noscript>
36-
<script>
37-
window.EmberENV = {{EMBER_ENV}};
38-
</script>
3938
<script src="assets/vendor.js"></script>
4039
<script src="assets/cargo.js"></script>
41-
<script>
42-
window.Cargo = require('cargo/app')['default'].create({{APP_CONFIG}});
43-
</script>
40+
{{content-for 'body-footer'}}
4441
</body>
4542
</html>

app/initializers/google.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Ember from 'ember';
22

33
export var initialize = function() {
44
Ember.$.getScript('https://www.google.com/jsapi', function() {
5-
google.load('visualization', '1.0', {
5+
window.google.load('visualization', '1.0', {
66
'packages': ['corechart'],
77
'callback': function() {
88
window.googleChartsLoaded = true;

app/templates/application.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<div id="header">
66
{{#link-to "index"}}
77
<img src="/assets/Cargo-Logo-Small.png" id="logo"
8-
height=100 width=100/>
8+
height=100 width=100 />
99
{{/link-to}}
1010
{{#link-to "index"}}
11-
<h1>CARGO</h2>
11+
<h1>CARGO</h1>
1212
{{/link-to}}
1313

1414
<form class='search' action='/search' {{ action "" on="submit" }} >

app/templates/me/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<dl>
1313
<dt>Name</dt>
14-
<dd>{{ name }}</dt>
14+
<dd>{{ name }}</dd>
1515
<dt>GitHub Account</dt>
1616
<dd>{{ login }}</dd>
1717
<dt>Email</dt>

0 commit comments

Comments
 (0)