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 li = facet_groups[facet_group];
var link = build_link(other_facet, other_facet.label) var link = build_link(other_facet, other_facet.label)
link.addClass('facet-group-member');
li.after(link ); 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)){ if ( other_facet.name === ipa_current_facet( entity)){
var text = link.text(); var text = link.text();
link.text(''); link.text('');
link.append($('<ul>'). 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/>',{ append($('<li/>',{
html:$('<span />',{ html:$('<span />',{
class:"action-controls"})}))); class:"action-controls"
})
}))
);
} }
facet_groups[facet_group] = li.next(); facet_groups[facet_group] = li.next();
} else { } 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)){ 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; 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 { .action-panel li.entity-facet-disabled {
font-family: "Liberation Sans",Arial,sans-serif; font-family: "Liberation Sans",Arial,sans-serif;
color: gray; color: gray;
cursor: default; cursor: default;
text-decoration: none; text-decoration: none;
text-transform: none; text-transform: none;
} }
.action-panel li.entity-facet-relation-label { .action-panel li.entity-facet-relation-label {
@@ -479,8 +487,14 @@ span.main-separator{
cursor: default; cursor: default;
text-transform: uppercase; text-transform: uppercase;
font-size: 1.2em; font-size: 1.2em;
margin-left:1.8em;
} }
.action-panel li.facet-group-member {
margin-left:3.6em;
}
.action-button { .action-button {
background: none; background: none;
background-image:none; background-image:none;
@@ -489,7 +503,8 @@ span.main-separator{
} }
.action-controls { .action-controls {
padding-left: 2em; position: relative;
display:inline;
} }
.client { .client {

View File

@@ -250,7 +250,7 @@ class LDAPObject(Object):
relationships = { relationships = {
# attribute: (label, inclusive param prefix, exclusive param prefix) # attribute: (label, inclusive param prefix, exclusive param prefix)
'member': ('Member', '', 'no_'), 'member': ('Member', '', 'no_'),
'memberof': ('Parent', 'in_', 'not_in_'), 'memberof': ('Member Of', 'in_', 'not_in_'),
'memberindirect': ( 'memberindirect': (
'Indirect Member', None, 'no_indirect_' 'Indirect Member', None, 'no_indirect_'
), ),

View File

@@ -171,7 +171,7 @@ class host(LDAPObject):
} }
bindable = True bindable = True
relationships = { relationships = {
'memberof': ('Parent', 'in_', 'not_in_'), 'memberof': ('Member Of', 'in_', 'not_in_'),
'enrolledby': ('Enrolled by', 'enroll_by_', 'not_enroll_by_'), 'enrolledby': ('Enrolled by', 'enroll_by_', 'not_enroll_by_'),
'managedby': ('Managed by', 'man_by_', 'not_man_by_'), 'managedby': ('Managed by', 'man_by_', 'not_man_by_'),
} }

View File

@@ -87,7 +87,7 @@ class netgroup(LDAPObject):
} }
relationships = { relationships = {
'member': ('Member', '', 'no_'), 'member': ('Member', '', 'no_'),
'memberof': ('Parent', 'in_', 'not_in_'), 'memberof': ('Member Of', 'in_', 'not_in_'),
'memberindirect': ( 'memberindirect': (
'Indirect Member', None, 'no_indirect_' 'Indirect Member', None, 'no_indirect_'
), ),