added profile "inline" menus as a way of extending the user profile display
This commit is contained in:
@@ -48,6 +48,18 @@ if (user.isAnonymous())
|
||||
loader = cast.queryDialogLoader(req);
|
||||
dlg = loader.loadDialogResource("user_profile.dlg.xml");
|
||||
|
||||
// Load the profile menu.
|
||||
mprov = vcast.queryMenuProvider(req_help.getRequestObject(Namespaces.DYNAMO_OBJECT_NAMESPACE,"venice-menus"));
|
||||
menu = mprov.getInlineMenu(user,VeniceNamespaces.USER_PROFILE_NAMESPACE,"user.profile.menu",cast.newIntArray(0));
|
||||
if (menu.getItemCount()>1)
|
||||
{ // set up the menu properly
|
||||
menu.setVariable("target",stringutils.encodeURL(target));
|
||||
menu.setSelectedIndex(0);
|
||||
|
||||
} // end if
|
||||
else // don't display the menu
|
||||
menu = null;
|
||||
|
||||
if (req_help.isVerb("GET"))
|
||||
{ // Get the privacy settings and admin flags.
|
||||
priv = cast.toOptionSet(user.getObject(VeniceNamespaces.USER_PROFILE_NAMESPACE,"privacy"));
|
||||
@@ -113,7 +125,7 @@ if (req_help.isVerb("GET"))
|
||||
dlg.setRenderParam("rtgt",stringutils.encodeURL(target));
|
||||
vlib.setLocation(req,target);
|
||||
vlib.setDisplayLogin(req,false);
|
||||
dynamo.scriptReturn(new FrameDialog(dlg));
|
||||
dynamo.scriptReturn(new FrameDialog(dlg,menu,null));
|
||||
|
||||
} // end if
|
||||
|
||||
@@ -164,7 +176,7 @@ catch (e)
|
||||
dlg.setRenderParam("rtgt",stringutils.encodeURL(target));
|
||||
vlib.setLocation(req,target);
|
||||
vlib.setDisplayLogin(req,false);
|
||||
dynamo.scriptReturn(new FrameDialog(dlg));
|
||||
dynamo.scriptReturn(new FrameDialog(dlg,menu,null));
|
||||
|
||||
} // end catch
|
||||
|
||||
|
||||
@@ -93,3 +93,41 @@ html>body span.chdrsubtitle {
|
||||
html>body td.errorhead, html>body td.errorbody {
|
||||
font-size: medium;
|
||||
}
|
||||
|
||||
## these are styles for inline menu lists
|
||||
div.imenu {
|
||||
padding: 5px;
|
||||
border: 1px solid #000;
|
||||
margin-bottom: 25px;
|
||||
background-color: #6666cc;
|
||||
}
|
||||
|
||||
div.imenu ul {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.imenu ul li {
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 2px 15px 5px;
|
||||
border: 1px solid #000;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
background-color: #9999ff;
|
||||
}
|
||||
|
||||
div.imenu ul li.down {
|
||||
border-bottom: 1px solid #fff;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
div.imenu ul li.separator {
|
||||
border: none;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
background-color: #6666cc;
|
||||
}
|
||||
|
||||
@@ -97,3 +97,8 @@ td.errorbody {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.selectedItem {
|
||||
color: #3333aa;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user