-
Notifications
You must be signed in to change notification settings - Fork 0
/
address-book.html
245 lines (243 loc) · 12.1 KB
/
address-book.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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<html ng-app="rubrica">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Rubrica</title>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/angular-resource.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/locale.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angularApp.js"></script>
<script src="js/address-book.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="js/gmaps.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link id="theme-link" rel="stylesheet" href="css/theme/default.min.css">
<link rel="stylesheet" href="css/address-book.css">
</head>
<body ng-controller="LocaleController as local">
<div >
<div id="ContactsController" ng-controller="ContactsController as conts">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="logo" href="/"></a>
</div>
<form class="navbar-form navbar-left" id="form-import" enctype="multipart/form-data" >
<div class="form-group">
<input type="text" class="form-control" placeholder="{{local.data.search}}" ng-model="conts.searchbox" title="{{local.data.searchTooltip}}">
<button class="btn btn-default" style="padding-top: 3;padding-bottom: 3;" title="{{local.data.search}}" ng-click="conts.search()" >
<div class="search"></div>
</button>
<button class="btn btn-default" style="padding-top: 3;padding-bottom: 3;" title="{{local.data.new}}" ng-click="conts.add();">
<div class="new"></div>
</button>
<button id="btn-import" class="btn btn-default" style="padding-top: 3;padding-bottom: 3;" title="{{local.data.import}}"><div class="import"></div></button>
<input type="file" id="file-import" name="imp" style="display:none" accept=".json"/>
<input id="btn-import-go" type="button" style="display:none;"/>
</div>
</form>
<form class="navbar-form navbar-right">
<select class="form-control" ng-model="local.language" ng-change="local.change()">
<option value="it">Italiano</option>
<option value="en">English</option>
</select>
<select id="theme-selector" class="form-control">
<option value="css/theme/default.min.css">Default</option>
<option value="css/theme/cerulean.min.css">Cerulean</option>
<option value="css/theme/cosmo.min.css">Cosmo</option>
<option value="css/theme/cyborg.min.css">Cyborg</option>
<option value="css/theme/darkly.min.css">Darkly</option>
<option value="css/theme/flatly.min.css">Flatly</option>
<option value="css/theme/journal.min.css">Journal</option>
<option value="css/theme/lumen.min.css">Lumen</option>
<option value="css/theme/paper.min.css">Paper</option>
<option value="css/theme/readable.min.css">Readable</option>
<option value="css/theme/sandstone.min.css">Sandstone</option>
<option value="css/theme/simplex.min.css">Simplex</option>
<option value="css/theme/slate.min.css">Slate</option>
<option value="css/theme/spacelab.min.css">Spacelab</option>
<option value="css/theme/superhero.min.css">Superhero</option>
<option value="css/theme/united.min.css">United</option>
<option value="css/theme/yeti.min.css">Yeti</option>
</select>
</form>
</div>
</nav>
<div class="col-md-3" >
<div class="panel panel-default" style="width:100%;">
<div class="panel-heading">
<b>{{local.data.contacts}}</b>
<a style="float:right;" ng-href="/export/rubrica.json?matr=">{{local.data.export}}</a>
</div>
<div class="panel-body" style="padding:0px;display:flex;overflow-y:auto;height:78%;overflow-x:hidden;">
<ul style="padding:3 5 0 5;width:100%">
<li class="user-item-listbox-{{contact.isSelected}}" ng-repeat="contact in conts.contacts">
<label style="margin:0px;padding:2px;width:100%">
<input style="display: none;" type="checkbox" ng-model="contact.isSelected" ng-change="conts.select(contact)";>
<table style="width:100%;">
<tr>
<td style="width:90px"><b>{{local.data.name}}</b></td>
<td>{{contact.name}}</td>
</tr>
<tr>
<td style="width:90px"><b>{{local.data.surname}}</b></td>
<td>{{contact.surname}}</td>
</tr>
</table>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<div id="UserController" ng-controller="UserController as user" class="panel panel-default" style="width:100%;">
<div class="panel-heading">
<b>{{local.data.details}}</b>
<a style="float:right;" ng-href="/export/{{user.data().name}}.{{user.data().surname}}.json?matr={{user.data().matricola}}" ng-show="user.current().isNotNew">{{local.data.export}}</a>
</div>
<div class="panel-body">
<div class="row" >
<div class="col-md-2" style="width:150px">
<form enctype="multipart/form-data" id="form-img">
<img id="image-h" ng-src="{{user.data().image}}" style="width: 140;height: 120;display: flex;" class="thumbnail"/>
<input type="file" id="imguploader" name="image" style="display:none" accept="image/*" ng-disabled="!user.current()"/>
<input id="img-uploader-sub" type="button" style="display:none;"/>
</form>
</div>
<div class="col-md-5" >
<div class="form-group">
<label class="control-label" for="focusedInput">{{local.data.name}}</label>
<input class="form-control" id="focusedInput" type="text" ng-model="user.data().name" ng-disabled="!user.current()">
<label class="control-label" for="focusedInput">{{local.data.birthday}}</label>
<input class="form-control" id="focusedInput" type="text" ng-model="user.data().datanascita" ng-disabled="!user.current()">
</div>
</div>
<div class="col-md-5" >
<div class="form-group">
<label class="control-label" for="focusedInput">{{local.data.surname}}</label>
<input class="form-control" id="focusedInput" type="text" ng-model="user.data().surname" ng-disabled="!user.current()">
<label class="control-label" for="focusedInput">{{local.data.id}}</label>
<input class="form-control" id="focusedInput" type="text" ng-model="user.data().matricola" ng-readonly="user.current().isNotNew" ng-disabled="!user.current()">
</div>
</div>
</div>
<div id="ListsController" ng-controller="ListsController as lists" class="row">
<div class="col-md-4" >
<div class="form-group">
<label class="control-label" for="focusedInput">{{local.data.emails}}</label>
<a style="float:right;" href="" ng-click="lists.removeAllMails()" ng-show="user.current()">{{local.data.delete}}</a>
<ul class="listbox-small">
<li ng-repeat="mail in lists.mails()" style="width:100%">
<label title="{{mail.text}}" style="font-weight: normal;width:100%;display:flex;" class="remove-{{mail.remove}}">
<a class="mail-send" ng-href="mailto:{{mail.text}}"></a>
<input style="display: none;" id="ff" type="checkbox" ng-model="mail.remove">
<span style="display: block;overflow: hidden;word-wrap: normal;text-overflow: ellipsis">{{mail.text}}</span></label>
</li>
</ul>
<form ng-submit="lists.addMail()">
<div class="input-group">
<input type="email" name="input" class="form-control" ng-model="lists.mailAddr" required ng-disabled="!user.current()">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" value="add" ng-disabled="!user.current()">+</button>
</span>
</div>
</form>
</div>
</div>
<div class="col-md-4" >
<div class="form-group">
<label class="control-label" for="focusedInput">{{local.data.telephones}}</label>
<a style="float:right;" href="" ng-click="lists.removeAllTels()" ng-show="user.current()">{{local.data.delete}}</a>
<ul class="listbox-small">
<li ng-repeat="tel in lists.tels()" style="width:100%">
<label title="{{tel.text}}" style="font-weight: normal;width:100%;display:flex;" class="remove-{{tel.remove}}" >
<a class="call"ng-href="callto:{{tel.text}}"></a>
<input style="display: none;" id="ff" type="checkbox" ng-model="tel.remove">
<span style="display: block;overflow: hidden;word-wrap: normal;text-overflow: ellipsis">{{tel.text}}</span></label>
</li>
</ul>
<form ng-submit="lists.addTel()">
<div class="input-group">
<input type="input" name="input" class="form-control" ng-model="lists.tel" required ng-disabled="!user.current()">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" value="add" ng-disabled="!user.current()">+</button>
</span>
</div>
</form>
</div>
</div>
<div class="col-md-4" >
<div class="form-group">
<label class="control-label" for="focusedInput">{{local.data.addresses}}</label>
<a style="float:right;" href="" ng-click="lists.removeAllAddrs()" ng-show="user.current()">{{local.data.delete}}</a>
<ul class="listbox-small">
<li ng-repeat="addr in lists.addrs()" style="width:100%;" >
<label title="{{addr.text}}" style="font-weight: normal;width:100%;display:flex;" class="remove-{{addr.remove}}">
<a class="location" href="javascript:void(0);" ng-click="lists.openMap(addr.text);"></a>
<input style="display: none;" id="ff" type="checkbox" ng-model="addr.remove">
<span style="display: block;overflow: hidden;word-wrap: normal;text-overflow: ellipsis">{{addr.text}}</span></label>
</li>
</ul>
<form ng-submit="lists.addAddr()">
<div class="input-group">
<input type="input" name="input" class="form-control" ng-model="lists.addr" required ng-disabled="!user.current()">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" value="add" ng-disabled="!user.current()">+</button>
</span>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row" style="text-align: right;margin-bottom: 15px;margin-right: 15px;margin-top: -20px;">
<button type="submit" class="btn btn-default" title="{{local.data.save}}" onclick="saveOutsideController();" ng-disabled="!user.current()">
<div class="save"></div>
</button>
<button type="submit" class="btn btn-default" title="{{local.data.delete}}" onclick="removeOutsideController();" ng-disabled="!user.current()">
<div class="delete"></div>
</button>
</div>
</div>
</div>
</div>
<div id="msg-box" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{local.data.close}}</button>
</div>
</div>
</div>
</div>
<div id="map-box" class="modal fade" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
<div id="map" style="height:50%;width:100%;"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{local.data.close}}</button>
</div>
</div>
</div>
</div>
</body>
</html>