-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontacts.html
110 lines (102 loc) · 4.64 KB
/
contacts.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
<html>
<head>
<meta charset="utf8"/>
<title>AngularJS Tutorial</title>
<link rel="stylesheet" href="css/bootstrap-3.1.1.min.css">
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<script src="js-lib/angular.min.js"></script>
<script src="js-lib/jquery-2.1.1.min.js"></script>
<script src="js-lib/bootstrap-3.1.1.min.js"></script>
<script src="js-lib/ui-bootstrap-custom-tpls-0.10.0.min.js"></script>
<script src="forms.js"></script>
<script src="compat.js"></script>
<script src="contactApp.js"></script>
<script>
$(function () {
$('#openModal').click(function () {
var mymodal = $('#myModal');
mymodal.modal('show');
});
});
</script>
<div data-ng-app="contactApp">
<div class="row" style="margin-top: 60px;">
<div class="col-md-offset-1 col-md-4">
<div class="panel panel-default" ng-controller="ContactListCtrl">
<div class="panel-heading">
<span class="panel-title">List of Contacts</span>
<button type="button" class="btn btn-default btn-xs pull-right"
data-ng-click="store.loadContacts()">
Load
</button>
</div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>Salutation</th>
<th>Firstname</th>
<th>Lastname</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in store.getContacts()">
<td>{{row.salutation}}</td>
<td>{{row.firstname}}</td>
<td>{{row.lastname}}</td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle btn-xs"
data-toggle="dropdown">
<span class="glyphicon glyphicon-cog"></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#" ng-click="selectContact(row,'rb');">Classic / Reboot</a></li>
<li><a href="#" ng-click="selectContact(row,'ng');">Angular UI</a></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row" ng-controller="ContactFormCtrl">
<reboot-dialog title="Edit Contact">
<reboot-select name="salutation" caption="Salutation" placeholder="Select salutation"
ng-model="form.salutation"
option-source="data/salutations.json"></reboot-select>
<reboot-input name="firstname" caption="Firstname" placeholder="Enter firstname"
ng-model="form.firstname"></reboot-input>
<reboot-input name="lastname" caption="Lastname" placeholder="Enter lastname"
ng-model="form.lastname"></reboot-input>
</reboot-dialog>
</div>
<div ng-controller="ModalDemoCtrl">
<script type="text/ng-template" id="myModalContent.html">
<div class="modal-header">
<h3 class="modal-title">Edit Contact</h3>
</div>
<div class="modal-body">
<reboot-select name="salutation" caption="Salutation" placeholder="Select salutation"
ng-model="form.salutation"
option-source="data/salutations.json"></reboot-select>
<reboot-input name="firstname" caption="Firstname" placeholder="Enter firstname"
ng-model="form.firstname"></reboot-input>
<reboot-input name="lastname" caption="Lastname" placeholder="Enter lastname"
ng-model="form.lastname"></reboot-input>
</div>
<div class="modal-footer">
<button class="btn btn-default" ng-click="cancel()">Cancel</button>
<button class="btn btn-primary" ng-click="ok()">Ok</button>
</div>
</script>
</div>
</div>
</body>
</html>