Subversion Repositories SmartDukaan

Rev

Rev 18135 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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