-
Notifications
You must be signed in to change notification settings - Fork 5
/
tests.html
98 lines (83 loc) · 2.94 KB
/
tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember JS Blog QUnit Tests</title>
<link rel="stylesheet" href="css/qunit.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<meta charset="utf-8">
<script src="js/libs/qunit.js"></script>
<script src="js/libs/jquery.js"></script>
<script src="js/libs/handlebars.js"></script>
<script src="js/libs/ember.js"></script>
<script src="js/libs/ember-data.js"></script>
<script src="js/libs/ember-template-compiler.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<div id="ember-tests"></div>
<script type="text/x-handlebars">
<body>
<header>
<h1>Blog</h1>
</header>
<div>
{{outlet}}
</div>
<footer>
©2013 Ian Dunlop.
</footer>
</body>
</script>
<script type="text/x-handlebars" data-template-name="index">
<div>{{#link-to 'posts'}}Posts{{/link-to}}</div>
<div>{{#link-to 'posts.new'}}New Post{{/link-to}}</div>
</script>
<script type="text/x-handlebars" data-template-name="posts">
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="posts/index">
<ul class="posts">
{{#each post in model}}
<li>{{#link-to 'post' post}}{{post.title}}{{/link-to}}</li>
{{/each}}
</ul>
<div>{{#link-to 'posts.new'}}New Post{{/link-to}}</div>
</script>
<script type="text/x-handlebars" data-template-name="post">
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="post/index">
{{title}}
<ul>
{{#each comment in comments}}
<li>{{#link-to 'post.comment' comment}}{{comment.text}}{{/link-to}}</li>
{{/each}}
</ul>
{{#link-to 'comments.new'}}New Comment{{/link-to}}
</script>
<script type="text/x-handlebars" data-template-name="post/comment">
{{text}}
</script>
<script type="text/x-handlebars" data-template-name="comments">
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="comments/new">
<form {{action 'save' on='submit' }}>
{{textarea valueBinding="text" placeholder="Enter comment here"}}
<button type="submit">Create Comment</button>
</form>
</script>
<script type="text/x-handlebars" data-template-name="posts/new">
<form {{action 'save' content on='submit' }}>
{{textarea valueBinding="title" placeholder="Enter title here"}} {{textarea valueBinding="text"
placeholder="Enter content here"}}
<button type="submit">Create Post</button>
</form>
</script>
<script src="js/app.js"></script>
<script src="tests/router-test.js"></script>
</body>
</html>