summaryrefslogtreecommitdiffstats
path: root/scripts/rpmphp.js
blob: 789898602d835d6073eeefe7daa3477be879b868 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
function initZoomJS(name)
{
	$('#pkgdb-link').remove();
	$.ajax({
		url: 'pkgdb-ajax.php?name=' + name,
		success: function(data) {
			if ( data.error ) {
				alert(data.error);
			} else {
				$('#' + name + '_desc').empty().text(data.devel.package.description);
				$.each(
					data,
					function(k, v){
						_data = data[k];
						if ( k === 'devel' ) {
							k = 'rawhide';
						}
						_owner_cell = $('#pkgdb_' + k + '_owner');
						if ( _owner_cell ) {
							_owner_cell.empty().text(_data.owner);
							_maintainers_cell = $('#pkgdb_' + k + '_maintainers');
							_maintainers = '';
							if ( _data.people != null ) {
								$.each(
									_data.people,
									function(){
										_maintainers += this.username + ', ';
									}
								)
							}
							_maintainers_cell.empty().text(_maintainers.slice(0, -2));
						}
					}
				);
			}
		}
	});
}