Merged V2.1 to HEAD: 6706 Wizard pages more standards compliant

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6790 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-09-14 20:32:00 +00:00
parent 003eb483d6
commit 77190cd418
15 changed files with 403 additions and 389 deletions

View File

@@ -60,26 +60,31 @@ public final class PanelGenerator
generatePanelStart(out, contextPath, panel, bgColor, false);
}
public static void generatePanelStart(Writer out, String contextPath, String panel, String bgColor, boolean dialog)
public static void generatePanelStart(final Writer out,
final String contextPath,
final String panel,
final String bgColor,
final boolean dialog)
throws IOException
{
out.write("<table cellspacing=0 cellpadding=0 border=0 width=100%><tr><td width=7><img src='");
out.write("<table cellspacing='0' cellpadding='0' style='border-width: 0px; width: 100%'>");
out.write("<tr><td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_01.gif' width=7 height=7 alt=''></td>");
out.write("_01.gif' width='7' height='7' alt=''/></td>");
out.write("<td background='");
out.write("<td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_02.gif'><img src='");
out.write("_02.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_02.gif' width=7 height=7 alt=''></td>");
out.write("_02.gif' width='7' height='7' alt=''/></td>");
out.write("<td width=7><img src='");
out.write("<td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
@@ -88,165 +93,176 @@ public final class PanelGenerator
{
out.write("_squared");
}
out.write(".gif' width=7 height=7 alt=''></td></tr>");
out.write(".gif' width='7' height='7' alt=''/></td></tr>");
out.write("<tr><td background='");
out.write("<tr><td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_04.gif'><img src='");
out.write("_04.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_04.gif' width=7 height=7 alt=''></td><td bgcolor='");
out.write("_04.gif' width='7' height='7' alt=''/></td><td style='background-color:");
out.write(bgColor);
out.write("'>");
out.write(";'>");
}
public static void generatePanelEnd(Writer out, String contextPath, String panel)
public static void generatePanelEnd(final Writer out,
final String contextPath,
final String panel)
throws IOException
{
out.write("</td><td background='");
out.write("</td><td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_06.gif'><img src='");
out.write("_06.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_06.gif' width=7 height=7 alt=''></td></tr>");
out.write("_06.gif' width='7' height='7' alt=''/></td></tr>");
out.write("<tr><td width=7><img src='");
out.write("<tr><td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_07.gif' width=7 height=7 alt=''></td>");
out.write("_07.gif' width='7' height='7' alt=''/></td>");
out.write("<td background='");
out.write("<td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_08.gif'><img src='");
out.write("_08.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_08.gif' width=7 height=7 alt=''></td>");
out.write("_08.gif' width='7' height='7' alt=''/></td>");
out.write("<td width=7><img src='");
out.write("<td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(panel);
out.write("_09.gif' width=7 height=7 alt=''></td></tr></table>");
out.write("_09.gif' width='7' height='7' alt=''/></td></tr></table>");
}
public static void generateTitledPanelMiddle(Writer out, String contextPath, String titlePanel,
String contentPanel, String contentBgColor) throws IOException
public static void generateTitledPanelMiddle(final Writer out,
final String contextPath,
final String titlePanel,
final String contentPanel,
final String contentBgColor)
throws IOException
{
// generate the expanded part, just under the title
out.write("</td><td background='");
out.write("</td><td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_06.gif'><img src='");
out.write("_06.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_06.gif' width=7 height=7 alt=''></td></tr>");
out.write("_06.gif' width='7' height='7' alt=''/></td></tr>");
out.write("<tr><td width=7><img src='");
out.write("<tr><td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_");
out.write(contentPanel);
out.write("_07.gif' width=7 height=7 alt=''></td>");
out.write("_07.gif' width='7' height='7' alt=''/></td>");
out.write("<td background='");
out.write("<td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_08.gif'><img src='");
out.write("_08.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_08.gif' width=7 height=7 alt=''></td>");
out.write("_08.gif' width='7' height='7' alt=''/></td>");
out.write("<td width=7><img src='");
out.write("<td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_");
out.write(contentPanel);
out.write("_09.gif' width=7 height=7 alt=''></td></tr>");
out.write("_09.gif' width='7' height='7' alt=''/></td></tr>");
out.write("<tr><td background='");
out.write("<tr><td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(contentPanel);
out.write("_04.gif'><img src='");
out.write("_04.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(contentPanel);
out.write("_04.gif' width=7 height=7 alt=''></td><td bgcolor='");
out.write("_04.gif' width='7' height='7' alt=''/></td><td style='background-color: ");
out.write(contentBgColor);
out.write("' style='padding-top:6px;'>");
out.write("; padding-top: 6px;'>");
}
public static void generateExpandedTitledPanelMiddle(Writer out, String contextPath, String titlePanel,
String expandedTitlePanel, String contentPanel, String contentBgColor) throws IOException
public static void generateExpandedTitledPanelMiddle(final Writer out,
final String contextPath,
final String titlePanel,
final String expandedTitlePanel,
final String contentPanel,
final String contentBgColor)
throws IOException
{
// generate the expanded part, just under the title
out.write("</td><td background='");
out.write("</td><td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_06.gif'><img src='");
out.write("_06.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_06.gif' width=7 height=7 alt=''></td></tr>");
out.write("_06.gif' width='7' height='7' alt=''/></td></tr>");
out.write("<tr><td width=7><img src='");
out.write("<tr><td style='width: 7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_");
out.write(expandedTitlePanel);
out.write("_07.gif' width=7 height=7 alt=''></td>");
out.write("_07.gif' width='7' height='7' alt=''/></td>");
out.write("<td background='");
out.write("<td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_");
out.write(expandedTitlePanel);
out.write("_08.gif'><img src='");
out.write("_08.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_");
out.write(expandedTitlePanel);
out.write("_08.gif' height=7 alt=''></td>");
out.write("_08.gif' height='7' alt=''/></td>");
out.write("<td width=7><img src='");
out.write("<td style='width:7px;'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(titlePanel);
out.write("_");
out.write(expandedTitlePanel);
out.write("_09.gif' width=7 height=7 alt=''></td></tr>");
out.write("_09.gif' width='7' height='7' alt=''/></td></tr>");
out.write("<tr><td background='");
out.write("<tr><td style='background-image: url(");
out.write(contextPath);
out.write("/images/parts/");
out.write(contentPanel);
out.write("_04.gif'><img src='");
out.write("_04.gif)'><img src='");
out.write(contextPath);
out.write("/images/parts/");
out.write(contentPanel);
out.write("_04.gif' width=7 height=7 alt=''></td><td bgcolor='");
out.write("_04.gif' width='7' height='7' alt=''/></td><td style='background-color:");
out.write(contentBgColor);
out.write("' style='padding-top:6px;'>");
out.write("; padding-top:6px;'>");
}
public final static String BGCOLOR_WHITE = "#FFFFFF";

View File

@@ -468,7 +468,7 @@ public final class Utils
line = reader.readLine();
if (line != null)
{
parsedContent.append("<br>");
parsedContent.append("<br/>");
}
}
@@ -898,49 +898,54 @@ public final class Utils
* @param height Height in pixels
* @param alt Optional alt/title text
* @param onclick JavaScript onclick event handler code
* @param align Optional HTML alignment value
* @param verticalAlign Optional HTML alignment value
*
* @return Populated <code>img</code> tag
*/
public static String buildImageTag(FacesContext context, String image, int width, int height,
String alt, String onclick, String align)
public static String buildImageTag(final FacesContext context,
final String image,
final int width,
final int height,
String alt,
final String onclick,
final String verticalAlign)
{
StringBuilder buf = new StringBuilder(200);
buf.append("<img src=\"")
StringBuilder style = new StringBuilder("border-width:0px;");
buf.append("<img src='")
.append(context.getExternalContext().getRequestContextPath())
.append(image)
.append("\" width=")
.append("' width='")
.append(width)
.append(" height=")
.append("' height='")
.append(height)
.append(" border=0");
.append("'");
if (alt != null)
{
alt = Utils.encode(alt);
buf.append(" alt=\"")
buf.append(" alt='")
.append(alt)
.append("\" title=\"")
.append("' title='")
.append(alt)
.append('"');
.append("'");
}
else
{
buf.append(" alt=''");
}
if (align != null)
if (verticalAlign != null)
{
buf.append(" align=")
.append(align);
style.append("vertical-align:").append(verticalAlign).append(";");
}
if (onclick != null)
{
buf.append(" onclick=\"")
.append(onclick)
.append("\" style='cursor:pointer'");
buf.append(" onclick=\"").append(onclick).append('"');
style.append("cursor:pointer;");
}
buf.append('>');
buf.append(" style='").append(style).append("'/>");
return buf.toString();
}
@@ -983,35 +988,42 @@ public final class Utils
* @param context FacesContext
* @param image The local image path from the web folder with leading slash '/'
* @param alt Optional alt/title text
* @param align Optional HTML alignment value
* @param verticalAlign Optional HTML alignment value
*
* @return Populated <code>img</code> tag
*/
public static String buildImageTag(FacesContext context, String image, String alt, String align)
public static String buildImageTag(final FacesContext context,
final String image,
String alt,
final String verticalAlign)
{
StringBuilder buf = new StringBuilder(128);
buf.append("<img src=\"")
final StringBuilder buf = new StringBuilder(128);
buf.append("<img src='")
.append(context.getExternalContext().getRequestContextPath())
.append(image)
.append("\" border=0");
.append("' ");
final StringBuilder style = new StringBuilder("border-width:0px;");
if (alt != null)
{
alt = Utils.encode(alt);
buf.append(" alt=\"")
buf.append(" alt='")
.append(alt)
.append("\" title=\"")
.append("' title='")
.append(alt)
.append('"');
.append("'");
}
if (align != null)
else
{
buf.append(" align=")
.append(align);
buf.append(" alt=''");
}
buf.append('>');
if (verticalAlign != null)
{
style.append("vertical-align:").append(verticalAlign).append(";");
}
buf.append(" style='").append(style).append("'/>");
return buf.toString();
}

View File

@@ -80,16 +80,17 @@ public class UIActionLink extends UICommand
*/
public Object saveState(FacesContext context)
{
Object values[] = new Object[7];
// standard component attributes are saved by the super class
values[0] = super.saveState(context);
values[1] = this.padding;
values[2] = this.image;
values[3] = this.showLink;
values[4] = this.href;
values[5] = this.tooltip;
values[6] = this.target;
return (values);
return new Object[]
{
super.saveState(context),
this.padding,
this.image,
this.showLink,
this.href,
this.tooltip,
this.target
};
}
@@ -158,15 +159,7 @@ public class UIActionLink extends UICommand
this.padding = (Integer)vb.getValue(getFacesContext());
}
if (this.padding != null)
{
return this.padding.intValue();
}
else
{
// return default
return 0;
}
return this.padding != null ? this.padding.intValue() : 0;
}
/**

View File

@@ -54,7 +54,7 @@ public class UIMenu extends SelfRenderingComponent
*/
public void encodeBegin(FacesContext context) throws IOException
{
if (isRendered() == false)
if (!isRendered())
{
return;
}
@@ -81,7 +81,7 @@ public class UIMenu extends SelfRenderingComponent
// output image
if (getAttributes().get("image") != null)
{
out.write(Utils.buildImageTag(context, (String)getAttributes().get("image"), null, "absmiddle"));
out.write(Utils.buildImageTag(context, (String)getAttributes().get("image"), null, "middle"));
}
out.write("</a>");
@@ -92,7 +92,7 @@ public class UIMenu extends SelfRenderingComponent
// NOTE: the use of "*width:0px" is an IE6/7 specific hack to ensure that the CSS is processed
// only by IE (which needs the width value) and _not_ FireFox which doesn't...!
out.write("' style=\"position:absolute;display:none;padding-left:2px;*width:0px\">");
out.write("<table border=0 cellpadding=0");
out.write("<table border='0' cellpadding='0'");
outputAttribute(out, getAttributes().get("itemSpacing"), "cellspacing");
outputAttribute(out, getAttributes().get("menuStyle"), "style");
outputAttribute(out, getAttributes().get("menuStyleClass"), "class");
@@ -104,7 +104,7 @@ public class UIMenu extends SelfRenderingComponent
*/
public void encodeEnd(FacesContext context) throws IOException
{
if (isRendered() == false)
if (!isRendered())
{
return;
}
@@ -132,12 +132,7 @@ public class UIMenu extends SelfRenderingComponent
*/
public Object saveState(FacesContext context)
{
Object values[] = new Object[3];
// standard component attributes are saved by the super class
values[0] = super.saveState(context);
values[1] = this.label;
values[2] = this.tooltip;
return values;
return new Object[] { super.saveState(context), this.label, this.tooltip };
}

View File

@@ -93,14 +93,14 @@ public class UIStatusMessage extends SelfRenderingComponent
*/
public Object saveState(FacesContext context)
{
Object values[] = new Object[5];
// standard component attributes are saved by the super class
values[0] = super.saveState(context);
values[1] = this.border;
values[2] = this.bgcolor;
values[3] = this.messages;
values[4] = Integer.valueOf(this.currentMessage);
return values;
return new Object[]
{
super.saveState(context),
this.border,
this.bgcolor,
this.messages,
Integer.valueOf(this.currentMessage)
};
}
/**
@@ -108,7 +108,7 @@ public class UIStatusMessage extends SelfRenderingComponent
*/
public void encodeBegin(FacesContext context) throws IOException
{
if (isRendered() == false)
if (!isRendered())
{
return;
}
@@ -131,12 +131,12 @@ public class UIStatusMessage extends SelfRenderingComponent
}
// Previous Message icon image - clicking shows previous message
out.write("<table width=100% cellspacing=0 cellpadding=0><tr><td>");
out.write("<table style'width:100%;' cellspacing='0' cellpadding='0'><tr><td>");
String field = getHiddenFieldName();
String leftValue = getClientId(context) + NamingContainer.SEPARATOR_CHAR + Integer.toString(ACTION_PREVIOUS);
String leftOnclick = Utils.generateFormSubmit(context, this, field, leftValue);
out.write(Utils.buildImageTag(context, WebResources.IMAGE_MOVELEFT, 12, 12, null, leftOnclick, "absmiddle"));
out.write("</td><td width=100% align=center>");
out.write(Utils.buildImageTag(context, WebResources.IMAGE_MOVELEFT, 12, 12, null, leftOnclick, "middle"));
out.write("</td><td style='width:100%;' align='center'>");
// get messages for the component and crop the stack to the maximum history size
Iterator<FacesMessage> msgIterator = context.getMessages(STATUS_MESSAGE);
@@ -166,7 +166,7 @@ public class UIStatusMessage extends SelfRenderingComponent
style = CSS_WARNING;
}
out.write(Utils.buildImageTag(context, icon, null, "absmiddle"));
out.write(Utils.buildImageTag(context, icon, null, "middle"));
out.write("&nbsp;<span class='");
out.write(style);
out.write("'>");
@@ -179,7 +179,7 @@ public class UIStatusMessage extends SelfRenderingComponent
// Next Message icon image - clicking shows next message
String rightValue = getClientId(context) + NamingContainer.SEPARATOR_CHAR + Integer.toString(ACTION_NEXT);
String rightOnclick = Utils.generateFormSubmit(context, this, field, rightValue);
out.write(Utils.buildImageTag(context, WebResources.IMAGE_MOVERIGHT, 12, 12, null, rightOnclick, "absmiddle"));
out.write(Utils.buildImageTag(context, WebResources.IMAGE_MOVERIGHT, 12, 12, null, rightOnclick, "middle"));
out.write("</td></tr></table>");
if (panel != null)

View File

@@ -133,7 +133,7 @@ public class ActionLinkRenderer extends BaseRenderer
if (padding != 0)
{
// TODO: make this width value a property!
out.write("<table cellspacing=0 cellpadding=0><tr><td width=16>");
out.write("<table cellspacing='0' cellpadding='0'><tr><td style='width:16px;'>");
}
// if we are not show the text link, then the image is the clickable element
@@ -142,7 +142,7 @@ public class ActionLinkRenderer extends BaseRenderer
renderActionLinkAnchor(context, out, link);
}
out.write(Utils.buildImageTag(context, image, (String)link.getValue(), "absmiddle"));
out.write(Utils.buildImageTag(context, image, (String)link.getValue(), "middle"));
if (link.getShowLink() == false)
{
@@ -152,9 +152,9 @@ public class ActionLinkRenderer extends BaseRenderer
{
if (padding != 0)
{
out.write("</td><td style=\"padding:");
out.write("</td><td style='padding:");
out.write(Integer.toString(padding));
out.write("px\">");
out.write("px;'>");
}
// else the text is the clickable element
@@ -183,10 +183,12 @@ public class ActionLinkRenderer extends BaseRenderer
* @param context
* @param link
*/
private void renderActionLinkAnchor(FacesContext context, Writer out, UIActionLink link)
private void renderActionLinkAnchor(final FacesContext context,
final Writer out,
final UIActionLink link)
throws IOException
{
Map attrs = link.getAttributes();
final Map attrs = link.getAttributes();
// generate the href link - output later in the process depending on various rendering options
if (link.getHref() == null)
@@ -202,7 +204,11 @@ public class ActionLinkRenderer extends BaseRenderer
{
// generate JavaScript to set a hidden form field and submit
// a form which request attributes that we can decode
out.write(Utils.generateFormSubmit(context, link, Utils.getActionHiddenFieldName(context, link), link.getClientId(context), getParameterComponents(link)));
out.write(Utils.generateFormSubmit(context,
link,
Utils.getActionHiddenFieldName(context, link),
link.getClientId(context),
getParameterComponents(link)));
}
out.write('"');
@@ -227,31 +233,32 @@ public class ActionLinkRenderer extends BaseRenderer
// output href 'target' attribute if supplied
if (link.getTarget() != null)
{
out.write(" target=\"");
out.write(" target='");
out.write(link.getTarget());
out.write("\"");
out.write("'");
}
}
// common link attributes
if (attrs.get("id") != null)
{
out.write(" id=\"");
out.write(" id='");
out.write((String)attrs.get("id"));
out.write("\"");
out.write("'");
}
boolean appliedStyle = false;
if (attrs.get("style") != null)
{
out.write(" style=\"");
out.write(" style='");
out.write((String)attrs.get("style"));
out.write('"');
out.write("'");
appliedStyle = true;
}
if (attrs.get("styleClass") != null)
{
out.write(" class=");
out.write(" class='");
out.write((String)attrs.get("styleClass"));
out.write("'");
appliedStyle = true;
}
if (appliedStyle == false && link.getShowLink() == true && link.getImage() != null && link.getPadding() == 0)
@@ -261,9 +268,9 @@ public class ActionLinkRenderer extends BaseRenderer
}
if (link.getTooltip() != null)
{
out.write(" title=\"");
out.write(" title='");
out.write(Utils.encode(link.getTooltip()));
out.write('"');
out.write("'");
}
out.write('>');
}
@@ -376,8 +383,9 @@ public class ActionLinkRenderer extends BaseRenderer
}
if (attrs.get("styleClass") != null)
{
out.write(" class=");
out.write(" class=\"");
out.write((String)attrs.get("styleClass"));
out.write('"');
}
out.write('>');
out.write(Utils.encode(link.getValue().toString()));

View File

@@ -134,8 +134,9 @@ public class BreadcrumbRenderer extends BaseRenderer
}
if (bc.getAttributes().get("styleClass") != null)
{
buf.append(" class=")
.append(bc.getAttributes().get("styleClass"));
buf.append(" class=\"")
.append(bc.getAttributes().get("styleClass"))
.append('"');
}
if (bc.getAttributes().get("tooltip") != null)
{

View File

@@ -87,17 +87,17 @@ public class ModeListRenderer extends BaseRenderer
Map attrs = list.getAttributes();
if (list.isMenu() == false)
if (!list.isMenu())
{
// start outer table container the list items
out.write("<table cellspacing=1 cellpadding=0");
out.write("<table cellspacing='1' cellpadding='0'");
outputAttribute(out, attrs.get("styleClass"), "class");
outputAttribute(out, attrs.get("style"), "style");
outputAttribute(out, attrs.get("width"), "width");
out.write('>');
// horizontal rendering outputs a single row with each item as a column cell
if (list.isHorizontal() == true)
if (list.isHorizontal())
{
out.write("<tr>");
}
@@ -107,21 +107,21 @@ public class ModeListRenderer extends BaseRenderer
{
// each row is an inner table with a single row and 2 columns
// first column contains an icon if present, second column contains text
if (list.isHorizontal() == false)
if (!list.isHorizontal())
{
out.write("<tr>");
}
out.write("<td><table cellpadding=0 width=100%");
out.write("<td><table cellpadding='0' style='width:100%;'");
outputAttribute(out, attrs.get("itemSpacing"), "cellspacing");
out.write("><tr>");
// output icon column
if (list.getIconColumnWidth() != 0)
{
out.write("<td");
outputAttribute(out, list.getIconColumnWidth(), "width");
out.write("></td>");
out.write("<td style='width:");
out.write(String.valueOf(list.getIconColumnWidth()));
out.write(";'></td>");
}
// output title label
@@ -132,7 +132,7 @@ public class ModeListRenderer extends BaseRenderer
out.write(Utils.encode(list.getLabel()));
out.write("</span></td></tr></table></td>");
if (list.isHorizontal() == false)
if (!list.isHorizontal())
{
out.write("</tr>");
}
@@ -142,12 +142,12 @@ public class ModeListRenderer extends BaseRenderer
{
// render as a pop-up menu
// TODO: show the image set for the individual item if available?
out.write("<table cellspacing=0 cellpadding=0 style='white-space:nowrap'><tr>");
out.write("<table cellspacing='0' cellpadding='0' style='white-space:nowrap'><tr>");
String selectedImage = (String)attrs.get("selectedImage");
if (selectedImage != null)
{
out.write("<td style='padding-right:4px'>");
out.write(Utils.buildImageTag(context, selectedImage, null, "absmiddle"));
out.write(Utils.buildImageTag(context, selectedImage, null, "middle"));
out.write("</td>");
}
@@ -177,7 +177,7 @@ public class ModeListRenderer extends BaseRenderer
UIListItem item = (UIListItem)iter.next();
// if selected render as the label
if (item.getValue().equals(list.getValue()) == true)
if (item.getValue().equals(list.getValue()))
{
label = item.getLabel();
break;
@@ -185,13 +185,13 @@ public class ModeListRenderer extends BaseRenderer
}
}
}
else if (child instanceof UIListItem && child.isRendered() == true)
else if (child instanceof UIListItem && child.isRendered())
{
// found a valid UIListItem child to render
UIListItem item = (UIListItem)child;
// if selected render as the label
if (item.getValue().equals(list.getValue()) == true)
if (item.getValue().equals(list.getValue()))
{
label = item.getLabel();
break;
@@ -214,7 +214,7 @@ public class ModeListRenderer extends BaseRenderer
// output image
if (list.getMenuImage() != null)
{
out.write(Utils.buildImageTag(context, list.getMenuImage(), null, "absmiddle"));
out.write(Utils.buildImageTag(context, list.getMenuImage(), null, "middle"));
}
out.write("</a></td></tr></table>");
@@ -222,10 +222,10 @@ public class ModeListRenderer extends BaseRenderer
// output the hidden DIV section to contain the menu item table
out.write("<div id='");
out.write(menuId);
out.write("' style=\"position:absolute;display:none;padding-left:2px;\">");
out.write("' style='position:absolute;display:none;padding-left:2px;'>");
// start outer table container the list items
out.write("<table cellspacing=1 cellpadding=0");
out.write("<table cellspacing='1' cellpadding='0'");
outputAttribute(out, attrs.get("styleClass"), "class");
outputAttribute(out, attrs.get("style"), "style");
outputAttribute(out, attrs.get("width"), "width");
@@ -238,7 +238,7 @@ public class ModeListRenderer extends BaseRenderer
*/
public void encodeChildren(FacesContext context, UIComponent component) throws IOException
{
if (component.isRendered() == false)
if (!component.isRendered())
{
return;
}
@@ -268,11 +268,10 @@ public class ModeListRenderer extends BaseRenderer
}
}
}
else if (child instanceof UIListItem && child.isRendered() == true)
else if (child instanceof UIListItem && child.isRendered())
{
// found a valid UIListItem child to render
UIListItem item = (UIListItem)child;
renderItem(context, out, list, item);
renderItem(context, out, list, (UIListItem)child);
}
}
}
@@ -282,7 +281,7 @@ public class ModeListRenderer extends BaseRenderer
*/
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
{
if (component.isRendered() == false)
if (!component.isRendered())
{
return;
}
@@ -291,12 +290,12 @@ public class ModeListRenderer extends BaseRenderer
// end outer table
UIModeList list = (UIModeList)component;
if (list.isHorizontal() == true)
if (list.isHorizontal())
{
out.write("</tr>");
}
out.write("</table>");
if (list.isMenu() == true)
if (list.isMenu())
{
// close menu hidden div section
out.write("</div>");
@@ -333,7 +332,7 @@ public class ModeListRenderer extends BaseRenderer
out.write("<tr>");
}
out.write("<td><table cellpadding=0 width=100%");
out.write("<td><table cellpadding='0' style='width:100%;'");
outputAttribute(out, attrs.get("itemSpacing"), "cellspacing");
// if selected value render different style for the item
@@ -353,9 +352,9 @@ public class ModeListRenderer extends BaseRenderer
// output icon column
if (list.getIconColumnWidth() != 0)
{
out.write("<td");
outputAttribute(out, list.getIconColumnWidth(), "width");
out.write(">");
out.write("<td style='width:");
out.write(String.valueOf(list.getIconColumnWidth()));
out.write(";'>");
// if the "selectedImage" property is set and this item is selected then show it
if (selected == true && selectedImage != null)

View File

@@ -599,15 +599,7 @@ public class UIActions extends SelfRenderingComponent
this.showLink = (Boolean)vb.getValue(getFacesContext());
}
if (this.showLink != null)
{
return this.showLink.booleanValue();
}
else
{
// return default
return true;
}
return this.showLink != null ? this.showLink.booleanValue() : true;
}
/**
@@ -631,14 +623,7 @@ public class UIActions extends SelfRenderingComponent
this.verticalSpacing = (Integer)vb.getValue(getFacesContext());
}
if (this.verticalSpacing != null)
{
return this.verticalSpacing;
}
else
{
return 0;
}
return this.verticalSpacing != null ? this.verticalSpacing : 0;
}
/**
@@ -667,7 +652,7 @@ public class UIActions extends SelfRenderingComponent
*/
private static String createUniqueId()
{
return "_id_" + Short.toString(++id);
return "id_" + Short.toString(++id);
}
// ------------------------------------------------------------------------------

View File

@@ -78,11 +78,8 @@ public class UISidebar extends SelfRenderingComponent
@Override
public Object saveState(FacesContext context)
{
Object values[] = new Object[8];
// standard component attributes are saved by the super class
values[0] = super.saveState(context);
values[1] = this.activePlugin;
return values;
return new Object[] { super.saveState(context), this.activePlugin };
}
@SuppressWarnings("unchecked")
@@ -93,20 +90,20 @@ public class UISidebar extends SelfRenderingComponent
ResponseWriter out = context.getResponseWriter();
out.write("<div id=\"sidebar\" class=\"sidebar\">");
out.write("<div id='sidebar' class='sidebar'>");
// render the start of the header panel
String cxPath = context.getExternalContext().getRequestContextPath();
out.write("<table cellspacing=0 cellpadding=0 bgcolor='#ffffff'>" +
"<tr><td style=\"background-image: url(");
out.write("<table cellspacing='0' cellpadding='0' style='background-color: #ffffff;'>" +
"<tr><td style='width: 5px; background-image: url(");
out.write(cxPath);
out.write("/images/parts/sidebar_top_grey_begin.gif)\" valign=\"top\" width=5>" +
out.write("/images/parts/sidebar_top_grey_begin.gif)' valign='top'>" +
"<img src=\"");
out.write(cxPath);
out.write("/images/parts/sidebar_grey_01.gif\" width=5 height=5></td>" +
"<td style=\"background-image: url(");
out.write("/images/parts/sidebar_grey_01.gif\" width='5' height='5' alt=''/></td>" +
"<td style='height: 24px; background-image: url(");
out.write(cxPath);
out.write("/images/parts/sidebar_top_grey_bg.gif)\" height=24>");
out.write("/images/parts/sidebar_top_grey_bg.gif)'>");
// generate the required child components if not present
if (this.getChildCount() == 1)
@@ -169,7 +166,7 @@ public class UISidebar extends SelfRenderingComponent
{
ResponseWriter out = context.getResponseWriter();
out.write("<table border='0' cellpadding='6' cellspacing='0' width='100%'><tr><td>");
out.write("<table border='0' cellpadding='6' cellspacing='0' style='width: 100%;'><tr><td>");
// render the list
UIModeList modeList = (UIModeList)getChildren().get(0);
@@ -185,12 +182,12 @@ public class UISidebar extends SelfRenderingComponent
// render the end of the header panel
String cxPath = context.getExternalContext().getRequestContextPath();
out.write("</td><td style=\"background-image: url(");
out.write("</td><td style='width: 5px; background-image: url(");
out.write(cxPath);
out.write("/images/parts/sidebar_top_grey_end.gif)\" width=5 align=right valign=top>" +
"<img src=\"");
out.write("/images/parts/sidebar_top_grey_end.gif)' align='right' valign='top'>" +
"<img src='");
out.write(cxPath);
out.write("/images/parts/sidebar_grey_03.gif\" width=5 height=5></td></tr>" +
out.write("/images/parts/sidebar_grey_03.gif' width='5' height='5' alt=''/></td></tr>" +
"<tr><td colspan='3'>");
// render the plugin
@@ -210,18 +207,18 @@ public class UISidebar extends SelfRenderingComponent
ResponseWriter out = context.getResponseWriter();
String cxPath = context.getExternalContext().getRequestContextPath();
out.write("</td></tr>" +
"<tr><td height=12 width=5><img src=\"");
"<tr><td style='height: 12px; width: 5px;'><img src='");
out.write(cxPath);
out.write("/images/parts/sidebar_bottom_grey_begin.gif\" width=5 height=12></td>" +
"<td width=100% style=\"background-image: url(");
out.write("/images/parts/sidebar_bottom_grey_begin.gif' width='5' height='12' alt=''/></td>" +
"<td style='width: 100%; background-image: url(");
out.write(cxPath);
out.write("/images/parts/sidebar_bottom_grey_bg.gif)\">" +
"<img src=\"");
out.write("/images/parts/sidebar_bottom_grey_bg.gif)'>" +
"<img src='");
out.write(cxPath);
out.write("/images/parts/sidebar_bottom_grey_bg.gif\" width=48 height=12></td>" +
"<td align=right width=5><img src=\"");
out.write("/images/parts/sidebar_bottom_grey_bg.gif' width='48' height='12' alt=''/></td>" +
"<td align='right' style='width: 5px;'><img src='");
out.write(cxPath);
out.write("/images/parts/sidebar_bottom_grey_end.gif\" width=5 height=12></td></tr>" +
out.write("/images/parts/sidebar_bottom_grey_end.gif' width='5' height='12' alt=''/></td></tr>" +
"</table>" +
"</div>");
}

View File

@@ -182,7 +182,7 @@ public class UISimpleSearch extends UICommand
ResourceBundle bundle = (ResourceBundle)Application.getBundle(context);
// script for dynamic simple search menu drop-down options
out.write("<script>");
out.write("<script type='text/javascript'>");
out.write("function _noenter(event) {" +
"if (event && event.keyCode == 13) {" +
" _searchSubmit();return false; }" +
@@ -194,49 +194,49 @@ public class UISimpleSearch extends UICommand
out.write("</script>");
// outer table containing search drop-down icon, text box and search Go image button
out.write("<table cellspacing=4 cellpadding=0>");
out.write("<table cellspacing='4' cellpadding='0'>");
out.write("<tr><td style='padding-top:2px'>");
String searchImage = Utils.buildImageTag(context, "/images/icons/search_icon.gif", 15, 15,
bundle.getString(MSG_GO), "_searchSubmit();");
out.write(Utils.buildImageTag(context, "/images/icons/search_controls.gif", 27, 13,
bundle.getString(MSG_OPTIONS), "javascript:_toggleMenu(event, '_alfsearch');"));
bundle.getString(MSG_OPTIONS), "javascript:_toggleMenu(event, 'alfsearch_menu');"));
// dynamic DIV area containing search options
out.write("<br><div id='_alfsearch' style='position:absolute;display:none'>");
out.write("<table border=0 class='moreActionsMenu' cellspacing=4 cellpadding=0>");
out.write("<br><div id='alfsearch_menu' style='position:absolute;display:none'>");
out.write("<table border='0' class='moreActionsMenu' cellspacing='4' cellpadding='0'>");
// output each option - setting the current one to CHECKED
String optionFieldName = getClientId(context) + NamingContainer.SEPARATOR_CHAR + OPTION_PARAM;
String radioOption = "<tr><td class='userInputForm'><input type='radio' name='" + optionFieldName + "'";
String radioOption = "<tr><td class='userInputForm' style='white-space:nowrap;'><input type='radio' name='" + optionFieldName + "'";
out.write(radioOption);
out.write(" VALUE='0'");
out.write(" value='0'");
int searchMode = getSearchMode();
if (searchMode == 0) out.write(" CHECKED");
out.write("><nobr>" + bundle.getString(MSG_ALL_ITEMS) + "</nobr></td></tr>");
if (searchMode == 0) out.write(" checked='checked'");
out.write("/>" + bundle.getString(MSG_ALL_ITEMS) + "</td></tr>");
out.write(radioOption);
out.write(" VALUE='1'");
if (searchMode == 1) out.write(" CHECKED");
out.write("><nobr>" + bundle.getString(MSG_FILE_NAMES_CONTENTS) + "</nobr></td></tr>");
out.write(" value='1'");
if (searchMode == 1) out.write(" checked='checked'");
out.write("/>" + bundle.getString(MSG_FILE_NAMES_CONTENTS) + "</td></tr>");
out.write(radioOption);
out.write(" VALUE='2'");
if (searchMode == 2) out.write(" CHECKED");
out.write("><nobr>" + bundle.getString(MSG_FILE_NAMES_ONLY) + "</nobr></td></tr>");
out.write(" value='2'");
if (searchMode == 2) out.write(" checked='checked'");
out.write("/>" + bundle.getString(MSG_FILE_NAMES_ONLY) + "</td></tr>");
out.write(radioOption);
out.write(" VALUE='3'");
if (searchMode == 3) out.write(" CHECKED");
out.write("><nobr>" + bundle.getString(MSG_SPACE_NAMES_ONLY) + "</nobr></td></tr>");
out.write(" value='3'");
if (searchMode == 3) out.write(" checked='checked'");
out.write("/>" + bundle.getString(MSG_SPACE_NAMES_ONLY) + "</td></tr>");
// row with table containing advanced search link and Search Go button
out.write("<tr><td><table width=100%><tr><td>");
out.write("<tr><td><table width='100%'><tr><td>");
// generate a link that will cause an action event to navigate to the advanced search screen
out.write("<a class='small' href='#' onclick=\"");
out.write(Utils.generateFormSubmit(context, this, Utils.getActionHiddenFieldName(context, this), ADVSEARCH_PARAM));
out.write("\">");
out.write(bundle.getString(MSG_ADVANCED_SEARCH));
out.write("</a>");
out.write("</td><td align=right>");
out.write("</td><td align='right'>");
out.write(searchImage);
out.write("</td></tr></table></td></tr>");
out.write("</table></div>");
@@ -273,14 +273,7 @@ public class UISimpleSearch extends UICommand
*/
public String getLastSearch()
{
if (search != null)
{
return this.search.getText();
}
else
{
return "";
}
return this.search != null ? this.search.getText() : "";
}
/**
@@ -288,21 +281,14 @@ public class UISimpleSearch extends UICommand
*/
public int getSearchMode()
{
if (search != null)
{
return this.search.getMode();
}
else
{
return SearchContext.SEARCH_ALL;
}
return this.search != null ? this.search.getMode() : SearchContext.SEARCH_ALL;
}
// ------------------------------------------------------------------------------
// Private data
private static Log logger = LogFactory.getLog(UISimpleSearch.class);
private static final Log logger = LogFactory.getLog(UISimpleSearch.class);
/** I18N message Ids */
private static final String MSG_ADVANCED_SEARCH = "advanced_search";

View File

@@ -46,10 +46,29 @@ public class PageTag extends TagSupport
private static final long serialVersionUID = 8142765393181557228L;
private final static String SCRIPTS_START = "<script type=\"text/javascript\" src=\"";
private final static String SCRIPTS_MENU = "/scripts/menu.js\"></script>";
private final static String SCRIPTS_WEBDAV = "/scripts/webdav.js\"></script>";
private final static String SCRIPTS_END = "\"></script>\n";
private final static String STYLES_START = "<link rel=\"stylesheet\" href=\"";
private final static String STYLES_MAIN = "/css/main.css\" TYPE=\"text/css\">\n";
private final static String STYLES_MAIN = "/css/main.css\" type=\"text/css\">\n";
private final static String[] SCRIPTS =
{
// menu javascript
"/scripts/menu.js",
// webdav javascript
"/scripts/webdav.js",
// base yahoo file
"/scripts/ajax/yahoo/yahoo/yahoo-min.js",
// io handling (AJAX)
"/scripts/ajax/yahoo/connection/connection-min.js",
// event handling
"/scripts/ajax/yahoo/event/event-min.js",
// mootools
"/scripts/ajax/mootools.v1.11.js",
// common Alfresco util methods
"/scripts/ajax/common.js",
// pop-up panel helper objects
"/scripts/ajax/summary-info.js"
};
/**
* Please ensure you understand the terms of the license before changing the contents of this file.
@@ -131,7 +150,7 @@ public class PageTag extends TagSupport
String reqPath = ((HttpServletRequest)pageContext.getRequest()).getContextPath();
Writer out = pageContext.getOut();
if (Application.inPortalServer() == false)
if (!Application.inPortalServer())
{
out.write("<html><head><title>");
if (this.titleId != null && this.titleId.length() != 0)
@@ -146,10 +165,10 @@ public class PageTag extends TagSupport
{
out.write("Alfresco Web Client");
}
out.write("</title>");
out.write("<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"" + reqPath + "/wcservice/api/search/keyword/description.xml\" title=\"Alfresco Keyword Search\"/>");
out.write("</head>");
out.write("<body>\n");
out.write("</title>\n");
out.write("<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"" + reqPath +
"/wcservice/api/search/keyword/description.xml\" title=\"Alfresco Keyword Search\">\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
}
// CSS style includes
@@ -157,51 +176,25 @@ public class PageTag extends TagSupport
out.write(reqPath);
out.write(STYLES_MAIN);
// menu javascript
for (final String s : PageTag.SCRIPTS)
{
out.write(SCRIPTS_START);
out.write(reqPath);
out.write(SCRIPTS_MENU);
// webdav javascript
out.write(SCRIPTS_START);
out.write(reqPath);
out.write(SCRIPTS_WEBDAV);
// base yahoo file
out.write("<script type=\"text/javascript\" src=\"");
out.write(reqPath);
out.write("/scripts/ajax/yahoo/yahoo/yahoo-min.js\"></script>");
// io handling (AJAX)
out.write("<script type=\"text/javascript\" src=\"");
out.write(reqPath);
out.write("/scripts/ajax/yahoo/connection/connection-min.js\"></script>");
// event handling
out.write("<script type=\"text/javascript\" src=\"");
out.write(reqPath);
out.write("/scripts/ajax/yahoo/event/event-min.js\"></script>");
// mootools
out.write("<script type=\"text/javascript\" src=\"");
out.write(reqPath);
out.write("/scripts/ajax/mootools.v1.11.js\"></script>");
// common Alfresco util methods
out.write("<script type=\"text/javascript\" src=\"");
out.write(reqPath);
out.write("/scripts/ajax/common.js\"></script>");
// pop-up panel helper objects
out.write("<script type=\"text/javascript\" src=\"");
out.write(reqPath);
out.write("/scripts/ajax/summary-info.js\"></script>");
out.write(s);
out.write(SCRIPTS_END);
}
// set the context path used by some Alfresco script objects
out.write("<script type=\"text/javascript\">");
out.write("setContextPath('");
out.write(reqPath);
out.write("');</script>\n");
if (!Application.inPortalServer())
{
out.write("</head>");
out.write("<body>\n");
}
}
catch (IOException ioe)
{
@@ -224,7 +217,7 @@ public class PageTag extends TagSupport
pageContext.getOut().write(getAlfrescoButton());
}
if (Application.inPortalServer() == false)
if (!Application.inPortalServer())
{
pageContext.getOut().write("\n</body></html>");
}
@@ -259,20 +252,20 @@ public class PageTag extends TagSupport
private String getAlfrescoButton()
{
if (alfresco == null)
if (PageTag.alfresco == null)
{
HttpServletRequest req = (HttpServletRequest)pageContext.getRequest();
alfresco = "<center><table><tr><td>" +
final HttpServletRequest req = (HttpServletRequest)pageContext.getRequest();
PageTag.alfresco = ("<center><table style='margin: 0px auto;'><tr><td>" +
"<a href='" + ALF_URL + "'>" +
"<img border=0 alt='' title='" + ALF_TEXT + "' align=absmiddle src='" +
("http".equals(req.getScheme()) ? ALF_LOGO_HTTP : ALF_LOGO_HTTPS) +
"'>" +"</a></td><td align=center>" +
"<span class=footer>" + ALF_COPY +
"</span></td><td><a href='http://sourceforge.net/projects/alfresco'><img border=0 alt='' title='SourceForge' align=absmiddle src='" +
"<img style='vertical-align:middle;border-width:0px;' alt='' title='" + ALF_TEXT +
"' src='" + ("http".equals(req.getScheme()) ? ALF_LOGO_HTTP : ALF_LOGO_HTTPS) +
"'>" +"</a></td><td align='center'>" +
"<span class='footer'>" + ALF_COPY +
"</span></td><td><a href='http://sourceforge.net/projects/alfresco'>" +
"<img style='vertical-align:middle;border-width:0px' alt='' title='SourceForge' src='" +
req.getContextPath() + SF_LOGO + "'></a>" +
"</td></tr></table></center>";
"</td></tr></table></center>");
}
return alfresco;
return PageTag.alfresco;
}
}

View File

@@ -20,19 +20,19 @@
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
* http://www.alfresco.com/legal/licensing
--%>
<%-- Breadcrumb area --%>
<%-- Designed to support a variable height breadcrumb --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_1.gif" width=4 height=7></td>
<td width=100% style="background-image: url(<%=request.getContextPath()%>/images/parts/headbar_2.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_3.gif" width=4 height=7></td>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_1.gif" width="4" height="7" alt=""/></td>
<td style="width:100%; background-image: url(<%=request.getContextPath()%>/images/parts/headbar_2.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_3.gif" width="4" height="7" alt=""/></td>
</tr>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/headbar_4.gif)"></td>
<td bgcolor="#dfe6ed">
<td style="background-color: #dfe6ed;">
<%-- Breadcrumb component --%>
<div style="padding-left:8px" class="headbarTitle">
<a:breadcrumb value="#{NavigationBean.location}" styleClass="headbarLink" />
@@ -42,7 +42,7 @@
</tr>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_7.gif" width=4 height=10></td>
<td width=100% style="background-image: url(<%=request.getContextPath()%>/images/parts/headbar_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_9.gif" width=4 height=10></td>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_7.gif" width="4" height="10" alt=""/></td>
<td style="width: 100%; background-image: url(<%=request.getContextPath()%>/images/parts/headbar_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/headbar_9.gif" width="4" height="10" alt=""/></td>
</tr>

View File

@@ -20,74 +20,104 @@
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
* http://www.alfresco.com/legal/licensing
--%>
<%-- Title bar area --%>
<table cellspacing=0 cellpadding=2 width=100%>
<table cellspacing="0" cellpadding="2" width="100%">
<tr>
<%-- Top level toolbar and company logo area --%>
<td width=100%>
<table cellspacing=0 cellpadding=0 width=100%>
<td style="width:100%;">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="padding-right:4px;"><a:actionLink image="/images/logo/AlfrescoLogo32.png" value="Alfresco" tooltip="Alfresco" showLink="false" action="about" /></td>
<td><img src="<%=request.getContextPath()%>/images/parts/titlebar_begin.gif" width=10 height=31></td>
<td width=100% style="background-image: url(<%=request.getContextPath()%>/images/parts/titlebar_bg.gif); background-repeat:repeat-x">
<td style="padding-right:4px;"><a:actionLink id="about_alfresco" image="/images/logo/AlfrescoLogo32.png" value="Alfresco" tooltip="Alfresco" showLink="false" action="about" /></td>
<td><img src="<%=request.getContextPath()%>/images/parts/titlebar_begin.gif" width="10" height="31" alt=""/></td>
<td style="width: 100%; background-image: url(<%=request.getContextPath()%>/images/parts/titlebar_bg.gif); background-repeat:repeat-x">
<%-- Toolbar --%>
<a:modeList itemSpacing="3" iconColumnWidth="0" horizontal="true"
itemStyleClass="topToolbar" itemLinkStyleClass="topToolbarLink" selectedStyleClass="topToolbar" selectedLinkStyleClass="topToolbarLink"
value="#{NavigationBean.toolbarLocation}" actionListener="#{NavigationBean.toolbarLocationChanged}">
<a:modeList itemSpacing="3"
iconColumnWidth="0"
horizontal="true"
itemStyleClass="topToolbar"
itemLinkStyleClass="topToolbarLink"
selectedStyleClass="topToolbar"
selectedLinkStyleClass="topToolbarLink"
value="#{NavigationBean.toolbarLocation}"
actionListener="#{NavigationBean.toolbarLocationChanged}">
<a:listItem value="companyhome" label="#{msg.company_home}" rendered="#{NavigationBean.companyHomeVisible}" />
<a:listItem value="userhome" label="#{msg.my_home}" />
<a:listItem value="guesthome" label="#{msg.guest_home}" rendered="#{NavigationBean.isGuest == false && NavigationBean.guestHomeVisible}" />
<a:listItem value="guesthome"
label="#{msg.guest_home}"
rendered="#{!NavigationBean.isGuest && NavigationBean.guestHomeVisible}" />
<a:listItem value="myalfresco" label="#{msg.my_alfresco}" />
</a:modeList>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/titlebar_end.gif" width=8 height=31></td>
<td><img src="<%=request.getContextPath()%>/images/parts/titlebar_end.gif" width="8" height="31" alt=""/></td>
</tr>
</table>
</td>
<%-- Help area --%>
<td>
<table cellspacing=2 cellpadding=0 width=100%>
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td>
<%-- admin user only actions --%>
<a:booleanEvaluator value="#{NavigationBean.currentUser.admin == true}" id="evalA">
<a:actionLink value="#{msg.admin_console}" image="/images/icons/admin_console.gif" showLink="false" action="dialog:adminConsole" id="link11_1" />
<a:booleanEvaluator value="#{NavigationBean.currentUser.admin}" id="evalA">
<a:actionLink value="#{msg.admin_console}"
image="/images/icons/admin_console.gif"
showLink="false"
action="dialog:adminConsole"
id="alf_admin_console" />
</a:booleanEvaluator>
</td>
<td width=12>&nbsp;</td>
<td style="width:12px;">&nbsp;</td>
<td>
<%-- user preferences --%>
<a:actionLink value="#{msg.user_console}" image="/images/icons/user_console.gif" showLink="false" action="dialog:userConsole" actionListener="#{UsersBean.setupUserAction}" id="link11_2">
<a:actionLink value="#{msg.user_console}"
image="/images/icons/user_console.gif"
showLink="false"
action="dialog:userConsole"
actionListener="#{UsersBean.setupUserAction}"
id="alf_user_console">
<f:param name="id" value="#{NavigationBean.currentUser.person.id}" />
</a:actionLink>
</td>
<td width=8>&nbsp;</td>
<td><a:actionLink value="#{msg.toggle_shelf}" image="/images/icons/shelf.gif" showLink="false" actionListener="#{NavigationBean.toggleShelf}" /></td>
<td width=8>&nbsp;</td>
<td><a:actionLink value="#{msg.help}" image="/images/icons/Help_icon.gif" showLink="false" href="#{NavigationBean.helpUrl}" target="help" /></td>
<td width=8>&nbsp;</td>
<td><nobr><a href="http://www.alfresco.com/services/support/issues/" target="new"><h:outputText value="#{msg.raise_issue}" /></a></nobr></td>
<td width=8>&nbsp;</td>
<td><nobr>
<a:actionLink id="logout" image="/images/icons/logout.gif" value="#{msg.logout} (#{NavigationBean.currentUser.userName})" rendered="#{NavigationBean.isGuest == false}" action="#{LoginBean.logout}" immediate="true" />
<a:actionLink id="login" image="/images/icons/login.gif" value="#{msg.login} (#{NavigationBean.currentUser.userName})" rendered="#{NavigationBean.isGuest == true}" action="#{LoginBean.logout}" />
</nobr></td>
<td style="width:8px;">&nbsp;</td>
<td>
<a:actionLink id="alf_toggle_shelf"
value="#{msg.toggle_shelf}"
image="/images/icons/shelf.gif"
showLink="false"
actionListener="#{NavigationBean.toggleShelf}" />
</td>
<td style="width:8px;">&nbsp;</td>
<td>
<a:actionLink id="alf_help"
value="#{msg.help}"
image="/images/icons/Help_icon.gif"
showLink="false"
href="#{NavigationBean.helpUrl}"
target="help" />
</td>
<td style="width:8px;">&nbsp;</td>
<td style="white-space:nowrap;"><a href="http://www.alfresco.com/services/support/issues/" target="new"><h:outputText value="#{msg.raise_issue}" /></a></td>
<td style="width:8px;">&nbsp;</td>
<td style="white-space:nowrap;">
<a:actionLink id="logout" image="/images/icons/logout.gif" value="#{msg.logout} (#{NavigationBean.currentUser.userName})" rendered="#{!NavigationBean.isGuest}" action="#{LoginBean.logout}" immediate="true" />
<a:actionLink id="login" image="/images/icons/login.gif" value="#{msg.login} (#{NavigationBean.currentUser.userName})" rendered="#{NavigationBean.isGuest}" action="#{LoginBean.logout}" />
</td>
</tr>
</table>
</td>
<%-- Search area --%>
<td>
<table cellspacing=0 cellpadding=0 width=100%>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/searchbar_begin.gif" width=6 height=31></td>
<td width=100% style="background-image: url(<%=request.getContextPath()%>/images/parts/searchbar_bg.gif)">
<td><img src="<%=request.getContextPath()%>/images/parts/searchbar_begin.gif" width="6" height="31" alt=""/></td>
<td style="width:100%; background-image: url(<%=request.getContextPath()%>/images/parts/searchbar_bg.gif);">
<r:simpleSearch id="search" actionListener="#{BrowseBean.search}" />
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/searchbar_end.gif" width=6 height=31></td>
<td><img src="<%=request.getContextPath()%>/images/parts/searchbar_end.gif" width="6" height="31" alt=""/></td>
</tr>
</table>
</td>

View File

@@ -20,7 +20,7 @@
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
* http://www.alfresco.com/legal/licensing
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
@@ -32,7 +32,6 @@
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.app.Application" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page title="<%=Application.getWizardManager().getTitle() %>">
<f:view>
@@ -67,15 +66,15 @@
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#dfe6ed">
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif); width:4px;"></td>
<td style="background-color: #dfe6ed;">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<table cellspacing="4" cellpadding="0" style="width:100%;">
<tr>
<td width="32">
<h:graphicImage id="wizard-logo" url="#{WizardManager.icon}" />
<td style="width:32px;">
<h:graphicImage id="wizard-logo" url="#{WizardManager.icon}" alt=""/>
</td>
<td>
<div class="mainTitle"><h:outputText value="#{WizardManager.title}" /></div>
@@ -85,25 +84,25 @@
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif); width: 4px;"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9" alt=""/></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9" alt=""/></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif); width:4px;"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<table cellspacing="0" cellpadding="3" border="0" style="width: 100%;">
<tr>
<td width="20%" valign="top">
<td style="width:20%;" valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
<h:outputText styleClass="mainSubTitle" value="#{msg.steps}"/><br>
<h:outputText styleClass="mainSubTitle" value="#{msg.steps}"/><br/>
<a:modeList itemSpacing="3" iconColumnWidth="2" selectedStyleClass="statusListHighlight"
value="#{WizardManager.currentStepAsString}" disabled="true">
<a:listItems value="#{WizardManager.stepItems}" />
@@ -111,12 +110,12 @@
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
</td>
<td width="100%" valign="top">
<td style="width:100%;" valign="top">
<a:errors message="#{WizardManager.errorMessage}" styleClass="errorMessage" />
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<table cellpadding="2" cellspacing="2" style="border-width: 0px; width: 100%;">
<tr>
<td class="mainSubTitle"><h:outputText value="#{WizardManager.stepTitle}" /></td>
</tr>
@@ -125,7 +124,7 @@
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td width="100%" valign="top">
<td style="width: 100%;" valign="top">
<f:subview id="wizard-body">
<jsp:include page="<%=Application.getWizardManager().getPage() %>" />
</f:subview>
@@ -180,14 +179,14 @@
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif); width: 4px;"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4" alt=""/></td>
<td align="center" style="width: 100%; background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4" alt=""/></td>
</tr>
</table>