Subversion Repositories SmartDukaan

Rev

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

Rev 5738 Rev 6095
Line 28... Line 28...
28
						
28
						
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
						if(anchor != undefined) {						
33
						$(anchor).attr('href', productData['product_url']);
34
							$(anchor).attr('href', productData['product_url']);
34
						$(anchor).html(productData['price']);
35
							$(anchor).html(productData['price']);
-
 
36
						} else {
-
 
37
							try{
-
 
38
								$(td).html($(td).html().replace('Not Found', productData['price']));
-
 
39
							}catch(e) { 
-
 
40
								console.log(e);
-
 
41
							}
-
 
42
						}
35
						
43
						
36
						$(td).children('span.url-feedback-link').addClass('url-saved');
44
						$(td).children('span.url-feedback-link').addClass('url-saved');
37
					});
45
					});
38
					markBestPrice(tr);
46
					markBestPrice(tr);
39
				});
47
				});
Line 111... Line 119...
111
 		markBestPrice(this);
119
 		markBestPrice(this);
112
 		
120
 		
113
 		$(this).find('td').each(function(){
121
 		$(this).find('td').each(function(){
114
 			if($(this).hasClass('conflict'))	$(this).children('a').addClass('link-conflict');
122
 			if($(this).hasClass('conflict'))	$(this).children('a').addClass('link-conflict');
115
 			
123
 			
116
 			if(! $(this).hasClass('diff') && ! $(this).hasClass('name') && ! $(this).hasClass('saholic'))	{
124
 			if(! $(this).hasClass('diff') && ! $(this).hasClass('name') && ! $(this).hasClass('saholic') && ! $(this).hasClass('minPrice'))	{
117
 				$(this).append('<span class="reject-link" title="Click to reject the displayed figure">X</span>&nbsp;');
125
 				$(this).append('<span class="reject-link" title="Click to reject the displayed figure">X</span>&nbsp;');
118
 				$(this).append('<span class="url-feedback-link" title="Click to map a product page URL">U</span>');
126
 				$(this).append('<span class="url-feedback-link" title="Click to map a product page URL">U</span>');
119
 			}
127
 			}
120
 		});
128
 		});
121
	});
129
	});
Line 141... Line 149...
141
		});
149
		});
142
		var maxMinDiff = roundNumber((maxPrice - bestPrice) * 100 / maxPrice, 2);
150
		var maxMinDiff = roundNumber((maxPrice - bestPrice) * 100 / maxPrice, 2);
143
		
151
		
144
		$(tdBestPrice).addClass('best');
152
		$(tdBestPrice).addClass('best');
145
		
153
		
146
		if (bestPrice < saholicPrice)	$($(trNode).children()[0]).addClass('red');
-
 
147
		var tds = $(trNode).children()
154
		var tds = $(trNode).children()
-
 
155
		if (bestPrice < saholicPrice) {
-
 
156
			$($(trNode).children()[0]).addClass('red');
-
 
157
			tds[2].innerHTML = tdBestPrice.attr('source') + '<br/>' + bestPrice;
-
 
158
		} else {
-
 
159
			try{
-
 
160
				tds[2].innerHTML = "";
-
 
161
			} catch(err){
-
 
162
				console.log(err);
-
 
163
			}
-
 
164
		}
148
		
165
		
149
		if (tds.length == 9)	{
166
		if (tds.length == 10)	{
150
			tds[8].innerHTML = maxMinDiff + '%'
167
			tds[9].innerHTML = maxMinDiff + '%'
151
		} else	{var diffCssClass = '';
168
		} else	{var diffCssClass = '';
152
		
169
		
153
		if(maxMinDiff >= 25.0)	{
170
		if(maxMinDiff >= 25.0)	{
154
			diffCssClass = 'dark-orange';
171
			diffCssClass = 'dark-orange';
155
		} else if(maxMinDiff >= 10.0)	{
172
		} else if(maxMinDiff >= 10.0)	{