summaryrefslogtreecommitdiffstats
path: root/scripts/rpmphp.js
diff options
context:
space:
mode:
authorJohan "Papa" Cwiklinski <trasher@odysseus.(none)>2010-05-29 17:22:42 +0200
committerJohan "Papa" Cwiklinski <trasher@odysseus.(none)>2010-05-29 17:22:42 +0200
commit8aa3adeb74d3aba8f7cd9498870cd63d87aefd75 (patch)
tree6ef3a1b764d54008172c65dcc3d020dffab04653 /scripts/rpmphp.js
parentafcf0d9d405ce6cabeedbc1352fb651ef8eb47e7 (diff)
Use of ajax to load additionnal informations from pkgdb ; closes #45
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