forked from seaskymonster/web-reference-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gpa.html
480 lines (419 loc) · 23.2 KB
/
gpa.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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<link rel='stylesheet' href="assets/css/style.css" type='text/css' media='all' />
<link rel='stylesheet' href="assets/css/style-custom.css" type='text/css' media='all' />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel='stylesheet' href="assets/css/bbpress.css" type='text/css' media='all' />
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<body onload="initialize()" class="search search-results">
<!-- #header -->
<header id="header" class="clearfix" role="banner">
<div class="ht-container">
<div id="header-inner" class="clearfix">
<!-- #logo -->
<div id="logo">
<a title="Acme" href="index.html">
<i class="icon logo" >ACME</i>
</a>
</div>
<!-- /#logo -->
<!-- #primary-nav -->
<nav id="primary-nav" role="navigation" class="clearfix">
<ul id="menu-primary-nav" class="nav sf-menu clearfix">
<li class="menu-item "><a href="#">Domains</a></li>
<li class="menu-item "><a href="#">Websites</a></li>
<li class="menu-item "><a href="#">Email</a></li>
<li class="menu-item "><a href="#">Marketing</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children "><a href="#">Support +</a>
<ul class="sub-menu">
<li class="menu-item"><a href="support1.html">Support1</a></li>
<li class="menu-item"><a href="support2.html">Support2</a></li>
<li class="menu-item"><a href="support3.html">Support3</a></li>
<li class="menu-item "><a href="CallingCard.html">Calling Card</a></li>
</ul>
</li>
</ul>
</nav>
<!-- #primary-nav -->
</div>
</div>
</header>
<!-- /#header -->
<!-- #page-header -->
<div id="page-header" class="clearfix">
<div class="ht-container">
<h1>Results for: <span class="search_result"></span></h1>
<div id="live-search">
<form role="search" method="get" id="searchform" class="clearfix" action="http://demo.herothemes.com/supportdesk/" autocomplete="off">
<input class="name" type="text" onfocus="if (this.value == 'Search for Guided Path ...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search for Guided Path ...';}" value="Search for Guided Path ..." name="s" id="s" />
<input type="hidden" name="post_type[]" value="st_kb" />
</form>
</div>
</div>
</div>
<!-- /#page-header -->
<!-- #breadcrumbs -->
<div id="page-subnav" class="clearfix">
<div class="ht-container">
<div id="breadcrumbs"><a href="">Home</a><span class="sep">/</span>Search Results by<span style="font-weight:bold"; class="search_result_category"></span> for:<span class="search_result"></span></div></div>
</div>
<!-- /#breadcrumbs -->
<!-- #primary -->
<div id="primary" class="sidebar-right clearfix">
<div class="ht-container">
<!-- #content -->
<article id="content" style = "width:70%; height:85vh; border:1px solid #CCCCCC;" class="clearfix post-162 post type-post status-publish format-standard has-post-thumbnail hentry category-how-to tag-howto tag-strategy-2 tag-support has_thumb">
<div id="jwt_token_error"></div>
</article>
<!-- /#content -->
<!-- #sidebar -->
<aside id="sidebar" role="complementary">
<div id="categories-4" class="widget widget_categories clearfix"><h4 class="widget-title">Categories</h4> <ul>
<li class="cat-item cat-item-2"><a href="" >Announcements</a></li>
<li class="cat-item cat-item-3"><a href="" >How-To</a></li>
<li class="cat-item cat-item-4"><a href="" >Strategy</a></li>
</ul>
</div><div id="st_blog_widget-4" class="widget st_blog_widget clearfix">
<h4 class="widget-title">Latest News</h4>
<ul class="clearfix">
<li class="clearfix has_thumb">
<div class="entry-thumb">
<a href="" rel="nofollow">
<img width="60" height="60" src="http://dr57u1lgwukd1.cloudfront.net/supportdesk/wp-content/uploads/sites/2/2013/03/photodune-4086091-hard-work-m-60x60.jpg?d6b1d9" class="attachment-post-thumbnail wp-post-image" alt="photodune-4086091-hard-work-m" /> </a>
</div>
<a class="entry-title" href="" rel="bookmark">Take The Hardwork Out Of Support</a>
<div class="entry-meta"><time datetime="2013-03-18">March 18, 2013</time></div>
</li>
<li class="clearfix has_thumb">
<div class="entry-thumb">
<a href="" rel="nofollow">
<img width="60" height="60" src="http://dr57u1lgwukd1.cloudfront.net/supportdesk/wp-content/uploads/sites/2/2013/03/photodune-369921-handshaking-m-60x60.jpg?d6b1d9" class="attachment-post-thumbnail wp-post-image" alt="Handshaking" /> </a>
</div>
<a class="entry-title" href="" rel="bookmark">Our New Partnership With Handshake</a>
<div class="entry-meta"><time datetime="2013-03-18">March 18, 2013</time></div>
</li>
<li class="clearfix has_thumb">
<div class="entry-thumb">
<a href="" rel="nofollow">
<img width="60" height="60" src="http://dr57u1lgwukd1.cloudfront.net/supportdesk/wp-content/uploads/sites/2/2013/03/support-desk-demo-02-60x60.jpg?d6b1d9" class="attachment-post-thumbnail wp-post-image" alt="support-desk-demo-02" /> </a>
</div>
<a class="entry-title" href="" rel="bookmark">Real Solutions For Customers</a>
<div class="entry-meta"><time datetime="2013-03-18">March 18, 2013</time></div>
</li>
<li class="clearfix has_thumb">
<div class="entry-thumb">
<a href="" rel="nofollow">
<img width="60" height="60" src="http://dr57u1lgwukd1.cloudfront.net/supportdesk/wp-content/uploads/sites/2/2013/03/support-desk-demo-01-60x60.jpg?d6b1d9" class="attachment-post-thumbnail wp-post-image" alt="support-desk-demo-01" /> </a>
</div>
<a class="entry-title" href="" rel="bookmark">New Support Team Member!</a>
<div class="entry-meta"><time datetime="2013-03-17">March 17, 2013</time></div>
</li>
</ul>
</div><div id="tag_cloud-2" class="widget widget_tag_cloud clearfix"><h4 class="widget-title">Tags</h4><div class="tagcloud"><a href='' class='tag-link-5' title='3 topics' style='font-size: 11.75pt;'>announcement</a>
<a href='' class='tag-link-6' title='3 topics' style='font-size: 11.75pt;'>howto</a>
<a href='' class='tag-link-7' title='2 topic' style='font-size: 8pt;'>install</a>
<a href='' class='tag-link-8' title='3 topics' style='font-size: 11.75pt;'>strategy</a>
<a href='' class='tag-link-9' title='3 topics' style='font-size: 11.75pt;'>support</a>
<a href='' class='tag-link-10' title='3 topics' style='font-size: 11.75pt;'>supportdesk</a>
<a href='' class='tag-link-11' title='4 topics' style='font-size: 13pt;'>wordpress</a>
<a href='' class='tag-link-12' title='3 topics' style='font-size: 11.75pt;'>wordpress theme</a></div>
</div> </aside>
<!-- /#sidebar -->
</div>
</div>
<!-- /#primary -->
<!-- /#feedback -->
<div id="feedback">
<a id="live_support_button" >Get Live Help</a>
</div>
<!--<div class="overlay"></div>-->
<div style="display:none" class="modal draggable">
<div style="width: 270px; height: 30px; padding: 5px 15px; border: 0px; border-radius: 2px 2px 0px 0px; background: rgb(99, 99, 99);cursor: move;">
<span style="color: rgb(243, 243, 243); font-size: 15px; font-weight: bold; line-height: 15px;">Get Live Help</span>
<span id="close_live_help"title="Hide" style="cursor: pointer; width: 15px; height: 15px; color: rgb(243, 243, 243); position: absolute; top: 2px; right: 10px; font-weight: bold; text-align: center;">x</span>
</div>
<div class="draggable" style="position:absolute;height:400px;" id="container_for_live_support"></div>
</div>
<div class="content">
</div>
<!-- /#feedback -->
<!-- #footer-bottom -->
<footer id="footer" class="clearfix">
<div id="footer-widgets" class="clearfix">
<div class="ht-container">
<div class="row">
<div id="text-3" class="column col-third widget widget_text"><h4 class="widget-title"><span>About Acme</span></h4>
<div class="textwidget"><p>Acme is a domain register and web hosting company.</p>
<p>Grow your business by settings up a website and email accounts.</p>
</div>
</div>
<div id="st_blog_widget-3" class="column col-third widget st_blog_widget">
<h4 class="widget-title"><span>Latest News</span></h4>
<ul class="clearfix">
<li class="clearfix has_thumb">
<div class="entry-thumb">
<a href="" rel="nofollow">
<img width="60" height="60" src="http://dr57u1lgwukd1.cloudfront.net/supportdesk/wp-content/uploads/sites/2/2013/03/photodune-4086091-hard-work-m-60x60.jpg?d6b1d9" class="attachment-post-thumbnail wp-post-image" alt="photodune-4086091-hard-work-m" /> </a>
</div>
<a class="entry-title" href="" rel="bookmark">Take The Hardwork Out Of Support</a>
<div class="entry-meta"><time datetime="2013-03-18">March 18, 2013</time></div>
</li>
<li class="clearfix has_thumb">
<div class="entry-thumb">
<a href="" rel="nofollow">
<img width="60" height="60" src="http://dr57u1lgwukd1.cloudfront.net/supportdesk/wp-content/uploads/sites/2/2013/03/photodune-369921-handshaking-m-60x60.jpg?d6b1d9" class="attachment-post-thumbnail wp-post-image" alt="Handshaking" /> </a>
</div>
<a class="entry-title" href="" rel="bookmark">Our New Partnership With Handshake</a>
<div class="entry-meta"><time datetime="2013-03-18">March 18, 2013</time></div>
</li>
</ul>
</div>
<div id="categories-3" class="column col-third widget widget_categories"><h4 class="widget-title"><span>News Categories</span></h4> <ul>
<li class="cat-item cat-item-2"><a href="" >Announcements</a></li>
<li class="cat-item cat-item-3"><a href="" >How-To</a></li>
<li class="cat-item cat-item-4"><a href="" >Strategy</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="footer-bottom" class="clearfix">
<div class="ht-container">
<small id="copyright" role="contentinfo">Copyright © A Hero Theme.</small>
<nav id="footer-nav" role="navigation">
<ul class="nav-footer clearfix">
<li class="menu-item menu-item-type-post_type menu-item-object-page current_page_item"><a href="index.html">Home</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children"><a href="#">Domains</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom "><a href="#">Websites</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom "><a href="#">Email</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page "><a href="#">Marketing</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page "><a href="support1.html">Support</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page "><a href="CallingCard.html">Calling Card</a></li>
</ul>
<p class="nav-footer clearfix">Use of this site is subject to <a href="https://github.com/seaskymonster/web-reference-app/blob/master/Nexus%20Connect%20JavaScript%20Reference%20App%20EULA%202015-10-13.pdf">Terms and Conditions</a> and <a href="http://www.support.com/legal/site-privacy-policy/">Privacy Policy</a></p>
</nav>
</div>
</div>
</footer>
<!-- /#footer-bottom -->
<!--<script src="assets/js/jquery.min.js"></script>-->
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="https://static.nexus.support.com/client/v1/nexus-connect-sdk.js"></script>
<script>
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
};
function initialize() {
var token = localStorage.getItem('token');
if(!token) {
token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0IjoibXljb21wYW55IiwiZCI6Im5leHVzLnN1cHBvcnQuY29tIiwicHJtIjpbImxvZzoqIiwic2Vzc2lvbjpjb25uZWN0Il0sImp0aSI6IjYyMDhlYTRhLWJiZWEtNDQwYi05MjUzLTljYWJjYWNhMzMyYiIsImFwcCI6ImNydW1TUyIsInZlciI6ImNydW1TUyAxLjAiLCJwbHQiOiJicm93c2VyIiwiaWF0IjoxNDQzNTU1MDI1LCJhdWQiOlsiYXBwIiwiYXBpIl0sImlzcyI6IlN1cHBvcnQuY29tIn0.3qN0m6izKRyWGaP334yV-kudFTtZ6jQCpTM2Ne-wB9Y';
}
if(token) {
// console.log(token);
// console.log("browser",navigator);
var MachineOSDetails = detectMachineOS();
var BrowserDetails =detectBrowserDetails();
try {
NexusConnectSDK.initialize(token);
NexusConnectSDK.logContent("breadcrumb");
var by = getParameterByName('helpid') ? 'Searched by HelpId : ': (getParameterByName('tag')? 'Searched by Tag : ': 'Searched Content by : ');
var param = getParameterByName('helpid') ? getParameterByName('helpid'): (getParameterByName('tag')?getParameterByName('tag'):getParameterByName('search'));
param = by + param;
console.log(param);
NexusConnectSDK.logAction(param);
NexusConnectSDK.logDevice("Browser",{OS: BrowserDetails.browserName, Version: BrowserDetails.fullVersion});
NexusConnectSDK.logDevice("Machine",{OS: MachineOSDetails.OSName, Version: MachineOSDetails.OSVersion});
NexusConnectSDK.logContent("App Data", {Name: 'Acme Website', Version:'3.0.54'});
return token;
}catch(e){
console.log(e);
}
}else{
}
};
function detectMachineOS (){
var os="Unknown OS";
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
if (navigator.appVersion.indexOf("Win")!=-1) os="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) os="Mac OS";
if (navigator.appVersion.indexOf("X11")!=-1) os="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) os="Linux";
var osVersion = "unknown";
if (/Windows/.test(os)) {
osVersion = /Windows (.*)/.exec(nAgt)[1];
os = 'Windows';
}
switch (os) {
case 'Mac OS':
osVersion = /Mac OS X (10[\.\_\d]+)/.exec(nAgt)[1];
break;
case 'Android':
osVersion = /Android ([\.\_\d]+)/.exec(nAgt)[1];
break;
case 'iOS':
osVersion = /OS (\d+)_(\d+)_?(\d+)?/.exec(nVer);
osVersion = osVersion[1] + '.' + osVersion[2] + '.' + (osVersion[3] | 0);
break;
}
return {OSName: os, OSVersion: osVersion};
}
function detectBrowserDetails (){
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName = navigator.appName;
var fullVersion = ''+parseFloat(navigator.appVersion);
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;
// In Opera, the true version is after "Opera" or after "Version"
if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
browserName = "Opera";
fullVersion = nAgt.substring(verOffset+6);
if ((verOffset=nAgt.indexOf("Version"))!=-1)
fullVersion = nAgt.substring(verOffset+8);
}
// In MSIE, the true version is after "MSIE" in userAgent
else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
browserName = "Microsoft Internet Explorer";
fullVersion = nAgt.substring(verOffset+5);
}
// In Chrome, the true version is after "Chrome"
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
browserName = "Chrome";
fullVersion = nAgt.substring(verOffset+7);
}
// In Safari, the true version is after "Safari" or after "Version"
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
browserName = "Safari";
fullVersion = nAgt.substring(verOffset+7);
if ((verOffset=nAgt.indexOf("Version"))!=-1)
fullVersion = nAgt.substring(verOffset+8);
}
// In Firefox, the true version is after "Firefox"
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
browserName = "Firefox";
fullVersion = nAgt.substring(verOffset+8);
}
// In most other browsers, "name/version" is at the end of userAgent
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) <
(verOffset=nAgt.lastIndexOf('/')) )
{
browserName = nAgt.substring(nameOffset,verOffset);
fullVersion = nAgt.substring(verOffset+1);
if (browserName.toLowerCase()==browserName.toUpperCase()) {
browserName = navigator.appName;
}
}
// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1)
fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1)
fullVersion=fullVersion.substring(0,ix);
majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
fullVersion = ''+parseFloat(navigator.appVersion);
majorVersion = parseInt(navigator.appVersion,10);
}
return {browserName: browserName, fullVersion:fullVersion};
}
function get_gpa_param(){
var param_helpid = getParameterByName('helpid');
var param_tag = getParameterByName('tag');
var param_search = getParameterByName('search');
var param;
if(param_helpid ||param_tag ||param_search){
if(param_helpid){
param = param_helpid;
$('.search_result_category').text("HelpId");
}else if(param_tag){
param = param_tag;
$('.search_result_category').text("Tag");
}else{
param = param_search;
$('.search_result_category').text("Content");
}
}else{
return null;
}
var html = '<p style="color:red"> Please input valid JWT TOKEN IN HOME PAGE.</p>';
try {
if(param_helpid){
NexusConnectSDK.showSelfHelpForId(param, document.getElementById('content'));
}else if(param_tag) {
NexusConnectSDK.showSelfHelpForTags([param], document.getElementById('content'));
}else{
NexusConnectSDK.showSelfHelpForSearch(param, document.getElementById('content'));
}
}catch(e){
console.log(e);
$("#jwt_token_error").append(html);
}
console.log('param',param);
return param;
}
$(document).ready(function() {
var token = initialize();
var param = get_gpa_param();
if(param) {
$('.search_result').text(param);
}
var live_support_button_clicked = false;
$('#live_support_button').click(function () {
token = initialize();
if(!live_support_button_clicked){
var fname = "John";
var lname = "Doe";
var email = '[email protected]';
var phone = Math.floor(Math.random()*10000000000);
var externalId = Math.floor((Math.random() * 10000));
NexusConnectSDK.setEmail(email).setFirstName(fname).setLastName(lname).setPhone(phone).setExternalId(externalId);
NexusConnectSDK.showLiveHelp(document.getElementById('container_for_live_support'),{'phone':'(408)-830-7906', 'skill':'Sales'});
NexusConnectSDK.logContent("GPA");
$('.modal').show();
// $('#live_support_button').css("color","grey");
live_support_button_clicked = true;
}else{
$('.modal').hide();
// $('#live_support_button').css("color","orange");
live_support_button_clicked = false;
}
});
jQuery('#live-search').submit(function(event) {
event.preventDefault();
var input = $('.name').val();
if(input) {
window.location = "gpa.html?search=" + input;
NexusConnectSDK.logContent("breadcrumb");
// console.log('param',input);
NexusConnectSDK.logAction(input);
}
});
$('.draggable' ).draggable({
});
$('#close_live_help').click(function(){
$('.modal').hide();
// $('#live_support_button').css("color","orange");
live_support_button_clicked = false;
});
});
$('.exitHelp').click(function(e) {
console.log('sdk',NexusConnectSDK.isLiveHelpActive());
if(NexusConnectSDK.isLiveHelpActive()){
NexusConnectSDK.exitHelp();
}
});
</script>
</body>
</html>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
Page Caching using disk: enhanced (Requested URI contains query)
Database Caching 13/51 queries in 0.017 seconds using disk
Object Caching 2443/2572 objects using disk
Content Delivery Network via Amazon Web Services: CloudFront: dr57u1lgwukd1.cloudfront.net
Served from: demo.herothemes.com @ 2015-09-29 22:16:14 by W3 Total Cache -->