Fixes bug reported by Adam in internal discussion.

Ticket #326

Pavel
>From 4ca5f618913d780e018e37e03b159201bffb9996 Mon Sep 17 00:00:00 2001
From: Pavel Zuna <pz...@redhat.com>
Date: Wed, 6 Oct 2010 12:01:02 -0400
Subject: [PATCH] Fix attribute callbacks on details pages in the webUI.

Ticket #326
---
 install/static/details.js |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/install/static/details.js b/install/static/details.js
index f16dc36..99666b1 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -79,19 +79,23 @@ function ipa_generate_dl(jobj, id, name, dts)
 
     for (var i = 0; i < dts.length; ++i) {
         var label = '';
-        if (dts[i][0].indexOf('call_') != 0) {
-            var param_info = ipa_get_param_info(obj_name, dts[i][0]);
-            if (param_info)
-                label = param_info['label'];
-        }
+        var param_info = ipa_get_param_info(obj_name, dts[i][0]);
+        if (param_info)
+            label = param_info['label'];
         if ((!label) && (dts[i].length > 1))
             label = dts[i][1];
+
+        var title = dts[i][0];
+        if (typeof dts[i][2] == 'function')
+            title = 'call_' + dts[i][2].name;
         dl.append(
-            $('<dt/>',{
-                title:dts[i][0],
-                html:label+":"})
+            $('<dt></dt>', {
+                title: title,
+                html: label + ':',
+            })
         );
     }
+
     parent.append(dl);
     parent.append('<hr/>');
 }
-- 
1.7.1.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to