diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-05-30 08:40:54 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-05-30 08:40:54 +0200 |
commit | b2955d2b93937913334580dfad856e7b5c18c613 (patch) | |
tree | f788f81c482ba4c8aa9564a7d17c575c5f809ff5 /scripts/rpmphp.js | |
parent | 2c61a7ac0a3cfc86f74031ba6ec41ea81d4a8fcc (diff) | |
parent | caa9d9178232885b7e02aab8be94e01e438cc1d7 (diff) |
Merge branch 'master' of http://github.com/trasher/rpmphp
Diffstat (limited to 'scripts/rpmphp.js')
-rw-r--r-- | scripts/rpmphp.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/rpmphp.js b/scripts/rpmphp.js new file mode 100644 index 0000000..7898986 --- /dev/null +++ b/scripts/rpmphp.js @@ -0,0 +1,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)); + } + } + ); + } + } + }); +}
\ No newline at end of file |