summaryrefslogtreecommitdiffstats
path: root/install/static/group.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-10-01 12:53:13 -0500
committerAdam Young <ayoung@redhat.com>2010-10-01 16:17:51 -0400
commitaa7ecb6f5ff234fa9001bbea3ebe2e5360656139 (patch)
tree8c9957db5803b46daefe12c2889a470f2f83f564 /install/static/group.js
parent38490d35d3b8410a8077fb035b57cea86dd3bdab (diff)
downloadfreeipa-aa7ecb6f5ff234fa9001bbea3ebe2e5360656139.tar.gz
freeipa-aa7ecb6f5ff234fa9001bbea3ebe2e5360656139.tar.xz
freeipa-aa7ecb6f5ff234fa9001bbea3ebe2e5360656139.zip
Autogenerating Quick Links.
ipa_entity_quick_links() has been added to generate quick links automatically from object's attribute_members, the same logic used for generating facet list. The search definition for each entity has been updated to use the new function. A unit test has been added for this function.
Diffstat (limited to 'install/static/group.js')
-rw-r--r--install/static/group.js46
1 files changed, 1 insertions, 45 deletions
diff --git a/install/static/group.js b/install/static/group.js
index b1c0d895..4c2c5b0a 100644
--- a/install/static/group.js
+++ b/install/static/group.js
@@ -24,7 +24,7 @@ ipa_entity_set_search_definition('group', [
['cn', 'Name', null],
['gidnumber', 'GID', null],
['description', 'Description', null],
- ['quick_links', 'Quick Links', group_render_quick_links]
+ ['quick_links', 'Quick Links', ipa_entity_quick_links]
]);
ipa_entity_set_add_definition('group', [
@@ -64,47 +64,3 @@ function f_posix(dlg, mode)
return (false);
}
}
-
-function group_render_quick_links(tr, attr, value, entry_attrs) {
-
- var td = $("<td/>");
- tr.append(td);
-
- $("<a/>", {
- href: "jslink",
- html: $("<img src='group_details.png' />"),
- click: function() {
- var state = {};
- state['group-facet'] = 'details';
- state['group-pkey'] = entry_attrs['cn'][0];
- $.bbq.pushState(state);
- return false;
- }
- }).appendTo(td);
-
- $("<a/>", {
- href: "jslink",
- html: $("<img src='user_enroll.png' />"),
- click: function() {
- var state = {};
- state['group-facet'] = 'associate';
- state['group-enroll'] = 'user';
- state['group-pkey'] = entry_attrs['cn'][0];
- $.bbq.pushState(state);
- return false;
- }
- }).appendTo(td);
-
- $("<a/>", {
- href: "jslink",
- html: $("<img src='netgroup_member.png' />"),
- click: function() {
- var state = {};
- state['group-facet'] = 'associate';
- state['group-enroll'] = 'netgroup';
- state['group-pkey'] = entry_attrs['cn'][0];
- $.bbq.pushState(state);
- return false;
- }
- }).appendTo(td);
-}