mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to some IE6 related issues with portlet template refactoring, improved exception handing in WebScriptServlet
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign='middle' align='center'>
|
||||
<td valign="middle" align="center">
|
||||
<#assign isImage=node.isDocument && (node.mimetype = "image/gif" || node.mimetype = "image/jpeg" || node.mimetype = "image/png")>
|
||||
<#assign isVideo=node.isDocument && node.mimetype?starts_with("video/")>
|
||||
<#if isImage>
|
||||
@@ -33,18 +33,16 @@
|
||||
<embed width="320" height="240" src="${url.context}${node.url}" border="0" showcontrols="1" showdisplay="0" showstatusbar="0" autosize="1" autoplay="0" autoStart="0"></embed>
|
||||
</object>
|
||||
<#else>
|
||||
<table cellspacing=0 cellpadding=0 border=0>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border: thin solid #cccccc; padding:4px">
|
||||
<a href="${url.context}${node.url}" target="new"><img src="${url.context}${node.icon32}" width=32 height=32 border=0></a>
|
||||
<a href="${url.context}${node.url}" target="new"><img src="${url.context}${node.icon32}" width="32" height="32" border="0"></a>
|
||||
</div>
|
||||
</td>
|
||||
<td><img src="${url.context}/images/parts/rightSideShadow42.gif" width=6 height=42></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2><img src="${url.context}/images/parts/bottomShadow42.gif" width=48 height=5></td>
|
||||
<td><img src="${url.context}/images/parts/rightSideShadow42.gif" width="6" height="42"></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"><img src="${url.context}/images/parts/bottomShadow42.gif" width="48" height="5"></td></tr>
|
||||
</table>
|
||||
</#if>
|
||||
</td>
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/yahoo/yahoo-min.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/connection/connection-min.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.1.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/common.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/summary-info.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.1.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/doclist.js"></script>
|
||||
<script type="text/javascript">setContextPath('${url.context}');</script>
|
||||
|
||||
@@ -60,15 +60,13 @@
|
||||
<#assign count=count+1>
|
||||
<div class="docRow">
|
||||
<div class="docIcon">
|
||||
<a href="${url.context}${d.url}" target="new"><img class="docIconImage" alt="document" width="16" height="16" src="${url.context}${d.icon16?replace(".gif",".png")}" border=0></a>
|
||||
<a href="${url.context}${d.url}" target="new"><img class="docIconImage" alt="${d.name}" width="16" height="16" src="${url.context}${d.icon16?replace(".gif",".png")}" border=0></a>
|
||||
</div>
|
||||
<div class="docRowTitle">
|
||||
<div class="docItem">
|
||||
${d.name?html}
|
||||
<span class="docInfo" onclick="event.cancelBubble=true; AlfNodeInfoMgr.toggle('${d.nodeRef}',this);">
|
||||
<img src="${url.context}/images/icons/popup.gif" class="popupImage" width="16" height="16" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="docItem">
|
||||
${d.name?html}
|
||||
<span class="docInfo" onclick="event.cancelBubble=true; AlfNodeInfoMgr.toggle('${d.nodeRef}',this);">
|
||||
<img src="${url.context}/images/icons/popup.gif" class="popupImage" width="16" height="16" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="docDetail">
|
||||
<table cellpadding="2" cellspacing="0" border="0">
|
||||
@@ -151,13 +149,6 @@ a.docfilterLinkSelected:link, a.docfilterLinkSelected:visited
|
||||
border-bottom: 1px solid #CCD4DB;
|
||||
}
|
||||
|
||||
.docRowAlt
|
||||
{
|
||||
padding-top: 4px;
|
||||
border-bottom: 1px solid #CCD4DB;
|
||||
background-color: #EEF7FB;
|
||||
}
|
||||
|
||||
.docFooter
|
||||
{
|
||||
width: 700px;
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/yahoo/yahoo-min.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/connection/connection-min.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.1.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/common.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/summary-info.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.1.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mytasks.js"></script>
|
||||
<script type="text/javascript">setContextPath('${url.context}');</script>
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/yahoo/yahoo-min.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/yahoo/connection/connection-min.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.1.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/common.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/summary-info.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/mootools.v1.1.js"></script>
|
||||
<script type="text/javascript" src="/alfresco/scripts/ajax/myforms.js"></script>
|
||||
<script type="text/javascript">setContextPath('${url.context}');</script>
|
||||
|
||||
|
@@ -91,15 +91,8 @@ public class WebScriptServlet extends HttpServlet
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Processing request (" + req.getMethod() + ") " + req.getRequestURL() + (req.getQueryString() != null ? "?" + req.getQueryString() : ""));
|
||||
|
||||
try
|
||||
{
|
||||
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, authenticator, req, res);
|
||||
runtime.executeScript();
|
||||
}
|
||||
catch(Throwable e)
|
||||
{
|
||||
res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, authenticator, req, res);
|
||||
runtime.executeScript();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -211,6 +211,114 @@ function getContextPath()
|
||||
return txt;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the x/y position of the element in page coordinates.
|
||||
* Takes all parent scrollable containers into account.
|
||||
*/
|
||||
getPageXY: function(el)
|
||||
{
|
||||
var parentNode = null;
|
||||
var pos = new Object();
|
||||
|
||||
if (el.getBoundingClientRect) // IE
|
||||
{
|
||||
var box = el.getBoundingClientRect();
|
||||
var doc = document;
|
||||
|
||||
var scrollTop = Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
|
||||
var scrollLeft = Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
|
||||
|
||||
pos.x = box.left + scrollLeft;
|
||||
pos.y = box.top + scrollTop;
|
||||
|
||||
return pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
// firefox, opera
|
||||
pos.x = el.offsetLeft;
|
||||
pos.y = el.offsetTop;
|
||||
parentNode = el.offsetParent;
|
||||
if (parentNode != el)
|
||||
{
|
||||
while (parentNode)
|
||||
{
|
||||
pos.x += parentNode.offsetLeft;
|
||||
pos.y += parentNode.offsetTop;
|
||||
parentNode = parentNode.offsetParent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (el.parentNode)
|
||||
{
|
||||
parentNode = el.parentNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
parentNode = null;
|
||||
}
|
||||
|
||||
while (parentNode && parentNode.tagName.toUpperCase() != 'BODY' && parentNode.tagName.toUpperCase() != 'HTML')
|
||||
{
|
||||
// account for any scrolled ancestors
|
||||
if ($(parentNode).getStyle('display') != 'inline')
|
||||
{
|
||||
pos.x -= parentNode.scrollLeft;
|
||||
pos.y -= parentNode.scrollTop;
|
||||
}
|
||||
|
||||
if (parentNode.parentNode)
|
||||
{
|
||||
parentNode = parentNode.parentNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
parentNode = null;
|
||||
}
|
||||
}
|
||||
|
||||
return pos;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the height of the document.
|
||||
*/
|
||||
getDocumentHeight: function()
|
||||
{
|
||||
var scrollHeight = (document.compatMode != 'CSS1Compat') ? document.body.scrollHeight : document.documentElement.scrollHeight;
|
||||
return Math.max(scrollHeight, this.getViewportHeight());
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the width of the document.
|
||||
*/
|
||||
getDocumentWidth: function()
|
||||
{
|
||||
var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth;
|
||||
return Math.max(scrollWidth, this.getViewportWidth());
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the current height of the viewport.
|
||||
*/
|
||||
getViewportHeight: function()
|
||||
{
|
||||
return (document.compatMode == 'CSS1Compat') ?
|
||||
document.documentElement.clientHeight : // Standards
|
||||
document.body.clientHeight; // Quirks
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the current width of the viewport.
|
||||
*/
|
||||
getViewportWidth: function()
|
||||
{
|
||||
return (document.compatMode == 'CSS1Compat') ?
|
||||
document.documentElement.clientWidth : // Standards
|
||||
document.body.clientWidth; // Quirks
|
||||
},
|
||||
|
||||
/**
|
||||
* Aligns an element against the specified element. Automatically adjusts the element above or to
|
||||
* the left of the destination if the element would cause a scrollbar to appear.
|
||||
@@ -221,12 +329,11 @@ function getContextPath()
|
||||
*/
|
||||
smartAlignElement: function (el, destEl, maxwidth)
|
||||
{
|
||||
// extend elements with useful mootools prototypes
|
||||
// extend element with useful mootools prototypes
|
||||
el = $(el);
|
||||
destEl = $(destEl);
|
||||
|
||||
// get the position of the element we are aligning against
|
||||
var pos = destEl.getPosition();
|
||||
var pos = this.getPageXY(destEl);
|
||||
|
||||
// calculate display position for the element
|
||||
var region = el.getCoordinates();
|
||||
@@ -237,7 +344,7 @@ function getContextPath()
|
||||
{
|
||||
if (elWidth > maxwidth) elWidth = maxwidth;
|
||||
}
|
||||
var docWidth = Window.innerWidth + Window.scrollMaxX;
|
||||
var docWidth = this.getDocumentWidth();
|
||||
if (pos.x + 20 + elWidth < docWidth)
|
||||
{
|
||||
el.style.left = (pos.x + 20) + "px";
|
||||
@@ -247,7 +354,7 @@ function getContextPath()
|
||||
// Shifting X coord left - overflow
|
||||
el.style.left = (pos.x + 20 - ((pos.x + elWidth) - docWidth)) + "px";
|
||||
}
|
||||
if (pos.y + 12 + elHeight < (Window.innerHeight + Window.scrollMaxY))
|
||||
if (pos.y + 12 + elHeight < this.getDocumentHeight())
|
||||
{
|
||||
el.style.top = (pos.y + 12) + "px";
|
||||
}
|
||||
|
Reference in New Issue
Block a user