forked from srackham/routeless-backbone-contacts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (79 loc) · 2.6 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Routeless Backbone Contacts</title>
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta charset="utf-8">
<link rel="stylesheet" href="css/main.css" />
</head>
<body>
<h1>Routeless Backbone Contacts</h1>
<div id="ribbon">
<!-- ribbon-template -->
</div>
<div id="status">
<!-- status-template -->
</div>
<div id="content">
<div id="list">
<!-- list-template -->
</div>
<div id="detail">
<!-- detail-template -->
</div>
</div>
<!-- Templates -->
<script id="ribbon-template" type="text/x-underscore-template">
<div>
<button class="create">New Contact</button>
<button class="clear">Clear All</button>
<button class="import" >Import Data</button>
</div>
<div>
<label>Search</label>
<input class="search" type="text" autofocus>
</div>
</script>
<script id="status-template" type="text/x-underscore-template">
<div class="message">
<%= contacts.length + ' matching contacts' %>
</div>
</script>
<script id="list-template" type="text/x-underscore-template">
<ul>
<% _.each(contacts, function(contact){ %>
<li data-id="<%= contact.id %>"><%= contact.name %>
<% }); %>
</ul>
</script>
<script id="detail-template" type="text/x-underscore-template">
<table class="detail">
<tr><td>Name<td>
<input type="text" name="name" required value="<%= contact.name %>">
<tr><td>Address<td>
<textarea rows="3" name="address"><%= contact.address %></textarea>
<tr><td>Phone<td>
<input type="tel" name="phone" value="<%= contact.phone %>">
<tr><td>Mobile<td>
<input type="tel" name="mobile" value="<%= contact.mobile %>">
<tr><td>Email<td>
<input type="email" name="email" value="<%= contact.email %>">
<tr><td>Id<td>
<input type="text" name="id" readonly value="<%= contact.id %>">
<tr><td><td>
<button class="save">Save</button>
<% if (!contact.isNew()) { %>
<button class="delete">Delete</button>
<% }; %>
<tr><td><td class="error">
</table>
</script>
<!-- Execute scripts last (after HTML elements have been parsed) -->
<script type="text/javascript" charset="utf-8" src="lib/jquery-1.6.2.js"></script>
<script type="text/javascript" charset="utf-8" src="lib/underscore-1.1.7.js"></script>
<script type="text/javascript" charset="utf-8" src="lib/backbone-0.5.3.js"></script>
<script type="text/javascript" charset="utf-8" src="lib/backbone.localStorage-1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="js/data.js"></script>
<script type="text/javascript" charset="utf-8" src="js/application.js"></script>
</body>
</html>