summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-01-06 17:14:13 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2011-01-07 04:44:56 -0500
commitb730eb356f4ccb569a060b39f9d529f2fa753588 (patch)
tree54d4db3e15b3da7c670c3b6b109638a07b31380e
parent728a1d83619ef4f72f33240fe7f412d9f60b30ef (diff)
downloadfreeipa-b730eb356f4ccb569a060b39f9d529f2fa753588.tar.gz
freeipa-b730eb356f4ccb569a060b39f9d529f2fa753588.tar.xz
freeipa-b730eb356f4ccb569a060b39f9d529f2fa753588.zip
facet nesting
correctly nest the facet groups change 'parent' to 'member of' for facet group
-rw-r--r--install/static/entity.js23
-rw-r--r--install/static/ipa.css17
-rw-r--r--ipalib/plugins/baseldap.py2
-rw-r--r--ipalib/plugins/host.py2
-rw-r--r--ipalib/plugins/netgroup.py2
5 files changed, 37 insertions, 9 deletions
diff --git a/install/static/entity.js b/install/static/entity.js
index a6f31e84b..7f8d1ec87 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -520,22 +520,35 @@ function ipa_facet_create_action_panel(container) {
}
var li = facet_groups[facet_group];
var link = build_link(other_facet, other_facet.label)
+ link.addClass('facet-group-member');
li.after(link );
+ /*
+ If we are on the current facet, we make the text black, non-clickable,
+ add an icon and make suer the action controls are positioned underneath it.
+ */
if ( other_facet.name === ipa_current_facet( entity)){
var text = link.text();
link.text('');
link.append($('<ul>').
- append('<li>'+ text+'</li>').
+ append($('<li />',{
+ 'class': 'entity-facet-selected',
+ html: $('<span />',{
+ 'class':'input_link',
+ html:'<span class="ui-icon ui-icon-triangle-1-e" />'+ text
+ })})).
append($('<li/>',{
html:$('<span />',{
- class:"action-controls"})})));
+ class:"action-controls"
+ })
+ }))
+ );
}
facet_groups[facet_group] = li.next();
-
} else {
- ul.append(build_link(other_facet, other_facet.label));
+ var innerlist = $('<ul/>').appendTo(ul);
+ innerlist.append(build_link(other_facet, other_facet.label));
if ( other_facet.name === ipa_current_facet( entity)){
- ul.append($('<li><span class="action-controls"/></li>'));
+ innerlist.append($('<li class="entity-facet"><span class="action-controls" /></li>'));
}
}
}
diff --git a/install/static/ipa.css b/install/static/ipa.css
index 85ec91f39..455781b1c 100644
--- a/install/static/ipa.css
+++ b/install/static/ipa.css
@@ -465,12 +465,20 @@ span.main-separator{
text-transform: none;
}
+.action-panel li.entity-facet-selected {
+ font-family: "FreeWayBold", "Liberation Sans", Arial, Sans;
+ color: black;
+ text-transform: uppercase;
+ cursor: pointer;
+}
+
.action-panel li.entity-facet-disabled {
font-family: "Liberation Sans",Arial,sans-serif;
color: gray;
cursor: default;
text-decoration: none;
text-transform: none;
+
}
.action-panel li.entity-facet-relation-label {
@@ -479,8 +487,14 @@ span.main-separator{
cursor: default;
text-transform: uppercase;
font-size: 1.2em;
+ margin-left:1.8em;
}
+.action-panel li.facet-group-member {
+ margin-left:3.6em;
+}
+
+
.action-button {
background: none;
background-image:none;
@@ -489,7 +503,8 @@ span.main-separator{
}
.action-controls {
- padding-left: 2em;
+ position: relative;
+ display:inline;
}
.client {
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 688f35bad..ecc3fd0b9 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -250,7 +250,7 @@ class LDAPObject(Object):
relationships = {
# attribute: (label, inclusive param prefix, exclusive param prefix)
'member': ('Member', '', 'no_'),
- 'memberof': ('Parent', 'in_', 'not_in_'),
+ 'memberof': ('Member Of', 'in_', 'not_in_'),
'memberindirect': (
'Indirect Member', None, 'no_indirect_'
),
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 3b0b8eef4..9cc997863 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -171,7 +171,7 @@ class host(LDAPObject):
}
bindable = True
relationships = {
- 'memberof': ('Parent', 'in_', 'not_in_'),
+ 'memberof': ('Member Of', 'in_', 'not_in_'),
'enrolledby': ('Enrolled by', 'enroll_by_', 'not_enroll_by_'),
'managedby': ('Managed by', 'man_by_', 'not_man_by_'),
}
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py
index ce9a51b6c..e8c59a570 100644
--- a/ipalib/plugins/netgroup.py
+++ b/ipalib/plugins/netgroup.py
@@ -87,7 +87,7 @@ class netgroup(LDAPObject):
}
relationships = {
'member': ('Member', '', 'no_'),
- 'memberof': ('Parent', 'in_', 'not_in_'),
+ 'memberof': ('Member Of', 'in_', 'not_in_'),
'memberindirect': (
'Indirect Member', None, 'no_indirect_'
),