Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | 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
 
26
$(function(){	
27
	$('.expandRow').live('click', function(){
28
		endDate = $(this).parents("td").attr("dateVal");
29
		startDate = $(this).parents("td").attr("dateValNext");
30
		expanded = $(this).parents("td").attr("expanded");
31
		oneTime = $(this).parents("td").attr("oneTime");
32
		if (expanded=="1"){
33
			$(this).parents('tr').removeClass();
34
			$("td").css("background-color","");
35
			$('.'+endDate).hide();
36
			$(this).children('img').attr('src', '/Support/images/add_green_button.png');
37
			$(this).parents("td").attr('expanded', '0');
38
			return true;
39
		}
40
		if (oneTime=="1"){
41
			$(this).parents("tr").addClass("diffColor");
42
			$('.'+endDate).show();
43
			$('tr.diffColor').children('td').css('backgroundColor', '#7F98FA');
44
			$("td").css("background-color","");
45
			$(this).children('img').attr('src', '/Support/images/minus_green_button.png');
46
			$(this).parents("td").attr('expanded', '1');
47
			return true;
48
		}
49
		$("tr").removeClass("diffColor");
50
		$("td").css("background-color","");
51
		$(this).parents("tr").addClass("diffColor");
52
		var row = $(this).closest('tr');
53
		var itemId = $('.itemId').text();
54
		getDuplicateRecords(startDate,endDate,itemId,row);
55
		$(this).parents("td").attr('expanded', '1');
56
		$(this).parents("td").attr('oneTime', '1');
57
		$(this).children('img').attr('src', '/Support/images/minus_green_button.png');
58
	});
59
});
60
 
61
//$(function() {
62
//$( "#start_date" ).datepicker();
63
//$( "#end_date" ).datepicker();
64
 
65
////$("#search_item").live('click', function() {
66
////var catalogId = $('#catalog_id').val();
67
////var start_date= $('#start_date').val();
68
////var end_date= $('#end_date').val();
69
////loadSearchInfo("search-result", catalogId, start_date, end_date);
70
////});
71
//});