Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12694 anikendra 1
 
2
<?php
3
 if($stylesheet != 'authorize.css'){
4
//print_r($data);
5
$route = $this -> router -> fetch_module();
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
 <div class="welcome-popup" ></div>
34
       <div class="popup">
35
            <img src="<?php echo base_url().'assets/images/logo.PNG'; ?>" alt="saholic"/>
36
            <p>Try our new mobile site</p>
37
            <div class="btn m-btn" onclick="removePopup(event);ga('send', 'event', 'MobileSite', 'Popup', '<?php echo uri_string();?>');">continue</div>
38
            <a onClick="ga('send', 'event', 'Outbound', 'Popup', '<?php echo uri_string();?>');" class="desktop-link" href="http://www.saholic.com/<?php echo uri_string();?>/?fullbrowser=true&utm_source=mobile_site">Go to Desktop Site</a>
39
        </div>
40
-->
41
			</div><!--container-->
42
		<script src="<?=base_url()?>assets/js/common.js?version=<?=$this->config->item('cdn_version');?>" type="text/javascript"></script>	
43
  		<script src='<?=base_url().$this->config->item('current_client')?>/js/search_bar.js?version=<?=$this->config->item('cdn_version');?>' type="text/javascript"></script>
44
  		<?php 
45
			$userAgent = $_SERVER['HTTP_USER_AGENT'];
46
			if (strripos($userAgent,'Opera') == 0) {?>
47
				<script pagespeed_no_defer="" data-pace-options='{ "startOnPageLoad": false }' src='<?=base_url()?>assets/js/pace.js' type="text/javascript"></script>
48
		<?php } ?>
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);
53
 
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
 
189
              point = e.touches[0];
190
 
191
              pointStartX = point.pageX;
192
 
193
              pointStartY = point.pageY; null;
194
 
195
            },
196
 
197
            onBeforeScrollMove : function(e) {
198
 
199
 
200
              point = e.touches[0];
201
 
202
              //alert("onBeforeScrollMove");
203
 
204
              deltaX = Math.abs(point.pageX - pointStartX);
205
 
206
              deltaY = Math.abs(point.pageY - pointStartY);
207
 
208
              if (deltaX >= deltaY) {
209
                e.preventDefault();
210
 
211
                // alert("horizontal");
212
 
213
              } else {
214
 
215
                //alert("vertical");
216
 
217
                null;
218
 
219
              }
220
 
221
            }
222
          });
223
        setTimeout(function() {
224
 
225
          for ( i = 0; i < len; i++) {
226
 
227
            scroller[i].refresh();
228
 
229
          }
230
 
231
        }, 100);
232
        }
233
 
234
      }
235
       }else {
236
 
237
      var a = document.getElementsByClassName('rec-hldr');
238
 
239
       for (var i = 0; i < a.length; i++) {
240
 
241
        a[i].style.overflowX = 'auto';
242
 
243
        a[i].style.webkitOverflowScrolling = 'touch';
244
 
245
      }
246
 
247
    }
248
 
249
    }else if (iOS) {
250
 
251
    if (navigator.userAgent.match(/(iPad|iPhone|iPod|iPod touch);.*CPU.*OS (6|7)_\d/i) ? true : false) {
252
 
253
     var a = document.getElementsByClassName('rec-hldr');
254
      for (var i = 0; i < a.length; i++) {
255
        a[i].style.overflowX = 'auto';
256
        a[i].style.overflowY = 'hidden';
257
        a[i].style.webkitOverflowScrolling = 'touch';
258
      }
259
 
260
    }else{
261
       var script = document.createElement("script");
262
      script.type = "text/javascript";
263
      script.src = base_url+'assets/js/iscroll.js'
264
      document.body.appendChild(script);
265
      script.onload = function() {
266
        var point, pointStartX, pointStartY, deltaX, deltaY;
267
        var i, scroller = [], len = document.getElementsByClassName('rec-wrapper').length;
268
        var scrollerArray = document.getElementsByClassName('rec-wrapper');
269
          //var length = scrollerArray[i].children.length;
270
          scroller[i] = new iScroll(swipe_1, {
271
            bounce : true,
272
            momentum : true,
273
            //hScroll: true,
274
            vScroll : false,
275
            hScrollbar : false,
276
            vScrollbar : false,
277
            snap : true,
278
            onBeforeScrollStart : function(e) {
279
              point = e.touches;
280
              pointStartX = point.pageX;
281
              pointStartY = point.pageY; null;
282
            },
283
            onBeforeScrollMove : function(e) {
284
              point = e.touches;
285
              //alert("onBeforeScrollMove");
286
              deltaX = Math.abs(point.pageX - pointStartX);
287
              deltaY = Math.abs(point.pageY - pointStartY);
288
              if (deltaX >= deltaY) {
289
                e.preventDefault();
290
                // alert("horizontal");
291
              } else {
292
                //alert("vertical");
293
                null;
294
              }
295
            }
296
          });
297
    }
298
    }
299
    }else if (ua.indexOf("BlackBerry") >= 0 || ua.indexOf("BB10") >= 0) {
300
    var a = document.getElementsByClassName('rec-hldr');
301
    for (var i = 0; i < a.length; i++) {
302
      a[i].style.overflowX = 'auto';
303
      a[i].style.webkitOverflowScrolling = 'touch';
304
    }
305
  }
306
</script>
307
<?php } ?>
308
  </body>
309
</html>
310
 
311
 
312
<!-- <p>Page rendered in <strong>{elapsed_time}</strong> seconds</p> -->