summaryrefslogtreecommitdiffstats
path: root/scripts/rpmphp.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rpmphp.js')
-rw-r--r--scripts/rpmphp.js38
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