Subversion Repositories SmartDukaan

Rev

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

Rev 24595 Rev 24649
Line 570... Line 570...
570
			});
570
			});
571
}
571
}
572
$(".price_drop").live('click', function() {
572
$(".price_drop").live('click', function() {
573
	loadPriceDrop("main-content");
573
	loadPriceDrop("main-content");
574
});
574
});
575
var stopInterval;
-
 
576
$(document).ready(function(){
-
 
577
	
-
 
578
	 stopInterval = setInterval(showAttendanceModal, 10000);
-
 
579
	
-
 
580
});
-
 
581
function showAttendanceModal() {
-
 
582
	var today = new Date().getTime();
-
 
583
	if ($.cookie("punchIn") == undefined) {
-
 
584
		document.cookie = "punchIn=" + today;
-
 
585
	}
-
 
586
	if (today >= parseInt($.cookie("punchIn"))) {
-
 
587
		doGetAjaxRequestHandler(context + "/getPunchInOutForModel", function(
-
 
588
				response) {
-
 
589
		      if(response == 'true'){
-
 
590
		    	  $('#punchInOutModal').modal('hide');
-
 
591
		    	  clearInterval(stopInterval);
-
 
592
		    	  console.log("hide");
-
 
593
		      }else{
-
 
594
		    	  $("#punch-in-out-model").html(response);
-
 
595
					$('#punchInOutModal').modal('show');
-
 
596
					var time = today + 30 * 60 * 1000
-
 
597
					document.cookie = "punchIn=" + time; 
-
 
598
					console.log("show");
-
 
599
		      }
-
 
600
			
-
 
601
			 
-
 
602
 
-
 
603
		});	}
-
 
604
}
-
 
605
575