mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6933: Various fixes for cross-site javascript and associated trickery to web-client UI screens Plus fixes to several dialogs broken in use-the-link dialog conversion changes. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -896,16 +896,12 @@ public final class Utils
|
||||
*
|
||||
* @return Populated <code>img</code> tag
|
||||
*/
|
||||
public static String buildImageTag(final FacesContext context,
|
||||
final String image,
|
||||
final int width,
|
||||
final int height,
|
||||
String alt,
|
||||
final String onclick,
|
||||
final String verticalAlign)
|
||||
public static String buildImageTag(FacesContext context, String image, int width, int height,
|
||||
String alt, String onclick, String verticalAlign)
|
||||
{
|
||||
StringBuilder buf = new StringBuilder(200);
|
||||
StringBuilder style = new StringBuilder("border-width:0px;");
|
||||
|
||||
String style = "border-width:0px;";
|
||||
buf.append("<img src='")
|
||||
.append(context.getExternalContext().getRequestContextPath())
|
||||
.append(image)
|
||||
@@ -931,15 +927,20 @@ public final class Utils
|
||||
|
||||
if (verticalAlign != null)
|
||||
{
|
||||
style.append("vertical-align:").append(verticalAlign).append(";");
|
||||
StringBuilder styleBuf = new StringBuilder(40);
|
||||
styleBuf.append(style).append("vertical-align:").append(verticalAlign).append(";");
|
||||
style = styleBuf.toString();
|
||||
}
|
||||
|
||||
if (onclick != null)
|
||||
{
|
||||
buf.append(" onclick=\"").append(onclick).append('"');
|
||||
style.append("cursor:pointer;");
|
||||
StringBuilder styleBuf = new StringBuilder(style.length() + 16);
|
||||
styleBuf.append(style).append("cursor:pointer;");
|
||||
style = styleBuf.toString();
|
||||
}
|
||||
buf.append(" style='").append(style).append("'/>");
|
||||
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
@@ -986,18 +987,15 @@ public final class Utils
|
||||
*
|
||||
* @return Populated <code>img</code> tag
|
||||
*/
|
||||
public static String buildImageTag(final FacesContext context,
|
||||
final String image,
|
||||
String alt,
|
||||
final String verticalAlign)
|
||||
public static String buildImageTag(FacesContext context, String image, String alt, String verticalAlign)
|
||||
{
|
||||
final StringBuilder buf = new StringBuilder(128);
|
||||
StringBuilder buf = new StringBuilder(128);
|
||||
buf.append("<img src='")
|
||||
.append(context.getExternalContext().getRequestContextPath())
|
||||
.append(image)
|
||||
.append("' ");
|
||||
|
||||
final StringBuilder style = new StringBuilder("border-width:0px;");
|
||||
String style = "border-width:0px;";
|
||||
if (alt != null)
|
||||
{
|
||||
alt = Utils.encode(alt);
|
||||
@@ -1014,7 +1012,9 @@ public final class Utils
|
||||
|
||||
if (verticalAlign != null)
|
||||
{
|
||||
style.append("vertical-align:").append(verticalAlign).append(";");
|
||||
StringBuilder styleBuf = new StringBuilder(40);
|
||||
styleBuf.append(style).append("vertical-align:").append(verticalAlign).append(";");
|
||||
style = styleBuf.toString();
|
||||
}
|
||||
|
||||
buf.append(" style='").append(style).append("'/>");
|
||||
|
Reference in New Issue
Block a user