Subversion Repositories SmartDukaan

Rev

Rev 11785 | Rev 11805 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10582 lgm 1
 
2
<?php
3
 if($stylesheet != 'authorize.css'){
4
//print_r($data);
11732 lgm 5
$route = $this -> router -> fetch_module();
10582 lgm 6
$data = $response['footer'];
7
if(isset($data) and !empty($data))
8
{
9
foreach($data as $headkey=>$value)
10
{
11
	if(isset($value['render']) and !empty($value['render']))
12
	{
13
		unset($value['render']);
14
		if(isset($value) and !empty($value))
15
		$this->load->view($this->layoutName.$headkey,array($headkey=>$value));
16
	else
17
		$this->load->view($this->layoutName.$headkey);
18
	}
19
	else
20
		{ 
21
			if(isset($value) and !empty($value) and count($value)>1)
22
				{ echo 'data list here';}
23
		}
24
 
25
 
26
}
27
 
28
}
29
}
30
?>
31
 
32
<div class="mask" onclick="toggleOverlay(event)"></div>
11760 lgm 33
 <div class="welcome-popup" ></div>
34
       <div class="popup">
11789 lgm 35
            <img src="<?php echo base_url().'assets/images/logo.PNG'; ?>" alt="saholic"/>
11760 lgm 36
            <p>Try our new mobile site</p>
37
            <div class="btn m-btn" onclick="removePopup(event)">continue</div>
11782 anikendra 38
            <a onClick="_gaq.push(['_trackEvent', 'Outbound', 'Desktop', 'Popup link clicked']);" class="desktop-link" href="http://www.saholic.com/?fullbrowser=true&utm_source=mobile_site">Go to Desktop Site</a>
11760 lgm 39
        </div><!--popup-->
10582 lgm 40
 
41
			</div><!--container-->
42
		<script src="<?=base_url()?>assets/js/common.js?version=<?=$this->config->item('cdn_version');?>" type="text/javascript"></script>	
11521 lgm 43
  		<script src='<?=base_url().$this->config->item('current_client')?>/js/search_bar.js?version=<?=$this->config->item('cdn_version');?>' type="text/javascript"></script>
11717 lgm 44
  		<?php 
45
			$userAgent = $_SERVER['HTTP_USER_AGENT'];
46
			if (strripos($userAgent,'Opera') == 0) {?>
11785 anikendra 47
				<script pagespeed_no_defer="" data-pace-options='{ "startOnPageLoad": false }' src='<?=base_url()?>assets/js/pace.js' type="text/javascript"></script>
11717 lgm 48
		<?php } ?>
11731 lgm 49
<!--Start product detail js-->
50
<?php if(isset($route) && $route == 'productinfo'){?>
51
<script type="text/javascript">             
52
  var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1);
11724 anikendra 53
 
11731 lgm 54
    if(isOperaMini ){
55
     document.getElementById('view-more').style.display = 'block';
56
     document.getElementById('viewmore_1').style.display = 'block';
57
    }
58
    var len = document.getElementById('swipe_0').children[0].children.length;
59
    var len1 = document.getElementById('swipe_1').children[0].children.length;
60
  	var count = 1
61
  	function showAll(){
62
 
63
   	if(count == 1){
64
    	document.getElementById('view-more').innerHTML = 'Close';
65
    	document.getElementById('swipe_0').children[0].style.whiteSpace = 'inherit';
66
    	document.getElementById('swipe_0').children[0].style.display = 'block';
67
    	for(var i =0; i< len;i++){
68
     		document.getElementsByClassName('pd-image')[i].style.width = '100%';
69
    	}
70
    	count = 2; 
71
   	}else{
72
     	document.getElementById('view-more').innerHTML = 'View All';
73
     	document.getElementById('swipe_0').children[0].style.whiteSpace = 'nowrap';
74
    	document.getElementById('swipe_0').children[0].style.display = 'inline-block';
75
    	for(var i =0; i< len;i++){
76
     	document.getElementsByClassName('pd-image')[i].style.width = '';
77
    	}
78
    	count = 1;
79
   	} 
80
  }
81
 
82
  var count1 = 1
83
    function showAll1(){
84
      if(count1 ==1){
85
        document.getElementById('viewmore_1').innerHTML = 'Close';
86
        document.getElementById('swipe_1').children[0].style.whiteSpace = 'inherit';
87
        document.getElementById('swipe_1').children[0].style.display = 'block';
88
        for(var i =0; i< len1;i++){
89
         document.getElementsByClassName('rec-product')[i].style.width = '50%';
90
          if(i%2 == 0){
91
            document.getElementsByClassName('rec-product')[i].style.cssFloat = 'left';  
92
           }else{
93
            document.getElementsByClassName('rec-product')[i].style.cssFloat = 'right';
94
            document.getElementsByClassName('rec-product')[i].style.border = 'none';
95
          }
96
        }
97
        count1 = 2;    
98
      }else{
99
        document.getElementById('viewmore_1').innerHTML = 'View More';
100
        document.getElementById('swipe_1').children[0].style.whiteSpace = 'nowrap';
101
        document.getElementById('swipe_1').children[0].style.display = 'inline-block';
102
        for(var i =0; i< len1;i++){
103
         document.getElementsByClassName('rec-product')[i].style.width = '';
104
          if(i%2 == 0){
105
            document.getElementsByClassName('rec-product')[i].style.cssFloat = '';  
106
           }else{
107
            document.getElementsByClassName('rec-product')[i].style.cssFloat = '';
108
            document.getElementsByClassName('rec-product')[i].style.border = '';
109
          }
110
        }
111
        count1 = 1;
112
      }
113
 
114
  }  
115
  var isIE10 = false;
116
 
117
  /*@cc_on
118
 
119
   if (/^10/.test(@_jscript_version)) {
120
 
121
   isIE10 = true;
122
 
123
   }
124
 
125
   @*/
126
 
127
  var iOS = navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
128
 
129
  var ua = navigator.userAgent;
130
 
131
  var userAgent = navigator.userAgent.toLowerCase();
132
 
133
  if (isIE10) {
134
       var a = document.getElementsByClassName('rec-hldr');
135
 
136
          for (var i = 0; i < a.length; i++) {
137
 
138
            a[i].style.overflowX = 'auto';
139
 
140
          }
141
 
142
        }
143
 
144
        else if (ua.indexOf("Android") >= 0) {
145
 
146
          var androidversion = parseFloat(ua.slice(ua.indexOf("Android") + 8));
147
 
148
         if (androidversion < 3.0) {
149
 
150
       var script = document.createElement("script");
151
 
152
      script.type = "text/javascript";
153
 
154
      script.src = base_url+'assets/js/iscroll.js'
155
 
156
      document.body.appendChild(script);
157
 
158
      script.onload = function() {
159
 
160
        var point, pointStartX, pointStartY, deltaX, deltaY;
161
 
162
        var i, scroller = [], len = document.getElementsByClassName('rec-hldr').length;
163
 
164
        var scrollerArray = document.getElementsByClassName('rec-hldr');
165
 
166
           for ( i = 0; i < scrollerArray.length; i++) {     
167
 
168
          var length = scrollerArray[i].children.length;
169
 
170
          scroller[i] = new iScroll("swipe_"+ i, {
171
 
172
            bounce : true,
173
 
174
            momentum : true,
175
 
176
            //hScroll: true,
177
 
178
            vScroll : false,
179
 
180
            hScrollbar : false,
181
 
182
            vScrollbar : false,
183
 
184
            snap : true,
185
 
186
            onBeforeScrollStart : function(e) {
187
 
188
              console.log("onBeforeScrollStart");
189
 
190
              point = e.touches[0];
191
 
192
              pointStartX = point.pageX;
193
 
194
              pointStartY = point.pageY; null;
195
 
196
            },
197
 
198
            onBeforeScrollMove : function(e) {
199
 
200
              console.log(e);
201
 
202
              point = e.touches[0];
203
 
204
              //alert("onBeforeScrollMove");
205
 
206
              deltaX = Math.abs(point.pageX - pointStartX);
207
 
208
              deltaY = Math.abs(point.pageY - pointStartY);
209
 
210
              if (deltaX >= deltaY) {
211
                e.preventDefault();
212
 
213
                // alert("horizontal");
214
 
215
              } else {
216
 
217
                //alert("vertical");
218
 
219
                null;
220
 
221
              }
222
 
223
            }
224
          });
225
        setTimeout(function() {
226
 
227
          for ( i = 0; i < len; i++) {
228
 
229
            scroller[i].refresh();
230
 
231
          }
232
 
233
        }, 100);
234
        }
235
 
236
      }
237
       }else {
238
 
239
      var a = document.getElementsByClassName('rec-hldr');
240
 
241
       for (var i = 0; i < a.length; i++) {
242
 
243
        a[i].style.overflowX = 'auto';
244
 
245
        a[i].style.webkitOverflowScrolling = 'touch';
246
 
247
      }
248
 
249
    }
250
 
251
    }else if (iOS) {
252
 
253
    if (navigator.userAgent.match(/(iPad|iPhone|iPod|iPod touch);.*CPU.*OS (6|7)_\d/i) ? true : false) {
254
 
255
     var a = document.getElementsByClassName('rec-hldr');
256
      for (var i = 0; i < a.length; i++) {
257
        a[i].style.overflowX = 'auto';
258
        a[i].style.overflowY = 'hidden';
259
        a[i].style.webkitOverflowScrolling = 'touch';
260
      }
261
 
262
    }else{
263
       var script = document.createElement("script");
264
      script.type = "text/javascript";
265
      script.src = base_url+'assets/js/iscroll.js'
266
      document.body.appendChild(script);
267
      script.onload = function() {
268
        var point, pointStartX, pointStartY, deltaX, deltaY;
269
        var i, scroller = [], len = document.getElementsByClassName('rec-wrapper').length;
270
        var scrollerArray = document.getElementsByClassName('rec-wrapper');
271
          //var length = scrollerArray[i].children.length;
272
          scroller[i] = new iScroll(swipe_1, {
273
            bounce : true,
274
            momentum : true,
275
            //hScroll: true,
276
            vScroll : false,
277
            hScrollbar : false,
278
            vScrollbar : false,
279
            snap : true,
280
            onBeforeScrollStart : function(e) {
281
              console.log("onBeforeScrollStart");
282
              point = e.touches;
283
              pointStartX = point.pageX;
284
              pointStartY = point.pageY; null;
285
            },
286
            onBeforeScrollMove : function(e) {
287
              console.log(e);
288
              point = e.touches;
289
              //alert("onBeforeScrollMove");
290
              deltaX = Math.abs(point.pageX - pointStartX);
291
              deltaY = Math.abs(point.pageY - pointStartY);
292
              if (deltaX >= deltaY) {
293
                e.preventDefault();
294
                // alert("horizontal");
295
              } else {
296
                //alert("vertical");
297
                null;
298
              }
299
            }
300
          });
301
    }
302
    }
303
    }else if (ua.indexOf("BlackBerry") >= 0 || ua.indexOf("BB10") >= 0) {
304
    var a = document.getElementsByClassName('rec-hldr');
305
    for (var i = 0; i < a.length; i++) {
306
      a[i].style.overflowX = 'auto';
307
      a[i].style.webkitOverflowScrolling = 'touch';
308
    }
309
  }
310
</script>
311
<?php } ?>
312
<!--End product detail js-->
11752 lgm 313
<script>
314
 
315
    if(getCOOKIE('flag') == 1){
316
        document.getElementsByClassName('welcome-popup')[0].style.display = 'none';
317
        document.getElementsByClassName('popup')[0].style.display = 'none';
318
 
319
      }else{
320
        document.getElementsByClassName('welcome-popup')[0].style.display = 'block';
321
        document.getElementsByClassName('popup')[0].style.display = 'block';
322
        document.getElementsByClassName("welcome-popup")[0].style.minHeight = document.getElementsByTagName('body')[0].clientHeight + "px";
323
      }
324
 </script>
11724 anikendra 325
<!-- Start Alexa Certify Javascript -->
326
<script type="text/javascript">
327
_atrk_opts = { atrk_acct:"N82Fj1agtu00gJ", domain:"saholic.com",dynamic: true};
328
(function() { var as = document.createElement('script'); as.type = 'text/javascript'; as.async = true; as.src = "https://d31qbv1cthcecs.cloudfront.net/atrk.js"; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(as, s); })();
329
</script>
330
<noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=N82Fj1agtu00gJ" style="display:none" height="1" width="1" alt="" /></noscript>
331
<!-- End Alexa Certify Javascript -->
10582 lgm 332
  </body>
333
</html>
334
 
335
 
11724 anikendra 336
<!-- <p>Page rendered in <strong>{elapsed_time}</strong> seconds</p> -->