-
Notifications
You must be signed in to change notification settings - Fork 0
/
wl_uat_multisample.html
118 lines (98 loc) · 4.2 KB
/
wl_uat_multisample.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>UAT IFrame HOST</title>
<!-- For code sample syntax highlighting -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="claro">
<h2>Prefill Query Demo</h2>
Note: If you want this functionality on your site using iframe embed an ID on the iframe is required and some javascript.<br>
See the code at the bottom of this page.
<p>
<div id="prefill">
<!-- /// UAT New Tab. Copy from Here /// -->
<a href="http://qat.winwebconnect.com/api/v1/uat/whitelabel?awb=01614800601" target="_blank">Open Prefilled UAT Search in a new Browser Tab</a>
<!-- /// UAT New Tab. Copy to Here /// -->
</div>
<h2>Popup Option Demo</h2>
<div id="popup">
<!-- /// UAT Popup. Copy From Here /// -->
<script>
var UATpopup = null;
function popUpWINUAT() {
if (UATpopup == null || UATpopup.closed) {
UATpopup = window.open(
'http://qat.winwebconnect.com/api/v1/uat/whitelabel', 'WINUAT',
'resizable,status=0,toolbar=0,location=0,menubar=0,height=600,width=800');
}
if (window.focus) {
UATpopup.focus();
}
return false;
}
</script>
<a href="http://qat.winwebconnect.com/api/v1/uat/whitelabel" onclick="return popUpWINUAT()" target="WINUAT">
Open UAT Search in PopUp
</a>
<!-- /// UAT Popup. Copy to Here /// -->
</div>
<h2>New Tab Option Demo</h2>
<div id="newtab">
<!-- /// UAT New Tab. Copy from Here /// -->
<a href="http://qat.winwebconnect.com/api/v1/uat/whitelabel" target="_blank">Open UAT Search in a new Browser Tab</a>
<!-- /// UAT New Tab. Copy to Here /// -->
</div>
<h2>Custom CSS New Tab Option Demo</h2>
<div id="custom_css_newtab">
<!-- /// UAT New Tab. Copy from Here /// -->
<a href="http://qat.winwebconnect.com/api/v1/uat/whitelabel?css=http://qat.winwebconnect.com/src/win/test/widget/functional/wl_custom.css" target="_blank">Open Custom CSS enhanced UAT Search in a new Browser Tab</a>
<!-- /// UAT New Tab. Copy to Here /// -->
</div>
<h2>Customize Quotas and affiliates New Tab Option Demo</h2>
<div id="custom_quota_newtab">
<!-- /// UAT New Tab. Copy from Here /// -->
<a href="http://qat.winwebconnect.com/api/v1/uat/whitelabel?quota=5"aPeriod=1h&hostPartner=Lognet%20Global%20Network" target="_blank">Open in a new Browser Tab</a>
<!-- /// UAT New Tab. Copy to Here /// -->
</div>
<div id="iframehost">
<span>
<h2>IFrame Option Demo</h2>
This shows how to support linking directly to a query by simply appending
?awb=00108334970 to the host page URL.
<p>Try it: <a href=".?awb=00108334970">AWB 00108334970</a>
<p><b>Make sure that the iframe id matches the id used in document.getElementById.</b>
</span>
<div id="iframe_directlink_sample">
<!-- /// UAT IFrame. Copy from here /// -->
<!-- The id of the iframe MUST match the id used below to set url of the iframe -->
<iframe id="iframeWL" style="border: 0" height="600px" width="800px" src=""></iframe>
<script>
// This url should point to the environment that you are using, such as:
// "https://www.winwebconnect.com/api/v1/uat/whitelabel"
var baseurl = "http://qat.winwebconnect.com/api/v1/uat/whitelabel";
// Find the iframe by id, it MUST match what is set in the iframe element
// Set the URL the iframe should load
document.getElementById('iframeWL').src = baseurl + window.location.search;
</script>
<!-- /// UAT IFrame. Copy to Here /// -->
</div>
</div>
<script>
function htmlEscape(str) {
return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>').replace(/\//g, '/');
}
var gbid = document.getElementById.bind(document);
['prefill','popup','newtab','custom_css_newtab','custom_quota_newtab','iframe_directlink_sample'].forEach(function(codeCont) {
var newpre = document.createElement("pre"),
codeContEl = gbid(codeCont);
newpre.innerHTML = '<code id="'+codeCont+'_codeview" class="html">';
codeContEl.parentNode.insertBefore(newpre, codeContEl);
gbid(codeCont + '_codeview').innerHTML = htmlEscape(codeContEl.innerHTML);
});
</script>
</body>
</html>