Subversion Repositories SmartDukaan

Rev

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

Rev 5401 Rev 5507
Line 19... Line 19...
19
				var data = eval('(' + dataString + ')');
19
				var data = eval('(' + dataString + ')');
20
				//console.log(dataString, data);
20
				//console.log(dataString, data);
21
				
21
				
22
				$.each(data, function(entityId, sourceData){
22
				$.each(data, function(entityId, sourceData){
23
					//console.log(entityId, sourceData);
23
					//console.log(entityId, sourceData);
-
 
24
					var tr = $('#' + entityId);
24
					
25
					
25
					$.each(sourceData, function(source, productData){
26
					$.each(sourceData, function(source, productData){
26
						//console.log(source, productData);
27
						//console.log(source, productData);
27
						
28
						
28
						var tr = $('#' + entityId);
-
 
29
						var td = $(tr).children('td[source=' + source +']')[0];
29
						var td = $(tr).children('td[source=' + source +']')[0];
30
						var anchor = $(td).children('a')[0];
30
						var anchor = $(td).children('a')[0];
31
						//console.log(anchor);
31
						//console.log(anchor);
32
						
32
						
33
						$(anchor).attr('href', productData['product_url']);
33
						$(anchor).attr('href', productData['product_url']);
34
						$(anchor).html(productData['price']);
34
						$(anchor).html(productData['price']);
35
						
35
						
36
						$(td).children('span.url-feedback-link').addClass('url-saved');
36
						$(td).children('span.url-feedback-link').addClass('url-saved');
37
					});
37
					});
-
 
38
					markBestPrice(tr);
38
				});
39
				});
39
			}
40
			}
40
		});
41
		});
41
	}
42
	}
42
	
43