-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
144 lines (142 loc) · 4.56 KB
/
Copy pathindex.html
File metadata and controls
144 lines (142 loc) · 4.56 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Contact Manager</title>
<link href="vendor/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link href="app/css/main.css" rel="stylesheet">
</head>
<body>
<header class="bs-header">
<div class="container">
<h1>Contact Manager</h1>
<p>Simple Backbone.js example application</p>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-xs-12 main-container">
</div>
</div>
</div>
<script type="text/template" id="tpl-contacts">
<h2 class="page-header text-center">List of contacts</h2>
<p class="text-center">
<a href="#contacts/new" class="btn btn-lg btn-outline">Add Contact</a>
</p>
<ul class="media-list row contacts-container"></ul>
</script>
<script type="text/template" id="tpl-contact">
<div class="thumbnail">
<img class="media-object" src="app/img/faces/<%- avatar %>">
</div>
<div class="media-heading">
<h3>
<%- name %>
<small>
<a href="#contacts/edit/<%- id %>"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="#contacts/delete/<%- id %>" class="delete-contract">
<span class="glyphicon glyphicon-trash"></span>
</a>
</small>
</h3>
</div>
<div class="media-body">
<dl>
<dt>Phone Number:</dt>
<dd><%- tel %></dd>
<dt>Email:</dt>
<dd><%- email %></dd>
</dl>
</div>
<hr>
</script>
<script type="text/template" id="tpl-new-contact">
<h2 class="page-header text-center"><%= isNew ? 'Create' : 'Edit' %> Contact</h2>
<form role="form" class="form-horizontal contract-form">
<div class="form-group">
<label class="col-sm-4 control-label">Full name:</label>
<div class="col-sm-6">
<input type="text" class="form-control contact-name-input" value="<%- name %>">
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Email address:</label>
<div class="col-sm-6">
<input type="email" class="form-control contact-email-input" value="<%- email %>">
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Telephone number:</label>
<div class="col-sm-6">
<input type="tel" class="form-control contact-tel-input" value="<%- tel %>">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-3">
<button type="submit" class="btn btn-outline btn-lg btn-block">Submit</button>
</div>
<div class="col-sm-3">
<a href="#contacts" class="btn btn-outline btn-lg btn-block">Cancel</a>
</div>
</div>
</form>
</script>
<script src="vendor/jquery/dist/jquery.js"></script>
<script src="vendor/underscore/underscore.js"></script>
<script src="vendor/backbone/backbone.js"></script>
<script src="app/js/app.js"></script>
<script src="app/js/models/contact.js"></script>
<script src="app/js/collections/contacts.js"></script>
<script src="app/js/views/contact.js"></script>
<script src="app/js/views/contacts.js"></script>
<script src="app/js/router.js"></script>
<script src="app/js/views/contactForm.js"></script>
<script>
$(function() {
ContactManager.start({
contacts: [
{
id: 1,
name : 'Terrence S. Hatfield',
tel: '651-603-1723',
email: 'TerrenceSHatfield@rhyta.com'
},
{
id: 2,
name : 'Chris M. Manning',
tel: '513-307-5859',
email: 'ChrisMManning@dayrep.com'
},
{
id: 3,
name : 'Ricky M. Digiacomo',
tel: '918-774-0199',
email: 'RickyMDigiacomo@teleworm.us'
},
{
id: 4,
name : 'Michael K. Bayne',
tel: '702-989-5145',
email: 'MichaelKBayne@rhyta.com'
},
{
id: 5,
name : 'John I. Wilson',
tel: '318-292-6700',
email: 'JohnIWilson@dayrep.com'
},
{
id: 6,
name : 'Rodolfo P. Robinett',
tel: '803-557-9815',
email: 'RodolfoPRobinett@jourrapide.com'
}
]
});
});
</script>
</body>
</html>