summaryrefslogtreecommitdiffstats
path: root/install/static/entity.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-11-23 22:24:50 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2010-11-24 20:30:34 -0500
commit841c290113f4871343294aca06307b909c4c3f45 (patch)
tree336828def1ab096617a20de7e67aeda12027623f /install/static/entity.js
parenta34bb67cbd7e1e860e856bcf53bef764d9b1c9d9 (diff)
downloadfreeipa-841c290113f4871343294aca06307b909c4c3f45.tar.gz
freeipa-841c290113f4871343294aca06307b909c4c3f45.tar.xz
freeipa-841c290113f4871343294aca06307b909c4c3f45.zip
action panel formatting
Cleans up the indentation of the action panel Puts the sudo and HBAC entries in a consistent order
Diffstat (limited to 'install/static/entity.js')
-rw-r--r--install/static/entity.js25
1 files changed, 19 insertions, 6 deletions
diff --git a/install/static/entity.js b/install/static/entity.js
index 25a9fd31..713dbf31 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -1,6 +1,7 @@
/* Authors:
* Pavel Zuna <pzuna@redhat.com>
* Endi S. Dewata <edewata@redhat.com>
+ * Adam Young <ayoung@redhat.com>
*
* Copyright (C) 2010 Red Hat
* see file 'COPYING' for use and warranty information
@@ -340,8 +341,6 @@ function ipa_entity_setup(container) {
facet.refresh();
}
-
-
function ipa_facet_create_action_panel(container) {
var that = this;
@@ -349,7 +348,9 @@ function ipa_facet_create_action_panel(container) {
var action_panel = $('<div/>', {
"class": "action-panel",
- html: $('<h3>Actions</h3>')
+ html: $('<h3>',{
+ text: IPA.metadata[entity_name].label
+ })
}).appendTo(container);
function build_link(other_facet,label,other_entity){
@@ -387,9 +388,21 @@ function ipa_facet_create_action_panel(container) {
var entity = IPA.get_entity(entity_name);
var facet_name = ipa_current_facet(entity);
- for (var i=0; i<entity.facets.length; i++) {
- var other_facet = entity.facets[i];
- var other_facet_name = other_facet.name;
+ var other_facet = entity.facets[0];
+ var other_facet_name = other_facet.name;
+ var main_facet = build_link(other_facet,other_facet.label)
+
+ /*assumeing for now that entities with only a single facet
+ do not have search*/
+ if (entity.facets.length > 0 ){
+ main_facet.text( 'List ' + IPA.metadata[entity_name].label);
+ }
+ main_facet.appendTo(ul);
+
+ ul.append($('<li><span class="action-controls"/></li>'));
+ for (var i=1; i<entity.facets.length; i++) {
+ other_facet = entity.facets[i];
+ other_facet_name = other_facet.name;
if (other_facet.label) {
ul.append(build_link(other_facet,other_facet.label));