| 18148 |
manas |
1 |
<!DOCTYPE html>
|
| 18135 |
manas |
2 |
<html>
|
| 18148 |
manas |
3 |
<head>
|
| 18151 |
manas |
4 |
<script type="text/javascript" src="<?php echo $base_url;?>js/jquery-1.10.2.js"></script>
|
| 18148 |
manas |
5 |
<title>Profitmandi</title>
|
|
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
|
|
|
7 |
<body>
|
|
|
8 |
<input type="hidden" value='<?php echo $intentToSend;?>' id="intent" />
|
|
|
9 |
</body>
|
|
|
10 |
</head>
|
| 18151 |
manas |
11 |
|
| 18148 |
manas |
12 |
</html>
|
|
|
13 |
|
|
|
14 |
<script type="text/javascript">
|
| 18151 |
manas |
15 |
$( document ).ready(function (){
|
|
|
16 |
$(document).on('click','.ok',function(){
|
|
|
17 |
$('.modalWindow').hide();
|
|
|
18 |
window.location=document.getElementById('intent').value;
|
|
|
19 |
});
|
|
|
20 |
});
|
|
|
21 |
|
| 18148 |
manas |
22 |
var overlayElement = null;
|
|
|
23 |
var modalWindowElement = null;
|
|
|
24 |
|
|
|
25 |
var isTouchSupported = 'ontouchstart' in window.document;
|
|
|
26 |
var startEvent = isTouchSupported ? 'touchstart' : 'mousedown';
|
|
|
27 |
var moveEvent = isTouchSupported ? 'touchmove' : 'mousemove';
|
|
|
28 |
var endEvent = isTouchSupported ? 'touchend' : 'mouseup';
|
|
|
29 |
|
|
|
30 |
//when window loads
|
|
|
31 |
window.addEventListener('load', initialize, false);
|
|
|
32 |
function initialize() {
|
|
|
33 |
showPopUpMessage(createPopUpHeader("Welcome to Profitmandi"),createPopUpContent("This message has expired. The deals might have changed."),250,175);
|
|
|
34 |
}
|
| 18151 |
manas |
35 |
|
| 18148 |
manas |
36 |
function createPopUpHeader(title){
|
|
|
37 |
modalWindowHeader = document.createElement("div");
|
|
|
38 |
modalWindowHeader.className = "modalWindowHeader";
|
|
|
39 |
modalWindowHeader.innerHTML = "<p>" + title + "</p>";
|
|
|
40 |
return modalWindowHeader;
|
|
|
41 |
}
|
|
|
42 |
function createPopUpContent(msg){
|
|
|
43 |
modalWindowContent = document.createElement("div");
|
|
|
44 |
modalWindowContent.className = "modalWindowContent";
|
|
|
45 |
modalWindowContent.innerHTML = "<p style='text-align:center; margin-top:10px;'>" + msg + "</p>";
|
|
|
46 |
okBtn = document.createElement("div");
|
|
|
47 |
okBtn.className = "redBtn okBtn";
|
| 18151 |
manas |
48 |
okBtn.innerHTML = "<p class='ok' style='text-align:center;'>OK</p>";
|
| 18148 |
manas |
49 |
okBtn.addEventListener(endEvent,function(){ hidePopUpMessage(); },false);
|
|
|
50 |
modalWindowContent.appendChild(okBtn);
|
|
|
51 |
return modalWindowContent;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
function showPopUpMessage(modalWindowHeader,modalWindowContent,width,height) {
|
|
|
55 |
overlayElement = document.createElement("div");
|
|
|
56 |
overlayElement.className = 'modalOverlay';
|
|
|
57 |
modalWindowElement = document.createElement("div");
|
|
|
58 |
modalWindowElement.className = 'modalWindow';
|
|
|
59 |
modalWindowElement.style.width = width + "px";
|
|
|
60 |
modalWindowElement.style.height = height + "px";
|
|
|
61 |
modalWindowElement.style.left = (window.innerWidth - width) / 2 + "px";
|
|
|
62 |
modalWindowElement.style.top = (window.innerHeight - height) / 2 + "px";
|
|
|
63 |
modalWindowElement.appendChild(modalWindowHeader);
|
|
|
64 |
modalWindowElement.appendChild(modalWindowContent);
|
|
|
65 |
document.body.appendChild(overlayElement);
|
|
|
66 |
document.body.appendChild(modalWindowElement);
|
|
|
67 |
setTimeout(function() {
|
|
|
68 |
modalWindowElement.style.opacity = 1;
|
|
|
69 |
overlayElement.style.opacity = 0.4;
|
|
|
70 |
overlayElement.addEventListener(endEvent, hidePopUpMessage, false);
|
|
|
71 |
}, 300);
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
function hidePopUpMessage() {
|
|
|
75 |
modalWindowElement.style.opacity = 0;
|
|
|
76 |
overlayElement.style.opacity = 0;
|
|
|
77 |
overlayElement.removeEventListener(endEvent, hidePopUpMessage, false);
|
|
|
78 |
setTimeout(function() {
|
|
|
79 |
document.body.removeChild(overlayElement);
|
|
|
80 |
document.body.removeChild(modalWindowElement);
|
|
|
81 |
}, 400);
|
| 18151 |
manas |
82 |
//window.location=document.getElementById('intent').value;
|
| 18148 |
manas |
83 |
}
|
|
|
84 |
|
|
|
85 |
</script>
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
<style type="text/css">
|
|
|
89 |
*
|
|
|
90 |
{
|
|
|
91 |
margin:0;
|
|
|
92 |
padding:0;
|
|
|
93 |
}
|
|
|
94 |
html,body
|
|
|
95 |
{
|
|
|
96 |
margin:0;
|
|
|
97 |
padding:0;
|
|
|
98 |
font-family:Helvetica;
|
|
|
99 |
font-size:14px;
|
|
|
100 |
background:#FFFFFF;
|
|
|
101 |
color:#222;
|
|
|
102 |
width:100%;
|
|
|
103 |
height:100%;
|
|
|
104 |
}
|
|
|
105 |
#wrapper
|
|
|
106 |
{
|
|
|
107 |
width:100%;
|
|
|
108 |
height:100%;
|
|
|
109 |
overflow:hidden;
|
|
|
110 |
position:relative;
|
|
|
111 |
}
|
|
|
112 |
.pageHeader
|
|
|
113 |
{
|
|
|
114 |
width:100%;
|
|
|
115 |
line-height:40px;
|
|
|
116 |
padding-top:3px;
|
|
|
117 |
color: #fff;
|
|
|
118 |
display: block;
|
|
|
119 |
overflow:hidden;
|
|
|
120 |
font-size: 16px;
|
|
|
121 |
font-weight: bold;
|
|
|
122 |
text-align: center;
|
|
|
123 |
margin-bottom:0px;
|
|
|
124 |
border-bottom:1px solid #999999;
|
|
|
125 |
background-color:#354F6E;
|
|
|
126 |
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8a8a8a), color-stop(2%, #6a6a6a), color-stop(100%, #151515));
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
.content
|
|
|
130 |
{
|
|
|
131 |
padding:10px;
|
|
|
132 |
text-align:center;
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
.redBtn
|
|
|
136 |
{
|
|
|
137 |
-webkit-border-radius:4px;
|
|
|
138 |
padding:10px;
|
|
|
139 |
text-align:center;
|
|
|
140 |
color:#fff;
|
|
|
141 |
font-size:14px;
|
|
|
142 |
font-weight:bold;
|
|
|
143 |
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #58d936), color-stop(2%, #58d936), color-stop(100%, #58d936));
|
|
|
144 |
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
|
|
145 |
|
|
|
146 |
}
|
|
|
147 |
.okBtn
|
|
|
148 |
{
|
|
|
149 |
width:80px;
|
|
|
150 |
padding:10px;
|
|
|
151 |
position:absolute;
|
|
|
152 |
left:77px;
|
|
|
153 |
bottom:10px;
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
/* modal window*/
|
|
|
157 |
.modalOverlay
|
|
|
158 |
{
|
|
|
159 |
width:100%;
|
|
|
160 |
height:100%;
|
|
|
161 |
position:absolute;
|
|
|
162 |
top:0;
|
|
|
163 |
left:0;
|
|
|
164 |
margin:0;
|
|
|
165 |
padding:0;
|
|
|
166 |
background:#000;
|
|
|
167 |
opacity:0;
|
|
|
168 |
-webkit-transition: opacity 0.3s ease-in;
|
|
|
169 |
z-index:101;
|
|
|
170 |
}
|
|
|
171 |
.modalWindow
|
|
|
172 |
{
|
|
|
173 |
position:fixed;
|
|
|
174 |
margin:0;
|
|
|
175 |
text-align:center;
|
|
|
176 |
word-spacing:2px;
|
|
|
177 |
line-height:15px;
|
|
|
178 |
font-weight:bold;
|
|
|
179 |
font-size:13px;
|
|
|
180 |
color:#58d936;
|
|
|
181 |
opacity:0;
|
|
|
182 |
z-index:102;
|
|
|
183 |
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #FFFFFF), color-stop(2%, #FFFFFF), color-stop(100%, #FFFFFF));
|
|
|
184 |
-webkit-border-radius:2px;
|
|
|
185 |
-webkit-box-shadow:-1px 2px 12px rgba(0, 0, 0, 0.91);
|
|
|
186 |
-webkit-transition: opacity 0.2s ease-in;
|
|
|
187 |
}
|
|
|
188 |
.modalWindowHeader
|
|
|
189 |
{
|
|
|
190 |
width:100%;
|
|
|
191 |
line-height:45px;
|
|
|
192 |
/*height:62px;*/
|
|
|
193 |
padding-top:3px;
|
|
|
194 |
color: #fff;
|
|
|
195 |
display: block;
|
|
|
196 |
overflow:hidden;
|
|
|
197 |
font-size: 16px;
|
|
|
198 |
font-weight: bold;
|
|
|
199 |
text-align: center;
|
|
|
200 |
margin-bottom:0px;
|
|
|
201 |
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #58d936), color-stop(2%, #58d936), color-stop(100%, #58d936));
|
|
|
202 |
}
|
|
|
203 |
.modalWindowContent
|
|
|
204 |
{
|
|
|
205 |
padding:10px;
|
|
|
206 |
color: #000;
|
|
|
207 |
display: block;
|
|
|
208 |
overflow:hidden;
|
|
|
209 |
font-size: 14px;
|
|
|
210 |
font-weight: bold;
|
|
|
211 |
line-height:20px;
|
|
|
212 |
}
|
|
|
213 |
</style>
|