facet nesting

correctly nest the facet groups
change 'parent' to 'member of' for facet group
This commit is contained in:
Adam Young
2011-01-06 17:14:13 -05:00
committed by Endi Sukma Dewata
parent 728a1d8361
commit b730eb356f
5 changed files with 37 additions and 9 deletions

View File

@@ -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>'));
}
}
}

View File

@@ -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 {

View File

@@ -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_'
),

View File

@@ -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_'),
}

View File

@@ -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_'
),