Skip to content
This repository was archived by the owner on Feb 11, 2020. It is now read-only.

Commit 3f13845

Browse files
author
hiroki kojima
committed
js 入れ替え
1 parent 5ed6c19 commit 3f13845

File tree

138 files changed

+11189
-160568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+11189
-160568
lines changed
+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<div class="alert alert-danger" role="alert"
2+
[hidden]="!canShowCreateFailedMsg">
3+
{{ createFailedMsg }}
4+
</div>
5+
6+
<form [ng-form-model]="createBookForm"
7+
class="form-horizontal"
8+
role="form"
9+
novalidate>
10+
11+
<div class="form-group"
12+
[class.has-error]="!isbnInput.valid && isbnInput.touched">
13+
<label class="control-label col-sm-2"
14+
for="inputISBN">ISBN:</label>
15+
<div class="col-sm-5">
16+
<input type="text"
17+
class="form-control"
18+
id="inputISBN"
19+
[(ng-model)]="book.isbn"
20+
[ng-form-control]="isbnInput"
21+
autofocus
22+
required>
23+
</div>
24+
<span class="col-sm-offset-2 col-sm-10 help-block"
25+
*ng-if="!isbnInput.valid && isbnInput.touched">
26+
This field is required.
27+
</span>
28+
</div>
29+
30+
<div class="form-group"
31+
[class.has-error]="!titleInput.valid && titleInput.touched">
32+
<label class="control-label col-sm-2"
33+
for="inputTitle">Title:</label>
34+
<div class="col-sm-10">
35+
<input type="text"
36+
class="form-control"
37+
id="inputTitle"
38+
[(ng-model)]="book.title"
39+
[ng-form-control]="titleInput"
40+
required>
41+
</div>
42+
<span class="col-sm-offset-2 col-sm-10 help-block"
43+
*ng-if="!titleInput.valid && titleInput.touched">
44+
This field is required.
45+
</span>
46+
</div>
47+
48+
<div class="form-group">
49+
<label class="control-label col-sm-2"
50+
for="inputAuthor">Author:</label>
51+
<div class="col-sm-10">
52+
<input type="text"
53+
class="form-control"
54+
id="inputAuthor"
55+
[(ng-model)]="book.author"
56+
[ng-form-control]="authorInput"
57+
>
58+
</div>
59+
</div>
60+
61+
<div class="form-group">
62+
<label class="control-label col-sm-2"
63+
for="inputPublicationDate">Publication Date:</label>
64+
<div class="col-sm-5">
65+
<input type="date"
66+
class="form-control"
67+
id="inputPublicationDate"
68+
[(ng-model)]="book.publicationDate"
69+
[ng-form-control]="publicationDateInput"
70+
>
71+
</div>
72+
</div>
73+
74+
<div class="row text-center">
75+
<button class="btn btn-primary"
76+
(click)="createBook()"
77+
[disabled]="!createBookForm.valid"
78+
type="submit">Create</button>
79+
</div>
80+
81+
</form>

assets/template/edit/edit-book.html

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<div class="alert alert-success" role="alert"
2+
[hidden]="!canShowUpdateSuccessMsg">
3+
Book has been successfully updated.
4+
</div>
5+
6+
<div class="alert alert-danger" role="alert"
7+
[hidden]="!canShowUpdateFailedMsg">
8+
{{ updateFailedMsg }}
9+
</div>
10+
11+
<form [ng-form-model]="editBookForm"
12+
class="form-horizontal"
13+
role="form">
14+
15+
<div class="form-group">
16+
<label class="control-label col-sm-2"
17+
for="inputISBN">ISBN:</label>
18+
<div class="col-sm-5">
19+
<p class="form-control-static"
20+
id="inputISBN">{{ book.isbn }}</p>
21+
</div>
22+
</div>
23+
24+
<div class="form-group"
25+
[class.has-error]="!titleInput.valid && titleInput.touched">
26+
<label class="control-label col-sm-2"
27+
for="inputTitle">Title:</label>
28+
<div class="col-sm-10">
29+
<input type="text"
30+
class="form-control"
31+
id="inputTitle"
32+
[(ng-model)]="book.title"
33+
[ng-form-control]="titleInput"
34+
required
35+
autofocus>
36+
</div>
37+
<span class="col-sm-offset-2 col-sm-10 help-block"
38+
*ng-if="!titleInput.valid && titleInput.touched">
39+
This field is required.
40+
</span>
41+
</div>
42+
43+
<div class="form-group">
44+
<label class="control-label col-sm-2"
45+
for="inputAuthor">Author:</label>
46+
<div class="col-sm-10">
47+
<input type="text"
48+
class="form-control"
49+
id="inputAuthor"
50+
[(ng-model)]="book.author"
51+
[ng-form-control]="authorInput"
52+
>
53+
</div>
54+
</div>
55+
56+
<div class="form-group">
57+
<label class="control-label col-sm-2"
58+
for="inputPublicationDate">Publication Date:</label>
59+
<div class="col-sm-5">
60+
<input type="date"
61+
class="form-control"
62+
id="inputPublicationDate"
63+
[(ng-model)]="book.publicationDate"
64+
[ng-form-control]="publicationDateInput"
65+
>
66+
</div>
67+
</div>
68+
69+
<div class="row text-center">
70+
<button class="btn btn-success"
71+
type="submit"
72+
[disabled]="!editBookForm.valid"
73+
(click)="updateBook()">Save</button>
74+
</div>
75+
76+
</form>
77+

assets/template/index.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
3+
<html>
4+
<head>
5+
<title>Angular 2 Boilerplate</title>
6+
7+
<script src="../../public/lib/traceur-runtime.js"></script>
8+
<script src="https://jspm.io/[email protected]"></script>
9+
<script src="https://code.angularjs.org/2.0.0-alpha.27/angular2.dev.js"></script>
10+
<script src="https://code.angularjs.org/2.0.0-alpha.27/router.dev.js"></script>
11+
12+
<link rel="stylesheet"
13+
type="text/css"
14+
href="../../public/css/pc.css" />
15+
</head>
16+
17+
<body>
18+
<source-app>
19+
Loading...
20+
</source-app>
21+
22+
<script>
23+
System.import('public/js/index');
24+
</script>
25+
</body>
26+
27+
</html>

assets/template/list/list-books.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<table class="table table-hover">
2+
<thead>
3+
<tr>
4+
<th>ISBN</th>
5+
<th>Title</th>
6+
<th>Author</th>
7+
<th>Publication Date</th>
8+
<th>Action</th>
9+
</tr>
10+
</thead>
11+
<tbody>
12+
<tr *ng-for="var book of books; #i = index">
13+
<td>{{ book.isbn }}</td>
14+
<td>{{ book.title }}</td>
15+
<td>{{ book.author }}</td>
16+
<td>{{ book.publicationDate }}</td>
17+
<td class="pull-left">
18+
<button type="button"
19+
id="viewButton-row-{{i + 1}}"
20+
class="btn btn-default"
21+
(click)="viewBook(book)">View</button>
22+
<button type="button"
23+
id="editButton-row-{{i + 1}}"
24+
class="btn btn-primary"
25+
(click)="editBook(book)">Edit</button>
26+
<button type="button"
27+
id="deleteButton-row-{{i + 1}}"
28+
class="btn btn-danger"
29+
(click)="deleteBook(book)">Delete</button>
30+
</td>
31+
</tr>
32+
</tbody>
33+
</table>

assets/template/view/view-book.html

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<form [ng-form-model]="viewBookForm"
2+
class="form-horizontal"
3+
role="form"
4+
novalidate>
5+
6+
<div class="form-group">
7+
<label class="control-label col-sm-2"
8+
for="valueISBN">ISBN:</label>
9+
<div class="col-sm-5">
10+
<p class="form-control-static"
11+
id="valueISBN">{{ book.isbn }}</p>
12+
</div>
13+
</div>
14+
15+
<div class="form-group">
16+
<label class="control-label col-sm-2"
17+
for="valueTitle">Title:</label>
18+
<div class="col-sm-10">
19+
<p class="form-control-static"
20+
id="valueTitle">{{ book.title }}</p>
21+
</div>
22+
</div>
23+
24+
<div class="form-group">
25+
<label class="control-label col-sm-2"
26+
for="valueAuthor">Author:</label>
27+
<div class="col-sm-10">
28+
<p class="form-control-static"
29+
id="valueAuthor">{{ book.author }}</p>
30+
</div>
31+
</div>
32+
33+
<div class="form-group">
34+
<label class="control-label col-sm-2"
35+
for="valuePublicationDate">Publication Date:</label>
36+
<div class="col-sm-5">
37+
<p class="form-control-static"
38+
id="valuePublicationDate">{{ book.publicationDate }}</p>
39+
</div>
40+
</div>
41+
42+
</form>
43+

assets/typescripts/100_libraries/_ref_100_libraries.ts

-6
This file was deleted.

0 commit comments

Comments
 (0)