| Line 1... |
Line 1... |
| 1 |
<!DOCTYPE html>
|
1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
2 |
<html>
|
| 3 |
<head>
|
3 |
<head>
|
| - |
|
4 |
<script type="text/javascript" src="<?php echo $base_url;?>js/jquery-1.10.2.js"></script>
|
| 4 |
<title>Profitmandi</title>
|
5 |
<title>Profitmandi</title>
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
|
| 6 |
<body>
|
7 |
<body>
|
| 7 |
<input type="hidden" value='<?php echo $intentToSend;?>' id="intent" />
|
8 |
<input type="hidden" value='<?php echo $intentToSend;?>' id="intent" />
|
| 8 |
</body>
|
9 |
</body>
|
| 9 |
</head>
|
10 |
</head>
|
| - |
|
11 |
|
| 10 |
</html>
|
12 |
</html>
|
| 11 |
|
13 |
|
| 12 |
<script type="text/javascript">
|
14 |
<script type="text/javascript">
|
| - |
|
15 |
$( document ).ready(function (){
|
| - |
|
16 |
$(document).on('click','.ok',function(){
|
| - |
|
17 |
$('.modalWindow').hide();
|
| - |
|
18 |
window.location=document.getElementById('intent').value;
|
| - |
|
19 |
});
|
| - |
|
20 |
});
|
| - |
|
21 |
|
| 13 |
var overlayElement = null;
|
22 |
var overlayElement = null;
|
| 14 |
var modalWindowElement = null;
|
23 |
var modalWindowElement = null;
|
| 15 |
|
24 |
|
| 16 |
var isTouchSupported = 'ontouchstart' in window.document;
|
25 |
var isTouchSupported = 'ontouchstart' in window.document;
|
| 17 |
var startEvent = isTouchSupported ? 'touchstart' : 'mousedown';
|
26 |
var startEvent = isTouchSupported ? 'touchstart' : 'mousedown';
|
| Line 21... |
Line 30... |
| 21 |
//when window loads
|
30 |
//when window loads
|
| 22 |
window.addEventListener('load', initialize, false);
|
31 |
window.addEventListener('load', initialize, false);
|
| 23 |
function initialize() {
|
32 |
function initialize() {
|
| 24 |
showPopUpMessage(createPopUpHeader("Welcome to Profitmandi"),createPopUpContent("This message has expired. The deals might have changed."),250,175);
|
33 |
showPopUpMessage(createPopUpHeader("Welcome to Profitmandi"),createPopUpContent("This message has expired. The deals might have changed."),250,175);
|
| 25 |
}
|
34 |
}
|
| 26 |
|
- |
|
| 27 |
/*window.addEventListener("resize",handleResize,false); //resizing is useful only when popups are opened
|
- |
|
| 28 |
function handleResize(){
|
- |
|
| 29 |
if(modalWindowElement){
|
- |
|
| 30 |
modalWindowElement.style.left = (window.innerWidth - modalWindowElement.offsetWidth) / 2 + "px";
|
- |
|
| 31 |
modalWindowElement.style.top = (window.innerHeight - modalWindowElement.offsetHeight) / 2 + "px";
|
- |
|
| 32 |
}
|
35 |
|
| 33 |
}
|
- |
|
| 34 |
*/
|
- |
|
| 35 |
function createPopUpHeader(title){
|
36 |
function createPopUpHeader(title){
|
| 36 |
modalWindowHeader = document.createElement("div");
|
37 |
modalWindowHeader = document.createElement("div");
|
| 37 |
modalWindowHeader.className = "modalWindowHeader";
|
38 |
modalWindowHeader.className = "modalWindowHeader";
|
| 38 |
modalWindowHeader.innerHTML = "<p>" + title + "</p>";
|
39 |
modalWindowHeader.innerHTML = "<p>" + title + "</p>";
|
| 39 |
return modalWindowHeader;
|
40 |
return modalWindowHeader;
|
| Line 42... |
Line 43... |
| 42 |
modalWindowContent = document.createElement("div");
|
43 |
modalWindowContent = document.createElement("div");
|
| 43 |
modalWindowContent.className = "modalWindowContent";
|
44 |
modalWindowContent.className = "modalWindowContent";
|
| 44 |
modalWindowContent.innerHTML = "<p style='text-align:center; margin-top:10px;'>" + msg + "</p>";
|
45 |
modalWindowContent.innerHTML = "<p style='text-align:center; margin-top:10px;'>" + msg + "</p>";
|
| 45 |
okBtn = document.createElement("div");
|
46 |
okBtn = document.createElement("div");
|
| 46 |
okBtn.className = "redBtn okBtn";
|
47 |
okBtn.className = "redBtn okBtn";
|
| 47 |
okBtn.innerHTML = "<p style='text-align:center;'>OK</p>";
|
48 |
okBtn.innerHTML = "<p class='ok' style='text-align:center;'>OK</p>";
|
| 48 |
okBtn.addEventListener(endEvent,function(){ hidePopUpMessage(); },false);
|
49 |
okBtn.addEventListener(endEvent,function(){ hidePopUpMessage(); },false);
|
| 49 |
modalWindowContent.appendChild(okBtn);
|
50 |
modalWindowContent.appendChild(okBtn);
|
| 50 |
return modalWindowContent;
|
51 |
return modalWindowContent;
|
| 51 |
}
|
52 |
}
|
| 52 |
|
53 |
|
| Line 76... |
Line 77... |
| 76 |
overlayElement.removeEventListener(endEvent, hidePopUpMessage, false);
|
77 |
overlayElement.removeEventListener(endEvent, hidePopUpMessage, false);
|
| 77 |
setTimeout(function() {
|
78 |
setTimeout(function() {
|
| 78 |
document.body.removeChild(overlayElement);
|
79 |
document.body.removeChild(overlayElement);
|
| 79 |
document.body.removeChild(modalWindowElement);
|
80 |
document.body.removeChild(modalWindowElement);
|
| 80 |
}, 400);
|
81 |
}, 400);
|
| 81 |
window.location=document.getElementById('intent').value;
|
82 |
//window.location=document.getElementById('intent').value;
|
| 82 |
}
|
83 |
}
|
| 83 |
|
84 |
|
| 84 |
</script>
|
85 |
</script>
|
| 85 |
|
86 |
|
| 86 |
|
87 |
|