Subversion Repositories SmartDukaan

Rev

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