summaryrefslogtreecommitdiffstats
path: root/install
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
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')
-rw-r--r--install/static/details.js4
-rw-r--r--install/static/entity.js25
-rwxr-xr-xinstall/static/hbacsvc.js5
-rwxr-xr-xinstall/static/hbacsvcgroup.js13
-rw-r--r--install/static/ipa.css10
-rw-r--r--install/static/search.js3
-rwxr-xr-xinstall/static/sudocmd.js2
-rwxr-xr-xinstall/static/sudocmdgroup.js13
8 files changed, 51 insertions, 24 deletions
diff --git a/install/static/details.js b/install/static/details.js
index 3b4edda6c..a989d9d4e 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -457,9 +457,7 @@ function ipa_details_create(container)
var action_panel = that.get_action_panel();
var ul = $('ul', action_panel);
- var buttons = $('<li/>', {
- 'class': 'details-buttons'
- }).prependTo(ul);
+ var buttons = $('.action-controls',action_panel);
$('<input/>', {
'type': 'text',
diff --git a/install/static/entity.js b/install/static/entity.js
index 25a9fd310..713dbf31d 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));
diff --git a/install/static/hbacsvc.js b/install/static/hbacsvc.js
index 26a2e8a0a..7dca90ecf 100755
--- a/install/static/hbacsvc.js
+++ b/install/static/hbacsvc.js
@@ -98,10 +98,13 @@ function ipa_hbacsvc_search_facet(spec) {
var ul = $('ul', action_panel);
+ /*Note that we add the rules at the top of the action panel
+ so that the HBAC entities always show in the same order.*/
+
$('<li/>', {
title: 'hbac',
text: 'HBAC Rules'
- }).appendTo(ul);
+ }).prependTo(ul);
$('<li/>', {
title: 'hbacsvcgroup',
diff --git a/install/static/hbacsvcgroup.js b/install/static/hbacsvcgroup.js
index 056c8fab1..121fad676 100755
--- a/install/static/hbacsvcgroup.js
+++ b/install/static/hbacsvcgroup.js
@@ -109,15 +109,18 @@ function ipa_hbacsvcgroup_search_facet(spec) {
var ul = $('ul', action_panel);
+ /*Note that we add these at the top of the action panel
+ so that the HBAC entities always show in the same order.*/
+ $('<li/>', {
+ title: 'hbacsvc',
+ text: 'HBAC Services'
+ }).prependTo(ul);
+
$('<li/>', {
title: 'hbac',
text: 'HBAC Rules'
- }).appendTo(ul);
+ }).prependTo(ul);
- $('<li/>', {
- title: 'hbacsvc',
- text: 'HBAC Services'
- }).appendTo(ul);
that.search_facet_create(container);
diff --git a/install/static/ipa.css b/install/static/ipa.css
index b7654be00..3b283610b 100644
--- a/install/static/ipa.css
+++ b/install/static/ipa.css
@@ -322,17 +322,24 @@ span.main-separator{
float: left;
margin-top: 5em;
margin-left: 2.5em;
+ padding-left: 0.5em;
padding-bottom: 1em;
width: 17.5em;
}
+
+.action-panel ul {
+ list-style-type:none;
+ padding: 0;
+}
+
.action-panel h3{
margin: 0;
background: #e8e8e8;
}
.action-panel li {
- height: 2em;
+ height: auto;
padding: 0.2em;
}
@@ -346,6 +353,7 @@ span.main-separator{
color: black;
text-decoration: underline;
cursor: pointer;
+ margin-left:2em;
}
.action-panel li.entity-facet-disabled {
diff --git a/install/static/search.js b/install/static/search.js
index 03d4cac5a..5b42cf11a 100644
--- a/install/static/search.js
+++ b/install/static/search.js
@@ -54,8 +54,7 @@ function ipa_search_widget(spec) {
var action_panel = that.facet.get_action_panel();
- var ul = $('ul', action_panel);
- var li = $('<li/>').prependTo(ul);
+ var li = $('.action-controls',action_panel);
var search_buttons = $('<span/>', {
'class': 'search-buttons'
diff --git a/install/static/sudocmd.js b/install/static/sudocmd.js
index 2ac947fcf..4255a31e3 100755
--- a/install/static/sudocmd.js
+++ b/install/static/sudocmd.js
@@ -101,7 +101,7 @@ function ipa_sudocmd_search_facet(spec) {
$('<li/>', {
title: 'sudorule',
text: 'SUDO Rules'
- }).appendTo(ul);
+ }).prependTo(ul);
$('<li/>', {
title: 'sudocmdgroup',
diff --git a/install/static/sudocmdgroup.js b/install/static/sudocmdgroup.js
index 0a193afab..6fddafb15 100755
--- a/install/static/sudocmdgroup.js
+++ b/install/static/sudocmdgroup.js
@@ -109,15 +109,18 @@ function ipa_sudocmdgroup_search_facet(spec) {
var ul = $('ul', action_panel);
+ /*Make sure that these go at the top of the action panel
+ and in the same order as on the other SUDO entity pages */
+ $('<li/>', {
+ title: 'sudocmd',
+ text: 'SUDO Command'
+ }).prependTo(ul);
+
$('<li/>', {
title: 'sudorule',
text: 'SUDO Rules'
- }).appendTo(ul);
+ }).prependTo(ul);
- $('<li/>', {
- title: 'sudocmd',
- text: 'SUDO Command'
- }).appendTo(ul);
that.search_facet_create(container);