Subversion Repositories SmartDukaan

Rev

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

Rev 26744 Rev 27047
Line 15... Line 15...
15
 
15
 
16
	$(".compare-with").live('click', function() {
16
	$(".compare-with").live('click', function() {
17
		$("#compareItem").show();
17
		$("#compareItem").show();
18
	});
18
	});
19
 
19
 
-
 
20
	catalogIds = [1021975, 1022020];
20
	$(".product-compare-info").live('click',function() {
21
	$(".product-compare-info").live('click',function() {
21
		catalogIds = [1021975, 1022020];
22
		changedIndex = $(this).closest('th').index()-1;
22
		if(typeof compareCatalogId!="undefined") {
23
		if(typeof compareCatalogId!="undefined") {
-
 
24
			//always push to last
-
 
25
			if(changedIndex==-2) {
23
			catalogIds.push(compareCatalogId);
26
				catalogIds[2] = compareCatalogId;
-
 
27
			} else {
-
 
28
				catalogIds[changedIndex] = compareCatalogId;
-
 
29
			}
24
		}
30
		}
25
		doAjaxRequestHandler(`${context}/getProductCompareInfo?catalogIds=` + catalogIds.join(","), "GET", 
31
		doAjaxRequestHandler(`${context}/getProductCompareInfo?catalogIds=` + catalogIds.join(","), "GET", 
26
		function(response) {
32
		function(response) {
27
			console.log(response)
33
			console.log(response)
28
			$('#' + "main-content").html(response);
34
			$('#' + "main-content").html(response);