Subversion Repositories SmartDukaan

Rev

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

Rev 20673 Rev 20713
Line 452... Line 452...
452
                window.location = redirect_url;
452
                window.location = redirect_url;
453
            }
453
            }
454
            });
454
            });
455
    });
455
    });
456
    
456
    
-
 
457
    var clickActionTimeout = null;
-
 
458
	function clearClickActionTimeout() {
-
 
459
	  if(clickActionTimeout) {
-
 
460
	    clearTimeout(clickActionTimeout);
-
 
461
	    clickActionTimeout = null;
-
 
462
	  }
-
 
463
	}
-
 
464
    
457
    $(document).on('click','.viewproduct',function(e){
465
    $(document).on('click','.viewproduct',function(e){
-
 
466
    e.preventDefault();
-
 
467
  	clearClickActionTimeout();
-
 
468
  	clickActionTimeout = setTimeout(function() {
458
		localStorage.pages = $('div.scrollselector').html();
469
    localStorage.pages = $('div.scrollselector').html();
459
		setCookie('fresh', "0", .1, true);
470
		setCookie('fresh', "0", .1, true);
460
        var proid = $(this).data("proid");
471
        var proid = $(this).data("proid");
461
        var identifier = $(this).data("identifier");
472
        var identifier = $(this).data("identifier");
462
        
473
        
463
        if(typeof livePriceCalls != undefined) {
474
        if(typeof livePriceCalls != undefined) {
Line 543... Line 554...
543
        properties.sku = String($(this).data('id'));
554
        properties.sku = String($(this).data('id'));
544
        properties.source = String($(this).data('source'));
555
        properties.source = String($(this).data('source'));
545
        properties.url = encodeURIComponent($(this).data('url'));
556
        properties.url = encodeURIComponent($(this).data('url'));
546
        properties.price = String($(this).data('price'));
557
        properties.price = String($(this).data('price'));
547
        pma.send('products','url','click',me,properties);
558
        pma.send('products','url','click',me,properties);
-
 
559
  		}, 200);
548
    });
560
    });
549
    $(document).on('click','.likeit',function(e){   
561
    $(document).on('click','.likeit',function(e){   
550
        var that = $(this);
562
        var that = $(this);
551
        if($(that).find('span.likedeal').hasClass('active')){
563
        if($(that).find('span.likedeal').hasClass('active')){
552
            //User has already liked it,so remove like
564
            //User has already liked it,so remove like