-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyprofile.html
executable file
·395 lines (346 loc) · 16.6 KB
/
myprofile.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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Profile</title>
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="images/android-desktop.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Material Design Lite">
<link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">
<meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#3372DF">
<link rel="shortcut icon" href="images/favicon.png">
<link rel="stylesheet" href="fonts/material-icons.css">
<link rel="stylesheet" href="styles/blue_material.css" />
<link rel="stylesheet" href="styles.css">
<style>
#view-source {
position: fixed;
display: block;
right: 0;
bottom: 0;
margin-right: 40px;
margin-bottom: 40px;
z-index: 900;
}
</style>
</head>
<body onload="">
<div id="loading" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div>
<div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Your Profile</span>
<div class="mdl-layout-spacer"></div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
<label class="mdl-button mdl-js-button mdl-button--icon" for="search">
<i class="material-icons">search</i>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" id="search">
<label class="mdl-textfield__label" for="search">Enter your query...</label>
</div>
</div>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="hdrbtn">
<i class="material-icons">more_vert</i>
</button>
<ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
<li class="mdl-menu__item">About</li>
<li class="mdl-menu__item">Contact</li>
<li class="mdl-menu__item">Legal information</li>
</ul>
</div>
<div class="mdl-layout__tab-bar mdl-js-ripple-effect">
<a href="#userProfile" id="profileButton" onclick="" class="mdl-layout__tab is-active">Profile</a>
<a href="#userSettings" id="editInformationButton" onclick="loadEditProfilePage();" class="mdl-layout__tab">Edit Your Information</a>
<a href="#userSermonHistory" onclick="" class="mdl-layout__tab">Your History</a>
<a href="#userWatchLater" onclick="" class="mdl-layout__tab">Watch Later / Recommended Sermons</a>
</div>
</header>
<div class="demo-drawer mdl-layout__drawer mdl-color-text--blue-grey-50" style="background-color: rgba(34, 45, 50, 0.81);">
<header class="demo-drawer-header" style="padding:0px;margin:0px;height:300px;opacity:.9;">
<div style="width:calc(100% - 20px);margin-top:20px;margin-left:10px;height:100%;background-size:cover;border-radius:30px;background:url('https://www.thebodyofchrist.us/media/2addedf1-2e2c-4078-86fa-1a268c356110.jpg.300x300_q85_detail_upscale.jpg');"></div>
<div class="demo-avatar-dropdown">
</header>
<nav class="demo-navigation mdl-navigation">
<span style="height:17px;padding:15px; font-family:'Open Sans', sans-serif; color: #4b646f;background: rgba(26, 34, 38, 0.89);">MAIN NAVIGATION</span>
<span onclick="window.location = ('app.html');" style="padding:15px;color: #b8c7ce;font-family: 'Open Sans', sans-serif;"><i style="width:20px;margin-left:10px;"class="fa fa-home"></i>Dashboard<i class="fa fa-angle-left pull-right"></i></span>
<span style="padding:15px;color: #b8c7ce;font-family: 'Open Sans', sans-serif;"><i style="width:20px;margin-left:10px;"class="fa fa-search"></i>Search<i class="fa fa-angle-left pull-right"></i></span>
<span style="padding:15px;color: #b8c7ce;font-family: 'Open Sans', sans-serif;"><i style="width:20px;margin-left:10px;"class="fa fa-globe"></i>Earth Overview<i class="fa fa-angle-left pull-right"></i></span>
<span style="height:17px;padding:15px; font-family:'Open Sans', sans-serif;color: #4b646f;background: rgba(26, 34, 38, 0.89);">MAIN SECTIONS</span>
<span style="padding:15px;color: #b8c7ce;font-family: 'Open Sans', sans-serif;border-left: solid #0073B7 3px;">The Body of Christ<i class="fa fa-angle-left pull-right"></i></span>
<span style="padding:15px;color: #b8c7ce;border-left: solid #F39C12 3px;font-family: 'Open Sans', sans-serif;">Let Your Light Shine<i class="fa fa-angle-left pull-right"></i></span>
<span style="padding:15px;color: #b8c7ce;font-family: 'Open Sans', sans-serif; border-left: solid #DD4B39 3px;">Renew Your Mind<i class="fa fa-angle-left pull-right"></i></span>
<span style="height:17px;padding:15px; font-family:'Open Sans', sans-serif;color: #4b646f;background: rgba(26, 34, 38, 0.89);">USER ACTIONS</span>
<span onclick="window.location=('myprofile.html');" style="padding:15px;color: #b8c7ce;font-family: 'Open Sans', sans-serif;"><i style="width:20px;margin-left:10px;"class="fa fa-user"></i>Edit Your Settings</span>
</nav>
</div>
<main class="mdl-layout__content mdl-color--grey-100">
<style>
.demo-list-two {
width: 300px;
}
</style>
<section class="mdl-layout__tab-panel is-active" id="userProfile">
<div class="page-content">
<div id="globalHolder" class="mdl-grid demo-content" style="padding:0;">
<div id="userImage" width="100%" style="height:300px;width:100%;background-size:cover;"/>
<div style="padding:20px; float:right;">
<button onclick="editButton();" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">mode_edit</i>
</button>
</div>
<div style="background-color:rgba(0, 115, 183, 0.45);width:100%;"><center><h2 style="position:relative;margin-top:200px;color:white;font-weight:500;"><span id="first_name"></span> <span id="last_name"></span></h2></center></div>
</div>
<!-- Three Line List with secondary info and action -->
<style>
.demo-list-three {
width: 650px;
}
</style>
<ul class="demo-list-three mdl-list">
<li class="mdl-list__item mdl-list__item--three-line">
<span class="mdl-list__item-primary-content">
<i class="material-icons mdl-list__item-avatar">home</i>
<span style="margin-right:20px;">Home Church:</span><button id="church" class="mdl-button mdl-js-button mdl-button--accent"></button>
</span>
</li>
<li class="mdl-list__item mdl-list__item--three-line">
<span class="mdl-list__item-primary-content">
<i class="material-icons mdl-list__item-avatar">public</i>
<span>Community:</span><span id="comunity"></span>
<span class="mdl-list__item-text-body">
Aaron Paul played the role of Jesse in Breaking Bad. He also featured in
</span>
</span>
</li>
<li class="mdl-list__item mdl-list__item--three-line">
<span class="mdl-list__item-primary-content">
<i class="material-icons mdl-list__item-avatar">person_add</i>
<span>Follow Colton:</span><span id="follow" style="margin-right:20px;"></span><button id="followButton" class="mdl-button mdl-js-button mdl-button--accent">Follow Colton</button>
</span>
</li>
</ul>
</div>
</div>
</section>
<section class="mdl-layout__tab-panel is-active" id="userSettings">
<div class="page-content">
<!-- List with avatar and controls -->
<style>
.demo-list-control {
width: 80%;
}
.demo-list-radio {
display: inline;
}
</style>
<center>
<ul class="demo-list-control mdl-list">
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" id="usernameIcon" style="font-size:40px;margin-right:20px;color:#424141;">account_box</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="usernameLabel">
<input class="mdl-textfield__input" type="text" id="usernameForm">
<label class="mdl-textfield__label" for="sample1">Username...</label>
</div>
<div class="mdl-tooltip" for="usernameForm">Username</div>
<div class="mdl-tooltip" for="usernameIcon">Username</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" id="firstNameIcon" style="font-size:40px;margin-right:20px;color:#424141;">perm_identity</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="firstNameLabel">
<input class="mdl-textfield__input" type="text" id="firstNameForm">
<label class="mdl-textfield__label" for="sample1">First Name...</label>
</div>
<div class="mdl-tooltip" for="firstNameForm">First Name</div>
<div class="mdl-tooltip" for="firstNameIcon">First Name</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" id="lastNameIcon" style="font-size:40px;margin-right:20px;color:#424141;">perm_identity</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="lastNameLabel">
<input class="mdl-textfield__input" type="text" id="lastNameForm">
<label class="mdl-textfield__label" for="sample1">Last Name...</label>
</div>
<div class="mdl-tooltip" for="lastNameForm">Last Name</div>
<div class="mdl-tooltip" for="lastNameIcon">Last Name</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" id="emailIcon" style="font-size:40px;margin-right:20px;color:#424141;">mail</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="emailLabel">
<input class="mdl-textfield__input" type="text" id="emailForm">
<label class="mdl-textfield__label" for="sample1">Email Address...</label>
</div>
<div class="mdl-tooltip" for="emailForm">Email Address</div>
<div class="mdl-tooltip" for="emailIcon">Email Address</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" id="photoIcon" style="font-size:40px;margin-right:20px;color:#424141;">add_a_photo</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="photoLabel">
<input class="mdl-textfield__input" type="text" id="photoForm">
<label class="mdl-textfield__label" for="sample1">Photo...</label>
</div>
<div class="mdl-tooltip" for="photoForm">Add Profile Image</div>
<div class="mdl-tooltip" for="photoIcon">Add Profile Image</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" style="font-size:40px;margin-right:20px;color:#424141;">public</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="communityLabel">
<input class="mdl-textfield__input" type="text" id="communityForm">
<label class="mdl-textfield__label" for="sample1">Your Community...</label>
</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" style="font-size:40px;margin-right:20px;color:#424141;">home</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="churchLabel">
<input class="mdl-textfield__input" type="text" id="churchForm">
<label class="mdl-textfield__label" for="sample1">Your Church...</label>
</div>
</li>
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons" style="font-size:40px;margin-right:20px;color:#424141;">face</i>
</span>
<div class="mdl-textfield mdl-js-textfield" id="aboutLabel">
<input class="mdl-textfield__input" type="text" id="sample1">
<label class="mdl-textfield__label" for="sample1">About...</label>
</div>
</li>
</ul>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
Save Profile Information
</button>
</center>
</div>
</section>
<section class="mdl-layout__tab-panel is-active" id="userSermonHistory">
<div class="page-content">
<div id="followingHolder" class="mdl-grid demo-content">
<button onclick="updateTest();"class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
Update Test
</button>
</div>
</div>
</section>
<section class="mdl-layout__tab-panel is-active" id="userWatchLater">
<div class="page-content">
<div id="recommendedHolder" class="mdl-grid demo-content">
</div>
</div>
</section>
</main>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="js/imgcache.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<script src="scripts/getMembers.js"></script>
<script type="text/javascript">
ImgCache.options.debug = true;
ImgCache.options.chromeQuota = 50 * 1024 * 1024;
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log(FileTransfer);
console.log(Media);
ImgCache.init(function() {
//setViewGlobal();
//loadEvents(localStorage.getItem('view'), communityID);
}, function() {
alert('ImgCache init: error! Check the log for errors');
});
}
</script>
<script src="scripts/jquery.cookie.js"></script>
<script src="scripts/material.js"></script>
<script src="scripts/getChurches.js"></script>
<!--<script src="scripts/getCommunities.js"></script>-->
<script src="scripts/getSpeakers.js"></script>
<script>
loadMembers('Global');
function loadEditProfilePage(){
function arrayLookup(array, prop, val) {
for (var i = 0, len = array.length; i < len; i++) {
if (array[i].hasOwnProperty(prop) && array[i][prop] === val) {
return array[i];
}
}
return null;
}
userID = parseInt(localStorage.getItem('userID'));
try {
firstName = arrayLookup(memberData.results, 'id', userID).first_name;
document.getElementById('firstNameForm').value = firstName;
$('#firstNameLabel').addClass('is-dirty');
//console.log(firstName);
} catch (err) {
console.log(err);
}
try {
lastName = arrayLookup(memberData.results, 'id', userID).last_name;
document.getElementById('lastNameForm').value = lastName;
$('#lastNameLabel').addClass('is-dirty');
// console.log(lastName);
} catch (err) {
console.log(err);
}
try {
username = arrayLookup(memberData.results, 'id', userID).username;
document.getElementById('usernameForm').value = username;
$('#usernameLabel').addClass('is-dirty');
//console.log(username);
} catch (err) {
console.log(err);
}
try {
firstName = arrayLookup(memberData.results, 'id', userID).first_name;
document.getElementById('firstNameForm').value = firstName;
$('#firstNameLabel').addClass('is-dirty');
console.log(firstName);
} catch (err) {
console.log(err);
}
try {
emailAddress = arrayLookup(memberData.results, 'id', userID).email;
document.getElementById('emailForm').value = emailAddress;
$('#emailLabel').addClass('is-dirty');
//console.log(emailAddress);
} catch (err) {
console.log(err);
}
}
function editButton(){
loadEditProfilePage();
$('#userProfile').removeClass('is-active');
$('#profileButton').removeClass('is-active');
$('#editInformationButton').addClass('is-active');
$('#userSettings').addClass('is-active');
}
function updateTest(){
jQuery.ajax({
url: 'https://www.thebodyofchrist.us/service/setHomeChurch/?churchID=1',
type: "GET",
}).done(function(memberData, textStatus, jqXHR) {
alert(memberData);
alert(textStatus);
});
}
</script>
</body>
</html>