Subversion Repositories SmartDukaan

Rev

Rev 11015 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11015 kshitij.so 1
$(function() {
2
	$(".showCompetitionAnalysis").live('click', function() {
3
		$("tr").removeClass("diffColor");
4
		$("td").css("background-color","");
5
		$(this).parents("tr").addClass("diffColor");
6
		$('tr.diffColor').children('td').css('backgroundColor', '#7F98FA');
7
	});
8
});
9
 
10
$(function(){	
11
	$(".next").live('click', function() {
12
		var start = $( ".valueStart" ).text();
13
		var end = $( ".valueEnd" ).text();
14
		var itemId = $('.itemId').text();
15
		getNextItems(start,end,itemId);
16
	});
17
	$(".previous").live('click', function() {
18
		var start = $( ".valueStart" ).text();
19
		var end = $( ".valueEnd" ).text();
20
		var pre = end - 20;
21
		var itemId = $('.itemId').text();
22
		getPreviousItems(start,end,pre,itemId);
23
	});
24
});
25
 
11110 kshitij.so 26
$(function(){
27
	$("#fetchLiveData").live('click', function() {
28
		var supc_code = $('.supcCode').text();
29
		showData(supc_code);
30
	});
31
});
32
 
33
$(function(){
34
	$("#closeDiv").live('click', function() {
35
		$('#hidden-data').hide();
36
	});
37
});
38
 
11015 kshitij.so 39
$(function(){	
40
	$('.expandRow').live('click', function(){
41
		endDate = $(this).parents("td").attr("dateVal");
42
		startDate = $(this).parents("td").attr("dateValNext");
43
		expanded = $(this).parents("td").attr("expanded");
44
		oneTime = $(this).parents("td").attr("oneTime");
45
		if (expanded=="1"){
46
			$(this).parents('tr').removeClass();
47
			$("td").css("background-color","");
48
			$('.'+endDate).hide();
49
			$(this).children('img').attr('src', '/Support/images/add_green_button.png');
50
			$(this).parents("td").attr('expanded', '0');
51
			return true;
52
		}
53
		if (oneTime=="1"){
54
			$(this).parents("tr").addClass("diffColor");
55
			$('.'+endDate).show();
56
			$('tr.diffColor').children('td').css('backgroundColor', '#7F98FA');
57
			$("td").css("background-color","");
58
			$(this).children('img').attr('src', '/Support/images/minus_green_button.png');
59
			$(this).parents("td").attr('expanded', '1');
60
			return true;
61
		}
62
		$("tr").removeClass("diffColor");
63
		$("td").css("background-color","");
64
		$(this).parents("tr").addClass("diffColor");
65
		var row = $(this).closest('tr');
66
		var itemId = $('.itemId').text();
67
		getDuplicateRecords(startDate,endDate,itemId,row);
68
		$(this).parents("td").attr('expanded', '1');
69
		$(this).parents("td").attr('oneTime', '1');
70
		$(this).children('img').attr('src', '/Support/images/minus_green_button.png');
71
	});
72
});
73
 
74
//$(function() {
75
//$( "#start_date" ).datepicker();
76
//$( "#end_date" ).datepicker();
77
 
78
////$("#search_item").live('click', function() {
79
////var catalogId = $('#catalog_id').val();
80
////var start_date= $('#start_date').val();
81
////var end_date= $('#end_date').val();
82
////loadSearchInfo("search-result", catalogId, start_date, end_date);
83
////});
84
//});