Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function rating(votes){
	var html = '<table class="rating-table">' +
					'<tbody>' +
						'<tr>';
	var intvalue = Math.floor( votes );
	var intvalue = Math.ceil( votes ); 
	var intvalue = Math.round( votes );
	
	if (votes == 0){
		for (var i =0; i<5; i++){
			html += '<td><img class="'+ i + '" src="images/empty.png" /></td>';
		}
	} else {
	
		for (var i=0; i<intvalue; i++){	
			html += '<img class="'+ i + '" src="images/full.png" />';
		}
	
		if(votes % 1 !== 0){//is float
			html += '<img class="'+ i + '" src="images/semi.png" />';
		}
	}
	
	return html += '</tr></tbody></table>';
}

Commits for Nextrek/Web/Smartcharging_search/js/scripts.js

Diff revisions: vs.
Revision Author Commited Message
1035 Diff Diff LZicari picture LZicari Thu 17 Dec, 2015 11:50:10 +0000
1034 Diff Diff LZicari picture LZicari Thu 17 Dec, 2015 09:30:59 +0000
1033 LZicari picture LZicari Tue 15 Dec, 2015 17:48:58 +0000