This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathowner_group_chat.html
430 lines (389 loc) · 22.6 KB
/
owner_group_chat.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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<!DOCTYPE html>
<html lang="en">
<head>
<title>Horizontal Menu | Layouts</title>
<meta charset="utf-8">
<!--Template is from Madmin.swlabs.co. (2017). mAdmin | Angular. [online] Available at: http://madmin.swlabs.co/ [Accessed 9 Sep. 2017].-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT">
<link rel="shortcut icon" href="images/icons/favicon.ico">
<link rel="apple-touch-icon" href="images/icons/favicon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/icons/favicon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/icons/favicon-114x114.png">
<!--Loading bootstrap css-->
<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700">
<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700,300">
<link type="text/css" rel="stylesheet" href="vendors/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css">
<link type="text/css" rel="stylesheet" href="vendors/font-awesome/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="vendors/bootstrap/css/bootstrap.min.css">
<!--LOADING STYLESHEET FOR PAGE-->
<link type="text/css" rel="stylesheet" href="vendors/intro.js/introjs.css">
<link type="text/css" rel="stylesheet" href="vendors/calendar/zabuto_calendar.min.css">
<link type="text/css" rel="stylesheet" href="vendors/sco.message/sco.message.css">
<link type="text/css" rel="stylesheet" href="vendors/intro.js/introjs.css">
<!--Loading style vendors-->
<link type="text/css" rel="stylesheet" href="vendors/animate.css/animate.css">
<link type="text/css" rel="stylesheet" href="vendors/jquery-pace/pace.css">
<link type="text/css" rel="stylesheet" href="vendors/iCheck/skins/all.css">
<link type="text/css" rel="stylesheet" href="vendors/jquery-notific8/jquery.notific8.min.css">
<link type="text/css" rel="stylesheet" href="vendors/bootstrap-daterangepicker/daterangepicker-bs3.css">
<!--Loading style-->
<link type="text/css" rel="stylesheet" href="css/themes/style1/yellow-blue.css" class="default-style">
<link type="text/css" rel="stylesheet" href="css/themes/style1/yellow-blue.css" id="theme-change" class="style-change color-change">
<link type="text/css" rel="stylesheet" href="css/style-responsive.css">
</head>
<body class="horizontal-menu-page clear-cookie ">
<div>
<div id="header-topbar-option-demo" class="page-header-topbar">
<nav id="topbar" role="navigation" style="margin-bottom: 0; z-index: 2;" class="navbar navbar-default navbar-static-top">
<div class="navbar-header">
<a id="logo" href="index.html" style="padding:15px"><div style="clear:both;"><span class="logo-text" style="vertical-align: top">  WePet <i class="fa fa-paw" style=""></i></span></div></a>
</div>
<div class="topbar-main"><a id="menu-toggle" href="#" class="hidden-xs"><i class="fa fa-bars"></i></a>
<form id="topbar-search" action="#" method="GET" >
<div class="input-group">
<input type="text" placeholder="Search for Job..." class="form-control" /><span class="input-group-btn"><a href="javascript:;" class="btn submit"><i class="fa fa-search"></i></a></span>
</div>
</form>
<ul class="nav navbar navbar-top-links navbar-left mbn text-right">
<li class="dropdown topbar-user">
<a data-hover="dropdown" href="#" class="dropdown-toggle"><img src="./images/User3.png" alt="" class="img-responsive img-circle" /> <span class="hidden-xs">John Doe</span> <span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-user pull-right">
<li><a href="myprofile.html"><i class="fa fa-user"></i>My Profile</a>
</li>
<li><a href="#"><i class="fa fa-calendar"></i>My Calendar</a>
</li>
<li><a href="#"><i class="fa fa-envelope"></i>My Inbox<span class="badge badge-danger">3</span></a>
</li>
<li><a href="#"><i class="fa fa-tasks"></i>My Tasks<span class="badge badge-success">7</span></a>
</li>
<li class="divider"></li>
<li><a href="#"><i class="fa fa-lock"></i>Lock Screen</a>
</li>
<li><a href="login_owner.html"><i class="fa fa-key"></i>Log Out</a>
</li>
</ul>
</li>
<li id="topbar-chat" class="hidden-xs"><a href="javascript:void(0)" class="btn-chat"><i class="fa fa-comments"></i><span class="badge badge-info">3</span></a>
</li>
</ul>
</div>
</nav>
<!--BEGIN MODAL CONFIG PORTLET-->
<div id="modal-config" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" data-dismiss="modal" aria-hidden="true" class="close">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eleifend et nisl eget porta. Curabitur elementum sem molestie nisl varius, eget tempus odio molestie. Nunc vehicula sem arcu, eu pulvinar neque cursus ac. Aliquam ultricies lobortis magna et aliquam. Vestibulum egestas eu urna sed ultricies. Nullam pulvinar dolor vitae quam dictum condimentum. Integer a sodales elit, eu pulvinar leo. Nunc nec aliquam nisi, a mollis neque. Ut vel felis quis tellus hendrerit placerat. Vivamus vel nisl non magna feugiat dignissim sed ut nibh. Nulla elementum, est a pretium hendrerit, arcu risus luctus augue, mattis aliquet orci ligula eget massa. Sed ut ultricies felis.</p>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-default">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!--END MODAL CONFIG PORTLET-->
</div>
<!--END TOPBAR-->
<div id="wrapper">
<!--BEGIN SIDEBAR MENU-->
<!--END SIDEBAR MENU-->
<!--BEGIN CHAT FORM-->
<!--END CHAT FORM-->
<!--BEGIN PAGE WRAPPER-->
<div id="page-wrapper">
<!--BEGIN CONTENT-->
<div class="page-content">
<div class="row">
<div class="col-lg-12">
</div>
<div class="panel">
<div class="panel-body">
<div class="main-menu col-lg-6">
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">Group <button type="button" class="btn btn-default btn-xs"><i class="fa fa-sign-out"></i></button></a>
</li>
</ul>
<div id="myTabContent" class="tab-content">
<div id="home" class="tab-pane fade in active">
<div id="group-joined">
<div class="chat-scroller">
<ul class="chats">
<li class="in"><img src="./images/User3.png" class="avatar img-responsive" />
<div class="message"><span class="chat-arrow"></span><a href="#" class="chat-name">Robin</a> <span class="chat-datetime">at July 06, 2014 17:06</span><span class="chat-body">Hey, how are you guys doing today?</span>
</div>
</li>
<li class="in"><img src="./images/User1.png" class="avatar img-responsive" />
<div class="message"><span class="chat-arrow"></span><a href="#" class="chat-name">John</a> <span class="chat-datetime">at July 06, 2014 18:06</span><span class="chat-body">Hi, guys, I just took Timmy to the vet. He is alright now</span>
</div>
</li>
<li class="out"><img src="./images/User2.png" class="avatar img-responsive" />
<div class="message"><span class="chat-arrow"></span><a href="#" class="chat-name">me</a> <span class="chat-datetime">at July 06, 2014 17:06</span><span class="chat-body">That is a relief thank you, John</span>
</div>
</li>
<li class="in"><img src="./images/User1.png" class="avatar img-responsive" />
<div class="message"><span class="chat-arrow"></span><a href="#" class="chat-name">John</a> <span class="chat-datetime">at July 06, 2014 18:06</span><span class="chat-body">No worries, Ted</span>
</div>
</li>
<li class="in"><img src="./images/User3.png" class="avatar img-responsive" />
<div class="message"><span class="chat-arrow"></span><a href="#" class="chat-name">Robin</a> <span class="chat-datetime">at July 06, 2014 17:06</span><span class="chat-body">I think we have completed most of the task, shall we look for a new job now</span>
</div>
</li>
</ul>
</div>
<div class="chat-form">
<div class="input-group">
<input id="input-chat" type="text" placeholder="Type a message here..." class="form-control" /><span id="btn-chat" class="input-group-btn"><button type="button" class="btn btn-green"><i class="fa fa-check"></i></button></span>
</div>
</div>
</div>
<div id="group-no">
<h4>Please select and join a group from here:</h4>
<a href="grouplist_care.html" type="button" class="btn-info text-center col-xs-offset-3 col-xs-6">Group List</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btn-group btn-group-justified"><a href="owner_profile.html" role="button" class="btn btn-info">Job</a><a href="#" role="button" class="btn btn-success active">Me</a><a role="button" class="btn btn-default">Contact</a>
</div>
</div>
</div>
<!--END CONTENT-->
</div>
<!--END FOOTER-->
<!--END PAGE WRAPPER-->
</div>
</div>
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/jquery-ui.js"></script>
<!--loading bootstrap js-->
<script src="vendors/bootstrap/js/bootstrap.min.js"></script>
<script src="vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<script src="vendors/metisMenu/jquery.metisMenu.js"></script>
<script src="vendors/slimScroll/jquery.slimscroll.js"></script>
<script src="vendors/jquery-cookie/jquery.cookie.js"></script>
<script src="vendors/iCheck/icheck.min.js"></script>
<script src="vendors/iCheck/custom.min.js"></script>
<script src="vendors/jquery-notific8/jquery.notific8.min.js"></script>
<script src="vendors/jquery-highcharts/highcharts.js"></script>
<script src="js/jquery.menu.js"></script>
<script src="vendors/holder/holder.js"></script>
<script src="vendors/responsive-tabs/responsive-tabs.js"></script>
<script src="vendors/jquery-news-ticker/jquery.newsTicker.min.js"></script>
<script src="vendors/moment/moment.js"></script>
<script src="vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
<!--CORE JAVASCRIPT-->
<script src="js/main.js"></script>
<!--LOADING SCRIPTS FOR PAGE-->
<script src="vendors/intro.js/intro.js"></script>
<script src="vendors/flot-chart/jquery.flot.js"></script>
<script src="vendors/flot-chart/jquery.flot.categories.js"></script>
<script src="vendors/flot-chart/jquery.flot.pie.js"></script>
<script src="vendors/flot-chart/jquery.flot.tooltip.js"></script>
<script src="vendors/flot-chart/jquery.flot.resize.js"></script>
<script src="vendors/flot-chart/jquery.flot.fillbetween.js"></script>
<script src="vendors/flot-chart/jquery.flot.stack.js"></script>
<script src="vendors/flot-chart/jquery.flot.spline.js"></script>
<script src="vendors/calendar/zabuto_calendar.min.js"></script>
<script src="vendors/sco.message/sco.message.js"></script>
<script src="vendors/intro.js/intro.js"></script>
<script>
$(function () {
//BEGIN CHAT FORM
$('.chat-scroller').slimScroll({
"width": '100%',
"height": '320px',
"wheelStep": 30,
"scrollTo": "100px"
});
$('.chat-form input#input-chat').on("keypress", function(e){
var $obj = $(this);
var $me = $obj.parents().find('ul.chats');
if (e.which == 13) {
var content = $obj.val();
if (content !== "") {
$me.addClass(content);
var d = new Date();
var h = d.getHours();
var m = d.getMinutes();
if (m < 10) m = "0" + m;
$obj.val(""); // CLEAR TEXT ON TEXTAREA
var element = "";
element += "<li class='out'>";
element += "<img class='avatar' src='images/User1.png'>";
element += "<div class='message'>";
element += "<span class='chat-arrow'></span>";
element += "<a class='chat-name' href='#'>Me </a>";
element += "<span class='chat-datetime'>at October 18, 2017 " + h + ":" + m + "</span>";
element += "<span class='chat-body'>" + content + "</span>";
element += "</div>";
element += "</li>";
$me.append(element);
var height = 0;
$me.find('li').each(function(i, value){
height += parseInt($(this).height());
console.log($(this).height());
});
height += '';
$('.chat-scroller').slimScroll({
scrollTo: height,
"wheelStep": 30,
});
}
}
});
$('.chat-form span#btn-chat').on("click", function(e){
e.preventDefault();
var $obj = $(this).parents('.chat-form').find('input#input-chat');
var $me = $obj.parents().find('ul.chats');
var content = $obj.val();
if (content !== "") {
$me.addClass(content);
var d = new Date();
var h = d.getHours();
var m = d.getMinutes();
if (m < 10) m = "0" + m;
$obj.val(""); // CLEAR TEXT ON TEXTAREA
var element = "";
element += "<li class='in'>";
element += "<img class='avatar' src='https://s3.amazonaws.com/uifaces/faces/twitter/kolage/48.jpg'>";
element += "<div class='message'>";
element += "<span class='chat-arrow'></span>";
element += "<a class='chat-name' href='#'>Admin </a>";
element += "<span class='chat-datetime'>at July 6, 2014" + h + ":" + m + "</span>";
element += "<span class='chat-body'>" + content + "</span>";
element += "</div>";
element += "</li>";
$me.append(element);
var height = 0;
$me.find('li').each(function(i, value){
height += parseInt($(this).height());
});
height += '';
$('.chat-scroller').slimScroll({
scrollTo: height,
"wheelStep": 30,
});
}
});
});
$(document).ready(function () {
if(GetURLParameter('x')){
console.log(325);
var $me = $("ul.chats");
var d = new Date();
var h = d.getHours();
var m = d.getMinutes();
if (m < 10) m = "0" + m;
var element = "";
element += "<li class='out'>";
element += "<img class='avatar' src='https://s3.amazonaws.com/uifaces/faces/twitter/kolage/48.jpg'>";
element += "<div class='message'>";
element += "<span class='chat-arrow'></span>";
element += "<a class='chat-name' href='#'>Admin </a>";
element += "<span class='chat-datetime'>at July 6, 2014" + h + ":" + m + "</span>";
element += "<span class='chat-body'>" + "Shared a job" + "</span>";
element += "</div>";
element += "</li>";
$me.append(element);
var height = 0;
$me.find('li').each(function(i, value){
height += parseInt($(this).height());
});
height += '';
$('.chat-scroller').slimScroll({
scrollTo: height,
"wheelStep": 30,
});
var $shared = ''
$shared += '<li class="clearfix"><span class="drag-drop"><i></i></span>';
$shared += '<div class="todo-check pull-left">';
$shared += '<div class="icheckbox_minimal-grey" style="position: relative;"><input';
$shared += 'type="checkbox" value="" style="position: absolute; top: -20%; left: -20%;'; $shared += 'display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background:' ;
$shared += 'rgb(255, 255, 255); border: 0px; opacity: 0;"><ins class="iCheck-helper"'; $shared += 'style="position: absolute; top: -20%; left: -20%; display: block; width:'; $shared += '140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins></div>';
$shared += '</div>';
$shared += '<div class="todo-title">New Job</div>';
$shared += '<div class="todo-actions pull-right clearfix"><a href="#" class="todo-agree"><i class="fa fa-thumbs-up"></i><span class="badge badge-green">0</span></a>';
$shared += '<a href="#" class="todo-disagree"> <i class="fa fa-thumbs-down"></i><span class="badge badge-red">0</span></a>';
$shared += '</div></li>';
$('#profile ul.todo-list').prepend($shared);
}else{
console.log(1);
}
$(".job-detail").hide();
$("#group-no").hide();
$(".job").click(function () {
$(".job-list").hide();
$(".job-detail").show();
});
$(".back-btn").click(function(){
console.log("back-button clicked");
$(".job-detail").hide();
$(".job-list").show();
});
$('a.todo-agree').click(function(e){
if ($(this).hasClass("voted")){
}else{
$(this).addClass('voted');
$(this).next().addClass('voted');
$(this).parent().parent().css('background-color','#aaaaaa');
var $now = parseInt($(this).find("span").text());
$now = $now + 1;
$(this).find("span").text($now);
if($now >= 4){
$(this).parent().parent().css('background-color','#a8e09f');
}
}
e.stopPropagation();
});
$('a.todo-disagree').click(function(e){
if ($(this).hasClass("voted")){
}else{
$(this).addClass('voted');
$(this).prev().addClass('voted');
$(this).parent().parent().css('background-color','#aaaaaa');
var $now = parseInt($(this).find("span").text());
$now = $now + 1;
$(this).find("span").text($now);
if($now >= 4){
$(this).parent().parent().css('background-color','#8c8c8c');
}
}
e.stopPropagation();
});
$("#myTab li:first-of-type button").click(function(){
$("#group-joined").hide();
$("#group-no").show();
$("#myTab li:first-of-type button").hide();
});
$('#myTasks .fa-check').click(function(){
$(this).parent().parent().parent().css('background-color','#aaaaaa');
});
});
function GetURLParameter(sParam){
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam) {
return sParameterName[1];
}
}
}
</script>
</body>
</html>