-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
232 lines (213 loc) · 10.1 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
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
<!DOCTYPE html>
<html lang="en" ng-app='myApp'>
<head>
<meta charset="utf-8">
<title>Shen's Event Planner</title>
<!-- Angular -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- load ngmessages -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-messages.js"></script>
<!-- Firebase -->
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/2.0.1/angularfire.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.5.3/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.5.2/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.5.2/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js"></script>
<script src="js/all.js"></script>
<link rel="stylesheet" href="css/main.css">
</head>
<body ng-controller="mainControl as mc">
<header class="row">
<div class="col-xs-12 text-center">
<h1>Shen's Event Planner</h1>
<h4>by shen</h4>
</div>
</header>
<div class="row">
<div class="col-xs-6 btn-group" ng-hide="mc.values.logged">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".signUp">Sign Up</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".logIn">Log In</button>
</div>
<div class="col-xs-6 btn-group" ng-show="mc.values.logged">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".createEvent">Create Event</button>
<button type="button" class="btn btn-primary" ng-click="mc.logOut()">Sign Out</button>
</div>
</div>
<section class="row text-center events-section ng-cloak" ng-show="mc.values.logged">
<article class="eventCard" ng-repeat="everyObject in mc.eventList">
<button type="button" class="pull-right" ng-click="mc.removeEvent(everyObject)"><span>×</span></button>
<h3>{{everyObject.topic}}</h3>
<h4>{{everyObject.type}}</h4>
<p>{{everyObject.host}}</p>
<p>{{everyObject.startDate}}</p>
<p>{{everyObject.endDate}}</p>
<p>{{everyObject.location}}</p>
<p>{{everyObject.guest}}</p>
<p>{{everyObject.msg}}</p>
</article>
</section>
<div class="logIn modal fade" id="logIn" role="dialog" ng-controller='logInControl as lc'>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header primary-color-dark-bg">
<h4>Log In</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body primary-bg">
<form id="logInForm" name="logInForm" ng-submit="lc.logIn(user)" novalidate>
<label for="logInEmail">
<span>email:</span>
<input type="email" id="logInEmail" name="emailInput" class="form-control" placeholder="your email" required autocomplete="email" ng-model="user.email">
</label>
<label for="logInPassword">
<span>password:</span>
<input type="password" id="logInPassword" name="passwordInput" class="form-control" placeholder="input your password" maxlength="20" minlength="6" required ng-model="user.password">
</label>
<button class="submit btn btn-primary" id="logInSubmit" type="submit button" value="logIn">logIn</button>
</form>
</div>
<div class="modal-footer primary-color-dark-bg">
</div>
</div>
</div>
</div>
<div class="signUp modal fade" id="signUp" role="dialog" ng-controller='signUpControl as sc'>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header primary-color-dark-bg">
<h4 class="modal-title">sigh up</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body primary-bg">
<form id="signUpForm" name="signUpForm" ng-submit="sc.signUp(newUser)" autocomplete="on" novalidate>
<label for="name">
<span>name:</span>
<input type="text" id="name" name="name" class="form-control" placeholder="your name" required autocomplete="name" autofocus ng-model="newUser.name">
</label>
<div class="input-error" ng-messages="signUpForm.name.$error">
<div ng-message="required">
<p>Input your name please!</p>
</div>
</div>
<label for="signUpEmail">
<span>email:</span>
<input type="email" id="signUpEmail" name="email" class="form-control" placeholder="your email" required autocomplete="email" ng-model="newUser.email">
</label>
<div class="input-error" ng-messages="signUpForm.email.$error">
<div ng-message="required">
<p>Input your email please!</p>
</div>
<div ng-message="email">
<p>Input correct email!</p>
</div>
</div>
<label for="password">
<span>password:</span>
<input type="password" id="password" name="password" class="form-control" placeholder="input your password" maxlength="20" minlength="6" required ng-model="newUser.password" ng-keyup="sc.checkPassword()">
<ul class="input-error">
<li ng-hide="sc.charLen">Password should be between 6-20 characters (longer is better)</li>
<li ng-hide="sc.symbols">Password needs at least one of these symbols: !, @, #, $, %, ^, &, *</li>
<li ng-hide="sc.missNumber">Password needs at least one number</li>
<li ng-hide="sc.lowerCase">Password needs at least one lowercase letter</li>
<li ng-hide="sc.upperCase">Password needs at least one uppercase letter</li>
</ul>
</label>
<label for="secondPassword">
<span>password:</span>
<input type="password" id="secondPassword" name="secondPassword" class="form-control" placeholder="input your password again" required ng-model="newUser.secondPassword" ng-keyup="sc.checkSame()">
<div ng-hide="sc.passwordMatch">Your input should be same with first input password!</div>
</label>
<div></div>
<label for="birthday">
<span>birthday:</span>
<input type="date" id="birthday" name="birthday" class="form-control" ng-model="newUser.birthday" placeholder="mm/dd/yyyy">
</label>
<br>
<label>
<span>gender:</span>
<label for="male">
<input type="radio" id="male" name="male" ng-model="newUser.gender" value="male">Male
</label>
<label for="female">
<input type="radio" id="female" name="female" ng-model="newUser.gender" value="female">Female
</label>
</label>
<div ng-show="rCtrl.registerErr">
<p>Registration Failed! {{rCtrl.registerErrMsg}}</p>
</div>
<button class="submit btn btn-primary" id="signUpSubmit" type="submit" value="signUp">submit</button>
</form>
</div>
<div class="modal-footer primary-color-dark-bg">
</div>
</div>
</div>
</div>
<div class="createEvent modal fade" id="createEvent" role="dialog" ng-controller='eventControl as ec'>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header primary-color-dark-bg">
<h4 class="modal-title">Create new events</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body primary-bg">
<form id="eventForm" name="eventForm" ng-submit="ec.submit(eObj)" novalidate>
<label for="topic">
<span>topic:</span>
<input type="text" id="topic" name="topicInput" class="form-control" placeholder="topic of your event" required autofocus ng-model="eObj.topic">
</label>
<label for="event">
<span>Choose an Event</span>
<input list="eventList" id="event" class="form-control" placeholder="conference, movie, etc" required ng-model="eObj.type">
<datalist id="eventList">
<option value="Birthday Party"></option>
<option value="Party"></option>
<option value="Conference Talk"></option>
<option value="Wedding"></option>
<option value="Date Night"></option>
<option value="Study Session"></option>
<option value="Book Club"></option>
<option value="Movie"></option>
</datalist>
</label>
<label for="host">
<span>Enter Event Host</span>
<input id="host" type="text" class="form-control" placeholder="Event Host" required ng-model="eObj.host">
</label>
<label for="eventStart">
<span>Enter Start: date and time</span>
<input class="form-control" type="datetime-local" id="eventStart" ng-model="eObj.startDate" required>
</label>
<label for="eventEnd">
<span>Enter End: date and time</span>
<input class="form-control" type="datetime-local" id="eventEnd" ng-model="eObj.endDate" required>
</label>
<label for="locationTextField">
<label>Location</label>
<input id="locationTextField" class="form-control googlemap" type="text" size="50" ng-model="eObj.location">
</label>
<label for="guest">
<span>Add Guests</span>
<input id="guest" class="guest" type="text" placeholder="Enter guest names (Sam, Tom, Pam, etc.)" ng-model="eObj.guest" required>
</label>
<label for="message">
<p><span class="optional">(Optional)</span> Add a message for guests [140 characters only]</p>
<textarea class="form-control" id="message" ng-model="eObj.msg" rows="3" cols="50" maxlength="140"></textarea>
</label>
<label for="eventSubmit">
<input id="eventSubmit" type="submit" value="Create Event">
</label>
</form>
</div>
</div>
</div>
</div>
</body>
</html>